Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : #include <stdio.h>
3 : :
4 : : #include <osl/mutex.hxx>
5 : : #include <osl/thread.h>
6 : : #include <cppuhelper/factory.hxx>
7 : : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
8 : :
9 : : #include "LotusWordProImportFilter.hxx"
10 : :
11 : : using namespace ::rtl;
12 : : using namespace ::cppu;
13 : : using namespace ::com::sun::star::uno;
14 : : using namespace ::com::sun::star::lang;
15 : : using namespace ::com::sun::star::registry;
16 : :
17 : : extern "C"
18 : : {
19 : 9 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
20 : : const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
21 : : {
22 : 9 : void * pRet = 0;
23 : :
24 : 9 : OUString implName = OUString::createFromAscii( pImplName );
25 [ + - ][ + - ]: 9 : if ( pServiceManager && implName.equals(LotusWordProImportFilter_getImplementationName()) )
[ + - ]
[ + - # # ]
[ + - ]
26 : : {
27 : : Reference< XSingleServiceFactory > xFactory( createSingleFactory(
28 : : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
29 : : OUString::createFromAscii( pImplName ),
30 [ + - ][ + - ]: 9 : LotusWordProImportFilter_createInstance, LotusWordProImportFilter_getSupportedServiceNames() ) );
[ + - ][ + - ]
31 : :
32 [ + - ]: 9 : if (xFactory.is())
33 : : {
34 [ + - ]: 9 : xFactory->acquire();
35 [ + - ]: 9 : pRet = xFactory.get();
36 : 9 : }
37 : : }
38 : :
39 : 9 : return pRet;
40 : : }
41 : : }
42 : :
43 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|