bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / unoidl / facreg.cxx
blobc1445b5beb8de66fe83934e10b7bbf67a3e3952d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/registry/XRegistryKey.hpp>
22 #include "sddll.hxx"
24 #include <cppuhelper/factory.hxx>
25 #include <uno/lbnames.h>
26 #include <sfx2/sfxmodelfactory.hxx>
27 #include "osl/diagnose.h"
28 #include "sal/types.h"
30 #include <string.h>
32 #include <comphelper/stl_types.hxx>
33 #include <boost/unordered_map.hpp>
34 #include <boost/shared_ptr.hpp>
36 using namespace com::sun::star;
39 // Forward declarations of the factories.
41 extern uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory, const sal_uInt64 _nCreationFlags );
42 extern OUString SdDrawingDocument_getImplementationName() throw( uno::RuntimeException );
43 extern uno::Sequence< OUString > SAL_CALL SdDrawingDocument_getSupportedServiceNames() throw( uno::RuntimeException );
45 extern uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory, const sal_uInt64 _nCreationFlags );
46 extern OUString SdPresentationDocument_getImplementationName() throw( uno::RuntimeException );
47 extern uno::Sequence< OUString > SAL_CALL SdPresentationDocument_getSupportedServiceNames() throw( uno::RuntimeException );
49 extern uno::Reference< uno::XInterface > SAL_CALL SdHtmlOptionsDialog_CreateInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
50 extern OUString SdHtmlOptionsDialog_getImplementationName() throw( uno::RuntimeException );
51 extern uno::Sequence< OUString > SAL_CALL SdHtmlOptionsDialog_getSupportedServiceNames() throw( uno::RuntimeException );
53 extern uno::Reference< uno::XInterface > SAL_CALL SdUnoModule_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
54 extern OUString SdUnoModule_getImplementationName() throw( uno::RuntimeException );
55 extern uno::Sequence< OUString > SAL_CALL SdUnoModule_getSupportedServiceNames() throw( uno::RuntimeException );
57 namespace sd
59 extern uno::Reference< uno::XInterface > SAL_CALL RandomNode_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
60 extern OUString RandomNode__getImplementationName() throw( uno::RuntimeException );
61 extern uno::Sequence< OUString > SAL_CALL RandomNode_getSupportedServiceNames() throw( uno::RuntimeException );
63 extern uno::Reference< uno::XInterface > SAL_CALL SlideLayoutController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
64 extern OUString SlideLayoutController_getImplementationName() throw( uno::RuntimeException );
65 extern uno::Sequence< OUString > SlideLayoutController_getSupportedServiceNames() throw( uno::RuntimeException );
67 extern uno::Reference< uno::XInterface > SAL_CALL InsertSlideController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
68 extern OUString InsertSlideController_getImplementationName() throw( uno::RuntimeException );
69 extern uno::Sequence< OUString > InsertSlideController_getSupportedServiceNames() throw( uno::RuntimeException );
72 namespace sd { namespace framework {
74 extern uno::Reference<uno::XInterface> SAL_CALL Configuration_createInstance(
75 const uno::Reference<uno::XComponentContext>& rxContext)
76 throw(uno::Exception);
77 extern OUString Configuration_getImplementationName(void) throw (uno::RuntimeException);
78 extern uno::Sequence<OUString> SAL_CALL Configuration_getSupportedServiceNames (void)
79 throw (uno::RuntimeException);
81 extern uno::Reference<uno::XInterface> SAL_CALL ConfigurationController_createInstance(
82 const uno::Reference<uno::XComponentContext>& rxContext)
83 throw(uno::Exception);
84 extern OUString ConfigurationController_getImplementationName(void) throw (uno::RuntimeException);
85 extern uno::Sequence<OUString> SAL_CALL ConfigurationController_getSupportedServiceNames (void)
86 throw (uno::RuntimeException);
88 extern uno::Reference<uno::XInterface> SAL_CALL ModuleController_createInstance(
89 const uno::Reference<uno::XComponentContext>& rxContext)
90 throw(uno::Exception);
91 extern OUString ModuleController_getImplementationName(void) throw (uno::RuntimeException);
92 extern uno::Sequence<OUString> SAL_CALL ModuleController_getSupportedServiceNames (void)
93 throw (uno::RuntimeException);
95 extern uno::Reference<uno::XInterface> SAL_CALL BasicPaneFactory_createInstance(
96 const uno::Reference<uno::XComponentContext>& rxContext)
97 throw(uno::Exception);
98 extern OUString BasicPaneFactory_getImplementationName(void) throw (uno::RuntimeException);
99 extern uno::Sequence<OUString> SAL_CALL BasicPaneFactory_getSupportedServiceNames (void)
100 throw (uno::RuntimeException);
102 extern uno::Reference<uno::XInterface> SAL_CALL BasicToolBarFactory_createInstance(
103 const uno::Reference<uno::XComponentContext>& rxContext)
104 throw(uno::Exception);
105 extern OUString BasicToolBarFactory_getImplementationName(void) throw (uno::RuntimeException);
106 extern uno::Sequence<OUString> SAL_CALL BasicToolBarFactory_getSupportedServiceNames (void)
107 throw (uno::RuntimeException);
109 extern uno::Reference<uno::XInterface> SAL_CALL BasicViewFactory_createInstance(
110 const uno::Reference<uno::XComponentContext>& rxContext)
111 throw(uno::Exception);
112 extern OUString BasicViewFactory_getImplementationName(void) throw (uno::RuntimeException);
113 extern uno::Sequence<OUString> SAL_CALL BasicViewFactory_getSupportedServiceNames (void)
114 throw (uno::RuntimeException);
116 extern uno::Reference<uno::XInterface> SAL_CALL TaskPanelFactory_createInstance(
117 const uno::Reference<uno::XComponentContext>& rxContext)
118 throw(uno::Exception);
119 extern OUString TaskPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
120 extern uno::Sequence<OUString> SAL_CALL TaskPanelFactory_getSupportedServiceNames (void)
121 throw (uno::RuntimeException);
123 extern uno::Reference<uno::XInterface> SAL_CALL ResourceId_createInstance(
124 const uno::Reference<uno::XComponentContext>& rxContext)
125 throw(uno::Exception);
126 extern OUString ResourceId_getImplementationName(void) throw (uno::RuntimeException);
127 extern uno::Sequence<OUString> SAL_CALL ResourceId_getSupportedServiceNames (void)
128 throw (uno::RuntimeException);
130 extern uno::Reference<uno::XInterface> SAL_CALL PresentationFactoryProvider_createInstance(
131 const uno::Reference<uno::XComponentContext>& rxContext)
132 throw(uno::Exception);
133 extern OUString PresentationFactoryProvider_getImplementationName(void)
134 throw (uno::RuntimeException);
135 extern uno::Sequence<OUString> SAL_CALL PresentationFactoryProvider_getSupportedServiceNames (void)
136 throw (uno::RuntimeException);
139 namespace sd { namespace sidebar {
141 extern uno::Reference<uno::XInterface> SAL_CALL PanelFactory_createInstance(
142 const uno::Reference<uno::XComponentContext>& rxContext)
143 throw(uno::Exception);
144 extern OUString PanelFactory_getImplementationName(void) throw (uno::RuntimeException);
145 extern uno::Sequence<OUString> SAL_CALL PanelFactory_getSupportedServiceNames (void)
146 throw (uno::RuntimeException);
150 namespace sd { namespace toolpanel {
151 extern uno::Reference<uno::XInterface> SAL_CALL ToolPanelFactory_createInstance(
152 const uno::Reference<uno::XComponentContext>& rxContext)
153 throw(uno::Exception);
154 extern OUString ToolPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
155 extern uno::Sequence<OUString> SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
156 throw (uno::RuntimeException);
160 namespace sd { namespace presenter {
161 extern uno::Reference<uno::XInterface> SAL_CALL SlideRenderer_createInstance(
162 const uno::Reference<uno::XComponentContext>& rxContext)
163 throw(uno::Exception);
164 extern OUString SlideRenderer_getImplementationName(void)
165 throw (uno::RuntimeException);
166 extern uno::Sequence<OUString> SAL_CALL SlideRenderer_getSupportedServiceNames (void)
167 throw (uno::RuntimeException);
169 extern uno::Reference<uno::XInterface> SAL_CALL PresenterCanvas_createInstance(
170 const uno::Reference<uno::XComponentContext>& rxContext)
171 throw(uno::Exception);
172 extern OUString PresenterCanvas_getImplementationName(void)
173 throw (uno::RuntimeException);
174 extern uno::Sequence<OUString> SAL_CALL PresenterCanvas_getSupportedServiceNames (void)
175 throw (uno::RuntimeException);
177 extern uno::Reference<uno::XInterface> SAL_CALL PresenterTextViewService_createInstance(
178 const uno::Reference<uno::XComponentContext>& rxContext)
179 throw(uno::Exception);
180 extern OUString PresenterTextViewService_getImplementationName(void)
181 throw (uno::RuntimeException);
182 extern uno::Sequence<OUString> SAL_CALL PresenterTextViewService_getSupportedServiceNames (void)
183 throw (uno::RuntimeException);
185 extern uno::Reference<uno::XInterface> SAL_CALL PresenterHelperService_createInstance(
186 const uno::Reference<uno::XComponentContext>& rxContext)
187 throw(uno::Exception);
188 extern OUString PresenterHelperService_getImplementationName(void)
189 throw (uno::RuntimeException);
190 extern uno::Sequence<OUString> SAL_CALL PresenterHelperService_getSupportedServiceNames (void)
191 throw (uno::RuntimeException);
193 extern uno::Reference<uno::XInterface> SAL_CALL PresenterPreviewCache_createInstance(
194 const uno::Reference<uno::XComponentContext>& rxContext)
195 throw(uno::Exception);
196 extern OUString PresenterPreviewCache_getImplementationName(void)
197 throw (uno::RuntimeException);
198 extern uno::Sequence<OUString> SAL_CALL PresenterPreviewCache_getSupportedServiceNames (void)
199 throw (uno::RuntimeException);
203 namespace sd { namespace slidesorter {
204 extern uno::Reference<uno::XInterface> SAL_CALL SlideSorterService_createInstance(
205 const uno::Reference<uno::XComponentContext>& rxContext)
206 throw(uno::Exception);
207 extern OUString SlideSorterService_getImplementationName(void)
208 throw (uno::RuntimeException);
209 extern uno::Sequence<OUString> SAL_CALL SlideSorterService_getSupportedServiceNames (void)
210 throw (uno::RuntimeException);
213 using namespace ::sd;
214 using namespace ::sd::framework;
215 using namespace ::sd::presenter;
216 using namespace ::sd::slidesorter;
217 using namespace ::sd::sidebar;
218 using namespace ::sd::toolpanel;
223 // ----------------------------------------------------------------------------
224 // Declaration and initialization of a map from service names to locally
225 // unique factory identifiers.
227 enum FactoryId
229 SdDrawingDocumentFactoryId,
230 SdPresentationDocumentFactoryId,
231 SdHtmlOptionsDialogFactoryId,
232 SdUnoModuleFactoryId,
233 RandomNodeFactoryId,
235 ConfigurationFactoryId,
236 ConfigurationControllerFactoryId,
237 ModuleControllerFactoryId,
238 BasicPaneFactoryFactoryId,
239 BasicToolBarFactoryFactoryId,
240 BasicViewFactoryFactoryId,
241 TaskPanelFactoryFactoryId,
242 ToolPanelFactoryFactoryId,
243 PanelFactoryFactoryId,
244 ResourceIdFactoryId,
245 PresentationFactoryProviderFactoryId,
246 SlideRendererFactoryId,
247 PresenterCanvasFactoryId,
248 PresenterTextViewServiceFactoryId,
249 PresenterHelperServiceFactoryId,
250 PresenterPreviewCacheFactoryId,
251 SlideSorterServiceFactoryId,
252 SlideLayoutControllerFactoryId,
253 InsertSlideControllerFactoryId,
255 typedef ::boost::unordered_map<OUString, FactoryId, OUStringHash, comphelper::UStringEqual> FactoryMap;
258 namespace {
259 static ::boost::shared_ptr<FactoryMap> spFactoryMap;
260 ::boost::shared_ptr<FactoryMap> GetFactoryMap (void)
262 if (spFactoryMap.get() == NULL)
264 spFactoryMap.reset(new FactoryMap);
265 (*spFactoryMap)[SdDrawingDocument_getImplementationName()] = SdDrawingDocumentFactoryId;
266 (*spFactoryMap)[SdPresentationDocument_getImplementationName()] = SdPresentationDocumentFactoryId;
267 (*spFactoryMap)[SdHtmlOptionsDialog_getImplementationName()] = SdHtmlOptionsDialogFactoryId;
268 (*spFactoryMap)[SdUnoModule_getImplementationName()] = SdUnoModuleFactoryId;
269 (*spFactoryMap)[RandomNode__getImplementationName()] = RandomNodeFactoryId;
270 (*spFactoryMap)[Configuration_getImplementationName()] = ConfigurationFactoryId;
271 (*spFactoryMap)[ConfigurationController_getImplementationName()] = ConfigurationControllerFactoryId;
272 (*spFactoryMap)[ModuleController_getImplementationName()] = ModuleControllerFactoryId;
273 (*spFactoryMap)[BasicPaneFactory_getImplementationName()] = BasicPaneFactoryFactoryId;
274 (*spFactoryMap)[BasicToolBarFactory_getImplementationName()] = BasicToolBarFactoryFactoryId;
275 (*spFactoryMap)[BasicViewFactory_getImplementationName()] = BasicViewFactoryFactoryId;
276 (*spFactoryMap)[TaskPanelFactory_getImplementationName()] = TaskPanelFactoryFactoryId;
277 (*spFactoryMap)[ToolPanelFactory_getImplementationName()] = ToolPanelFactoryFactoryId;
278 (*spFactoryMap)[PanelFactory_getImplementationName()] = PanelFactoryFactoryId;
279 (*spFactoryMap)[ResourceId_getImplementationName()] = ResourceIdFactoryId;
280 (*spFactoryMap)[PresentationFactoryProvider_getImplementationName()] = PresentationFactoryProviderFactoryId;
281 (*spFactoryMap)[SlideRenderer_getImplementationName()] = SlideRendererFactoryId;
282 (*spFactoryMap)[PresenterCanvas_getImplementationName()] = PresenterCanvasFactoryId;
283 (*spFactoryMap)[PresenterTextViewService_getImplementationName()] = PresenterTextViewServiceFactoryId;
284 (*spFactoryMap)[PresenterHelperService_getImplementationName()] = PresenterHelperServiceFactoryId;
285 (*spFactoryMap)[PresenterPreviewCache_getImplementationName()] = PresenterPreviewCacheFactoryId;
286 (*spFactoryMap)[SlideSorterService_getImplementationName()] = SlideSorterServiceFactoryId;
287 (*spFactoryMap)[SlideLayoutController_getImplementationName()] = SlideLayoutControllerFactoryId;
288 (*spFactoryMap)[InsertSlideController_getImplementationName()] = InsertSlideControllerFactoryId;
290 return spFactoryMap;
292 } // end of anonymous namespace
295 extern "C"
298 SAL_DLLPUBLIC_EXPORT void * SAL_CALL sd_component_getFactory(
299 const sal_Char * pImplName,
300 void * pServiceManager,
301 void * )
303 void * pRet = 0;
305 if( pServiceManager )
307 uno::Reference< lang::XMultiServiceFactory > xMSF( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
309 uno::Reference<lang::XSingleServiceFactory> xFactory;
310 uno::Reference<lang::XSingleComponentFactory> xComponentFactory;
312 ::boost::shared_ptr<FactoryMap> pFactoryMap (GetFactoryMap());
313 OUString sImplementationName (OUString::createFromAscii(pImplName));
314 FactoryMap::const_iterator iFactory (pFactoryMap->find(sImplementationName));
315 if (iFactory != pFactoryMap->end())
317 switch (iFactory->second)
319 case SdHtmlOptionsDialogFactoryId:
320 xFactory = ::cppu::createSingleFactory(
321 xMSF,
322 SdHtmlOptionsDialog_getImplementationName(),
323 SdHtmlOptionsDialog_CreateInstance,
324 SdHtmlOptionsDialog_getSupportedServiceNames());
325 break;
327 case SdDrawingDocumentFactoryId:
328 xFactory = ::sfx2::createSfxModelFactory(
329 xMSF,
330 SdDrawingDocument_getImplementationName(),
331 SdDrawingDocument_createInstance,
332 SdDrawingDocument_getSupportedServiceNames());
333 break;
335 case SdPresentationDocumentFactoryId:
336 xFactory = ::sfx2::createSfxModelFactory(
337 xMSF,
338 SdPresentationDocument_getImplementationName(),
339 SdPresentationDocument_createInstance,
340 SdPresentationDocument_getSupportedServiceNames());
341 break;
343 case SdUnoModuleFactoryId:
344 xFactory = ::cppu::createSingleFactory(
345 xMSF,
346 SdUnoModule_getImplementationName(),
347 SdUnoModule_createInstance,
348 SdUnoModule_getSupportedServiceNames());
349 break;
351 case RandomNodeFactoryId:
352 xFactory = ::cppu::createSingleFactory(
353 xMSF,
354 sd::RandomNode__getImplementationName(),
355 sd::RandomNode_createInstance,
356 sd::RandomNode_getSupportedServiceNames());
357 break;
359 case ConfigurationFactoryId:
360 xComponentFactory = ::cppu::createSingleComponentFactory(
361 sd::framework::Configuration_createInstance,
362 sd::framework::Configuration_getImplementationName(),
363 sd::framework::Configuration_getSupportedServiceNames());
364 break;
366 case ConfigurationControllerFactoryId:
367 xComponentFactory = ::cppu::createSingleComponentFactory(
368 sd::framework::ConfigurationController_createInstance,
369 sd::framework::ConfigurationController_getImplementationName(),
370 sd::framework::ConfigurationController_getSupportedServiceNames());
371 break;
373 case ModuleControllerFactoryId:
374 xComponentFactory = ::cppu::createSingleComponentFactory(
375 sd::framework::ModuleController_createInstance,
376 sd::framework::ModuleController_getImplementationName(),
377 sd::framework::ModuleController_getSupportedServiceNames());
378 break;
380 case BasicPaneFactoryFactoryId:
381 xComponentFactory = ::cppu::createSingleComponentFactory(
382 sd::framework::BasicPaneFactory_createInstance,
383 sd::framework::BasicPaneFactory_getImplementationName(),
384 sd::framework::BasicPaneFactory_getSupportedServiceNames());
385 break;
387 case BasicToolBarFactoryFactoryId:
388 xComponentFactory = ::cppu::createSingleComponentFactory(
389 sd::framework::BasicToolBarFactory_createInstance,
390 sd::framework::BasicToolBarFactory_getImplementationName(),
391 sd::framework::BasicToolBarFactory_getSupportedServiceNames());
392 break;
394 case BasicViewFactoryFactoryId:
395 xComponentFactory = ::cppu::createSingleComponentFactory(
396 sd::framework::BasicViewFactory_createInstance,
397 sd::framework::BasicViewFactory_getImplementationName(),
398 sd::framework::BasicViewFactory_getSupportedServiceNames());
399 break;
401 case TaskPanelFactoryFactoryId:
402 xComponentFactory = ::cppu::createSingleComponentFactory(
403 sd::framework::TaskPanelFactory_createInstance,
404 sd::framework::TaskPanelFactory_getImplementationName(),
405 sd::framework::TaskPanelFactory_getSupportedServiceNames());
406 break;
408 case ToolPanelFactoryFactoryId:
409 xComponentFactory = ::cppu::createSingleComponentFactory(
410 sd::toolpanel::ToolPanelFactory_createInstance,
411 sd::toolpanel::ToolPanelFactory_getImplementationName(),
412 sd::toolpanel::ToolPanelFactory_getSupportedServiceNames());
413 break;
415 case PanelFactoryFactoryId:
416 xComponentFactory = ::cppu::createSingleComponentFactory(
417 sd::sidebar::PanelFactory_createInstance,
418 sd::sidebar::PanelFactory_getImplementationName(),
419 sd::sidebar::PanelFactory_getSupportedServiceNames());
420 break;
422 case ResourceIdFactoryId:
423 xComponentFactory = ::cppu::createSingleComponentFactory(
424 sd::framework::ResourceId_createInstance,
425 sd::framework::ResourceId_getImplementationName(),
426 sd::framework::ResourceId_getSupportedServiceNames());
427 break;
429 case PresentationFactoryProviderFactoryId:
430 xComponentFactory = ::cppu::createSingleComponentFactory(
431 sd::framework::PresentationFactoryProvider_createInstance,
432 sd::framework::PresentationFactoryProvider_getImplementationName(),
433 sd::framework::PresentationFactoryProvider_getSupportedServiceNames());
434 break;
436 case SlideRendererFactoryId:
437 xComponentFactory = ::cppu::createSingleComponentFactory(
438 sd::presenter::SlideRenderer_createInstance,
439 sd::presenter::SlideRenderer_getImplementationName(),
440 sd::presenter::SlideRenderer_getSupportedServiceNames());
441 break;
443 case PresenterCanvasFactoryId:
444 xComponentFactory = ::cppu::createSingleComponentFactory(
445 sd::presenter::PresenterCanvas_createInstance,
446 sd::presenter::PresenterCanvas_getImplementationName(),
447 sd::presenter::PresenterCanvas_getSupportedServiceNames());
448 break;
450 case PresenterTextViewServiceFactoryId:
451 xComponentFactory = ::cppu::createSingleComponentFactory(
452 sd::presenter::PresenterTextViewService_createInstance,
453 sd::presenter::PresenterTextViewService_getImplementationName(),
454 sd::presenter::PresenterTextViewService_getSupportedServiceNames());
455 break;
457 case PresenterHelperServiceFactoryId:
458 xComponentFactory = ::cppu::createSingleComponentFactory(
459 sd::presenter::PresenterHelperService_createInstance,
460 sd::presenter::PresenterHelperService_getImplementationName(),
461 sd::presenter::PresenterHelperService_getSupportedServiceNames());
462 break;
464 case PresenterPreviewCacheFactoryId:
465 xComponentFactory = ::cppu::createSingleComponentFactory(
466 sd::presenter::PresenterPreviewCache_createInstance,
467 sd::presenter::PresenterPreviewCache_getImplementationName(),
468 sd::presenter::PresenterPreviewCache_getSupportedServiceNames());
469 break;
471 case SlideSorterServiceFactoryId:
472 xComponentFactory = ::cppu::createSingleComponentFactory(
473 sd::slidesorter::SlideSorterService_createInstance,
474 sd::slidesorter::SlideSorterService_getImplementationName(),
475 sd::slidesorter::SlideSorterService_getSupportedServiceNames());
476 break;
478 case SlideLayoutControllerFactoryId:
479 xFactory = ::cppu::createSingleFactory(
480 xMSF,
481 sd::SlideLayoutController_getImplementationName(),
482 sd::SlideLayoutController_createInstance,
483 sd::SlideLayoutController_getSupportedServiceNames());
484 break;
486 case InsertSlideControllerFactoryId:
487 xFactory = ::cppu::createSingleFactory(
488 xMSF,
489 sd::InsertSlideController_getImplementationName(),
490 sd::InsertSlideController_createInstance,
491 sd::InsertSlideController_getSupportedServiceNames());
492 default:
493 break;
495 if (xComponentFactory.is())
497 xComponentFactory->acquire();
498 pRet = xComponentFactory.get();
500 else if (xFactory.is())
502 xFactory->acquire();
503 pRet = xFactory.get();
508 if (pRet != NULL)
509 SdDLL::Init();
510 return pRet;
513 } // end of extern "C"
515 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */