1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: facreg.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
33 #include <com/sun/star/registry/XRegistryKey.hpp>
37 #include <cppuhelper/factory.hxx>
38 #include <uno/lbnames.h>
39 #include <sfx2/sfxmodelfactory.hxx>
40 #include "osl/diagnose.h"
41 #include "sal/types.h"
43 #ifndef INCLUDED_STRING_H
45 #define INCLUDED_STRING_H
47 #include <comphelper/stl_types.hxx>
49 #include <boost/shared_ptr.hpp>
52 using namespace com::sun::star
;
55 // Forward declarations of the factories.
57 extern uno::Reference
< uno::XInterface
> SAL_CALL
SdDrawingDocument_createInstance( const uno::Reference
< lang::XMultiServiceFactory
> & _rxFactory
, const sal_uInt64 _nCreationFlags
);
58 extern OUString
SdDrawingDocument_getImplementationName() throw( uno::RuntimeException
);
59 extern uno::Sequence
< OUString
> SAL_CALL
SdDrawingDocument_getSupportedServiceNames() throw( uno::RuntimeException
);
61 extern uno::Reference
< uno::XInterface
> SAL_CALL
SdPresentationDocument_createInstance( const uno::Reference
< lang::XMultiServiceFactory
> & _rxFactory
, const sal_uInt64 _nCreationFlags
);
62 extern OUString
SdPresentationDocument_getImplementationName() throw( uno::RuntimeException
);
63 extern uno::Sequence
< OUString
> SAL_CALL
SdPresentationDocument_getSupportedServiceNames() throw( uno::RuntimeException
);
65 extern uno::Reference
< uno::XInterface
> SAL_CALL
SdHtmlOptionsDialog_CreateInstance( const uno::Reference
< lang::XMultiServiceFactory
> & _rxFactory
);
66 extern OUString
SdHtmlOptionsDialog_getImplementationName() throw( uno::RuntimeException
);
67 extern uno::Sequence
< OUString
> SAL_CALL
SdHtmlOptionsDialog_getSupportedServiceNames() throw( uno::RuntimeException
);
69 extern uno::Reference
< uno::XInterface
> SAL_CALL
SdUnoModule_createInstance( const uno::Reference
< lang::XMultiServiceFactory
> & _rxFactory
);
70 extern OUString
SdUnoModule_getImplementationName() throw( uno::RuntimeException
);
71 extern uno::Sequence
< OUString
> SAL_CALL
SdUnoModule_getSupportedServiceNames() throw( uno::RuntimeException
);
75 extern uno::Reference
< uno::XInterface
> SAL_CALL
RandomNode_createInstance( const uno::Reference
< lang::XMultiServiceFactory
> & _rxFactory
);
76 extern OUString
RandomNode__getImplementationName() throw( uno::RuntimeException
);
77 extern uno::Sequence
< OUString
> SAL_CALL
RandomNode_getSupportedServiceNames() throw( uno::RuntimeException
);
80 namespace sd
{ namespace framework
{
82 extern uno::Reference
<uno::XInterface
> SAL_CALL
Configuration_createInstance(
83 const uno::Reference
<uno::XComponentContext
>& rxContext
)
84 throw(uno::Exception
);
85 extern OUString
Configuration_getImplementationName(void) throw (uno::RuntimeException
);
86 extern uno::Sequence
<OUString
> SAL_CALL
Configuration_getSupportedServiceNames (void)
87 throw (uno::RuntimeException
);
89 extern uno::Reference
<uno::XInterface
> SAL_CALL
ConfigurationController_createInstance(
90 const uno::Reference
<uno::XComponentContext
>& rxContext
)
91 throw(uno::Exception
);
92 extern OUString
ConfigurationController_getImplementationName(void) throw (uno::RuntimeException
);
93 extern uno::Sequence
<OUString
> SAL_CALL
ConfigurationController_getSupportedServiceNames (void)
94 throw (uno::RuntimeException
);
96 extern uno::Reference
<uno::XInterface
> SAL_CALL
ModuleController_createInstance(
97 const uno::Reference
<uno::XComponentContext
>& rxContext
)
98 throw(uno::Exception
);
99 extern OUString
ModuleController_getImplementationName(void) throw (uno::RuntimeException
);
100 extern uno::Sequence
<OUString
> SAL_CALL
ModuleController_getSupportedServiceNames (void)
101 throw (uno::RuntimeException
);
103 extern uno::Reference
<uno::XInterface
> SAL_CALL
BasicPaneFactory_createInstance(
104 const uno::Reference
<uno::XComponentContext
>& rxContext
)
105 throw(uno::Exception
);
106 extern OUString
BasicPaneFactory_getImplementationName(void) throw (uno::RuntimeException
);
107 extern uno::Sequence
<OUString
> SAL_CALL
BasicPaneFactory_getSupportedServiceNames (void)
108 throw (uno::RuntimeException
);
110 extern uno::Reference
<uno::XInterface
> SAL_CALL
BasicToolBarFactory_createInstance(
111 const uno::Reference
<uno::XComponentContext
>& rxContext
)
112 throw(uno::Exception
);
113 extern OUString
BasicToolBarFactory_getImplementationName(void) throw (uno::RuntimeException
);
114 extern uno::Sequence
<OUString
> SAL_CALL
BasicToolBarFactory_getSupportedServiceNames (void)
115 throw (uno::RuntimeException
);
117 extern uno::Reference
<uno::XInterface
> SAL_CALL
BasicViewFactory_createInstance(
118 const uno::Reference
<uno::XComponentContext
>& rxContext
)
119 throw(uno::Exception
);
120 extern OUString
BasicViewFactory_getImplementationName(void) throw (uno::RuntimeException
);
121 extern uno::Sequence
<OUString
> SAL_CALL
BasicViewFactory_getSupportedServiceNames (void)
122 throw (uno::RuntimeException
);
124 extern uno::Reference
<uno::XInterface
> SAL_CALL
TaskPanelFactory_createInstance(
125 const uno::Reference
<uno::XComponentContext
>& rxContext
)
126 throw(uno::Exception
);
127 extern OUString
TaskPanelFactory_getImplementationName(void) throw (uno::RuntimeException
);
128 extern uno::Sequence
<OUString
> SAL_CALL
TaskPanelFactory_getSupportedServiceNames (void)
129 throw (uno::RuntimeException
);
131 extern uno::Reference
<uno::XInterface
> SAL_CALL
ResourceId_createInstance(
132 const uno::Reference
<uno::XComponentContext
>& rxContext
)
133 throw(uno::Exception
);
134 extern OUString
ResourceId_getImplementationName(void) throw (uno::RuntimeException
);
135 extern uno::Sequence
<OUString
> SAL_CALL
ResourceId_getSupportedServiceNames (void)
136 throw (uno::RuntimeException
);
138 extern uno::Reference
<uno::XInterface
> SAL_CALL
PresentationFactoryProvider_createInstance(
139 const uno::Reference
<uno::XComponentContext
>& rxContext
)
140 throw(uno::Exception
);
141 extern OUString
PresentationFactoryProvider_getImplementationName(void)
142 throw (uno::RuntimeException
);
143 extern uno::Sequence
<OUString
> SAL_CALL
PresentationFactoryProvider_getSupportedServiceNames (void)
144 throw (uno::RuntimeException
);
148 namespace sd
{ namespace presenter
{
149 extern uno::Reference
<uno::XInterface
> SAL_CALL
SlideRenderer_createInstance(
150 const uno::Reference
<uno::XComponentContext
>& rxContext
)
151 throw(uno::Exception
);
152 extern OUString
SlideRenderer_getImplementationName(void)
153 throw (uno::RuntimeException
);
154 extern uno::Sequence
<OUString
> SAL_CALL
SlideRenderer_getSupportedServiceNames (void)
155 throw (uno::RuntimeException
);
157 extern uno::Reference
<uno::XInterface
> SAL_CALL
PresenterCanvas_createInstance(
158 const uno::Reference
<uno::XComponentContext
>& rxContext
)
159 throw(uno::Exception
);
160 extern OUString
PresenterCanvas_getImplementationName(void)
161 throw (uno::RuntimeException
);
162 extern uno::Sequence
<OUString
> SAL_CALL
PresenterCanvas_getSupportedServiceNames (void)
163 throw (uno::RuntimeException
);
165 extern uno::Reference
<uno::XInterface
> SAL_CALL
PresenterTextViewService_createInstance(
166 const uno::Reference
<uno::XComponentContext
>& rxContext
)
167 throw(uno::Exception
);
168 extern OUString
PresenterTextViewService_getImplementationName(void)
169 throw (uno::RuntimeException
);
170 extern uno::Sequence
<OUString
> SAL_CALL
PresenterTextViewService_getSupportedServiceNames (void)
171 throw (uno::RuntimeException
);
173 extern uno::Reference
<uno::XInterface
> SAL_CALL
PresenterHelperService_createInstance(
174 const uno::Reference
<uno::XComponentContext
>& rxContext
)
175 throw(uno::Exception
);
176 extern OUString
PresenterHelperService_getImplementationName(void)
177 throw (uno::RuntimeException
);
178 extern uno::Sequence
<OUString
> SAL_CALL
PresenterHelperService_getSupportedServiceNames (void)
179 throw (uno::RuntimeException
);
181 extern uno::Reference
<uno::XInterface
> SAL_CALL
PresenterPreviewCache_createInstance(
182 const uno::Reference
<uno::XComponentContext
>& rxContext
)
183 throw(uno::Exception
);
184 extern OUString
PresenterPreviewCache_getImplementationName(void)
185 throw (uno::RuntimeException
);
186 extern uno::Sequence
<OUString
> SAL_CALL
PresenterPreviewCache_getSupportedServiceNames (void)
187 throw (uno::RuntimeException
);
191 namespace sd
{ namespace slidesorter
{
192 extern uno::Reference
<uno::XInterface
> SAL_CALL
SlideSorterService_createInstance(
193 const uno::Reference
<uno::XComponentContext
>& rxContext
)
194 throw(uno::Exception
);
195 extern OUString
SlideSorterService_getImplementationName(void)
196 throw (uno::RuntimeException
);
197 extern uno::Sequence
<OUString
> SAL_CALL
SlideSorterService_getSupportedServiceNames (void)
198 throw (uno::RuntimeException
);
201 using namespace ::sd
;
202 using namespace ::sd::framework
;
203 using namespace ::sd::presenter
;
204 using namespace ::sd::slidesorter
;
209 // ----------------------------------------------------------------------------
210 // Declaration and initialization of a map from service names to locally
211 // unique factory identifiers.
215 SdDrawingDocumentFactoryId
,
216 SdPresentationDocumentFactoryId
,
217 SdHtmlOptionsDialogFactoryId
,
218 SdUnoModuleFactoryId
,
221 ConfigurationFactoryId
,
222 ConfigurationControllerFactoryId
,
223 ModuleControllerFactoryId
,
224 BasicPaneFactoryFactoryId
,
225 BasicToolBarFactoryFactoryId
,
226 BasicViewFactoryFactoryId
,
227 TaskPanelFactoryFactoryId
,
229 PresentationFactoryProviderFactoryId
,
230 SlideRendererFactoryId
,
231 PresenterCanvasFactoryId
,
232 PresenterTextViewServiceFactoryId
,
233 PresenterHelperServiceFactoryId
,
234 PresenterPreviewCacheFactoryId
,
235 SlideSorterServiceFactoryId
237 typedef ::std::hash_map
<OUString
, FactoryId
, comphelper::UStringHash
, comphelper::UStringEqual
> FactoryMap
;
241 static ::boost::shared_ptr
<FactoryMap
> spFactoryMap
;
242 ::boost::shared_ptr
<FactoryMap
> GetFactoryMap (void)
244 if (spFactoryMap
.get() == NULL
)
246 spFactoryMap
.reset(new FactoryMap
);
247 (*spFactoryMap
)[SdDrawingDocument_getImplementationName()] = SdDrawingDocumentFactoryId
;
248 (*spFactoryMap
)[SdPresentationDocument_getImplementationName()] = SdPresentationDocumentFactoryId
;
249 (*spFactoryMap
)[SdHtmlOptionsDialog_getImplementationName()] = SdHtmlOptionsDialogFactoryId
;
250 (*spFactoryMap
)[SdUnoModule_getImplementationName()] = SdUnoModuleFactoryId
;
251 (*spFactoryMap
)[RandomNode__getImplementationName()] = RandomNodeFactoryId
;
252 (*spFactoryMap
)[Configuration_getImplementationName()] = ConfigurationFactoryId
;
253 (*spFactoryMap
)[ConfigurationController_getImplementationName()] = ConfigurationControllerFactoryId
;
254 (*spFactoryMap
)[ModuleController_getImplementationName()] = ModuleControllerFactoryId
;
255 (*spFactoryMap
)[BasicPaneFactory_getImplementationName()] = BasicPaneFactoryFactoryId
;
256 (*spFactoryMap
)[BasicToolBarFactory_getImplementationName()] = BasicToolBarFactoryFactoryId
;
257 (*spFactoryMap
)[BasicViewFactory_getImplementationName()] = BasicViewFactoryFactoryId
;
258 (*spFactoryMap
)[TaskPanelFactory_getImplementationName()] = TaskPanelFactoryFactoryId
;
259 (*spFactoryMap
)[ResourceId_getImplementationName()] = ResourceIdFactoryId
;
260 (*spFactoryMap
)[PresentationFactoryProvider_getImplementationName()] = PresentationFactoryProviderFactoryId
;
261 (*spFactoryMap
)[SlideRenderer_getImplementationName()] = SlideRendererFactoryId
;
262 (*spFactoryMap
)[PresenterCanvas_getImplementationName()] = PresenterCanvasFactoryId
;
263 (*spFactoryMap
)[PresenterTextViewService_getImplementationName()] = PresenterTextViewServiceFactoryId
;
264 (*spFactoryMap
)[PresenterHelperService_getImplementationName()] = PresenterHelperServiceFactoryId
;
265 (*spFactoryMap
)[PresenterPreviewCache_getImplementationName()] = PresenterPreviewCacheFactoryId
;
266 (*spFactoryMap
)[SlideSorterService_getImplementationName()] = SlideSorterServiceFactoryId
;
270 } // end of anonymous namespace
278 SAL_DLLPUBLIC_EXPORT
void SAL_CALL
component_getImplementationEnvironment(
279 const sal_Char
** ppEnvTypeName
,
282 *ppEnvTypeName
= CPPU_CURRENT_LANGUAGE_BINDING_NAME
;
285 static void SAL_CALL
writeInfo(
286 registry::XRegistryKey
* pRegistryKey
,
287 const OUString
& rImplementationName
,
288 const uno::Sequence
< OUString
> & rServices
)
290 uno::Reference
< registry::XRegistryKey
> xNewKey(
291 pRegistryKey
->createKey(
292 OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) );
294 for( sal_Int32 i
= 0; i
< rServices
.getLength(); i
++ )
295 xNewKey
->createKey( rServices
.getConstArray()[i
]);
298 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL
component_writeInfo(
300 void * pRegistryKey
)
306 registry::XRegistryKey
*pKey
= reinterpret_cast< registry::XRegistryKey
* >( pRegistryKey
);
308 writeInfo( pKey
, SdHtmlOptionsDialog_getImplementationName(), SdHtmlOptionsDialog_getSupportedServiceNames() );
309 writeInfo( pKey
, SdDrawingDocument_getImplementationName(), SdDrawingDocument_getSupportedServiceNames() );
310 writeInfo( pKey
, SdPresentationDocument_getImplementationName(), SdPresentationDocument_getSupportedServiceNames() );
311 writeInfo( pKey
, SdUnoModule_getImplementationName(), SdUnoModule_getSupportedServiceNames() );
312 writeInfo( pKey
, sd::RandomNode__getImplementationName(), sd::RandomNode_getSupportedServiceNames() );
315 sd::framework::Configuration_getImplementationName(),
316 sd::framework::Configuration_getSupportedServiceNames());
319 sd::framework::ConfigurationController_getImplementationName(),
320 sd::framework::ConfigurationController_getSupportedServiceNames());
323 sd::framework::ModuleController_getImplementationName(),
324 sd::framework::ModuleController_getSupportedServiceNames());
327 sd::framework::BasicPaneFactory_getImplementationName(),
328 sd::framework::BasicPaneFactory_getSupportedServiceNames());
331 sd::framework::BasicToolBarFactory_getImplementationName(),
332 sd::framework::BasicToolBarFactory_getSupportedServiceNames());
335 sd::framework::BasicViewFactory_getImplementationName(),
336 sd::framework::BasicViewFactory_getSupportedServiceNames());
339 sd::framework::TaskPanelFactory_getImplementationName(),
340 sd::framework::TaskPanelFactory_getSupportedServiceNames());
343 sd::framework::ResourceId_getImplementationName(),
344 sd::framework::ResourceId_getSupportedServiceNames());
347 sd::framework::PresentationFactoryProvider_getImplementationName(),
348 sd::framework::PresentationFactoryProvider_getSupportedServiceNames());
351 sd::presenter::SlideRenderer_getImplementationName(),
352 sd::presenter::SlideRenderer_getSupportedServiceNames());
355 sd::presenter::PresenterCanvas_getImplementationName(),
356 sd::presenter::PresenterCanvas_getSupportedServiceNames());
359 sd::presenter::PresenterTextViewService_getImplementationName(),
360 sd::presenter::PresenterTextViewService_getSupportedServiceNames());
363 sd::presenter::PresenterHelperService_getImplementationName(),
364 sd::presenter::PresenterHelperService_getSupportedServiceNames());
367 sd::presenter::PresenterPreviewCache_getImplementationName(),
368 sd::presenter::PresenterPreviewCache_getSupportedServiceNames());
371 sd::slidesorter::SlideSorterService_getImplementationName(),
372 sd::slidesorter::SlideSorterService_getSupportedServiceNames());
374 catch (registry::InvalidRegistryException
&)
376 OSL_ENSURE( sal_False
, "### InvalidRegistryException!" );
382 SAL_DLLPUBLIC_EXPORT
void * SAL_CALL
component_getFactory(
383 const sal_Char
* pImplName
,
384 void * pServiceManager
,
389 if( pServiceManager
)
391 uno::Reference
< lang::XMultiServiceFactory
> xMSF( reinterpret_cast< lang::XMultiServiceFactory
* >( pServiceManager
) );
393 uno::Reference
<lang::XSingleServiceFactory
> xFactory
;
394 uno::Reference
<lang::XSingleComponentFactory
> xComponentFactory
;
396 ::boost::shared_ptr
<FactoryMap
> pFactoryMap (GetFactoryMap());
397 OUString
sImplementationName (OUString::createFromAscii(pImplName
));
398 FactoryMap::const_iterator
iFactory (pFactoryMap
->find(sImplementationName
));
399 if (iFactory
!= pFactoryMap
->end())
401 switch (iFactory
->second
)
403 case SdHtmlOptionsDialogFactoryId
:
404 xFactory
= ::cppu::createSingleFactory(
406 SdHtmlOptionsDialog_getImplementationName(),
407 SdHtmlOptionsDialog_CreateInstance
,
408 SdHtmlOptionsDialog_getSupportedServiceNames());
411 case SdDrawingDocumentFactoryId
:
412 xFactory
= ::sfx2::createSfxModelFactory(
414 SdDrawingDocument_getImplementationName(),
415 SdDrawingDocument_createInstance
,
416 SdDrawingDocument_getSupportedServiceNames());
419 case SdPresentationDocumentFactoryId
:
420 xFactory
= ::sfx2::createSfxModelFactory(
422 SdPresentationDocument_getImplementationName(),
423 SdPresentationDocument_createInstance
,
424 SdPresentationDocument_getSupportedServiceNames());
427 case SdUnoModuleFactoryId
:
428 xFactory
= ::cppu::createSingleFactory(
430 SdUnoModule_getImplementationName(),
431 SdUnoModule_createInstance
,
432 SdUnoModule_getSupportedServiceNames());
435 case RandomNodeFactoryId
:
436 xFactory
= ::cppu::createSingleFactory(
438 sd::RandomNode__getImplementationName(),
439 sd::RandomNode_createInstance
,
440 sd::RandomNode_getSupportedServiceNames());
443 case ConfigurationFactoryId
:
444 xComponentFactory
= ::cppu::createSingleComponentFactory(
445 sd::framework::Configuration_createInstance
,
446 sd::framework::Configuration_getImplementationName(),
447 sd::framework::Configuration_getSupportedServiceNames());
450 case ConfigurationControllerFactoryId
:
451 xComponentFactory
= ::cppu::createSingleComponentFactory(
452 sd::framework::ConfigurationController_createInstance
,
453 sd::framework::ConfigurationController_getImplementationName(),
454 sd::framework::ConfigurationController_getSupportedServiceNames());
457 case ModuleControllerFactoryId
:
458 xComponentFactory
= ::cppu::createSingleComponentFactory(
459 sd::framework::ModuleController_createInstance
,
460 sd::framework::ModuleController_getImplementationName(),
461 sd::framework::ModuleController_getSupportedServiceNames());
464 case BasicPaneFactoryFactoryId
:
465 xComponentFactory
= ::cppu::createSingleComponentFactory(
466 sd::framework::BasicPaneFactory_createInstance
,
467 sd::framework::BasicPaneFactory_getImplementationName(),
468 sd::framework::BasicPaneFactory_getSupportedServiceNames());
471 case BasicToolBarFactoryFactoryId
:
472 xComponentFactory
= ::cppu::createSingleComponentFactory(
473 sd::framework::BasicToolBarFactory_createInstance
,
474 sd::framework::BasicToolBarFactory_getImplementationName(),
475 sd::framework::BasicToolBarFactory_getSupportedServiceNames());
478 case BasicViewFactoryFactoryId
:
479 xComponentFactory
= ::cppu::createSingleComponentFactory(
480 sd::framework::BasicViewFactory_createInstance
,
481 sd::framework::BasicViewFactory_getImplementationName(),
482 sd::framework::BasicViewFactory_getSupportedServiceNames());
485 case TaskPanelFactoryFactoryId
:
486 xComponentFactory
= ::cppu::createSingleComponentFactory(
487 sd::framework::TaskPanelFactory_createInstance
,
488 sd::framework::TaskPanelFactory_getImplementationName(),
489 sd::framework::TaskPanelFactory_getSupportedServiceNames());
492 case ResourceIdFactoryId
:
493 xComponentFactory
= ::cppu::createSingleComponentFactory(
494 sd::framework::ResourceId_createInstance
,
495 sd::framework::ResourceId_getImplementationName(),
496 sd::framework::ResourceId_getSupportedServiceNames());
499 case PresentationFactoryProviderFactoryId
:
500 xComponentFactory
= ::cppu::createSingleComponentFactory(
501 sd::framework::PresentationFactoryProvider_createInstance
,
502 sd::framework::PresentationFactoryProvider_getImplementationName(),
503 sd::framework::PresentationFactoryProvider_getSupportedServiceNames());
506 case SlideRendererFactoryId
:
507 xComponentFactory
= ::cppu::createSingleComponentFactory(
508 sd::presenter::SlideRenderer_createInstance
,
509 sd::presenter::SlideRenderer_getImplementationName(),
510 sd::presenter::SlideRenderer_getSupportedServiceNames());
513 case PresenterCanvasFactoryId
:
514 xComponentFactory
= ::cppu::createSingleComponentFactory(
515 sd::presenter::PresenterCanvas_createInstance
,
516 sd::presenter::PresenterCanvas_getImplementationName(),
517 sd::presenter::PresenterCanvas_getSupportedServiceNames());
520 case PresenterTextViewServiceFactoryId
:
521 xComponentFactory
= ::cppu::createSingleComponentFactory(
522 sd::presenter::PresenterTextViewService_createInstance
,
523 sd::presenter::PresenterTextViewService_getImplementationName(),
524 sd::presenter::PresenterTextViewService_getSupportedServiceNames());
527 case PresenterHelperServiceFactoryId
:
528 xComponentFactory
= ::cppu::createSingleComponentFactory(
529 sd::presenter::PresenterHelperService_createInstance
,
530 sd::presenter::PresenterHelperService_getImplementationName(),
531 sd::presenter::PresenterHelperService_getSupportedServiceNames());
534 case PresenterPreviewCacheFactoryId
:
535 xComponentFactory
= ::cppu::createSingleComponentFactory(
536 sd::presenter::PresenterPreviewCache_createInstance
,
537 sd::presenter::PresenterPreviewCache_getImplementationName(),
538 sd::presenter::PresenterPreviewCache_getSupportedServiceNames());
541 case SlideSorterServiceFactoryId
:
542 xComponentFactory
= ::cppu::createSingleComponentFactory(
543 sd::slidesorter::SlideSorterService_createInstance
,
544 sd::slidesorter::SlideSorterService_getImplementationName(),
545 sd::slidesorter::SlideSorterService_getSupportedServiceNames());
551 if (xComponentFactory
.is())
553 xComponentFactory
->acquire();
554 pRet
= xComponentFactory
.get();
556 else if (xFactory
.is())
559 pRet
= xFactory
.get();
569 } // end of extern "C"