Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #include <cppuhelper/factory.hxx> // helper for factories
30 : : #include <rtl/string.hxx>
31 : :
32 : : #include <com/sun/star/registry/XRegistryKey.hpp>
33 : :
34 : : using namespace com::sun::star::lang;
35 : :
36 : : using namespace com::sun::star::registry;
37 : :
38 : : extern void * SAL_CALL LngSvcMgr_getFactory
39 : : (
40 : : const sal_Char * pImplName,
41 : : XMultiServiceFactory * pServiceManager,
42 : : void * /*pRegistryKey*/
43 : : );
44 : :
45 : : extern void * SAL_CALL DicList_getFactory
46 : : (
47 : : const sal_Char * pImplName,
48 : : XMultiServiceFactory * pServiceManager,
49 : : void *
50 : : );
51 : :
52 : : void * SAL_CALL LinguProps_getFactory
53 : : (
54 : : const sal_Char * pImplName,
55 : : XMultiServiceFactory * pServiceManager,
56 : : void *
57 : : );
58 : :
59 : : extern void * SAL_CALL ConvDicList_getFactory
60 : : (
61 : : const sal_Char * pImplName,
62 : : XMultiServiceFactory * pServiceManager,
63 : : void *
64 : : );
65 : :
66 : : extern void * SAL_CALL GrammarCheckingIterator_getFactory
67 : : (
68 : : const sal_Char * pImplName,
69 : : XMultiServiceFactory * pServiceManager,
70 : : void *
71 : : );
72 : :
73 : :
74 : : extern "C"
75 : : {
76 : :
77 : 188 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL lng_component_getFactory(
78 : : const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
79 : : {
80 : : void * pRet =
81 : : LngSvcMgr_getFactory(
82 : : pImplName,
83 : : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
84 : 188 : pRegistryKey );
85 : :
86 [ + + ]: 188 : if(!pRet)
87 : : pRet = LinguProps_getFactory(
88 : : pImplName,
89 : : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
90 : 142 : pRegistryKey );
91 : :
92 [ + + ]: 188 : if(!pRet)
93 : : pRet = DicList_getFactory(
94 : : pImplName,
95 : : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
96 : 94 : pRegistryKey );
97 : :
98 [ + + ]: 188 : if(!pRet)
99 : : pRet = ConvDicList_getFactory(
100 : : pImplName,
101 : : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
102 : 50 : pRegistryKey );
103 : :
104 [ + + ]: 188 : if(!pRet)
105 : : pRet = GrammarCheckingIterator_getFactory(
106 : : pImplName,
107 : : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
108 : 50 : pRegistryKey );
109 : 188 : return pRet;
110 : : }
111 : : }
112 : :
113 : :
114 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|