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 #include "precompiled_rptui.hxx"
24 #include <cppuhelper/factory.hxx>
25 #include <osl/diagnose.h>
26 #include <cppuhelper/implementationentry.hxx>
27 #include "ReportController.hxx"
28 #include "toolboxcontroller.hxx"
29 #include "statusbarcontroller.hxx"
30 #include "DefaultInspection.hxx"
31 #include "ReportComponentHandler.hxx"
32 #include "GeometryHandler.hxx"
33 #include "DataProviderHandler.hxx"
34 
35 /********************************************************************************************/
36 
37 using namespace ::rptui;
38 using namespace ::com::sun::star::uno;
39 using namespace ::com::sun::star::lang;
40 using namespace ::com::sun::star::registry;
41 
42 //***************************************************************************************
43 //
44 // registry functions
45 namespace
46 {
47 
48 cppu::ImplementationEntry entries[] = {
49 	{ &OReportController::create, &OReportController::getImplementationName_Static, &OReportController::getSupportedServiceNames_Static,
50 		&cppu::createSingleComponentFactory, 0, 0 },
51 	{ &OToolboxController::create, &OToolboxController::getImplementationName_Static, &OToolboxController::getSupportedServiceNames_Static,
52 		&cppu::createSingleComponentFactory, 0, 0 },
53     { &OStatusbarController::create, &OStatusbarController::getImplementationName_Static, &OStatusbarController::getSupportedServiceNames_Static,
54 		&cppu::createSingleComponentFactory, 0, 0 },
55     { &DefaultComponentInspectorModel::create, &DefaultComponentInspectorModel::getImplementationName_Static, &DefaultComponentInspectorModel::getSupportedServiceNames_static,
56 		&cppu::createSingleComponentFactory, 0, 0 },
57     { &ReportComponentHandler::create, &ReportComponentHandler::getImplementationName_Static, &ReportComponentHandler::getSupportedServiceNames_static,
58 		&cppu::createSingleComponentFactory, 0, 0 },
59     { &GeometryHandler::create, &GeometryHandler::getImplementationName_Static, &GeometryHandler::getSupportedServiceNames_static,
60 		&cppu::createSingleComponentFactory, 0, 0 },
61     { &DataProviderHandler::create, &DataProviderHandler::getImplementationName_Static, &DataProviderHandler::getSupportedServiceNames_static,
62 		&cppu::createSingleComponentFactory, 0, 0 },
63 	{ 0, 0, 0, 0, 0, 0 }
64 };
65 }
66 
component_getFactory(char const * implName,void * serviceManager,void * registryKey)67 extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
68     char const * implName, void * serviceManager, void * registryKey)
69 {
70     return cppu::component_getFactoryHelper(
71         implName, serviceManager, registryKey, entries);
72 }
73 
component_getImplementationEnvironment(char const ** envTypeName,uno_Environment **)74 extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
75     char const ** envTypeName, uno_Environment **)
76 {
77     *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
78 }
79