xref: /aoo41x/main/linguistic/source/lngreg.cxx (revision 3b8558fd)
1*3b8558fdSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*3b8558fdSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*3b8558fdSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*3b8558fdSAndrew Rist  * distributed with this work for additional information
6*3b8558fdSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*3b8558fdSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*3b8558fdSAndrew Rist  * "License"); you may not use this file except in compliance
9*3b8558fdSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*3b8558fdSAndrew Rist  *
11*3b8558fdSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*3b8558fdSAndrew Rist  *
13*3b8558fdSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*3b8558fdSAndrew Rist  * software distributed under the License is distributed on an
15*3b8558fdSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3b8558fdSAndrew Rist  * KIND, either express or implied.  See the License for the
17*3b8558fdSAndrew Rist  * specific language governing permissions and limitations
18*3b8558fdSAndrew Rist  * under the License.
19*3b8558fdSAndrew Rist  *
20*3b8558fdSAndrew Rist  *************************************************************/
21*3b8558fdSAndrew Rist 
22*3b8558fdSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_linguistic.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <cppuhelper/factory.hxx>	// helper for factories
29cdf0e10cSrcweir #include <rtl/string.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <com/sun/star/registry/XRegistryKey.hpp>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir using namespace com::sun::star::lang;
34cdf0e10cSrcweir 
35cdf0e10cSrcweir using namespace com::sun::star::registry;
36cdf0e10cSrcweir 
37cdf0e10cSrcweir extern void * SAL_CALL LngSvcMgr_getFactory
38cdf0e10cSrcweir (
39cdf0e10cSrcweir 	const sal_Char * pImplName,
40cdf0e10cSrcweir 	XMultiServiceFactory * pServiceManager,
41cdf0e10cSrcweir 	void * /*pRegistryKey*/
42cdf0e10cSrcweir );
43cdf0e10cSrcweir 
44cdf0e10cSrcweir extern void * SAL_CALL DicList_getFactory
45cdf0e10cSrcweir (
46cdf0e10cSrcweir 	const sal_Char * pImplName,
47cdf0e10cSrcweir 	XMultiServiceFactory * pServiceManager,
48cdf0e10cSrcweir 	void *
49cdf0e10cSrcweir );
50cdf0e10cSrcweir 
51cdf0e10cSrcweir void * SAL_CALL LinguProps_getFactory
52cdf0e10cSrcweir (
53cdf0e10cSrcweir 	const sal_Char * pImplName,
54cdf0e10cSrcweir 	XMultiServiceFactory * pServiceManager,
55cdf0e10cSrcweir 	void *
56cdf0e10cSrcweir );
57cdf0e10cSrcweir 
58cdf0e10cSrcweir extern void * SAL_CALL ConvDicList_getFactory
59cdf0e10cSrcweir (
60cdf0e10cSrcweir     const sal_Char * pImplName,
61cdf0e10cSrcweir     XMultiServiceFactory * pServiceManager,
62cdf0e10cSrcweir     void *
63cdf0e10cSrcweir );
64cdf0e10cSrcweir 
65cdf0e10cSrcweir extern void * SAL_CALL GrammarCheckingIterator_getFactory
66cdf0e10cSrcweir (
67cdf0e10cSrcweir     const sal_Char * pImplName,
68cdf0e10cSrcweir     XMultiServiceFactory * pServiceManager,
69cdf0e10cSrcweir     void *
70cdf0e10cSrcweir );
71cdf0e10cSrcweir 
72cdf0e10cSrcweir //extern void * SAL_CALL GrammarChecker_getFactory
73cdf0e10cSrcweir //(
74cdf0e10cSrcweir //    const sal_Char * pImplName,
75cdf0e10cSrcweir //    XMultiServiceFactory * pServiceManager,
76cdf0e10cSrcweir //    void *
77cdf0e10cSrcweir //);
78cdf0e10cSrcweir 
79cdf0e10cSrcweir ////////////////////////////////////////
80cdf0e10cSrcweir // definition of the two functions that are used to provide the services
81cdf0e10cSrcweir //
82cdf0e10cSrcweir 
83cdf0e10cSrcweir extern "C"
84cdf0e10cSrcweir {
85cdf0e10cSrcweir 
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)86cdf0e10cSrcweir void SAL_CALL component_getImplementationEnvironment(
87cdf0e10cSrcweir     const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
88cdf0e10cSrcweir {
89cdf0e10cSrcweir     *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
90cdf0e10cSrcweir }
91cdf0e10cSrcweir 
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)92cdf0e10cSrcweir void * SAL_CALL component_getFactory(
93cdf0e10cSrcweir 	const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
94cdf0e10cSrcweir {
95cdf0e10cSrcweir 	void * pRet =
96cdf0e10cSrcweir 		LngSvcMgr_getFactory(
97cdf0e10cSrcweir 			pImplName,
98cdf0e10cSrcweir 			reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
99cdf0e10cSrcweir 			pRegistryKey );
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	if(!pRet)
102cdf0e10cSrcweir 		pRet = LinguProps_getFactory(
103cdf0e10cSrcweir 			pImplName,
104cdf0e10cSrcweir 			reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
105cdf0e10cSrcweir 			pRegistryKey );
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 	if(!pRet)
108cdf0e10cSrcweir 		pRet = 	DicList_getFactory(
109cdf0e10cSrcweir 			pImplName,
110cdf0e10cSrcweir 			reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
111cdf0e10cSrcweir 			pRegistryKey );
112cdf0e10cSrcweir 
113cdf0e10cSrcweir     if(!pRet)
114cdf0e10cSrcweir         pRet =  ConvDicList_getFactory(
115cdf0e10cSrcweir             pImplName,
116cdf0e10cSrcweir             reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
117cdf0e10cSrcweir             pRegistryKey );
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 	if(!pRet)
120cdf0e10cSrcweir         pRet =  GrammarCheckingIterator_getFactory(
121cdf0e10cSrcweir             pImplName,
122cdf0e10cSrcweir             reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
123cdf0e10cSrcweir             pRegistryKey );
124cdf0e10cSrcweir /*
125cdf0e10cSrcweir 	if(!pRet)
126cdf0e10cSrcweir         pRet =  GrammarChecker_getFactory(
127cdf0e10cSrcweir             pImplName,
128cdf0e10cSrcweir             reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
129cdf0e10cSrcweir             pRegistryKey );
130cdf0e10cSrcweir */
131cdf0e10cSrcweir 	return pRet;
132cdf0e10cSrcweir }
133cdf0e10cSrcweir }
134cdf0e10cSrcweir 
135cdf0e10cSrcweir ///////////////////////////////////////////////////////////////////////////
136cdf0e10cSrcweir 
137