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 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_chart2.hxx" 26 #include <cppuhelper/implementationentry.hxx> 27 #ifndef _CHARTMODEL_HXX 28 #include "ChartModel.hxx" 29 #endif 30 31 #include "Diagram.hxx" 32 #include "Legend.hxx" 33 #include "Axis.hxx" 34 #include "GridProperties.hxx" 35 #include "Title.hxx" 36 #include "FormattedString.hxx" 37 #include "PageBackground.hxx" 38 #include "DataSeries.hxx" 39 #include "PolarCoordinateSystem.hxx" 40 #include "CartesianCoordinateSystem.hxx" 41 42 #include "ChartTypeManager.hxx" 43 #include "XMLFilter.hxx" 44 45 #include "_serviceregistration_charttypes.hxx" 46 47 static struct ::cppu::ImplementationEntry g_entries_chart2_model[] = 48 { 49 { 50 ::chart::ChartModel::create 51 , ::chart::ChartModel::getImplementationName_Static 52 , ::chart::ChartModel::getSupportedServiceNames_Static 53 , ::cppu::createSingleComponentFactory 54 , 0 55 , 0 56 } 57 ,{ 58 ::chart::Diagram::create 59 , ::chart::Diagram::getImplementationName_Static 60 , ::chart::Diagram::getSupportedServiceNames_Static 61 , ::cppu::createSingleComponentFactory 62 , 0 63 , 0 64 } 65 ,{ 66 ::chart::Legend::create 67 , ::chart::Legend::getImplementationName_Static 68 , ::chart::Legend::getSupportedServiceNames_Static 69 , ::cppu::createSingleComponentFactory 70 , 0 71 , 0 72 } 73 ,{ 74 ::chart::Axis::create 75 , ::chart::Axis::getImplementationName_Static 76 , ::chart::Axis::getSupportedServiceNames_Static 77 , ::cppu::createSingleComponentFactory 78 , 0 79 , 0 80 } 81 ,{ 82 ::chart::GridProperties::create 83 , ::chart::GridProperties::getImplementationName_Static 84 , ::chart::GridProperties::getSupportedServiceNames_Static 85 , ::cppu::createSingleComponentFactory 86 , 0 87 , 0 88 } 89 ,{ 90 ::chart::Title::create 91 , ::chart::Title::getImplementationName_Static 92 , ::chart::Title::getSupportedServiceNames_Static 93 , ::cppu::createSingleComponentFactory 94 , 0 95 , 0 96 } 97 98 ,{ 99 ::chart::FormattedString::create 100 , ::chart::FormattedString::getImplementationName_Static 101 , ::chart::FormattedString::getSupportedServiceNames_Static 102 , ::cppu::createSingleComponentFactory 103 , 0 104 , 0 105 } 106 107 ,{ 108 ::chart::ChartTypeManager::create 109 , ::chart::ChartTypeManager::getImplementationName_Static 110 , ::chart::ChartTypeManager::getSupportedServiceNames_Static 111 , ::cppu::createSingleComponentFactory 112 , 0 113 , 0 114 } 115 ,{ 116 ::chart::PageBackground::create 117 , ::chart::PageBackground::getImplementationName_Static 118 , ::chart::PageBackground::getSupportedServiceNames_Static 119 , ::cppu::createSingleComponentFactory 120 , 0 121 , 0 122 } 123 ,{ 124 ::chart::DataSeries::create 125 , ::chart::DataSeries::getImplementationName_Static 126 , ::chart::DataSeries::getSupportedServiceNames_Static 127 , ::cppu::createSingleComponentFactory 128 , 0 129 , 0 130 } 131 ,{ 132 ::chart::XMLFilter::create 133 , ::chart::XMLFilter::getImplementationName_Static 134 , ::chart::XMLFilter::getSupportedServiceNames_Static 135 , ::cppu::createSingleComponentFactory 136 , 0 137 , 0 138 } 139 ,{ 140 ::chart::XMLReportFilterHelper::create 141 , ::chart::XMLReportFilterHelper::getImplementationName_Static 142 , ::chart::XMLFilter::getSupportedServiceNames_Static // we support the same, because we are derived from 143 , ::cppu::createSingleComponentFactory 144 , 0 145 , 0 146 } 147 ,{ 148 ::chart::PolarCoordinateSystem2d::create 149 , ::chart::PolarCoordinateSystem2d::getImplementationName_Static 150 , ::chart::PolarCoordinateSystem2d::getSupportedServiceNames_Static 151 , ::cppu::createSingleComponentFactory 152 , 0 153 , 0 154 } 155 ,{ 156 ::chart::PolarCoordinateSystem3d::create 157 , ::chart::PolarCoordinateSystem3d::getImplementationName_Static 158 , ::chart::PolarCoordinateSystem3d::getSupportedServiceNames_Static 159 , ::cppu::createSingleComponentFactory 160 , 0 161 , 0 162 } 163 ,{ 164 ::chart::CartesianCoordinateSystem2d::create 165 , ::chart::CartesianCoordinateSystem2d::getImplementationName_Static 166 , ::chart::CartesianCoordinateSystem2d::getSupportedServiceNames_Static 167 , ::cppu::createSingleComponentFactory 168 , 0 169 , 0 170 } 171 ,{ 172 ::chart::CartesianCoordinateSystem3d::create 173 , ::chart::CartesianCoordinateSystem3d::getImplementationName_Static 174 , ::chart::CartesianCoordinateSystem3d::getSupportedServiceNames_Static 175 , ::cppu::createSingleComponentFactory 176 , 0 177 , 0 178 } 179 ,{ 0, 0, 0, 0, 0, 0 } 180 }; 181 182 // component exports 183 extern "C" 184 { 185 //================================================================================================== 186 SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( 187 const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) 188 { 189 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; 190 } 191 //================================================================================================== 192 SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( 193 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) 194 { 195 void * pResult = ::cppu::component_getFactoryHelper( 196 pImplName, pServiceManager, pRegistryKey, g_entries_chart2_model ); 197 198 if( ! pResult ) 199 pResult = ::cppu::component_getFactoryHelper( 200 pImplName, pServiceManager, pRegistryKey, 201 ChartTypeEntriesForServiceRegistration::getImplementationEntries() ); 202 203 return pResult; 204 } 205 } 206 //========================================================================= 207