xref: /aoo42x/main/sw/source/ui/uno/unofreg.cxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_sw.hxx"
30*cdf0e10cSrcweir #include "SwXFilterOptions.hxx"
31*cdf0e10cSrcweir #include "sal/types.h"
32*cdf0e10cSrcweir #include <osl/diagnose.h>
33*cdf0e10cSrcweir #include <uno/lbnames.h>
34*cdf0e10cSrcweir #include <cppuhelper/factory.hxx>
35*cdf0e10cSrcweir #include <sfx2/sfxmodelfactory.hxx>
36*cdf0e10cSrcweir #ifndef INCLUDED_STRING_H
37*cdf0e10cSrcweir #include <string.h>
38*cdf0e10cSrcweir #define INCLUDED_STRING_H
39*cdf0e10cSrcweir #endif
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir using namespace rtl;
42*cdf0e10cSrcweir using namespace ::com::sun::star;
43*cdf0e10cSrcweir using namespace ::com::sun::star::lang;
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir // module
46*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwUnoModule_getSupportedServiceNames() throw();
47*cdf0e10cSrcweir extern OUString SAL_CALL SwUnoModule_getImplementationName() throw();
48*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwUnoModule_createInstance( const uno::Reference< XMultiServiceFactory > &rSMgr ) throw( uno::Exception );
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir // writer documents
51*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwTextDocument_getSupportedServiceNames() throw();
52*cdf0e10cSrcweir extern OUString SAL_CALL SwTextDocument_getImplementationName() throw();
53*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance( const uno::Reference< XMultiServiceFactory > &rSMgr, const sal_uInt64 _nCreationFlags ) throw( uno::Exception );
54*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwWebDocument_getSupportedServiceNames() throw();
55*cdf0e10cSrcweir extern OUString SAL_CALL SwWebDocument_getImplementationName() throw();
56*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwWebDocument_createInstance( const uno::Reference< XMultiServiceFactory > &rSMgr ) throw( uno::Exception );
57*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwGlobalDocument_getSupportedServiceNames() throw();
58*cdf0e10cSrcweir extern OUString SAL_CALL SwGlobalDocument_getImplementationName() throw();
59*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwGlobalDocument_createInstance( const uno::Reference< XMultiServiceFactory > &rSMgr ) throw( uno::Exception );
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir // xml import
62*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLImport_getSupportedServiceNames() throw();
63*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLImport_getImplementationName() throw();
64*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLImport_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
65*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLImportStyles_getSupportedServiceNames() throw();
66*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLImportStyles_getImplementationName() throw();
67*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLImportStyles_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
68*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLImportContent_getSupportedServiceNames() throw();
69*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLImportContent_getImplementationName() throw();
70*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLImportContent_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL     SwXMLImportMeta_getSupportedServiceNames() throw();
73*cdf0e10cSrcweir extern OUString SAL_CALL     SwXMLImportMeta_getImplementationName() throw();
74*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLImportMeta_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLImportSettings_getSupportedServiceNames() throw();
77*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLImportSettings_getImplementationName() throw();
78*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLImportSettings_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir // xml export (OOo)
81*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportOOO_getSupportedServiceNames() throw();
82*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportOOO_getImplementationName() throw();
83*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportOOO_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
84*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportContentOOO_getSupportedServiceNames() throw();
85*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportContentOOO_getImplementationName() throw();
86*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportContentOOO_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
87*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportStylesOOO_getSupportedServiceNames() throw();
88*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportStylesOOO_getImplementationName() throw();
89*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportStylesOOO_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
90*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportMetaOOO_getSupportedServiceNames() throw();
91*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportMetaOOO_getImplementationName() throw();
92*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportMetaOOO_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
93*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportSettingsOOO_getSupportedServiceNames() throw();
94*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportSettingsOOO_getImplementationName() throw();
95*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportSettingsOOO_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir // xml export (OASIS)
98*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExport_getSupportedServiceNames() throw();
99*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExport_getImplementationName() throw();
100*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExport_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
101*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportContent_getSupportedServiceNames() throw();
102*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportContent_getImplementationName() throw();
103*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportContent_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
104*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportStyles_getSupportedServiceNames() throw();
105*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportStyles_getImplementationName() throw();
106*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportStyles_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
107*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportMeta_getSupportedServiceNames() throw();
108*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportMeta_getImplementationName() throw();
109*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportMeta_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
110*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMLExportSettings_getSupportedServiceNames() throw();
111*cdf0e10cSrcweir extern OUString SAL_CALL SwXMLExportSettings_getImplementationName() throw();
112*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMLExportSettings_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr)	throw( uno::Exception );
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir //API objects
115*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXAutoTextContainer_getSupportedServiceNames() throw();
116*cdf0e10cSrcweir extern OUString SAL_CALL SwXAutoTextContainer_getImplementationName() throw();
117*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXAutoTextContainer_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr) throw( uno::Exception );
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXModule_getSupportedServiceNames() throw();
120*cdf0e10cSrcweir extern OUString SAL_CALL SwXModule_getImplementationName() throw();
121*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXModule_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr) throw( uno::Exception );
122*cdf0e10cSrcweir 
123*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() throw();
124*cdf0e10cSrcweir extern OUString SAL_CALL SwXMailMerge_getImplementationName() throw();
125*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr) throw( uno::Exception );
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir extern uno::Sequence< OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() throw();
128*cdf0e10cSrcweir extern OUString SAL_CALL SwXMailMerge_getImplementationName() throw();
129*cdf0e10cSrcweir extern uno::Reference< uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr) throw( uno::Exception );
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir // --> OD 2007-05-24 #i73788#
132*cdf0e10cSrcweir #include "cppuhelper/implementationentry.hxx"
133*cdf0e10cSrcweir namespace comp_FinalThreadManager {
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir // component and service helper functions:
136*cdf0e10cSrcweir ::rtl::OUString SAL_CALL _getImplementationName();
137*cdf0e10cSrcweir com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames();
138*cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL _create(
139*cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context );
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir }
142*cdf0e10cSrcweir // <--
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir //
145*cdf0e10cSrcweir #ifdef __cplusplus
146*cdf0e10cSrcweir extern "C"
147*cdf0e10cSrcweir {
148*cdf0e10cSrcweir #endif
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
151*cdf0e10cSrcweir 		const sal_Char ** ppEnvTypeName,
152*cdf0e10cSrcweir         uno_Environment ** /*ppEnv*/ )
153*cdf0e10cSrcweir {
154*cdf0e10cSrcweir 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
155*cdf0e10cSrcweir }
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir static ::cppu::ImplementationEntry const entries[] = {
158*cdf0e10cSrcweir     { &comp_FinalThreadManager::_create,
159*cdf0e10cSrcweir       &comp_FinalThreadManager::_getImplementationName,
160*cdf0e10cSrcweir       &comp_FinalThreadManager::_getSupportedServiceNames,
161*cdf0e10cSrcweir       &::cppu::createSingleComponentFactory, 0, 0 },
162*cdf0e10cSrcweir     { 0, 0, 0, 0, 0, 0 }
163*cdf0e10cSrcweir };
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
166*cdf0e10cSrcweir 	const sal_Char * pImplName,
167*cdf0e10cSrcweir 	void * pServiceManager,
168*cdf0e10cSrcweir     void * pRegistryKey )
169*cdf0e10cSrcweir {
170*cdf0e10cSrcweir 	void * pRet = 0;
171*cdf0e10cSrcweir 	if( pServiceManager )
172*cdf0e10cSrcweir 	{
173*cdf0e10cSrcweir 		uno::Reference< XMultiServiceFactory > xMSF(
174*cdf0e10cSrcweir 			reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 		uno::Reference< XSingleServiceFactory > xFactory;
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir 		const sal_Int32 nImplNameLen = strlen( pImplName );
179*cdf0e10cSrcweir 		if( SwXMLImport_getImplementationName().equalsAsciiL( pImplName,
180*cdf0e10cSrcweir 															  nImplNameLen ) )
181*cdf0e10cSrcweir 		{
182*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
183*cdf0e10cSrcweir 				SwXMLImport_getImplementationName(),
184*cdf0e10cSrcweir 				SwXMLImport_createInstance,
185*cdf0e10cSrcweir 				SwXMLImport_getSupportedServiceNames() );
186*cdf0e10cSrcweir 		}
187*cdf0e10cSrcweir 		else if( SwXMLImportStyles_getImplementationName().equalsAsciiL(
188*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
189*cdf0e10cSrcweir 		{
190*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
191*cdf0e10cSrcweir 				SwXMLImportStyles_getImplementationName(),
192*cdf0e10cSrcweir 				SwXMLImportStyles_createInstance,
193*cdf0e10cSrcweir 				SwXMLImportStyles_getSupportedServiceNames() );
194*cdf0e10cSrcweir 		}
195*cdf0e10cSrcweir 		else if( SwXMLImportContent_getImplementationName().equalsAsciiL(
196*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
197*cdf0e10cSrcweir 		{
198*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
199*cdf0e10cSrcweir 				SwXMLImportContent_getImplementationName(),
200*cdf0e10cSrcweir 				SwXMLImportContent_createInstance,
201*cdf0e10cSrcweir 				SwXMLImportContent_getSupportedServiceNames() );
202*cdf0e10cSrcweir 		}
203*cdf0e10cSrcweir 		else if( SwXMLImportMeta_getImplementationName().equalsAsciiL(
204*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
205*cdf0e10cSrcweir 		{
206*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
207*cdf0e10cSrcweir 				SwXMLImportMeta_getImplementationName(),
208*cdf0e10cSrcweir 				SwXMLImportMeta_createInstance,
209*cdf0e10cSrcweir 				SwXMLImportMeta_getSupportedServiceNames() );
210*cdf0e10cSrcweir 		}
211*cdf0e10cSrcweir 		else if( SwXMLImportSettings_getImplementationName().equalsAsciiL(
212*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
213*cdf0e10cSrcweir 		{
214*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
215*cdf0e10cSrcweir 				SwXMLImportSettings_getImplementationName(),
216*cdf0e10cSrcweir 				SwXMLImportSettings_createInstance,
217*cdf0e10cSrcweir 				SwXMLImportSettings_getSupportedServiceNames() );
218*cdf0e10cSrcweir 		}
219*cdf0e10cSrcweir 		else if( SwXMLExportOOO_getImplementationName().equalsAsciiL( pImplName,
220*cdf0e10cSrcweir 															nImplNameLen ) )
221*cdf0e10cSrcweir 		{
222*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
223*cdf0e10cSrcweir 				SwXMLExportOOO_getImplementationName(),
224*cdf0e10cSrcweir 				SwXMLExportOOO_createInstance,
225*cdf0e10cSrcweir 				SwXMLExportOOO_getSupportedServiceNames() );
226*cdf0e10cSrcweir 		}
227*cdf0e10cSrcweir 		else if( SwXMLExportStylesOOO_getImplementationName().equalsAsciiL(
228*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
229*cdf0e10cSrcweir 		{
230*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
231*cdf0e10cSrcweir 				SwXMLExportStylesOOO_getImplementationName(),
232*cdf0e10cSrcweir 				SwXMLExportStylesOOO_createInstance,
233*cdf0e10cSrcweir 				SwXMLExportStylesOOO_getSupportedServiceNames() );
234*cdf0e10cSrcweir 		}
235*cdf0e10cSrcweir 		else if( SwXMLExportContentOOO_getImplementationName().equalsAsciiL(
236*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
237*cdf0e10cSrcweir 		{
238*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
239*cdf0e10cSrcweir 				SwXMLExportContentOOO_getImplementationName(),
240*cdf0e10cSrcweir 				SwXMLExportContentOOO_createInstance,
241*cdf0e10cSrcweir 				SwXMLExportContentOOO_getSupportedServiceNames() );
242*cdf0e10cSrcweir 		}
243*cdf0e10cSrcweir 		else if( SwXMLExportMetaOOO_getImplementationName().equalsAsciiL(
244*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
245*cdf0e10cSrcweir 		{
246*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
247*cdf0e10cSrcweir 				SwXMLExportMetaOOO_getImplementationName(),
248*cdf0e10cSrcweir 				SwXMLExportMetaOOO_createInstance,
249*cdf0e10cSrcweir 				SwXMLExportMetaOOO_getSupportedServiceNames() );
250*cdf0e10cSrcweir 		}
251*cdf0e10cSrcweir 		else if( SwXMLExportSettingsOOO_getImplementationName().equalsAsciiL(
252*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
253*cdf0e10cSrcweir 		{
254*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
255*cdf0e10cSrcweir 				SwXMLExportSettingsOOO_getImplementationName(),
256*cdf0e10cSrcweir 				SwXMLExportSettingsOOO_createInstance,
257*cdf0e10cSrcweir 				SwXMLExportSettingsOOO_getSupportedServiceNames() );
258*cdf0e10cSrcweir 		}
259*cdf0e10cSrcweir 		else if( SwXMLExport_getImplementationName().equalsAsciiL( pImplName,
260*cdf0e10cSrcweir 															nImplNameLen ) )
261*cdf0e10cSrcweir 		{
262*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
263*cdf0e10cSrcweir 				SwXMLExport_getImplementationName(),
264*cdf0e10cSrcweir 				SwXMLExport_createInstance,
265*cdf0e10cSrcweir 				SwXMLExport_getSupportedServiceNames() );
266*cdf0e10cSrcweir 		}
267*cdf0e10cSrcweir 		else if( SwXMLExportStyles_getImplementationName().equalsAsciiL(
268*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
269*cdf0e10cSrcweir 		{
270*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
271*cdf0e10cSrcweir 				SwXMLExportStyles_getImplementationName(),
272*cdf0e10cSrcweir 				SwXMLExportStyles_createInstance,
273*cdf0e10cSrcweir 				SwXMLExportStyles_getSupportedServiceNames() );
274*cdf0e10cSrcweir 		}
275*cdf0e10cSrcweir 		else if( SwXMLExportContent_getImplementationName().equalsAsciiL(
276*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
277*cdf0e10cSrcweir 		{
278*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
279*cdf0e10cSrcweir 				SwXMLExportContent_getImplementationName(),
280*cdf0e10cSrcweir 				SwXMLExportContent_createInstance,
281*cdf0e10cSrcweir 				SwXMLExportContent_getSupportedServiceNames() );
282*cdf0e10cSrcweir 		}
283*cdf0e10cSrcweir 		else if( SwXMLExportMeta_getImplementationName().equalsAsciiL(
284*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
285*cdf0e10cSrcweir 		{
286*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
287*cdf0e10cSrcweir 				SwXMLExportMeta_getImplementationName(),
288*cdf0e10cSrcweir 				SwXMLExportMeta_createInstance,
289*cdf0e10cSrcweir 				SwXMLExportMeta_getSupportedServiceNames() );
290*cdf0e10cSrcweir 		}
291*cdf0e10cSrcweir 		else if( SwXMLExportSettings_getImplementationName().equalsAsciiL(
292*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
293*cdf0e10cSrcweir 		{
294*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
295*cdf0e10cSrcweir 				SwXMLExportSettings_getImplementationName(),
296*cdf0e10cSrcweir 				SwXMLExportSettings_createInstance,
297*cdf0e10cSrcweir 				SwXMLExportSettings_getSupportedServiceNames() );
298*cdf0e10cSrcweir 		}
299*cdf0e10cSrcweir         else if( SwXAutoTextContainer_getImplementationName().equalsAsciiL(
300*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
301*cdf0e10cSrcweir 		{
302*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
303*cdf0e10cSrcweir                 SwXAutoTextContainer_getImplementationName(),
304*cdf0e10cSrcweir                 SwXAutoTextContainer_createInstance,
305*cdf0e10cSrcweir                 SwXAutoTextContainer_getSupportedServiceNames() );
306*cdf0e10cSrcweir 		}
307*cdf0e10cSrcweir         else if( SwXModule_getImplementationName().equalsAsciiL(
308*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
309*cdf0e10cSrcweir 		{
310*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
311*cdf0e10cSrcweir                 SwXModule_getImplementationName(),
312*cdf0e10cSrcweir                 SwXModule_createInstance,
313*cdf0e10cSrcweir                 SwXModule_getSupportedServiceNames() );
314*cdf0e10cSrcweir 		}
315*cdf0e10cSrcweir         else if( SwXMailMerge_getImplementationName().equalsAsciiL(
316*cdf0e10cSrcweir                                                     pImplName, nImplNameLen ) )
317*cdf0e10cSrcweir         {
318*cdf0e10cSrcweir             xFactory = ::cppu::createSingleFactory( xMSF,
319*cdf0e10cSrcweir                 SwXMailMerge_getImplementationName(),
320*cdf0e10cSrcweir                 SwXMailMerge_createInstance,
321*cdf0e10cSrcweir                 SwXMailMerge_getSupportedServiceNames() );
322*cdf0e10cSrcweir         }
323*cdf0e10cSrcweir         else if( SwXFilterOptions::getImplementationName_Static().equalsAsciiL(
324*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
325*cdf0e10cSrcweir 		{
326*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
327*cdf0e10cSrcweir                 SwXFilterOptions::getImplementationName_Static(),
328*cdf0e10cSrcweir                 SwXFilterOptions_createInstance,
329*cdf0e10cSrcweir                 SwXFilterOptions::getSupportedServiceNames_Static() );
330*cdf0e10cSrcweir 		}
331*cdf0e10cSrcweir         else if( SwTextDocument_getImplementationName().equalsAsciiL(
332*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
333*cdf0e10cSrcweir 		{
334*cdf0e10cSrcweir 			xFactory = ::sfx2::createSfxModelFactory( xMSF,
335*cdf0e10cSrcweir                 SwTextDocument_getImplementationName(),
336*cdf0e10cSrcweir                 SwTextDocument_createInstance,
337*cdf0e10cSrcweir                 SwTextDocument_getSupportedServiceNames() );
338*cdf0e10cSrcweir 		}
339*cdf0e10cSrcweir         else if( SwWebDocument_getImplementationName().equalsAsciiL(
340*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
341*cdf0e10cSrcweir 		{
342*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
343*cdf0e10cSrcweir                 SwWebDocument_getImplementationName(),
344*cdf0e10cSrcweir                 SwWebDocument_createInstance,
345*cdf0e10cSrcweir                 SwWebDocument_getSupportedServiceNames() );
346*cdf0e10cSrcweir 		}
347*cdf0e10cSrcweir         else if( SwGlobalDocument_getImplementationName().equalsAsciiL(
348*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
349*cdf0e10cSrcweir 		{
350*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
351*cdf0e10cSrcweir                 SwGlobalDocument_getImplementationName(),
352*cdf0e10cSrcweir                 SwGlobalDocument_createInstance,
353*cdf0e10cSrcweir                 SwGlobalDocument_getSupportedServiceNames() );
354*cdf0e10cSrcweir 		}
355*cdf0e10cSrcweir         else if( SwUnoModule_getImplementationName().equalsAsciiL(
356*cdf0e10cSrcweir 													pImplName, nImplNameLen ) )
357*cdf0e10cSrcweir 		{
358*cdf0e10cSrcweir 			xFactory = ::cppu::createSingleFactory( xMSF,
359*cdf0e10cSrcweir                 SwUnoModule_getImplementationName(),
360*cdf0e10cSrcweir                 SwUnoModule_createInstance,
361*cdf0e10cSrcweir                 SwUnoModule_getSupportedServiceNames() );
362*cdf0e10cSrcweir 		}
363*cdf0e10cSrcweir         // --> OD 2007-05-24 #i73788#
364*cdf0e10cSrcweir         else if( comp_FinalThreadManager::_getImplementationName().equalsAsciiL(
365*cdf0e10cSrcweir                                                     pImplName, nImplNameLen ) )
366*cdf0e10cSrcweir         {
367*cdf0e10cSrcweir             pRet = ::cppu::component_getFactoryHelper(
368*cdf0e10cSrcweir                         pImplName, pServiceManager, pRegistryKey, entries);
369*cdf0e10cSrcweir         }
370*cdf0e10cSrcweir         // <--
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir         if( xFactory.is())
373*cdf0e10cSrcweir 		{
374*cdf0e10cSrcweir 			xFactory->acquire();
375*cdf0e10cSrcweir 			pRet = xFactory.get();
376*cdf0e10cSrcweir 		}
377*cdf0e10cSrcweir 	}
378*cdf0e10cSrcweir 	return pRet;
379*cdf0e10cSrcweir }
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir #ifdef __cplusplus
382*cdf0e10cSrcweir }
383*cdf0e10cSrcweir #endif
384