Kaydet (Commit) 1a860b8d authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS presenterscreen (1.2.4); FILE MERGED

2008/04/30 07:51:56 af 1.2.4.6: #i88853# PresenterSlideShowView is no longer a service.
2008/04/22 13:01:48 af 1.2.4.5: #i18486# Made extension identifier platform specific.
2008/04/22 08:30:39 af 1.2.4.4: #i18486# Changed startup details.  Remembering the extension path.
2008/04/22 08:27:17 af 1.2.4.3: RESYNC: (1.2-1.3); FILE MERGED
2008/04/18 09:01:28 af 1.2.4.2: #i18486# Added missing PresenterSlideShowView service.
2008/04/16 16:30:21 af 1.2.4.1: #i18486# Dropped dependence on non-URE libraries.
üst 980a5b50
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* $RCSfile: PresenterComponent.cxx,v $ * $RCSfile: PresenterComponent.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* This file is part of OpenOffice.org. * This file is part of OpenOffice.org.
* *
...@@ -30,35 +30,122 @@ ...@@ -30,35 +30,122 @@
************************************************************************/ ************************************************************************/
#include "PresenterComponent.hxx" #include "PresenterComponent.hxx"
#include <rtl/instance.hxx> #include "cppuhelper/factory.hxx"
#include "cppuhelper/implementationentry.hxx"
#include <com/sun/star/deployment/DeploymentException.hpp>
#include <com/sun/star/deployment/XPackageInformationProvider.hpp>
#include "PresenterPane.hxx" #include "PresenterExtensionIdentifier.hxx"
#include "PresenterPaneBorderManager.hxx"
#include "PresenterProtocolHandler.hxx" #include "PresenterProtocolHandler.hxx"
#include "PresenterScreen.hxx" #include "PresenterScreen.hxx"
#include "PresenterSlideShowView.hxx"
#include "PresenterSpritePane.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang; using namespace cppu;
using namespace osl;
using ::rtl::OUString; using ::rtl::OUString;
namespace sdext { namespace presenter { namespace sdext { namespace presenter {
namespace { static OUString gsBasePath;
void RegisterServices (void)
::rtl::OUString PresenterComponent::GetBasePath (
const Reference<XComponentContext>& rxComponentContext)
{
return GetBasePath(rxComponentContext, gsExtensionIdentifier);
}
::rtl::OUString PresenterComponent::GetBasePath (
const Reference<XComponentContext>& rxComponentContext,
const OUString& rsExtensionIdentifier)
{
if (gsBasePath.getLength() == 0)
{ {
OAutoRegistration<PresenterPane>(); // Determine the base path of the bitmaps.
OAutoRegistration<PresenterPaneBorderManager>(); Reference<deployment::XPackageInformationProvider> xInformationProvider (
OAutoRegistration<PresenterProtocolHandler>(); rxComponentContext->getValueByName(
OAutoRegistration<PresenterScreen>(); OUString(RTL_CONSTASCII_USTRINGPARAM(
OAutoRegistration<PresenterSlideShowView>(); "/singletons/com.sun.star.deployment.PackageInformationProvider"))),
OAutoRegistration<PresenterSpritePane>(); UNO_QUERY);
if (xInformationProvider.is())
{
try
{
gsBasePath = xInformationProvider->getPackageLocation(rsExtensionIdentifier)
+ OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
}
catch(deployment::DeploymentException&)
{
}
}
} }
return gsBasePath;
} }
IMPLEMENT_COMPONENT_LIBRARY_API(PresenterComponent, RegisterServices);
IMPLEMENT_COMPONENT_MODULE(PresenterComponent);
rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
static struct ImplementationEntry gServiceEntries[] =
{
{
PresenterProtocolHandler::Create,
PresenterProtocolHandler::getImplementationName_static,
PresenterProtocolHandler::getSupportedServiceNames_static,
createSingleComponentFactory, &g_moduleCount.modCnt, 0
},
{
PresenterScreenJob::Create,
PresenterScreenJob::getImplementationName_static,
PresenterScreenJob::getSupportedServiceNames_static,
createSingleComponentFactory, 0, 0
},
{ 0, 0, 0, 0, 0, 0 }
};
extern "C"
{
sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
{
return g_moduleCount.canUnload( &g_moduleCount , pTime );
}
void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper(pServiceManager, pRegistryKey, gServiceEntries);
}
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , gServiceEntries);
}
}
} } // end of namespace sdext::presenter } } // end of namespace sdext::presenter
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment