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 : #include <cppuhelper/factory.hxx> // helper for factories
21 : #include <rtl/string.hxx>
22 :
23 : #include <com/sun/star/registry/XRegistryKey.hpp>
24 :
25 : using namespace com::sun::star::lang;
26 :
27 : using namespace com::sun::star::registry;
28 :
29 : extern void * SAL_CALL LngSvcMgr_getFactory
30 : (
31 : const sal_Char * pImplName,
32 : XMultiServiceFactory * pServiceManager,
33 : void * /*pRegistryKey*/
34 : );
35 :
36 : extern void * SAL_CALL DicList_getFactory
37 : (
38 : const sal_Char * pImplName,
39 : XMultiServiceFactory * pServiceManager,
40 : void *
41 : );
42 :
43 : void * SAL_CALL LinguProps_getFactory
44 : (
45 : const sal_Char * pImplName,
46 : XMultiServiceFactory * pServiceManager,
47 : void *
48 : );
49 :
50 : extern void * SAL_CALL ConvDicList_getFactory
51 : (
52 : const sal_Char * pImplName,
53 : XMultiServiceFactory * pServiceManager,
54 : void *
55 : );
56 :
57 : extern void * SAL_CALL GrammarCheckingIterator_getFactory
58 : (
59 : const sal_Char * pImplName,
60 : XMultiServiceFactory * pServiceManager,
61 : void *
62 : );
63 :
64 :
65 : extern "C"
66 : {
67 :
68 96 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL lng_component_getFactory(
69 : const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
70 : {
71 : void * pRet =
72 : LngSvcMgr_getFactory(
73 : pImplName,
74 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
75 96 : pRegistryKey );
76 :
77 96 : if(!pRet)
78 : pRet = LinguProps_getFactory(
79 : pImplName,
80 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
81 56 : pRegistryKey );
82 :
83 96 : if(!pRet)
84 : pRet = DicList_getFactory(
85 : pImplName,
86 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
87 29 : pRegistryKey );
88 :
89 96 : if(!pRet)
90 : pRet = ConvDicList_getFactory(
91 : pImplName,
92 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
93 0 : pRegistryKey );
94 :
95 96 : if(!pRet)
96 : pRet = GrammarCheckingIterator_getFactory(
97 : pImplName,
98 : reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
99 0 : pRegistryKey );
100 96 : return pRet;
101 : }
102 : }
103 :
104 :
105 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|