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 "sal/types.h"
25 #include <cppuhelper/factory.hxx>
26 #include <osl/diagnose.h>
27 #include <cppuhelper/implementationentry.hxx>
28 #include "ReportDefinition.hxx"
29 #include "FormattedField.hxx"
30 #include "FixedText.hxx"
31 #include "ImageControl.hxx"
32 #include "FormatCondition.hxx"
33 #include "ReportEngineJFree.hxx"
34 #include "Function.hxx"
35 #include "Shape.hxx"
36 #include "FixedLine.hxx"
37 
38 /********************************************************************************************/
39 
40 using namespace ::reportdesign;
41 using namespace ::com::sun::star::uno;
42 using namespace ::com::sun::star::lang;
43 using namespace ::com::sun::star::registry;
44 
45 //***************************************************************************************
46 //
47 // registry functions
48 namespace
49 {
50 
51 cppu::ImplementationEntry entries[] = {
52 	{ &OReportDefinition::create, &OReportDefinition::getImplementationName_Static, &OReportDefinition::getSupportedServiceNames_Static,
53 		&cppu::createSingleComponentFactory, 0, 0 },
54 	{ &OFormattedField::create, &OFormattedField::getImplementationName_Static, &OFormattedField::getSupportedServiceNames_Static,
55 		&cppu::createSingleComponentFactory, 0, 0 },
56     { &OFixedText::create, &OFixedText::getImplementationName_Static, &OFixedText::getSupportedServiceNames_Static,
57 		&cppu::createSingleComponentFactory, 0, 0 },
58     { &OImageControl::create, &OImageControl::getImplementationName_Static, &OImageControl::getSupportedServiceNames_Static,
59 		&cppu::createSingleComponentFactory, 0, 0 },
60     { &OFormatCondition::create, &OFormatCondition::getImplementationName_Static, &OFormatCondition::getSupportedServiceNames_Static,
61 		&cppu::createSingleComponentFactory, 0, 0 },
62     { &OReportEngineJFree::create, &OReportEngineJFree::getImplementationName_Static, &OReportEngineJFree::getSupportedServiceNames_Static,
63 		&cppu::createSingleComponentFactory, 0, 0 },
64     { &OFunction::create, &OFunction::getImplementationName_Static, &OFunction::getSupportedServiceNames_Static,
65 		&cppu::createSingleComponentFactory, 0, 0 },
66     { &OShape::create, &OShape::getImplementationName_Static, &OShape::getSupportedServiceNames_Static,
67 		&cppu::createSingleComponentFactory, 0, 0 },
68     { &OFixedLine::create, &OFixedLine::getImplementationName_Static, &OFixedLine::getSupportedServiceNames_Static,
69 	&cppu::createSingleComponentFactory, 0, 0 },
70 	{ 0, 0, 0, 0, 0, 0 }
71 };
72 }
73 
74 extern "C"
75 {
component_getFactory(char const * implName,void * serviceManager,void * registryKey)76 SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
77     char const * implName, void * serviceManager, void * registryKey)
78 {
79     return cppu::component_getFactoryHelper(
80         implName, serviceManager, registryKey, entries);
81 }
82 
component_getImplementationEnvironment(char const ** envTypeName,uno_Environment **)83 SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
84     char const ** envTypeName, uno_Environment **)
85 {
86     *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
87 }
88 
89 } // extern "C"
90