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 : using rtl::OUString;
29 :
30 : using namespace com::sun::star::uno;
31 : using namespace com::sun::star::lang;
32 : using namespace com::sun::star::registry;
33 :
34 : namespace svx
35 : {
36 : extern OUString SAL_CALL ExtrusionDepthController_getImplementationName();
37 : extern Reference< XInterface > SAL_CALL ExtrusionDepthController_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
38 : extern Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException );
39 :
40 : extern OUString SAL_CALL ExtrusionDirectionControl_getImplementationName();
41 : extern Reference< XInterface > SAL_CALL ExtrusionDirectionControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
42 : extern Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException );
43 :
44 : extern OUString SAL_CALL ExtrusionLightingControl_getImplementationName();
45 : extern Reference< XInterface > SAL_CALL ExtrusionLightingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
46 : extern Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException );
47 :
48 : extern OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName();
49 : extern Reference< XInterface > SAL_CALL ExtrusionSurfaceControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
50 : extern Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException );
51 :
52 : extern OUString SAL_CALL FontWorkAlignmentControl_getImplementationName();
53 : extern Reference< XInterface > SAL_CALL FontWorkAlignmentControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
54 : extern Sequence< OUString > SAL_CALL FontWorkAlignmentControl_getSupportedServiceNames() throw( RuntimeException );
55 :
56 : extern OUString SAL_CALL FontWorkCharacterSpacingControl_getImplementationName();
57 : extern Reference< XInterface > SAL_CALL FontWorkCharacterSpacingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException );
58 : extern Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException );
59 : }
60 :
61 : extern "C"
62 : {
63 :
64 0 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL svxcore_component_getFactory (
65 : const sal_Char * pImplName, void * pServiceManager, void * )
66 : {
67 0 : void * pRet = 0;
68 0 : if( pServiceManager )
69 : {
70 0 : Reference< XSingleServiceFactory > xFactory;
71 :
72 0 : if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) )
73 : {
74 : xFactory = ::cppu::createSingleFactory(
75 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
76 : ::svx::ExtrusionDepthController_getImplementationName(),
77 : ::svx::ExtrusionDepthController_createInstance,
78 0 : ::svx::ExtrusionDepthController_getSupportedServiceNames() );
79 : }
80 0 : else if( ::svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName ) )
81 : {
82 : xFactory = ::cppu::createSingleFactory(
83 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
84 : ::svx::ExtrusionDirectionControl_getImplementationName(),
85 : ::svx::ExtrusionDirectionControl_createInstance,
86 0 : ::svx::ExtrusionDirectionControl_getSupportedServiceNames() );
87 : }
88 0 : else if( ::svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName ) )
89 : {
90 : xFactory = ::cppu::createSingleFactory(
91 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
92 : ::svx::ExtrusionLightingControl_getImplementationName(),
93 : ::svx::ExtrusionLightingControl_createInstance,
94 0 : ::svx::ExtrusionLightingControl_getSupportedServiceNames() );
95 : }
96 0 : else if( ::svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName ) )
97 : {
98 : xFactory = ::cppu::createSingleFactory(
99 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
100 : ::svx::ExtrusionSurfaceControl_getImplementationName(),
101 : ::svx::ExtrusionSurfaceControl_createInstance,
102 0 : ::svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
103 : }
104 0 : else if( ::svx::FontWorkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
105 : {
106 : xFactory = ::cppu::createSingleFactory(
107 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
108 : ::svx::FontWorkAlignmentControl_getImplementationName(),
109 : ::svx::FontWorkAlignmentControl_createInstance,
110 0 : ::svx::FontWorkAlignmentControl_getSupportedServiceNames() );
111 : }
112 0 : else if( ::svx::FontWorkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
113 : {
114 : xFactory = ::cppu::createSingleFactory(
115 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
116 : ::svx::FontWorkCharacterSpacingControl_getImplementationName(),
117 : ::svx::FontWorkCharacterSpacingControl_createInstance,
118 0 : ::svx::FontWorkCharacterSpacingControl_getSupportedServiceNames() );
119 0 : } if( xFactory.is())
120 : {
121 0 : xFactory->acquire();
122 0 : pRet = xFactory.get();
123 0 : }
124 : }
125 :
126 0 : return pRet;
127 : }
128 :
129 : }
130 :
131 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|