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 #include "precompiled_sfx2.hxx"
25 
26 #include "ctp_factory.hxx"
27 
28 /** === begin UNO includes === **/
29 /** === end UNO includes === **/
30 
31 #include <cppuhelper/implementationentry.hxx>
32 
33 //......................................................................................................................
34 namespace sd { namespace colortoolpanel
35 {
36 //......................................................................................................................
37 
38 	/** === begin UNO using === **/
39 	using ::com::sun::star::uno::Reference;
40 	using ::com::sun::star::uno::XInterface;
41 	using ::com::sun::star::uno::UNO_QUERY;
42 	using ::com::sun::star::uno::UNO_QUERY_THROW;
43 	using ::com::sun::star::uno::UNO_SET_THROW;
44 	using ::com::sun::star::uno::Exception;
45 	using ::com::sun::star::uno::RuntimeException;
46 	using ::com::sun::star::uno::Any;
47 	using ::com::sun::star::uno::makeAny;
48 	using ::com::sun::star::uno::Sequence;
49 	using ::com::sun::star::uno::Type;
50 	/** === end UNO using === **/
51 
52 	//==================================================================================================================
53     //= descriptors for the services implemented in this component
54     //==================================================================================================================
55     static struct ::cppu::ImplementationEntry s_aServiceEntries[] =
56     {
57         {
58             ToolPanelFactory::Create,
59             ToolPanelFactory::getImplementationName_static,
60             ToolPanelFactory::getSupportedServiceNames_static,
61             ::cppu::createSingleComponentFactory, NULL, 0
62         },
63         { 0, 0, 0, 0, 0, 0 }
64     };
65 
66 //......................................................................................................................
67 } } // namespace sd::colortoolpanel
68 //......................................................................................................................
69 
70 extern "C"
71 {
72     //------------------------------------------------------------------------------------------------------------------
73     void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
74     {
75         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
76     }
77 
78     //------------------------------------------------------------------------------------------------------------------
79     sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey )
80     {
81         return ::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, ::sd::colortoolpanel::s_aServiceEntries );
82     }
83 
84     //------------------------------------------------------------------------------------------------------------------
85     void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
86     {
87         return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::sd::colortoolpanel::s_aServiceEntries );
88     }
89 }
90