diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-07 10:48:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-07 11:54:20 +0000 |
commit | b7914a9a566413eac55c7e115da1cb3552cd58df (patch) | |
tree | 0b1fcdddf5552ebcfed8966cc8e01567c4028442 /chart2 | |
parent | 65aafb507126760a293e16efe17fe7ac5ab186b5 (diff) |
loplugin:oncevar in chart2
Change-Id: Id9308f9265c2453075971c8105b4d161bd145da7
Reviewed-on: https://gerrit.libreoffice.org/30654
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
24 files changed, 43 insertions, 105 deletions
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx index 2a408c54e0d6..26926b35d22f 100644 --- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx @@ -38,7 +38,6 @@ using ::com::sun::star::uno::Sequence; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Area"; struct StaticAreaWrapperPropertyArray_Initializer { @@ -185,7 +184,7 @@ OUString SAL_CALL AreaWrapper::getImplementationName() OUString AreaWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.Area"); } sal_Bool SAL_CALL AreaWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index 288e22488987..16998053aba9 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -60,7 +60,6 @@ using ::com::sun::star::uno::Any; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Axis"; enum { @@ -710,7 +709,7 @@ OUString SAL_CALL AxisWrapper::getImplementationName() OUString AxisWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.Axis"); } sal_Bool SAL_CALL AxisWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index ae403bbe9854..f824d8baba5c 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -59,7 +59,6 @@ using ::com::sun::star::chart::XDateCategories; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartData"; uno::Sequence< uno::Sequence< double > > lcl_getNANInsteadDBL_MIN( const uno::Sequence< uno::Sequence< double > >& rData ) { @@ -720,7 +719,7 @@ OUString SAL_CALL ChartDataWrapper::getImplementationName() OUString ChartDataWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.ChartData"); } sal_Bool SAL_CALL ChartDataWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index b17ed8eae018..001b63c3b287 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -66,7 +66,6 @@ using ::com::sun::star::uno::Any; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSeries"; enum { @@ -932,7 +931,7 @@ OUString SAL_CALL DataSeriesPointWrapper::getImplementationName() OUString DataSeriesPointWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.DataSeries"); } sal_Bool SAL_CALL DataSeriesPointWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 7e3c1c2813ce..78195fc5ce1d 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -79,7 +79,6 @@ using ::osl::MutexGuard; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Diagram"; enum { @@ -2091,7 +2090,7 @@ OUString SAL_CALL DiagramWrapper::getImplementationName() OUString DiagramWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.Diagram"); } sal_Bool SAL_CALL DiagramWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx index cb6bc2102bcb..4e92d9b0f4a2 100644 --- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx @@ -42,7 +42,6 @@ using ::com::sun::star::uno::Sequence; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Grid"; struct StaticGridWrapperPropertyArray_Initializer { @@ -190,7 +189,7 @@ OUString SAL_CALL GridWrapper::getImplementationName() OUString GridWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.Grid"); } sal_Bool SAL_CALL GridWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx index 3e90e8f09fc4..87bac97c0cf9 100644 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -209,7 +209,6 @@ Any WrappedLegendAlignmentProperty::convertOuterToInnerValue( const Any& rOuterV namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Legend"; enum { @@ -439,7 +438,7 @@ OUString SAL_CALL LegendWrapper::getImplementationName() OUString LegendWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.Legend"); } sal_Bool SAL_CALL LegendWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index a4f006075705..cea132d0928a 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -41,7 +41,6 @@ using ::com::sun::star::uno::Any; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartLine"; struct StaticMinMaxLineWrapperDefaults_Initializer { @@ -426,7 +425,7 @@ OUString SAL_CALL MinMaxLineWrapper::getImplementationName() OUString MinMaxLineWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.ChartLine"); } sal_Bool SAL_CALL MinMaxLineWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index 97d7d04c0152..f2e26d6209e5 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -126,7 +126,6 @@ WrappedStackedTextProperty::~WrappedStackedTextProperty() namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Title"; enum { @@ -530,7 +529,7 @@ OUString SAL_CALL TitleWrapper::getImplementationName() OUString TitleWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.Title"); } sal_Bool SAL_CALL TitleWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx index d0feec2d8077..6dac6a7ffb12 100644 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -41,7 +41,6 @@ using ::com::sun::star::uno::Any; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartArea"; struct StaticUpDownBarWrapperPropertyArray_Initializer { @@ -390,7 +389,7 @@ OUString SAL_CALL UpDownBarWrapper::getImplementationName() OUString UpDownBarWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.ChartArea"); } sal_Bool SAL_CALL UpDownBarWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx index 66d485599f1a..8878a601b38b 100644 --- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx @@ -43,7 +43,6 @@ using ::com::sun::star::uno::Sequence; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.WallOrFloor"; struct StaticWallFloorWrapperPropertyArray_Initializer { @@ -173,7 +172,7 @@ OUString SAL_CALL WallFloorWrapper::getImplementationName() OUString WallFloorWrapper::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.WallOrFloor"); } sal_Bool SAL_CALL WallFloorWrapper::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx index f8f83ec33fe8..a8bcfa624490 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx @@ -94,12 +94,10 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R Any WrappedScaleTextProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - static const char aRefSizeName[] = "ReferencePageSize"; - Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) { - if( xInnerPropertySet->getPropertyValue( aRefSizeName ).hasValue() ) + if( xInnerPropertySet->getPropertyValue( "ReferencePageSize" ).hasValue() ) aRet <<= true; else aRet <<= false; diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index cc74c3e2873e..7302b71e6885 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -60,24 +60,7 @@ namespace char const sXML_metaStreamName[] = "meta.xml"; char const sXML_styleStreamName[] = "styles.xml"; char const sXML_contentStreamName[] = "content.xml"; -char const sXML_oldContentStreamName[] = "Content.xml"; -// soffice 6/7 -char const sXML_export_chart_styles_service[] = "com.sun.star.comp.Chart.XMLStylesExporter"; -char const sXML_export_chart_content_service[] = "com.sun.star.comp.Chart.XMLContentExporter"; - -char const sXML_import_chart_styles_service[] = "com.sun.star.comp.Chart.XMLStylesImporter"; -char const sXML_import_chart_content_service[] = "com.sun.star.comp.Chart.XMLContentImporter"; -char const sXML_import_chart_old_content_service[] = "com.sun.star.office.sax.importer.Chart"; - -// Oasis -char const sXML_export_chart_oasis_styles_service[] = "com.sun.star.comp.Chart.XMLOasisStylesExporter"; -char const sXML_export_chart_oasis_content_service[] = "com.sun.star.comp.Chart.XMLOasisContentExporter"; -char const sXML_export_chart_oasis_meta_service[] = "com.sun.star.comp.Chart.XMLOasisMetaExporter"; - -char const sXML_import_chart_oasis_styles_service[] = "com.sun.star.comp.Chart.XMLOasisStylesImporter"; -char const sXML_import_chart_oasis_content_service[] = "com.sun.star.comp.Chart.XMLOasisContentImporter"; -char const sXML_import_chart_oasis_meta_service[] = "com.sun.star.comp.Chart.XMLOasisMetaImporter"; uno::Reference< embed::XStorage > lcl_getWriteStorage( const Sequence< beans::PropertyValue >& rMediaDescriptor, @@ -384,23 +367,23 @@ sal_Int32 XMLFilter::impl_Import( if( bOasis ) nWarning |= impl_ImportStream( sXML_metaStreamName, - sXML_import_chart_oasis_meta_service, + "com.sun.star.comp.Chart.XMLOasisMetaImporter", xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); // import styles nWarning |= impl_ImportStream( sXML_styleStreamName, bOasis - ? OUString(sXML_import_chart_oasis_styles_service) - : OUString(sXML_import_chart_styles_service), + ? OUString("com.sun.star.comp.Chart.XMLOasisStylesImporter") + : OUString("com.sun.star.comp.Chart.XMLStylesImporter"), xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); // import content sal_Int32 nContentWarning = impl_ImportStream( sXML_contentStreamName, bOasis - ? OUString(sXML_import_chart_oasis_content_service) - : OUString(sXML_import_chart_content_service), + ? OUString("com.sun.star.comp.Chart.XMLOasisContentImporter") + : OUString("com.sun.star.comp.Chart.XMLContentImporter"), xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); nWarning |= nContentWarning; @@ -408,8 +391,8 @@ sal_Int32 XMLFilter::impl_Import( if( nContentWarning != 0 ) { nWarning = impl_ImportStream( - sXML_oldContentStreamName, - sXML_import_chart_old_content_service, + "Content.xml", // old content stream name + "com.sun.star.office.sax.importer.Chart", xStorage, xSaxParser, xFactory, xGraphicObjectResolver, xImportInfo ); } } @@ -639,23 +622,23 @@ sal_Int32 XMLFilter::impl_Export( if( bOasis ) nWarning |= impl_ExportStream( sXML_metaStreamName, - sXML_export_chart_oasis_meta_service, + "com.sun.star.comp.Chart.XMLOasisMetaExporter", xStorage, xSaxWriter, xServiceFactory, aFilterProperties ); // export styles nWarning |= impl_ExportStream( sXML_styleStreamName, bOasis - ? OUString(sXML_export_chart_oasis_styles_service) - : OUString(sXML_export_chart_styles_service), + ? OUString("com.sun.star.comp.Chart.XMLOasisStylesExporter") + : OUString("com.sun.star.comp.Chart.XMLStylesExporter"), // soffice 6/7 xStorage, xSaxWriter, xServiceFactory, aFilterProperties ); // export content sal_Int32 nContentWarning = impl_ExportStream( sXML_contentStreamName, bOasis - ? OUString(sXML_export_chart_oasis_content_service) - : OUString(sXML_export_chart_content_service), + ? OUString("com.sun.star.comp.Chart.XMLOasisContentExporter") + : OUString("com.sun.star.comp.Chart.XMLContentExporter"), xStorage, xSaxWriter, xServiceFactory, aFilterProperties ); nWarning |= nContentWarning; diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index eec6bbecad70..f29567c9b9fb 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -58,8 +58,6 @@ using ::osl::MutexGuard; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Axis"; - enum { PROP_AXIS_SHOW, @@ -657,7 +655,7 @@ OUString SAL_CALL Axis::getImplementationName() OUString Axis::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart2.Axis"); } sal_Bool SAL_CALL Axis::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index ec99d529703a..31961279ac8a 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -31,12 +31,6 @@ using ::com::sun::star::uno::Sequence; namespace { -static const char lcl_aServiceNameCartesian2d[] = "com.sun.star.chart2.CartesianCoordinateSystem2d"; -static const char lcl_aServiceNameCartesian3d[] = "com.sun.star.chart2.CartesianCoordinateSystem3d"; - -static const char lcl_aImplementationNameCartesian2d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem2d"; -static const char lcl_aImplementationNameCartesian3d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem3d"; - static const char CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME[] = "com.sun.star.chart2.CoordinateSystems.Cartesian"; } @@ -124,7 +118,7 @@ Sequence< OUString > CartesianCoordinateSystem2d::getSupportedServiceNames_Stati { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME; - aServices[ 1 ] = lcl_aServiceNameCartesian2d; + aServices[ 1 ] = "com.sun.star.chart2.CartesianCoordinateSystem2d"; return aServices; } @@ -137,7 +131,7 @@ OUString SAL_CALL CartesianCoordinateSystem2d::getImplementationName() OUString CartesianCoordinateSystem2d::getImplementationName_Static() { - return OUString(lcl_aImplementationNameCartesian2d); + return OUString("com.sun.star.comp.chart2.CartesianCoordinateSystem2d"); } sal_Bool SAL_CALL CartesianCoordinateSystem2d::supportsService( const OUString& rServiceName ) @@ -167,7 +161,7 @@ Sequence< OUString > CartesianCoordinateSystem3d::getSupportedServiceNames_Stati { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME; - aServices[ 1 ] = lcl_aServiceNameCartesian3d; + aServices[ 1 ] = "com.sun.star.chart2.CartesianCoordinateSystem3d"; return aServices; } @@ -180,7 +174,7 @@ OUString SAL_CALL CartesianCoordinateSystem3d::getImplementationName() OUString CartesianCoordinateSystem3d::getImplementationName_Static() { - return OUString(lcl_aImplementationNameCartesian3d); + return OUString("com.sun.star.comp.chart2.CartesianCoordinateSystem3d"); } sal_Bool SAL_CALL CartesianCoordinateSystem3d::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx index e145a704afbb..cd506a4ba97f 100644 --- a/chart2/source/model/main/GridProperties.cxx +++ b/chart2/source/model/main/GridProperties.cxx @@ -37,8 +37,6 @@ using ::com::sun::star::beans::Property; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.GridProperties"; - enum { PROP_GRID_SHOW @@ -250,7 +248,7 @@ OUString SAL_CALL GridProperties::getImplementationName() OUString GridProperties::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart2.GridProperties"); } sal_Bool SAL_CALL GridProperties::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index 2d3d691e94c8..29ebc46a081a 100644 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -47,8 +47,6 @@ using ::com::sun::star::beans::Property; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Legend"; - enum { PROP_LEGEND_ANCHOR_POSITION, @@ -306,7 +304,7 @@ OUString SAL_CALL Legend::getImplementationName() OUString Legend::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart2.Legend"); } sal_Bool SAL_CALL Legend::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx index c73f58c3fc43..c8654e31d2f0 100644 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -39,8 +39,6 @@ using ::com::sun::star::beans::Property; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.PageBackground"; - struct StaticPageBackgroundDefaults_Initializer { ::chart::tPropertyValueMap* operator()() @@ -230,7 +228,7 @@ OUString SAL_CALL PageBackground::getImplementationName() OUString PageBackground::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart2.PageBackground"); } sal_Bool SAL_CALL PageBackground::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index 44433a0a606f..aa982cd687f7 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -31,12 +31,6 @@ using ::com::sun::star::uno::Sequence; namespace { -static const char lcl_aServiceNamePolar2d[] = "com.sun.star.chart2.PolarCoordinateSystem2d"; -static const char lcl_aServiceNamePolar3d[] = "com.sun.star.chart2.PolarCoordinateSystem3d"; - -static const char lcl_aImplementationNamePolar2d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem2d"; -static const char lcl_aImplementationNamePolar3d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem3d"; - static const char CHART2_COOSYSTEM_POLAR_SERVICE_NAME[] = "com.sun.star.chart2.CoordinateSystems.Polar"; } @@ -124,7 +118,7 @@ Sequence< OUString > PolarCoordinateSystem2d::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME; - aServices[ 1 ] = lcl_aServiceNamePolar2d; + aServices[ 1 ] = "com.sun.star.chart2.PolarCoordinateSystem2d"; return aServices; } @@ -137,7 +131,7 @@ OUString SAL_CALL PolarCoordinateSystem2d::getImplementationName() OUString PolarCoordinateSystem2d::getImplementationName_Static() { - return OUString(lcl_aImplementationNamePolar2d) ; + return OUString("com.sun.star.comp.chart2.PolarCoordinateSystem2d") ; } sal_Bool SAL_CALL PolarCoordinateSystem2d::supportsService( const OUString& rServiceName ) @@ -167,7 +161,7 @@ Sequence< OUString > PolarCoordinateSystem3d::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME; - aServices[ 1 ] = lcl_aServiceNamePolar3d; + aServices[ 1 ] = "com.sun.star.chart2.PolarCoordinateSystem3d"; return aServices; } @@ -180,7 +174,7 @@ OUString SAL_CALL PolarCoordinateSystem3d::getImplementationName() OUString PolarCoordinateSystem3d::getImplementationName_Static() { - return OUString(lcl_aImplementationNamePolar3d); + return OUString("com.sun.star.comp.chart2.PolarCoordinateSystem3d"); } sal_Bool SAL_CALL PolarCoordinateSystem3d::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx index 06a03e148c93..e704c1ffda81 100644 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -47,8 +47,6 @@ using ::osl::MutexGuard; namespace { -static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Title"; - enum { PROP_TITLE_PARA_ADJUST, @@ -393,7 +391,7 @@ OUString SAL_CALL Title::getImplementationName() OUString Title::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart2.Title"); } sal_Bool SAL_CALL Title::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx index 0617e6846cd9..3bf13bced5a1 100644 --- a/chart2/source/tools/DataSource.cxx +++ b/chart2/source/tools/DataSource.cxx @@ -27,10 +27,6 @@ using ::com::sun::star::uno::RuntimeException; using namespace ::com::sun::star; -namespace -{ -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSource"; -} // anonymous namespace namespace chart { @@ -74,7 +70,7 @@ OUString SAL_CALL DataSource::getImplementationName() OUString DataSource::getImplementationName_Static() { - return OUString(lcl_aServiceName); + return OUString("com.sun.star.comp.chart.DataSource"); } sal_Bool SAL_CALL DataSource::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 668181ff100b..a8a59a6cae67 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -59,9 +59,6 @@ namespace chart namespace { -// note: in xmloff this name is used to indicate usage of own data -static const char lcl_aServiceName[] = "com.sun.star.comp.chart.InternalDataProvider"; - static const char lcl_aCategoriesRangeName[] = "categories"; static const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level static const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point @@ -1551,7 +1548,8 @@ OUString SAL_CALL InternalDataProvider::getImplementationName() OUString InternalDataProvider::getImplementationName_Static() { - return OUString(lcl_aServiceName); + // note: in xmloff this name is used to indicate usage of own data + return OUString("com.sun.star.comp.chart.InternalDataProvider"); } sal_Bool SAL_CALL InternalDataProvider::supportsService( const OUString& rServiceName ) diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx index 03b71adc35fd..134790941f4d 100644 --- a/chart2/source/tools/ReferenceSizeProvider.cxx +++ b/chart2/source/tools/ReferenceSizeProvider.cxx @@ -168,14 +168,13 @@ void ReferenceSizeProvider::getAutoResizeFromPropSet( const Reference< beans::XPropertySet > & xProp, ReferenceSizeProvider::AutoResizeState & rInOutState ) { - static const char aRefSizeName[] = "ReferencePageSize"; AutoResizeState eSingleState = AUTO_RESIZE_UNKNOWN; if( xProp.is()) { try { - if( xProp->getPropertyValue( aRefSizeName ).hasValue()) + if( xProp->getPropertyValue( "ReferencePageSize" ).hasValue()) eSingleState = AUTO_RESIZE_YES; else eSingleState = AUTO_RESIZE_NO; diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx index 692576f3c3b9..658c7c365359 100644 --- a/chart2/source/tools/RegressionEquation.cxx +++ b/chart2/source/tools/RegressionEquation.cxx @@ -46,9 +46,6 @@ using ::osl::MutexGuard; namespace { -static const char lcl_aImplementationName[] = "com.sun.star.comp.chart2.RegressionEquation"; -static const char lcl_aServiceName[] = "com.sun.star.chart2.RegressionEquation"; - enum { PROP_EQUATION_SHOW, @@ -322,7 +319,7 @@ uno::Sequence< OUString > RegressionEquation::getSupportedServiceNames_Static() const sal_Int32 nNumServices( 5 ); sal_Int32 nI = 0; uno::Sequence< OUString > aServices( nNumServices ); - aServices[ nI++ ] = lcl_aServiceName; + aServices[ nI++ ] = "com.sun.star.chart2.RegressionEquation"; aServices[ nI++ ] = "com.sun.star.beans.PropertySet"; aServices[ nI++ ] = "com.sun.star.drawing.FillProperties"; aServices[ nI++ ] = "com.sun.star.drawing.LineProperties"; @@ -340,7 +337,7 @@ OUString SAL_CALL RegressionEquation::getImplementationName() OUString RegressionEquation::getImplementationName_Static() { - return OUString(lcl_aImplementationName); + return OUString("com.sun.star.comp.chart2.RegressionEquation"); } sal_Bool SAL_CALL RegressionEquation::supportsService( const OUString& rServiceName ) |