xref: /trunk/main/svgio/source/svguno/svguno.cxx (revision cf6516809c57e1bb0a940545cca99cdad54d4ce2)
1ddde725dSArmin Le Grand /**************************************************************
2ddde725dSArmin Le Grand  *
3ddde725dSArmin Le Grand  * Licensed to the Apache Software Foundation (ASF) under one
4ddde725dSArmin Le Grand  * or more contributor license agreements.  See the NOTICE file
5ddde725dSArmin Le Grand  * distributed with this work for additional information
6ddde725dSArmin Le Grand  * regarding copyright ownership.  The ASF licenses this file
7ddde725dSArmin Le Grand  * to you under the Apache License, Version 2.0 (the
8ddde725dSArmin Le Grand  * "License"); you may not use this file except in compliance
9ddde725dSArmin Le Grand  * with the License.  You may obtain a copy of the License at
10ddde725dSArmin Le Grand  *
11ddde725dSArmin Le Grand  *   http://www.apache.org/licenses/LICENSE-2.0
12ddde725dSArmin Le Grand  *
13ddde725dSArmin Le Grand  * Unless required by applicable law or agreed to in writing,
14ddde725dSArmin Le Grand  * software distributed under the License is distributed on an
15ddde725dSArmin Le Grand  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ddde725dSArmin Le Grand  * KIND, either express or implied.  See the License for the
17ddde725dSArmin Le Grand  * specific language governing permissions and limitations
18ddde725dSArmin Le Grand  * under the License.
19ddde725dSArmin Le Grand  *
20ddde725dSArmin Le Grand  *************************************************************/
21ddde725dSArmin Le Grand 
22ddde725dSArmin Le Grand // MARKER(update_precomp.py): autogen include statement, do not remove
23ddde725dSArmin Le Grand #include "precompiled_svgio.hxx"
24ddde725dSArmin Le Grand 
25ddde725dSArmin Le Grand #include <svgio/svgiodllapi.h>
26ddde725dSArmin Le Grand #include <com/sun/star/uno/Reference.h>
27ddde725dSArmin Le Grand #include <com/sun/star/uno/RuntimeException.hpp>
28ddde725dSArmin Le Grand #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29ddde725dSArmin Le Grand #include <com/sun/star/lang/XComponent.hpp>
30ddde725dSArmin Le Grand #include <com/sun/star/registry/XRegistryKey.hpp>
31ddde725dSArmin Le Grand #include <com/sun/star/lang/XComponent.hpp>
32ddde725dSArmin Le Grand #include <com/sun/star/lang/XServiceInfo.hpp>
33ddde725dSArmin Le Grand #include <com/sun/star/lang/XSingleServiceFactory.hpp>
34ddde725dSArmin Le Grand #include <uno/environment.h>
35ddde725dSArmin Le Grand #include <cppuhelper/factory.hxx>
36*c058b6cbSDamjan Jovanovic #include <cppuhelper/implementationentry.hxx>
37ddde725dSArmin Le Grand 
38ddde725dSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
39ddde725dSArmin Le Grand 
40ddde725dSArmin Le Grand using namespace ::com::sun::star;
41ddde725dSArmin Le Grand 
42ddde725dSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
43ddde725dSArmin Le Grand // predefines
44ddde725dSArmin Le Grand 
45ddde725dSArmin Le Grand namespace svgio
46ddde725dSArmin Le Grand {
47ddde725dSArmin Le Grand     namespace svgreader
48ddde725dSArmin Le Grand     {
49ddde725dSArmin Le Grand         extern uno::Sequence< rtl::OUString > SAL_CALL XSvgParser_getSupportedServiceNames();
50ddde725dSArmin Le Grand         extern rtl::OUString SAL_CALL XSvgParser_getImplementationName();
51*c058b6cbSDamjan Jovanovic         extern uno::Reference< uno::XInterface > SAL_CALL XSvgParser_createInstance( const uno::Reference< uno::XComponentContext > & );
52ddde725dSArmin Le Grand     } // end of namespace svgreader
53ddde725dSArmin Le Grand } // end of namespace svgio
54ddde725dSArmin Le Grand 
55ddde725dSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
56ddde725dSArmin Le Grand // component_getImplementationEnvironment
57ddde725dSArmin Le Grand 
58ddde725dSArmin Le Grand extern "C"
59ddde725dSArmin Le Grand {
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)60ddde725dSArmin Le Grand     SVGIO_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
61ddde725dSArmin Le Grand     {
62ddde725dSArmin Le Grand         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
63ddde725dSArmin Le Grand     }
64ddde725dSArmin Le Grand }
65ddde725dSArmin Le Grand 
66ddde725dSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
67ddde725dSArmin Le Grand // component_getFactory
68ddde725dSArmin Le Grand 
69*c058b6cbSDamjan Jovanovic static struct ::cppu::ImplementationEntry g_component_entries[] =
70*c058b6cbSDamjan Jovanovic {
71*c058b6cbSDamjan Jovanovic     {
72*c058b6cbSDamjan Jovanovic         svgio::svgreader::XSvgParser_createInstance,
73*c058b6cbSDamjan Jovanovic         svgio::svgreader::XSvgParser_getImplementationName,
74*c058b6cbSDamjan Jovanovic         svgio::svgreader::XSvgParser_getSupportedServiceNames,
75*c058b6cbSDamjan Jovanovic         ::cppu::createSingleComponentFactory,
76*c058b6cbSDamjan Jovanovic         0,
77*c058b6cbSDamjan Jovanovic         0
78*c058b6cbSDamjan Jovanovic     },
79*c058b6cbSDamjan Jovanovic     { 0, 0, 0, 0, 0, 0 }
80*c058b6cbSDamjan Jovanovic };
81*c058b6cbSDamjan Jovanovic 
82ddde725dSArmin Le Grand extern "C"
83ddde725dSArmin Le Grand {
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)84*c058b6cbSDamjan Jovanovic     SVGIO_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
85ddde725dSArmin Le Grand     {
86*c058b6cbSDamjan Jovanovic         return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, g_component_entries );
87ddde725dSArmin Le Grand     }
88ddde725dSArmin Le Grand }
89ddde725dSArmin Le Grand 
90ddde725dSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
91ddde725dSArmin Le Grand // eof
92