1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_shell.hxx"
26 
27 #include <localebackend.hxx>
28 
29 #ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
30 #include <cppuhelper/implementationentry.hxx>
31 #endif
32 #include <com/sun/star/uno/XComponentContext.hpp>
33 
34 namespace css = com::sun::star ;
35 namespace uno = css::uno ;
36 namespace lang = css::lang ;
37 
38 //------------------------------------------------------------------------------
39 
createLocaleBackend(const uno::Reference<uno::XComponentContext> &)40 static uno::Reference<uno::XInterface> SAL_CALL createLocaleBackend(
41     const uno::Reference<uno::XComponentContext>&){
42 
43     return * LocaleBackend::createInstance();
44 }
45 
46 //------------------------------------------------------------------------------
47 
48 static const cppu::ImplementationEntry kImplementations_entries[] =
49 {
50     {
51         createLocaleBackend,
52         LocaleBackend::getBackendName,
53         LocaleBackend::getBackendServiceNames,
54         cppu::createSingleComponentFactory,
55         NULL,
56         0
57     },
58     { NULL, NULL, NULL, NULL, NULL, 0 }
59 } ;
60 
61 //------------------------------------------------------------------------------
62 
component_getImplementationEnvironment(const sal_Char ** aEnvTypeName,uno_Environment **)63 extern "C" void SAL_CALL component_getImplementationEnvironment(
64     const sal_Char **aEnvTypeName, uno_Environment ** /*aEnvironment*/) {
65 
66     *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
67 }
68 
69 //------------------------------------------------------------------------------
70 
component_getFactory(const sal_Char * aImplementationName,void * aServiceManager,void * aRegistryKey)71 extern "C" void *component_getFactory( const sal_Char *aImplementationName,
72     void *aServiceManager,
73     void *aRegistryKey) {
74 
75     return cppu::component_getFactoryHelper(
76         aImplementationName,
77         aServiceManager,
78         aRegistryKey,
79         kImplementations_entries) ;
80 }
81 
82 //------------------------------------------------------------------------------
83 
84