13b8558fdSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
33b8558fdSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
43b8558fdSAndrew Rist * or more contributor license agreements. See the NOTICE file
53b8558fdSAndrew Rist * distributed with this work for additional information
63b8558fdSAndrew Rist * regarding copyright ownership. The ASF licenses this file
73b8558fdSAndrew Rist * to you under the Apache License, Version 2.0 (the
83b8558fdSAndrew Rist * "License"); you may not use this file except in compliance
93b8558fdSAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
113b8558fdSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
133b8558fdSAndrew Rist * Unless required by applicable law or agreed to in writing,
143b8558fdSAndrew Rist * software distributed under the License is distributed on an
153b8558fdSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163b8558fdSAndrew Rist * KIND, either express or implied. See the License for the
173b8558fdSAndrew Rist * specific language governing permissions and limitations
183b8558fdSAndrew Rist * under the License.
19cdf0e10cSrcweir *
203b8558fdSAndrew Rist *************************************************************/
213b8558fdSAndrew Rist
223b8558fdSAndrew 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
37*55bca0e7Smseidel extern void * SAL_CALL LngSvcMgr_getFactory
38*55bca0e7Smseidel (
39*55bca0e7Smseidel const sal_Char * pImplName,
40*55bca0e7Smseidel XMultiServiceFactory * pServiceManager,
41*55bca0e7Smseidel void * /*pRegistryKey*/
42*55bca0e7Smseidel );
43cdf0e10cSrcweir
44*55bca0e7Smseidel extern void * SAL_CALL DicList_getFactory
45*55bca0e7Smseidel (
46*55bca0e7Smseidel const sal_Char * pImplName,
47*55bca0e7Smseidel XMultiServiceFactory * pServiceManager,
48*55bca0e7Smseidel void *
49*55bca0e7Smseidel );
50cdf0e10cSrcweir
51*55bca0e7Smseidel void * SAL_CALL LinguProps_getFactory
52*55bca0e7Smseidel (
53*55bca0e7Smseidel const sal_Char * pImplName,
54*55bca0e7Smseidel XMultiServiceFactory * pServiceManager,
55*55bca0e7Smseidel void *
56*55bca0e7Smseidel );
57cdf0e10cSrcweir
58*55bca0e7Smseidel extern void * SAL_CALL ConvDicList_getFactory
59*55bca0e7Smseidel (
60*55bca0e7Smseidel const sal_Char * pImplName,
61*55bca0e7Smseidel XMultiServiceFactory * pServiceManager,
62*55bca0e7Smseidel void *
63*55bca0e7Smseidel );
64cdf0e10cSrcweir
65*55bca0e7Smseidel extern void * SAL_CALL GrammarCheckingIterator_getFactory
66*55bca0e7Smseidel (
67*55bca0e7Smseidel const sal_Char * pImplName,
68*55bca0e7Smseidel XMultiServiceFactory * pServiceManager,
69*55bca0e7Smseidel void *
70*55bca0e7Smseidel );
71cdf0e10cSrcweir
72*55bca0e7Smseidel //extern void * SAL_CALL GrammarChecker_getFactory
73*55bca0e7Smseidel //(
74*55bca0e7Smseidel // const sal_Char * pImplName,
75*55bca0e7Smseidel // XMultiServiceFactory * pServiceManager,
76*55bca0e7Smseidel // void *
77*55bca0e7Smseidel //);
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 **)86b63233d8Sdamjan SAL_DLLPUBLIC_EXPORT 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)92b63233d8Sdamjan SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
93cdf0e10cSrcweir const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
94cdf0e10cSrcweir {
95*55bca0e7Smseidel void * pRet =
96*55bca0e7Smseidel LngSvcMgr_getFactory(
97*55bca0e7Smseidel pImplName,
98*55bca0e7Smseidel reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
99*55bca0e7Smseidel pRegistryKey );
100*55bca0e7Smseidel
101*55bca0e7Smseidel if(!pRet)
102*55bca0e7Smseidel pRet = LinguProps_getFactory(
103*55bca0e7Smseidel pImplName,
104*55bca0e7Smseidel reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
105*55bca0e7Smseidel pRegistryKey );
106*55bca0e7Smseidel
107*55bca0e7Smseidel if(!pRet)
108*55bca0e7Smseidel pRet = DicList_getFactory(
109*55bca0e7Smseidel pImplName,
110*55bca0e7Smseidel reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
111*55bca0e7Smseidel pRegistryKey );
112*55bca0e7Smseidel
113*55bca0e7Smseidel if(!pRet)
114*55bca0e7Smseidel pRet = ConvDicList_getFactory(
115*55bca0e7Smseidel pImplName,
116*55bca0e7Smseidel reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
117*55bca0e7Smseidel pRegistryKey );
118*55bca0e7Smseidel
119*55bca0e7Smseidel if(!pRet)
120*55bca0e7Smseidel pRet = GrammarCheckingIterator_getFactory(
121*55bca0e7Smseidel pImplName,
122*55bca0e7Smseidel reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
123*55bca0e7Smseidel pRegistryKey );
124*55bca0e7Smseidel /*
125*55bca0e7Smseidel if(!pRet)
126*55bca0e7Smseidel pRet = GrammarChecker_getFactory(
127*55bca0e7Smseidel pImplName,
128*55bca0e7Smseidel reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
129*55bca0e7Smseidel pRegistryKey );
130*55bca0e7Smseidel */
131*55bca0e7Smseidel return pRet;
132cdf0e10cSrcweir }
133cdf0e10cSrcweir }
134cdf0e10cSrcweir
135cdf0e10cSrcweir ///////////////////////////////////////////////////////////////////////////
136