From 705c48d32eec0aa5180e60ca157daca4b154e4a3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 3 Nov 2014 14:03:54 +0200 Subject: fdo#38835 strip out OUString globals they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37 --- .../controller/chartapiwrapper/AreaWrapper.cxx | 4 +- .../controller/chartapiwrapper/AxisWrapper.cxx | 4 +- .../chartapiwrapper/ChartDataWrapper.cxx | 4 +- .../chartapiwrapper/DataSeriesPointWrapper.cxx | 4 +- .../controller/chartapiwrapper/DiagramWrapper.cxx | 4 +- .../controller/chartapiwrapper/GridWrapper.cxx | 4 +- .../controller/chartapiwrapper/LegendWrapper.cxx | 4 +- .../chartapiwrapper/MinMaxLineWrapper.cxx | 4 +- .../controller/chartapiwrapper/TitleWrapper.cxx | 4 +- .../chartapiwrapper/UpDownBarWrapper.cxx | 4 +- .../chartapiwrapper/WallFloorWrapper.cxx | 4 +- .../chartapiwrapper/WrappedScaleTextProperties.cxx | 4 +- chart2/source/controller/main/ElementSelector.cxx | 4 +- chart2/source/model/main/Axis.cxx | 4 +- .../model/main/CartesianCoordinateSystem.cxx | 12 ++--- chart2/source/model/main/GridProperties.cxx | 4 +- chart2/source/model/main/Legend.cxx | 4 +- chart2/source/model/main/PageBackground.cxx | 4 +- chart2/source/model/main/PolarCoordinateSystem.cxx | 12 ++--- chart2/source/model/main/Title.cxx | 4 +- chart2/source/tools/CachedDataSequence.cxx | 4 +- chart2/source/tools/ConfigColorScheme.cxx | 2 +- chart2/source/tools/DataSource.cxx | 4 +- chart2/source/tools/ErrorBar.cxx | 4 +- chart2/source/tools/InternalDataProvider.cxx | 42 +++++++-------- chart2/source/tools/ObjectIdentifier.cxx | 25 ++++----- chart2/source/tools/ReferenceSizeProvider.cxx | 4 +- chart2/source/tools/RegressionCurveCalculator.cxx | 6 +-- chart2/source/tools/RegressionEquation.cxx | 6 +-- chart2/source/tools/Scaling.cxx | 61 +++++++++++----------- chart2/source/tools/UncachedDataSequence.cxx | 4 +- chart2/source/view/axes/DateScaling.cxx | 20 ++++--- 32 files changed, 139 insertions(+), 139 deletions(-) (limited to 'chart2/source') diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx index 5efb1f06d74c..4f0b6d7b9d53 100644 --- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx @@ -40,7 +40,7 @@ using ::com::sun::star::uno::Sequence; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Area" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Area"; struct StaticAreaWrapperPropertyArray_Initializer { @@ -179,7 +179,7 @@ Sequence< OUString > AreaWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( AreaWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( AreaWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index 4643d6ca5883..10da0e77dff4 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -63,7 +63,7 @@ using ::com::sun::star::uno::Any; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Axis" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Axis"; enum { @@ -694,7 +694,7 @@ Sequence< OUString > AxisWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( AxisWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( AxisWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 0689070da999..2acabf89d0d1 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -61,7 +61,7 @@ using ::com::sun::star::chart::XDateCategories; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ChartData" ); +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 ) { @@ -726,7 +726,7 @@ uno::Sequence< OUString > ChartDataWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( ChartDataWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( ChartDataWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index a897eb791be8..dfd565ed2b75 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -65,7 +65,7 @@ using ::osl::MutexGuard; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.DataSeries" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSeries"; enum { @@ -881,7 +881,7 @@ uno::Sequence< OUString > DataSeriesPointWrapper::getSupportedServiceNames_Stati } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( DataSeriesPointWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( DataSeriesPointWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 6fde3c4dd16b..a2c544f065fe 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -79,7 +79,7 @@ using ::osl::MutexGuard; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Diagram" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Diagram"; enum { @@ -2081,7 +2081,7 @@ uno::Sequence< OUString > DiagramWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( DiagramWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( DiagramWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx index 57efc982debc..e432ddcc423f 100644 --- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx @@ -44,7 +44,7 @@ using ::com::sun::star::uno::Sequence; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Grid" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Grid"; struct StaticGridWrapperPropertyArray_Initializer { @@ -185,7 +185,7 @@ Sequence< OUString > GridWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( GridWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( GridWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx index e069fc21aba7..cbb734ba5453 100644 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -210,7 +210,7 @@ Any WrappedLegendAlignmentProperty::convertOuterToInnerValue( const Any& rOuterV namespace { -static const OUString lcl_aServiceName("com.sun.star.comp.chart.Legend"); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Legend"; enum { @@ -432,7 +432,7 @@ Sequence< OUString > LegendWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( LegendWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( LegendWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index 841df09ad2c1..545575858f8a 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -41,7 +41,7 @@ using ::com::sun::star::uno::Any; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ChartLine" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartLine"; struct StaticMinMaxLineWrapperDefaults_Initializer { @@ -418,7 +418,7 @@ Sequence< OUString > MinMaxLineWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( MinMaxLineWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( MinMaxLineWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index 5197a0955ecd..aaa0c660104e 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -127,7 +127,7 @@ WrappedStackedTextProperty::~WrappedStackedTextProperty() namespace { -static const OUString lcl_aServiceName("com.sun.star.comp.chart.Title"); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Title"; enum { @@ -523,7 +523,7 @@ Sequence< OUString > TitleWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( TitleWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( TitleWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx index e3be3b99515e..57de55083d2f 100644 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -41,7 +41,7 @@ using ::com::sun::star::uno::Any; namespace { -static const OUString lcl_aServiceName("com.sun.star.comp.chart.ChartArea"); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartArea"; struct StaticUpDownBarWrapperPropertyArray_Initializer { @@ -382,7 +382,7 @@ Sequence< OUString > UpDownBarWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( UpDownBarWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( UpDownBarWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx index 701b86c9e881..58c629bf4c22 100644 --- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx @@ -44,7 +44,7 @@ using ::com::sun::star::uno::Sequence; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.WallOrFloor" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.WallOrFloor"; struct StaticWallFloorWrapperPropertyArray_Initializer { @@ -166,7 +166,7 @@ Sequence< OUString > WallFloorWrapper::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( WallFloorWrapper, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( WallFloorWrapper, OUString(lcl_aServiceName) ); } // namespace wrapper } // namespace chart diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx index 1092b580113d..b7a66ec67ace 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx @@ -64,7 +64,7 @@ WrappedScaleTextProperty::~WrappedScaleTextProperty() void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - static const OUString aRefSizeName( "ReferencePageSize" ); + static const char aRefSizeName[] = "ReferencePageSize"; if( xInnerPropertySet.is() ) { @@ -95,7 +95,7 @@ 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 OUString aRefSizeName( "ReferencePageSize" ); + static const char aRefSizeName[] = "ReferencePageSize"; Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) ); if( xInnerPropertySet.is() ) diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index 76657d5b05a8..df2c6029d184 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -47,7 +47,7 @@ using ::com::sun::star::uno::Sequence; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ElementSelectorToolbarController" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ElementSelectorToolbarController"; } SelectorListBox::SelectorListBox( vcl::Window* pParent, WinBits nStyle ) @@ -246,7 +246,7 @@ Reference< ::com::sun::star::accessibility::XAccessible > SelectorListBox::Creat } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( ElementSelectorToolbarController, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( ElementSelectorToolbarController, OUString(lcl_aServiceName) ); Sequence< OUString > ElementSelectorToolbarController::getSupportedServiceNames_Static() { diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index a345bd93f63b..06ae4301f074 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -59,7 +59,7 @@ using ::osl::MutexGuard; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Axis" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Axis"; enum { @@ -637,7 +637,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( Axis, Axis_Base, ::property::OPropertySet ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( Axis, Axis_Base, ::property::OPropertySet ) // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( Axis, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( Axis, OUString(lcl_aServiceName) ); } // namespace chart diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index d5f2ed60cc31..2339be6d0fd5 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -30,11 +30,11 @@ using ::com::sun::star::uno::Sequence; namespace { -static const OUString lcl_aServiceNameCartesian2d( "com.sun.star.chart2.CartesianCoordinateSystem2d" ); -static const OUString lcl_aServiceNameCartesian3d( "com.sun.star.chart2.CartesianCoordinateSystem3d" ); +static const char lcl_aServiceNameCartesian2d[] = "com.sun.star.chart2.CartesianCoordinateSystem2d"; +static const char lcl_aServiceNameCartesian3d[] = "com.sun.star.chart2.CartesianCoordinateSystem3d"; -static const OUString lcl_aImplementationNameCartesian2d( "com.sun.star.comp.chart2.CartesianCoordinateSystem2d" ); -static const OUString lcl_aImplementationNameCartesian3d( "com.sun.star.comp.chart2.CartesianCoordinateSystem3d" ); +static const char lcl_aImplementationNameCartesian2d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem2d"; +static const char lcl_aImplementationNameCartesian3d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem3d"; } namespace chart @@ -108,7 +108,7 @@ Sequence< OUString > CartesianCoordinateSystem2d::getSupportedServiceNames_Stati } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem2d, lcl_aImplementationNameCartesian2d ) +APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem2d, OUString(lcl_aImplementationNameCartesian2d) ) // ==== CartesianCoordinateSystem3d ==== @@ -130,7 +130,7 @@ Sequence< OUString > CartesianCoordinateSystem3d::getSupportedServiceNames_Stati } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem3d, lcl_aImplementationNameCartesian3d ) +APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem3d, OUString(lcl_aImplementationNameCartesian3d) ) } // namespace chart diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx index f7a282440651..f42c0e76834f 100644 --- a/chart2/source/model/main/GridProperties.cxx +++ b/chart2/source/model/main/GridProperties.cxx @@ -38,7 +38,7 @@ using ::osl::MutexGuard; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.GridProperties" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.GridProperties"; enum { @@ -243,7 +243,7 @@ Sequence< OUString > GridProperties::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( GridProperties, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( GridProperties, OUString(lcl_aServiceName) ); // needed by MSC compiler using impl::GridProperties_Base; diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index a0d885c09b6d..be21cd9ec7a2 100644 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -47,7 +47,7 @@ using ::com::sun::star::beans::Property; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Legend" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Legend"; enum { @@ -301,7 +301,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL Legend::getPropertySetInfo() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( Legend, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( Legend, OUString(lcl_aServiceName) ); // needed by MSC compiler using impl::Legend_Base; diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx index 3b72c388d67a..d9eea37794d3 100644 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -40,7 +40,7 @@ using ::osl::MutexGuard; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.PageBackground" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.PageBackground"; struct StaticPageBackgroundDefaults_Initializer { @@ -223,7 +223,7 @@ uno::Sequence< OUString > PageBackground::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( PageBackground, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( PageBackground, OUString(lcl_aServiceName) ); using impl::PageBackground_Base; diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index 3a82754426fa..a48744ac6768 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -30,11 +30,11 @@ using ::com::sun::star::uno::Sequence; namespace { -static const OUString lcl_aServiceNamePolar2d( "com.sun.star.chart2.PolarCoordinateSystem2d" ); -static const OUString lcl_aServiceNamePolar3d( "com.sun.star.chart2.PolarCoordinateSystem3d" ); +static const char lcl_aServiceNamePolar2d[] = "com.sun.star.chart2.PolarCoordinateSystem2d"; +static const char lcl_aServiceNamePolar3d[] = "com.sun.star.chart2.PolarCoordinateSystem3d"; -static const OUString lcl_aImplementationNamePolar2d( "com.sun.star.comp.chart2.PolarCoordinateSystem2d" ); -static const OUString lcl_aImplementationNamePolar3d( "com.sun.star.comp.chart2.PolarCoordinateSystem3d" ); +static const char lcl_aImplementationNamePolar2d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem2d"; +static const char lcl_aImplementationNamePolar3d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem3d"; } namespace chart @@ -108,7 +108,7 @@ Sequence< OUString > PolarCoordinateSystem2d::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d, lcl_aImplementationNamePolar2d ) +APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d, OUString(lcl_aImplementationNamePolar2d) ) // ==== PolarCoordinateSystem3d ==== @@ -130,7 +130,7 @@ Sequence< OUString > PolarCoordinateSystem3d::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d, lcl_aImplementationNamePolar3d ) +APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d, OUString(lcl_aImplementationNamePolar3d) ) } // namespace chart diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx index 35ee2004e13f..d3cac0d24a28 100644 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -46,7 +46,7 @@ using ::osl::MutexGuard; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Title" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Title"; enum { @@ -374,7 +374,7 @@ uno::Sequence< OUString > Title::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( Title, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( Title, OUString(lcl_aServiceName) ); // needed by MSC compiler using impl::Title_Base; diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx index 13ce0b899ff5..8c9e8db18402 100644 --- a/chart2/source/tools/CachedDataSequence.cxx +++ b/chart2/source/tools/CachedDataSequence.cxx @@ -46,7 +46,7 @@ using ::chart::impl::CachedDataSequence_Base; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.CachedDataSequence" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.CachedDataSequence"; enum { @@ -260,7 +260,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL CachedDataSequence::getPropertySet } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( CachedDataSequence, lcl_aServiceName ) +APPHELPER_XSERVICEINFO_IMPL( CachedDataSequence, OUString(lcl_aServiceName) ) // ________ XNumericalDataSequence ________ Sequence< double > SAL_CALL CachedDataSequence::getNumericalData() diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index f448c3143242..b5d227444131 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence; namespace { -static const OUString aSeriesPropName( "Series" ); +static const char aSeriesPropName[] = "Series"; } // anonymous namespace diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx index f81571142c31..24f8b5140be1 100644 --- a/chart2/source/tools/DataSource.cxx +++ b/chart2/source/tools/DataSource.cxx @@ -30,7 +30,7 @@ using namespace ::com::sun::star; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.DataSource" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSource"; } // anonymous namespace namespace chart @@ -69,7 +69,7 @@ Sequence< OUString > DataSource::getSupportedServiceNames_Static() return aServices; } -APPHELPER_XSERVICEINFO_IMPL( DataSource, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( DataSource, OUString(lcl_aServiceName) ); } // namespace chart diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx index ea675b92cb98..f3c5abc29d99 100644 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.ErrorBar" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.ErrorBar"; bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq ) { @@ -468,7 +468,7 @@ uno::Sequence< OUString > ErrorBar::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( ErrorBar, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( ErrorBar, OUString(lcl_aServiceName) ); // needed by MSC compiler using impl::ErrorBar_Base; diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index ee2dcfe9a5e4..1452af7c5791 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -59,14 +59,14 @@ namespace { // note: in xmloff this name is used to indicate usage of own data -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.InternalDataProvider" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.InternalDataProvider"; -static const OUString lcl_aCategoriesRangeName( "categories" ); -static const OUString lcl_aCategoriesLevelRangeNamePrefix( "categoriesL " ); //L <-> level -static const OUString lcl_aCategoriesPointRangeNamePrefix( "categoriesP " ); //P <-> point -static const OUString lcl_aCategoriesRoleName( "categories" ); -static const OUString lcl_aLabelRangePrefix( "label " ); -static const OUString lcl_aCompleteRange( "all" ); +static const char lcl_aCategoriesRangeName[] = "categories"; +static const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level +static const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point +static const char lcl_aCategoriesRoleName[] = "categories"; +static const char lcl_aLabelRangePrefix[] = "label "; +static const char lcl_aCompleteRange[] = "all"; typedef ::std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > > lcl_tSequenceMap; @@ -780,7 +780,7 @@ Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments( { Sequence< beans::PropertyValue > aArguments( 4 ); aArguments[0] = beans::PropertyValue( - "CellRangeRepresentation", -1, uno::makeAny( lcl_aCompleteRange ), + "CellRangeRepresentation", -1, uno::makeAny( OUString(lcl_aCompleteRange) ), beans::PropertyState_DIRECT_VALUE ); aArguments[1] = beans::PropertyValue( "DataRowSource", -1, uno::makeAny( @@ -821,7 +821,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa else if( aRangeRepresentation.match( lcl_aLabelRangePrefix )) { // label - sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32(); + sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32(); return createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::number( nIndex )); } else if ( aRangeRepresentation == "last" ) @@ -868,7 +868,7 @@ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUSt } else if( aRange.match( lcl_aLabelRangePrefix )) { - sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32(); + sal_Int32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32(); bResult = (nIndex < (m_bDataInColumns ? m_aInternalData.getColumnCount(): m_aInternalData.getRowCount())); } else @@ -887,7 +887,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation if( aRange.match( lcl_aLabelRangePrefix ) ) { - sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32(); + sal_Int32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32(); vector< uno::Any > aComplexLabel = m_bDataInColumns ? m_aInternalData.getComplexColumnLabel( nIndex ) : m_aInternalData.getComplexRowLabel( nIndex ); @@ -896,7 +896,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation } else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) ) { - sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesPointRangeNamePrefix.getLength() ).toInt32(); + sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesPointRangeNamePrefix) ).toInt32(); vector< uno::Any > aComplexCategory = m_bDataInColumns ? m_aInternalData.getComplexRowLabel( nPointIndex ) : m_aInternalData.getComplexColumnLabel( nPointIndex ); @@ -905,7 +905,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation } else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) ) { - sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength() ).toInt32(); + sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix) ).toInt32(); vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels()); if( nLevel < lcl_getInnerLevelCount( aCategories ) ) { @@ -960,7 +960,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation( vector< uno::Any > aNewVector( ContainerHelper::SequenceToVector(aNewData) ); if( aRange.match( lcl_aLabelRangePrefix ) ) { - sal_uInt32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32(); + sal_uInt32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32(); if( m_bDataInColumns ) m_aInternalData.setComplexColumnLabel( nIndex, aNewVector ); else @@ -968,7 +968,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation( } else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) ) { - sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32(); + sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32(); if( m_bDataInColumns ) m_aInternalData.setComplexRowLabel( nPointIndex, aNewVector ); else @@ -976,7 +976,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation( } else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) ) { - sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32(); + sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32(); vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels(); //ensure equal length @@ -1204,7 +1204,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang } else if( aRangeRepresentation.match( lcl_aLabelRangePrefix )) { - sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32(); + sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32(); aRange.aUpperLeft.bIsEmpty = false; aRange.aLowerRight.bIsEmpty = true; if( m_bDataInColumns ) @@ -1265,7 +1265,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM if( !aRange.aLowerRight.bIsEmpty && ( aRange.aUpperLeft.nColumn != aRange.aLowerRight.nColumn ) && ( aRange.aUpperLeft.nRow != aRange.aLowerRight.nRow ) ) - return lcl_aCompleteRange; + return OUString(lcl_aCompleteRange); // attention: this data provider has the limitation that it stores // internally if data comes from columns or rows. It is intended for @@ -1276,7 +1276,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM if( m_bDataInColumns ) { if( aRange.aUpperLeft.nColumn == 0 ) - return lcl_aCategoriesRangeName; + return OUString(lcl_aCategoriesRangeName); if( aRange.aUpperLeft.nRow == 0 ) return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nColumn - 1 ); @@ -1285,7 +1285,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM // data in rows if( aRange.aUpperLeft.nRow == 0 ) - return lcl_aCategoriesRangeName; + return OUString(lcl_aCategoriesRangeName); if( aRange.aUpperLeft.nColumn == 0 ) return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nRow - 1 ); @@ -1549,7 +1549,7 @@ Sequence< OUString > InternalDataProvider::getSupportedServiceNames_Static() return aServices; } -APPHELPER_XSERVICEINFO_IMPL( InternalDataProvider, lcl_aServiceName ); +APPHELPER_XSERVICEINFO_IMPL( InternalDataProvider, OUString(lcl_aServiceName) ); } // namespace chart diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index 638ca0654a94..d3b480f7c48a 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -46,12 +46,11 @@ using namespace ::com::sun::star::chart2; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; -static OUString m_aMultiClick( "MultiClick" ); -static OUString m_aDragMethodEquals( "DragMethod=" ); -static OUString m_aDragParameterEquals( "DragParameter=" ); -static OUString m_aProtocol( "CID/" ); -static OUString m_aEmptyString; -static OUString m_aPieSegmentDragMethodServiceName( "PieSegmentDraging" ); +static const char m_aMultiClick[] = "MultiClick"; +static const char m_aDragMethodEquals[] = "DragMethod="; +static const char m_aDragParameterEquals[] = "DragParameter="; +static const char m_aProtocol[] = "CID/"; +static const OUString m_aPieSegmentDragMethodServiceName("PieSegmentDraging"); namespace { @@ -507,7 +506,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierForParticles( OUStringBuffer aRet( m_aProtocol ); aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString )); - if(aRet.getLength()>m_aProtocol.getLength()) + if(aRet.getLength() > (sal_Int32)strlen(m_aProtocol)) aRet.appendAscii("/"); if(!rParentParticle.isEmpty()) @@ -525,18 +524,16 @@ OUString ObjectIdentifier::createParticleForDiagram( const Reference< XDiagram >& /*xDiagram*/ , ChartModel& /*xChartModel*/ ) { - static OUString aRet("D=0"); //todo: if more than one diagram is implemeted, add the correct diagram index here - return aRet; + return OUString("D=0"); } OUString ObjectIdentifier::createParticleForDiagram( const Reference< XDiagram >& /*xDiagram*/ , const Reference< frame::XModel >& /*xChartModel*/ ) { - static OUString aRet("D=0"); //todo: if more than one diagram is implemeted, add the correct diagram index here - return aRet; + return OUString("D=0"); } OUString ObjectIdentifier::createParticleForCoordinateSystem( @@ -698,7 +695,7 @@ OUString ObjectIdentifier::createClassifiedIdentifier( , const OUString& rParticleID )//e.g. SeriesID { return createClassifiedIdentifierWithParent( - eObjectType, rParticleID, m_aEmptyString ); + eObjectType, rParticleID, OUString() ); } OUString ObjectIdentifier::createClassifiedIdentifierWithParent( @@ -714,7 +711,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierWithParent( OUStringBuffer aRet( m_aProtocol ); aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString )); - if(aRet.getLength()>m_aProtocol.getLength()) + if(aRet.getLength() > (sal_Int32)strlen(m_aProtocol)) aRet.appendAscii("/"); aRet.append(rParentPartical); if(!rParentPartical.isEmpty()) @@ -896,7 +893,7 @@ bool ObjectIdentifier::isMultiClickObject( const OUString& rClassifiedIdentifier //was selected before; //!!!!! by definition the name of a MultiClickObject starts with "CID/MultiClick:" - bool bRet = rClassifiedIdentifier.match( m_aMultiClick, m_aProtocol.getLength() ); + bool bRet = rClassifiedIdentifier.match( m_aMultiClick, strlen(m_aProtocol) ); return bRet; } diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx index 268c3d1f5ee3..d612707f73dc 100644 --- a/chart2/source/tools/ReferenceSizeProvider.cxx +++ b/chart2/source/tools/ReferenceSizeProvider.cxx @@ -133,7 +133,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet( if( ! xProp.is()) return; - static const OUString aRefSizeName( "ReferencePageSize" ); + static const char aRefSizeName[] = "ReferencePageSize"; try { @@ -168,7 +168,7 @@ void ReferenceSizeProvider::getAutoResizeFromPropSet( const Reference< beans::XPropertySet > & xProp, ReferenceSizeProvider::AutoResizeState & rInOutState ) { - static const OUString aRefSizeName( "ReferencePageSize" ); + static const char aRefSizeName[] = "ReferencePageSize"; AutoResizeState eSingleState = AUTO_RESIZE_UNKNOWN; if( xProp.is()) diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx index 694e056e6b9f..d7be7b6136ca 100644 --- a/chart2/source/tools/RegressionCurveCalculator.cxx +++ b/chart2/source/tools/RegressionCurveCalculator.cxx @@ -55,17 +55,15 @@ bool RegressionCurveCalculator::isLinearScaling( // no scaling means linear if( !xScaling.is()) return true; - static OUString aLinScalingServiceName( "com.sun.star.chart2.LinearScaling" ); uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY ); - return (xServiceName.is() && xServiceName->getServiceName().equals( aLinScalingServiceName )); + return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LinearScaling" )); } bool RegressionCurveCalculator::isLogarithmicScaling( const Reference< chart2::XScaling > & xScaling ) { - static OUString aLogScalingServiceName( "com.sun.star.chart2.LogarithmicScaling" ); uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY ); - return (xServiceName.is() && xServiceName->getServiceName().equals( aLogScalingServiceName )); + return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LogarithmicScaling" )); } void RegressionCurveCalculator::setRegressionProperties( diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx index 755b1dacfed7..a29d7d5828d1 100644 --- a/chart2/source/tools/RegressionEquation.cxx +++ b/chart2/source/tools/RegressionEquation.cxx @@ -45,8 +45,8 @@ using ::osl::MutexGuard; namespace { -static const OUString lcl_aImplementationName( "com.sun.star.comp.chart2.RegressionEquation" ); -static const OUString lcl_aServiceName( "com.sun.star.chart2.RegressionEquation" ); +static const char lcl_aImplementationName[] = "com.sun.star.comp.chart2.RegressionEquation"; +static const char lcl_aServiceName[] = "com.sun.star.chart2.RegressionEquation"; enum { @@ -315,7 +315,7 @@ uno::Sequence< OUString > RegressionEquation::getSupportedServiceNames_Static() } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( RegressionEquation, lcl_aImplementationName ); +APPHELPER_XSERVICEINFO_IMPL( RegressionEquation, OUString(lcl_aImplementationName) ); using impl::RegressionEquation_Base; diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx index e30f8d0b5037..2b4ea673938a 100644 --- a/chart2/source/tools/Scaling.cxx +++ b/chart2/source/tools/Scaling.cxx @@ -24,10 +24,10 @@ namespace { -static const OUString lcl_aServiceName_Logarithmic( "com.sun.star.chart2.LogarithmicScaling" ); -static const OUString lcl_aServiceName_Exponential( "com.sun.star.chart2.ExponentialScaling" ); -static const OUString lcl_aServiceName_Linear( "com.sun.star.chart2.LinearScaling" ); -static const OUString lcl_aServiceName_Power( "com.sun.star.chart2.PowerScaling" ); +static const char lcl_aServiceName_Logarithmic[] = "com.sun.star.chart2.LogarithmicScaling"; +static const char lcl_aServiceName_Exponential[] = "com.sun.star.chart2.ExponentialScaling"; +static const char lcl_aServiceName_Linear[] = "com.sun.star.chart2.LinearScaling"; +static const char lcl_aServiceName_Power[] = "com.sun.star.chart2.PowerScaling"; } @@ -53,8 +53,7 @@ LogarithmicScaling::~LogarithmicScaling() { } - double SAL_CALL -LogarithmicScaling::doScaling( double value ) +double SAL_CALL LogarithmicScaling::doScaling( double value ) throw (uno::RuntimeException, std::exception) { double fResult; @@ -65,27 +64,27 @@ LogarithmicScaling::doScaling( double value ) return fResult; } - uno::Reference< XScaling > SAL_CALL -LogarithmicScaling::getInverseScaling() +uno::Reference< XScaling > SAL_CALL LogarithmicScaling::getInverseScaling() throw (uno::RuntimeException, std::exception) { return new ExponentialScaling( m_fBase ); } - OUString SAL_CALL -LogarithmicScaling::getServiceName() +OUString SAL_CALL LogarithmicScaling::getServiceName() throw (uno::RuntimeException, std::exception) { - return lcl_aServiceName_Logarithmic; + return OUString(lcl_aServiceName_Logarithmic); } uno::Sequence< OUString > LogarithmicScaling::getSupportedServiceNames_Static() { - return uno::Sequence< OUString >( & lcl_aServiceName_Logarithmic, 1 ); + uno::Sequence< OUString > aSeq(1); + aSeq.getArray()[0] = lcl_aServiceName_Logarithmic; + return aSeq; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( LogarithmicScaling, lcl_aServiceName_Logarithmic ) +APPHELPER_XSERVICEINFO_IMPL( LogarithmicScaling, OUString(lcl_aServiceName_Logarithmic) ) ExponentialScaling::ExponentialScaling( const uno::Reference< uno::XComponentContext > & xContext ) : m_fBase( 10.0 ), @@ -102,8 +101,7 @@ ExponentialScaling::~ExponentialScaling() { } - double SAL_CALL -ExponentialScaling::doScaling( double value ) +double SAL_CALL ExponentialScaling::doScaling( double value ) throw (uno::RuntimeException, std::exception) { double fResult; @@ -114,27 +112,27 @@ ExponentialScaling::doScaling( double value ) return fResult; } - uno::Reference< XScaling > SAL_CALL -ExponentialScaling::getInverseScaling() +uno::Reference< XScaling > SAL_CALL ExponentialScaling::getInverseScaling() throw (uno::RuntimeException, std::exception) { return new LogarithmicScaling( m_fBase ); } - OUString SAL_CALL -ExponentialScaling::getServiceName() +OUString SAL_CALL ExponentialScaling::getServiceName() throw (uno::RuntimeException, std::exception) { - return lcl_aServiceName_Exponential; + return OUString(lcl_aServiceName_Exponential); } uno::Sequence< OUString > ExponentialScaling::getSupportedServiceNames_Static() { - return uno::Sequence< OUString >( & lcl_aServiceName_Exponential, 1 ); + uno::Sequence< OUString > aSeq(1); + aSeq.getArray()[0] = lcl_aServiceName_Exponential; + return aSeq; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( ExponentialScaling, lcl_aServiceName_Exponential ) +APPHELPER_XSERVICEINFO_IMPL( ExponentialScaling, OUString(lcl_aServiceName_Exponential) ) LinearScaling::LinearScaling( const uno::Reference< uno::XComponentContext > & xContext ) : m_fSlope( 1.0 ), @@ -172,20 +170,21 @@ uno::Reference< XScaling > SAL_CALL return new LinearScaling( 1.0 / m_fSlope, m_fOffset / m_fSlope ); } - OUString SAL_CALL -LinearScaling::getServiceName() +OUString SAL_CALL LinearScaling::getServiceName() throw (uno::RuntimeException, std::exception) { - return lcl_aServiceName_Linear; + return OUString(lcl_aServiceName_Linear); } uno::Sequence< OUString > LinearScaling::getSupportedServiceNames_Static() { - return uno::Sequence< OUString >( & lcl_aServiceName_Linear, 1 ); + uno::Sequence< OUString > aSeq(1); + aSeq.getArray()[0] = lcl_aServiceName_Linear; + return aSeq; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( LinearScaling, lcl_aServiceName_Linear ) +APPHELPER_XSERVICEINFO_IMPL( LinearScaling, OUString(lcl_aServiceName_Linear) ) PowerScaling::PowerScaling( const uno::Reference< uno::XComponentContext > & xContext ) : m_fExponent( 10.0 ), @@ -225,16 +224,18 @@ uno::Reference< XScaling > SAL_CALL PowerScaling::getServiceName() throw (uno::RuntimeException, std::exception) { - return lcl_aServiceName_Power; + return OUString(lcl_aServiceName_Power); } uno::Sequence< OUString > PowerScaling::getSupportedServiceNames_Static() { - return uno::Sequence< OUString >( & lcl_aServiceName_Power, 1 ); + uno::Sequence< OUString > aSeq(1); + aSeq.getArray()[0] = lcl_aServiceName_Power; + return aSeq; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( PowerScaling, lcl_aServiceName_Power ) +APPHELPER_XSERVICEINFO_IMPL( PowerScaling, OUString(lcl_aServiceName_Power) ) } //namespace chart diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx index 993e495ca939..3ba14aa36afd 100644 --- a/chart2/source/tools/UncachedDataSequence.cxx +++ b/chart2/source/tools/UncachedDataSequence.cxx @@ -40,7 +40,7 @@ using ::chart::impl::UncachedDataSequence_Base; namespace { -static const OUString lcl_aServiceName( "com.sun.star.comp.chart.UncachedDataSequence" ); +static const char lcl_aServiceName[] = "com.sun.star.comp.chart.UncachedDataSequence"; enum { @@ -156,7 +156,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL UncachedDataSequence::getPropertyS } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( UncachedDataSequence, lcl_aServiceName ) +APPHELPER_XSERVICEINFO_IMPL( UncachedDataSequence, OUString(lcl_aServiceName) ) // ________ XNumericalDataSequence ________ Sequence< double > SAL_CALL UncachedDataSequence::getNumericalData() diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx index 86eeea128c14..c4931823615a 100644 --- a/chart2/source/view/axes/DateScaling.cxx +++ b/chart2/source/view/axes/DateScaling.cxx @@ -25,8 +25,8 @@ namespace { -static const OUString lcl_aServiceName_DateScaling( "com.sun.star.chart2.DateScaling" ); -static const OUString lcl_aServiceName_InverseDateScaling( "com.sun.star.chart2.InverseDateScaling" ); +static const char lcl_aServiceName_DateScaling[] = "com.sun.star.chart2.DateScaling"; +static const char lcl_aServiceName_InverseDateScaling[] = "com.sun.star.chart2.InverseDateScaling"; static const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic } @@ -100,16 +100,18 @@ uno::Reference< XScaling > SAL_CALL DateScaling::getInverseScaling() OUString SAL_CALL DateScaling::getServiceName() throw (uno::RuntimeException, std::exception) { - return lcl_aServiceName_DateScaling; + return OUString(lcl_aServiceName_DateScaling); } uno::Sequence< OUString > DateScaling::getSupportedServiceNames_Static() { - return uno::Sequence< OUString >( & lcl_aServiceName_DateScaling, 1 ); + uno::Sequence< OUString > aSeq(1); + aSeq.getArray()[0] = lcl_aServiceName_DateScaling; + return aSeq; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( DateScaling, lcl_aServiceName_DateScaling ) +APPHELPER_XSERVICEINFO_IMPL( DateScaling, OUString(lcl_aServiceName_DateScaling) ) InverseDateScaling::InverseDateScaling( const Date& rNullDate, sal_Int32 nTimeUnit, bool bShifted ) : m_aNullDate( rNullDate ) @@ -179,16 +181,18 @@ uno::Reference< XScaling > SAL_CALL InverseDateScaling::getInverseScaling() OUString SAL_CALL InverseDateScaling::getServiceName() throw (uno::RuntimeException, std::exception) { - return lcl_aServiceName_InverseDateScaling; + return OUString(lcl_aServiceName_InverseDateScaling); } uno::Sequence< OUString > InverseDateScaling::getSupportedServiceNames_Static() { - return uno::Sequence< OUString >( & lcl_aServiceName_InverseDateScaling, 1 ); + uno::Sequence< OUString > aSeq( 1 ); + aSeq.getArray()[0] = lcl_aServiceName_InverseDateScaling; + return aSeq; } // implement XServiceInfo methods basing upon getSupportedServiceNames_Static -APPHELPER_XSERVICEINFO_IMPL( InverseDateScaling, lcl_aServiceName_InverseDateScaling ) +APPHELPER_XSERVICEINFO_IMPL( InverseDateScaling, OUString(lcl_aServiceName_InverseDateScaling) ) } //namespace chart -- cgit v1.2.3