1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_chart2.hxx" 30 #include <cppuhelper/implementationentry.hxx> 31 #ifndef _CHARTMODEL_HXX 32 #include "ChartModel.hxx" 33 #endif 34 35 #include "Diagram.hxx" 36 #include "Legend.hxx" 37 #include "Axis.hxx" 38 #include "GridProperties.hxx" 39 #include "Title.hxx" 40 #include "FormattedString.hxx" 41 #include "PageBackground.hxx" 42 #include "DataSeries.hxx" 43 #include "PolarCoordinateSystem.hxx" 44 #include "CartesianCoordinateSystem.hxx" 45 46 #include "ChartTypeManager.hxx" 47 #include "XMLFilter.hxx" 48 49 #include "_serviceregistration_charttypes.hxx" 50 51 static struct ::cppu::ImplementationEntry g_entries_chart2_model[] = 52 { 53 { 54 ::chart::ChartModel::create 55 , ::chart::ChartModel::getImplementationName_Static 56 , ::chart::ChartModel::getSupportedServiceNames_Static 57 , ::cppu::createSingleComponentFactory 58 , 0 59 , 0 60 } 61 ,{ 62 ::chart::Diagram::create 63 , ::chart::Diagram::getImplementationName_Static 64 , ::chart::Diagram::getSupportedServiceNames_Static 65 , ::cppu::createSingleComponentFactory 66 , 0 67 , 0 68 } 69 ,{ 70 ::chart::Legend::create 71 , ::chart::Legend::getImplementationName_Static 72 , ::chart::Legend::getSupportedServiceNames_Static 73 , ::cppu::createSingleComponentFactory 74 , 0 75 , 0 76 } 77 ,{ 78 ::chart::Axis::create 79 , ::chart::Axis::getImplementationName_Static 80 , ::chart::Axis::getSupportedServiceNames_Static 81 , ::cppu::createSingleComponentFactory 82 , 0 83 , 0 84 } 85 ,{ 86 ::chart::GridProperties::create 87 , ::chart::GridProperties::getImplementationName_Static 88 , ::chart::GridProperties::getSupportedServiceNames_Static 89 , ::cppu::createSingleComponentFactory 90 , 0 91 , 0 92 } 93 ,{ 94 ::chart::Title::create 95 , ::chart::Title::getImplementationName_Static 96 , ::chart::Title::getSupportedServiceNames_Static 97 , ::cppu::createSingleComponentFactory 98 , 0 99 , 0 100 } 101 102 ,{ 103 ::chart::FormattedString::create 104 , ::chart::FormattedString::getImplementationName_Static 105 , ::chart::FormattedString::getSupportedServiceNames_Static 106 , ::cppu::createSingleComponentFactory 107 , 0 108 , 0 109 } 110 111 ,{ 112 ::chart::ChartTypeManager::create 113 , ::chart::ChartTypeManager::getImplementationName_Static 114 , ::chart::ChartTypeManager::getSupportedServiceNames_Static 115 , ::cppu::createSingleComponentFactory 116 , 0 117 , 0 118 } 119 ,{ 120 ::chart::PageBackground::create 121 , ::chart::PageBackground::getImplementationName_Static 122 , ::chart::PageBackground::getSupportedServiceNames_Static 123 , ::cppu::createSingleComponentFactory 124 , 0 125 , 0 126 } 127 ,{ 128 ::chart::DataSeries::create 129 , ::chart::DataSeries::getImplementationName_Static 130 , ::chart::DataSeries::getSupportedServiceNames_Static 131 , ::cppu::createSingleComponentFactory 132 , 0 133 , 0 134 } 135 ,{ 136 ::chart::XMLFilter::create 137 , ::chart::XMLFilter::getImplementationName_Static 138 , ::chart::XMLFilter::getSupportedServiceNames_Static 139 , ::cppu::createSingleComponentFactory 140 , 0 141 , 0 142 } 143 ,{ 144 ::chart::XMLReportFilterHelper::create 145 , ::chart::XMLReportFilterHelper::getImplementationName_Static 146 , ::chart::XMLFilter::getSupportedServiceNames_Static // we support the same, because we are derived from 147 , ::cppu::createSingleComponentFactory 148 , 0 149 , 0 150 } 151 ,{ 152 ::chart::PolarCoordinateSystem2d::create 153 , ::chart::PolarCoordinateSystem2d::getImplementationName_Static 154 , ::chart::PolarCoordinateSystem2d::getSupportedServiceNames_Static 155 , ::cppu::createSingleComponentFactory 156 , 0 157 , 0 158 } 159 ,{ 160 ::chart::PolarCoordinateSystem3d::create 161 , ::chart::PolarCoordinateSystem3d::getImplementationName_Static 162 , ::chart::PolarCoordinateSystem3d::getSupportedServiceNames_Static 163 , ::cppu::createSingleComponentFactory 164 , 0 165 , 0 166 } 167 ,{ 168 ::chart::CartesianCoordinateSystem2d::create 169 , ::chart::CartesianCoordinateSystem2d::getImplementationName_Static 170 , ::chart::CartesianCoordinateSystem2d::getSupportedServiceNames_Static 171 , ::cppu::createSingleComponentFactory 172 , 0 173 , 0 174 } 175 ,{ 176 ::chart::CartesianCoordinateSystem3d::create 177 , ::chart::CartesianCoordinateSystem3d::getImplementationName_Static 178 , ::chart::CartesianCoordinateSystem3d::getSupportedServiceNames_Static 179 , ::cppu::createSingleComponentFactory 180 , 0 181 , 0 182 } 183 ,{ 0, 0, 0, 0, 0, 0 } 184 }; 185 186 // component exports 187 extern "C" 188 { 189 //================================================================================================== 190 SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( 191 const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) 192 { 193 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; 194 } 195 //================================================================================================== 196 SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( 197 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) 198 { 199 void * pResult = ::cppu::component_getFactoryHelper( 200 pImplName, pServiceManager, pRegistryKey, g_entries_chart2_model ); 201 202 if( ! pResult ) 203 pResult = ::cppu::component_getFactoryHelper( 204 pImplName, pServiceManager, pRegistryKey, 205 ChartTypeEntriesForServiceRegistration::getImplementationEntries() ); 206 207 return pResult; 208 } 209 } 210 //========================================================================= 211