Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : /** this file contains the uno service registrations for all services in the svxcore lib */
21 :
22 :
23 : #include "sal/types.h"
24 : #include "osl/diagnose.h"
25 : #include "cppuhelper/factory.hxx"
26 : #include "uno/lbnames.h"
27 :
28 :
29 : using namespace com::sun::star::uno;
30 : using namespace com::sun::star::lang;
31 : using namespace com::sun::star::registry;
32 :
33 : namespace svx
34 : {
35 : extern OUString SAL_CALL ExtrusionDepthController_getImplementationName();
36 : extern Reference< XInterface > SAL_CALL ExtrusionDepthController_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
37 : extern Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException );
38 :
39 : extern OUString SAL_CALL ExtrusionDirectionControl_getImplementationName();
40 : extern Reference< XInterface > SAL_CALL ExtrusionDirectionControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
41 : extern Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException );
42 :
43 : extern OUString SAL_CALL ExtrusionLightingControl_getImplementationName();
44 : extern Reference< XInterface > SAL_CALL ExtrusionLightingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
45 : extern Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException );
46 :
47 : extern OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName();
48 : extern Reference< XInterface > SAL_CALL ExtrusionSurfaceControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
49 : extern Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException );
50 :
51 : extern OUString SAL_CALL FontworkAlignmentControl_getImplementationName();
52 : extern Reference< XInterface > SAL_CALL FontworkAlignmentControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
53 : extern Sequence< OUString > SAL_CALL FontworkAlignmentControl_getSupportedServiceNames() throw( RuntimeException );
54 :
55 : extern OUString SAL_CALL FontworkCharacterSpacingControl_getImplementationName();
56 : extern Reference< XInterface > SAL_CALL FontworkCharacterSpacingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
57 : extern Sequence< OUString > SAL_CALL FontworkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException );
58 : }
59 :
60 : extern "C"
61 : {
62 :
63 0 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
64 : const sal_Char * pImplName, void * pServiceManager, void * )
65 : {
66 0 : void * pRet = 0;
67 0 : if( pServiceManager )
68 : {
69 0 : Reference< XSingleServiceFactory > xFactory;
70 :
71 0 : if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) )
72 : {
73 0 : xFactory = ::cppu::createSingleFactory(
74 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
75 : ::svx::ExtrusionDepthController_getImplementationName(),
76 : ::svx::ExtrusionDepthController_createInstance,
77 0 : ::svx::ExtrusionDepthController_getSupportedServiceNames() );
78 : }
79 0 : else if( ::svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName ) )
80 : {
81 0 : xFactory = ::cppu::createSingleFactory(
82 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
83 : ::svx::ExtrusionDirectionControl_getImplementationName(),
84 : ::svx::ExtrusionDirectionControl_createInstance,
85 0 : ::svx::ExtrusionDirectionControl_getSupportedServiceNames() );
86 : }
87 0 : else if( ::svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName ) )
88 : {
89 0 : xFactory = ::cppu::createSingleFactory(
90 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
91 : ::svx::ExtrusionLightingControl_getImplementationName(),
92 : ::svx::ExtrusionLightingControl_createInstance,
93 0 : ::svx::ExtrusionLightingControl_getSupportedServiceNames() );
94 : }
95 0 : else if( ::svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName ) )
96 : {
97 0 : xFactory = ::cppu::createSingleFactory(
98 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
99 : ::svx::ExtrusionSurfaceControl_getImplementationName(),
100 : ::svx::ExtrusionSurfaceControl_createInstance,
101 0 : ::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
102 : }
103 0 : else if( ::svx::FontworkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
104 : {
105 0 : xFactory = ::cppu::createSingleFactory(
106 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
107 : ::svx::FontworkAlignmentControl_getImplementationName(),
108 : ::svx::FontworkAlignmentControl_createInstance,
109 0 : ::svx::FontworkAlignmentControl_getSupportedServiceNames() );
110 : }
111 0 : else if( ::svx::FontworkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
112 : {
113 0 : xFactory = ::cppu::createSingleFactory(
114 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
115 : ::svx::FontworkCharacterSpacingControl_getImplementationName(),
116 : ::svx::FontworkCharacterSpacingControl_createInstance,
117 0 : ::svx::FontworkCharacterSpacingControl_getSupportedServiceNames() );
118 0 : } if( xFactory.is())
119 : {
120 0 : xFactory->acquire();
121 0 : pRet = xFactory.get();
122 0 : }
123 : }
124 :
125 0 : return pRet;
126 : }
127 :
128 : }
129 :
130 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|