1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: lngreg.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_linguistic.hxx"
35 #include <cppuhelper/factory.hxx> // helper for factories
36 #include <rtl/string.hxx>
38 #include <com/sun/star/registry/XRegistryKey.hpp>
40 using namespace com::sun::star::lang
;
42 using namespace com::sun::star::registry
;
44 ////////////////////////////////////////
45 // declaration of external RegEntry-functions defined by the service objects
48 extern sal_Bool SAL_CALL LngSvcMgr_writeInfo
50 void * /*pServiceManager*/,
51 XRegistryKey
* pRegistryKey
54 extern sal_Bool SAL_CALL DicList_writeInfo
56 void * /*pServiceManager*/, XRegistryKey
* pRegistryKey
59 extern sal_Bool SAL_CALL LinguProps_writeInfo
61 void * /*pServiceManager*/,
62 XRegistryKey
* pRegistryKey
65 extern sal_Bool SAL_CALL ConvDicList_writeInfo
67 void * /*pServiceManager*/, XRegistryKey
* pRegistryKey
70 extern sal_Bool SAL_CALL GrammarCheckingIterator_writeInfo
72 void * /*pServiceManager*/, XRegistryKey
* pRegistryKey
75 //extern sal_Bool SAL_CALL GrammarChecker_writeInfo
77 // void * /*pServiceManager*/, XRegistryKey * pRegistryKey
80 extern void * SAL_CALL LngSvcMgr_getFactory
82 const sal_Char
* pImplName
,
83 XMultiServiceFactory
* pServiceManager
,
84 void * /*pRegistryKey*/
87 extern void * SAL_CALL DicList_getFactory
89 const sal_Char
* pImplName
,
90 XMultiServiceFactory
* pServiceManager
,
94 void * SAL_CALL LinguProps_getFactory
96 const sal_Char
* pImplName
,
97 XMultiServiceFactory
* pServiceManager
,
101 extern void * SAL_CALL ConvDicList_getFactory
103 const sal_Char
* pImplName
,
104 XMultiServiceFactory
* pServiceManager
,
108 extern void * SAL_CALL GrammarCheckingIterator_getFactory
110 const sal_Char
* pImplName
,
111 XMultiServiceFactory
* pServiceManager
,
115 //extern void * SAL_CALL GrammarChecker_getFactory
117 // const sal_Char * pImplName,
118 // XMultiServiceFactory * pServiceManager,
122 ////////////////////////////////////////
123 // definition of the two functions that are used to provide the services
129 void SAL_CALL
component_getImplementationEnvironment(
130 const sal_Char
** ppEnvTypeName
, uno_Environment
** /*ppEnv*/ )
132 *ppEnvTypeName
= CPPU_CURRENT_LANGUAGE_BINDING_NAME
;
135 sal_Bool SAL_CALL component_writeInfo
137 void * pServiceManager
,
138 XRegistryKey
* pRegistryKey
141 sal_Bool bRet
= LngSvcMgr_writeInfo( pServiceManager
, pRegistryKey
);
143 bRet
= LinguProps_writeInfo( pServiceManager
, pRegistryKey
);
145 bRet
= DicList_writeInfo( pServiceManager
, pRegistryKey
);
147 bRet
= ConvDicList_writeInfo( pServiceManager
, pRegistryKey
);
149 bRet
= GrammarCheckingIterator_writeInfo( pServiceManager
, pRegistryKey
);
152 bRet = GrammarChecker_writeInfo( pServiceManager, pRegistryKey );
157 void * SAL_CALL
component_getFactory(
158 const sal_Char
* pImplName
, void * pServiceManager
, void * pRegistryKey
)
161 LngSvcMgr_getFactory(
163 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
167 pRet
= LinguProps_getFactory(
169 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
173 pRet
= DicList_getFactory(
175 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
179 pRet
= ConvDicList_getFactory(
181 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
185 pRet
= GrammarCheckingIterator_getFactory(
187 reinterpret_cast< XMultiServiceFactory
* >( pServiceManager
),
191 pRet = GrammarChecker_getFactory(
193 reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
200 ///////////////////////////////////////////////////////////////////////////