xref: /trunk/main/basctl/source/basicide/register.cxx (revision cf6516809c57e1bb0a940545cca99cdad54d4ce2)
131598a22SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
331598a22SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
431598a22SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
531598a22SAndrew Rist  * distributed with this work for additional information
631598a22SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
731598a22SAndrew Rist  * to you under the Apache License, Version 2.0 (the
831598a22SAndrew Rist  * "License"); you may not use this file except in compliance
931598a22SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
1131598a22SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
1331598a22SAndrew Rist  * Unless required by applicable law or agreed to in writing,
1431598a22SAndrew Rist  * software distributed under the License is distributed on an
1531598a22SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1631598a22SAndrew Rist  * KIND, either express or implied.  See the License for the
1731598a22SAndrew Rist  * specific language governing permissions and limitations
1831598a22SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
2031598a22SAndrew Rist  *************************************************************/
2131598a22SAndrew Rist 
2231598a22SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_basctl.hxx"
26cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
27cdf0e10cSrcweir #include <com/sun/star/registry/XRegistryKey.hpp>
28cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.h>
29cdf0e10cSrcweir #include <rtl/ustring.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <cppuhelper/factory.hxx>
32*b504c543SDamjan Jovanovic #include <cppuhelper/implementationentry.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include "unomodel.hxx"
35cdf0e10cSrcweir 
36cdf0e10cSrcweir using ::rtl::OUString;
37cdf0e10cSrcweir using namespace ::com::sun::star;
38cdf0e10cSrcweir using namespace ::com::sun::star::uno;
39cdf0e10cSrcweir using namespace ::com::sun::star::lang;
40cdf0e10cSrcweir 
41*b504c543SDamjan Jovanovic static struct ::cppu::ImplementationEntry g_component_entries[] =
42*b504c543SDamjan Jovanovic {
43*b504c543SDamjan Jovanovic      {
44*b504c543SDamjan Jovanovic          SIDEModel_createInstance,
45*b504c543SDamjan Jovanovic          SIDEModel::getImplementationName_Static,
46*b504c543SDamjan Jovanovic          SIDEModel::getSupportedServiceNames_Static,
47*b504c543SDamjan Jovanovic          ::cppu::createSingleComponentFactory,
48*b504c543SDamjan Jovanovic          0,
49*b504c543SDamjan Jovanovic          0
50*b504c543SDamjan Jovanovic      },
51*b504c543SDamjan Jovanovic      { 0, 0, 0, 0, 0, 0 }
52*b504c543SDamjan Jovanovic };
53cdf0e10cSrcweir 
54cdf0e10cSrcweir extern "C" {
55cdf0e10cSrcweir 
component_getImplementationEnvironment(const sal_Char ** ppEnvironmentTypeName,uno_Environment ** ppEnvironment)56cdf0e10cSrcweir SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
57cdf0e10cSrcweir         const  sal_Char**   ppEnvironmentTypeName,
58cdf0e10cSrcweir         uno_Environment**   ppEnvironment           )
59cdf0e10cSrcweir {
60cdf0e10cSrcweir     (void)ppEnvironment;
61cdf0e10cSrcweir     *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
62cdf0e10cSrcweir }
63cdf0e10cSrcweir 
64cdf0e10cSrcweir SAL_DLLPUBLIC_EXPORT
component_getFactory(const sal_Char * pImplementationName,void * pServiceManager,void * pRegistryKey)65cdf0e10cSrcweir void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
66cdf0e10cSrcweir                                      void* pServiceManager,
67cdf0e10cSrcweir                                      void* pRegistryKey )
68cdf0e10cSrcweir {
69*b504c543SDamjan Jovanovic     return ::cppu::component_getFactoryHelper( pImplementationName, pServiceManager, pRegistryKey, g_component_entries );
70cdf0e10cSrcweir }
71cdf0e10cSrcweir 
72cdf0e10cSrcweir } // extern "C"
73