diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-10 15:06:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-11 06:59:15 +0000 |
commit | 22d0d2455f9aa699fac95c450da725c603333132 (patch) | |
tree | 2f619071b7967291b3767292c2a91fbc8b7a2d09 /chart2/source/model/main | |
parent | 78b4a1fb01af9ad3b3395a22f6e396be914b553e (diff) |
loplugin:expandablemethods in chart2
Change-Id: Ie6650628683ec7c67359351eec0e09033f2b50cb
Reviewed-on: https://gerrit.libreoffice.org/30750
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model/main')
23 files changed, 62 insertions, 313 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index f29567c9b9fb..8ba10b145626 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -633,14 +633,6 @@ Reference< beans::XPropertySetInfo > SAL_CALL Axis::getPropertySetInfo() return *StaticAxisInfo::get(); } -Sequence< OUString > Axis::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = "com.sun.star.chart2.Axis"; - aServices[ 1 ] = "com.sun.star.beans.PropertySet"; - return aServices; -} - using impl::Axis_Base; IMPLEMENT_FORWARD_XINTERFACE2( Axis, Axis_Base, ::property::OPropertySet ) @@ -650,11 +642,6 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( Axis, Axis_Base, ::property::OPropertySet ) OUString SAL_CALL Axis::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString Axis::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.Axis"); } @@ -667,7 +654,9 @@ sal_Bool SAL_CALL Axis::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL Axis::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.Axis", + "com.sun.star.beans.PropertySet" }; } } // namespace chart diff --git a/chart2/source/model/main/Axis.hxx b/chart2/source/model/main/Axis.hxx index 00f0d6503b19..6758b92d45b4 100644 --- a/chart2/source/model/main/Axis.hxx +++ b/chart2/source/model/main/Axis.hxx @@ -65,9 +65,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// merge XInterface implementations DECLARE_XINTERFACE() /// merge XTypeProvider implementations diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index d3eeedfade34..6a10d8404327 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -60,14 +60,9 @@ struct StaticCooSysDefaults_Initializer ::chart::tPropertyValueMap* operator()() { static ::chart::tPropertyValueMap aStaticDefaults; - lcl_AddDefaultsToMap( aStaticDefaults ); + ::chart::PropertyHelper::setPropertyValueDefault( aStaticDefaults, PROP_COORDINATESYSTEM_SWAPXANDYAXIS, false ); return &aStaticDefaults; } -private: - static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ) - { - ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_COORDINATESYSTEM_SWAPXANDYAXIS, false ); - } }; struct StaticCooSysDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticCooSysDefaults_Initializer > diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index 31961279ac8a..5befaffb9748 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -74,20 +74,9 @@ uno::Reference< util::XCloneable > SAL_CALL CartesianCoordinateSystem::createClo } // ____ XServiceInfo ____ -Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static() -{ - return { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME }; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL CartesianCoordinateSystem::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString CartesianCoordinateSystem::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart.CartesianCoordinateSystem"); } @@ -100,7 +89,7 @@ sal_Bool SAL_CALL CartesianCoordinateSystem::supportsService( const OUString& rS css::uno::Sequence< OUString > SAL_CALL CartesianCoordinateSystem::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME }; } // ==== CartesianCoordinateSystem2d ==== @@ -114,23 +103,9 @@ CartesianCoordinateSystem2d::~CartesianCoordinateSystem2d() {} // ____ XServiceInfo ____ -Sequence< OUString > CartesianCoordinateSystem2d::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME; - aServices[ 1 ] = "com.sun.star.chart2.CartesianCoordinateSystem2d"; - return aServices; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL CartesianCoordinateSystem2d::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString CartesianCoordinateSystem2d::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.CartesianCoordinateSystem2d"); } @@ -143,7 +118,10 @@ sal_Bool SAL_CALL CartesianCoordinateSystem2d::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL CartesianCoordinateSystem2d::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME, + "com.sun.star.chart2.CartesianCoordinateSystem2d" + }; } // ==== CartesianCoordinateSystem3d ==== @@ -157,23 +135,9 @@ CartesianCoordinateSystem3d::~CartesianCoordinateSystem3d() {} // ____ XServiceInfo ____ -Sequence< OUString > CartesianCoordinateSystem3d::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME; - aServices[ 1 ] = "com.sun.star.chart2.CartesianCoordinateSystem3d"; - return aServices; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL CartesianCoordinateSystem3d::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString CartesianCoordinateSystem3d::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.CartesianCoordinateSystem3d"); } @@ -186,7 +150,10 @@ sal_Bool SAL_CALL CartesianCoordinateSystem3d::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL CartesianCoordinateSystem3d::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME, + "com.sun.star.chart2.CartesianCoordinateSystem3d" + }; } } // namespace chart diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index b9647eb16b67..1997c565101f 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -318,11 +318,6 @@ void ChartModel::impl_adjustAdditionalShapesPositionAndSize( const awt::Size& aV OUString SAL_CALL ChartModel::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString ChartModel::getImplementationName_Static() -{ return OUString(CHART_MODEL_SERVICE_IMPLEMENTATION_NAME); } @@ -335,17 +330,11 @@ sal_Bool SAL_CALL ChartModel::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL ChartModel::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); -} - -uno::Sequence< OUString > ChartModel::getSupportedServiceNames_Static() -{ - uno::Sequence< OUString > aSNS( 3 ); - aSNS[0] = CHART_MODEL_SERVICE_NAME; - aSNS[1] = "com.sun.star.document.OfficeDocument"; - aSNS[2] = "com.sun.star.chart.ChartDocument"; - //// @todo : add additional services if you support any further - return aSNS; + return { + CHART_MODEL_SERVICE_NAME, + "com.sun.star.document.OfficeDocument", + "com.sun.star.chart.ChartDocument" + }; } // frame::XModel (required interface) diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx index 19a54e067fb4..0f359648f31f 100644 --- a/chart2/source/model/main/DataPoint.cxx +++ b/chart2/source/model/main/DataPoint.cxx @@ -272,24 +272,9 @@ void SAL_CALL DataPoint::disposing( const lang::EventObject& ) // ____ OPropertySet ____ void DataPoint::firePropertyChangeEvent() { - fireModifyEvent(); -} - -void DataPoint::fireModifyEvent() -{ m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } -Sequence< OUString > DataPoint::getSupportedServiceNames_Static() -{ - return Sequence< OUString >{ - "com.sun.star.drawing.FillProperties", - "com.sun.star.chart2.DataPoint", - "com.sun.star.chart2.DataPointProperties", - "com.sun.star.beans.PropertySet" - }; -} - // needed by MSC compiler using impl::DataPoint_Base; @@ -299,11 +284,6 @@ IMPLEMENT_FORWARD_XINTERFACE2( DataPoint, DataPoint_Base, ::property::OPropertyS OUString SAL_CALL DataPoint::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString DataPoint::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart.DataPoint") ; } @@ -316,7 +296,12 @@ sal_Bool SAL_CALL DataPoint::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL DataPoint::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return Sequence< OUString >{ + "com.sun.star.drawing.FillProperties", + "com.sun.star.chart2.DataPoint", + "com.sun.star.chart2.DataPointProperties", + "com.sun.star.beans.PropertySet" + }; } } // namespace chart diff --git a/chart2/source/model/main/DataPoint.hxx b/chart2/source/model/main/DataPoint.hxx index 2262079f0e59..8335509b8f8f 100644 --- a/chart2/source/model/main/DataPoint.hxx +++ b/chart2/source/model/main/DataPoint.hxx @@ -64,9 +64,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - protected: explicit DataPoint( const DataPoint & rOther ); @@ -119,8 +116,6 @@ protected: virtual void firePropertyChangeEvent() override; using OPropertySet::disposing; - void fireModifyEvent(); - private: css::uno::WeakReference< css::beans::XPropertySet > m_xParentProperties; diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx index d016f2160476..3f60181ac8ec 100644 --- a/chart2/source/model/main/DataSeries.cxx +++ b/chart2/source/model/main/DataSeries.cxx @@ -232,15 +232,6 @@ uno::Reference< util::XCloneable > SAL_CALL DataSeries::createClone() return xResult; } -Sequence< OUString > DataSeries::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = "com.sun.star.chart2.DataSeries"; - aServices[ 1 ] = "com.sun.star.chart2.DataPointProperties"; - aServices[ 2 ] = "com.sun.star.beans.PropertySet"; - return aServices; -} - // ____ OPropertySet ____ uno::Any DataSeries::GetDefaultValue( sal_Int32 nHandle ) const throw (beans::UnknownPropertyException, @@ -569,11 +560,6 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( DataSeries, DataSeries_Base, OPropertySet ) OUString SAL_CALL DataSeries::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString DataSeries::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart.DataSeries"); } @@ -586,7 +572,10 @@ sal_Bool SAL_CALL DataSeries::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL DataSeries::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.DataSeries", + "com.sun.star.chart2.DataPointProperties", + "com.sun.star.beans.PropertySet" }; } } // namespace chart diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 8ab8c6609f28..f8323f06df61 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -646,16 +646,6 @@ void Diagram::fireModifyEvent() m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } -Sequence< OUString > Diagram::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 3 ); - - aServices[ 0 ] = "com.sun.star.chart2.Diagram"; - aServices[ 1 ] = "com.sun.star.layout.LayoutElement"; - aServices[ 2 ] = "com.sun.star.beans.PropertySet"; - return aServices; -} - // ____ OPropertySet ____ uno::Any Diagram::GetDefaultValue( sal_Int32 nHandle ) const throw(beans::UnknownPropertyException) @@ -747,11 +737,6 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( Diagram, Diagram_Base, ::property::OPropertySe OUString SAL_CALL Diagram::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString Diagram::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.Diagram"); } @@ -764,7 +749,10 @@ sal_Bool SAL_CALL Diagram::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL Diagram::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.Diagram", + "com.sun.star.layout.LayoutElement", + "com.sun.star.beans.PropertySet" }; } } // namespace chart diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx index d34dfa5b3440..4396a584b71a 100644 --- a/chart2/source/model/main/FormattedString.cxx +++ b/chart2/source/model/main/FormattedString.cxx @@ -39,14 +39,9 @@ struct StaticFormattedStringDefaults_Initializer ::chart::tPropertyValueMap* operator()() { static ::chart::tPropertyValueMap aStaticDefaults; - lcl_AddDefaultsToMap( aStaticDefaults ); + ::chart::CharacterProperties::AddDefaultsToMap( aStaticDefaults ); return &aStaticDefaults; } -private: - static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ) - { - ::chart::CharacterProperties::AddDefaultsToMap( rOutMap ); - } }; struct StaticFormattedStringDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticFormattedStringDefaults_Initializer > @@ -197,15 +192,6 @@ void FormattedString::fireModifyEvent() m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } -Sequence< OUString > FormattedString::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 2 ); - - aServices[ 0 ] = "com.sun.star.chart2.FormattedString"; - aServices[ 1 ] = "com.sun.star.beans.PropertySet"; - return aServices; -} - // ____ OPropertySet ____ uno::Any FormattedString::GetDefaultValue( sal_Int32 nHandle ) const throw (beans::UnknownPropertyException, uno::RuntimeException) @@ -241,11 +227,6 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( FormattedString, FormattedString_Base, ::prope OUString SAL_CALL FormattedString::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString FormattedString::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart.FormattedString"); } @@ -258,7 +239,9 @@ sal_Bool SAL_CALL FormattedString::supportsService( const OUString& rServiceName css::uno::Sequence< OUString > SAL_CALL FormattedString::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.FormattedString", + "com.sun.star.beans.PropertySet" }; } } // namespace chart diff --git a/chart2/source/model/main/FormattedString.hxx b/chart2/source/model/main/FormattedString.hxx index 8f4755405260..2eb5565bd64b 100644 --- a/chart2/source/model/main/FormattedString.hxx +++ b/chart2/source/model/main/FormattedString.hxx @@ -61,9 +61,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// merge XInterface implementations DECLARE_XINTERFACE() /// merge XTypeProvider implementations diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx index cd506a4ba97f..6c6dee23a355 100644 --- a/chart2/source/model/main/GridProperties.cxx +++ b/chart2/source/model/main/GridProperties.cxx @@ -223,31 +223,13 @@ void SAL_CALL GridProperties::disposing( const lang::EventObject& /* Source */ ) // ____ OPropertySet ____ void GridProperties::firePropertyChangeEvent() { - fireModifyEvent(); -} - -void GridProperties::fireModifyEvent() -{ m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } -Sequence< OUString > GridProperties::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = "com.sun.star.chart2.GridProperties"; - aServices[ 1 ] = "com.sun.star.beans.PropertySet"; - return aServices; -} - // implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL GridProperties::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString GridProperties::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.GridProperties"); } @@ -260,7 +242,9 @@ sal_Bool SAL_CALL GridProperties::supportsService( const OUString& rServiceName css::uno::Sequence< OUString > SAL_CALL GridProperties::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.GridProperties", + "com.sun.star.beans.PropertySet" }; } // needed by MSC compiler diff --git a/chart2/source/model/main/GridProperties.hxx b/chart2/source/model/main/GridProperties.hxx index 75dd9a33ce1a..a38481edaf06 100644 --- a/chart2/source/model/main/GridProperties.hxx +++ b/chart2/source/model/main/GridProperties.hxx @@ -63,9 +63,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// merge XInterface implementations DECLARE_XINTERFACE() /// merge XTypeProvider implementations @@ -111,8 +108,6 @@ protected: virtual void firePropertyChangeEvent() override; using OPropertySet::disposing; - void fireModifyEvent(); - private: css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder; }; diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index 29ebc46a081a..3df5156c86b0 100644 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -252,26 +252,9 @@ void SAL_CALL Legend::disposing( const lang::EventObject& /* Source */ ) // ____ OPropertySet ____ void Legend::firePropertyChangeEvent() { - fireModifyEvent(); -} - -void Legend::fireModifyEvent() -{ m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } -Sequence< OUString > Legend::getSupportedServiceNames_Static() -{ - return Sequence< OUString >{ - "com.sun.star.chart2.Legend", - "com.sun.star.beans.PropertySet", - "com.sun.star.drawing.FillProperties", - "com.sun.star.drawing.LineProperties", - "com.sun.star.style.CharacterProperties", - "com.sun.star.layout.LayoutElement" - }; -} - // ____ OPropertySet ____ Any Legend::GetDefaultValue( sal_Int32 nHandle ) const throw (beans::UnknownPropertyException, uno::RuntimeException) @@ -299,11 +282,6 @@ Reference< beans::XPropertySetInfo > SAL_CALL Legend::getPropertySetInfo() OUString SAL_CALL Legend::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString Legend::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.Legend"); } @@ -316,7 +294,14 @@ sal_Bool SAL_CALL Legend::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL Legend::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.Legend", + "com.sun.star.beans.PropertySet", + "com.sun.star.drawing.FillProperties", + "com.sun.star.drawing.LineProperties", + "com.sun.star.style.CharacterProperties", + "com.sun.star.layout.LayoutElement" + }; } // needed by MSC compiler diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/model/main/Legend.hxx index 066a595b3606..8b1a270f1412 100644 --- a/chart2/source/model/main/Legend.hxx +++ b/chart2/source/model/main/Legend.hxx @@ -62,9 +62,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// merge XInterface implementations DECLARE_XINTERFACE() /// merge XTypeProvider implementations @@ -111,8 +108,6 @@ protected: virtual void firePropertyChangeEvent() override; using OPropertySet::disposing; - void fireModifyEvent(); - private: css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder; }; diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx index c8654e31d2f0..117eafb212ee 100644 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -203,31 +203,12 @@ void SAL_CALL PageBackground::disposing( const lang::EventObject& /* Source */ ) // ____ OPropertySet ____ void PageBackground::firePropertyChangeEvent() { - fireModifyEvent(); -} - -void PageBackground::fireModifyEvent() -{ m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } -uno::Sequence< OUString > PageBackground::getSupportedServiceNames_Static() -{ - uno::Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = "com.sun.star.chart2.PageBackground"; - aServices[ 1 ] = "com.sun.star.beans.PropertySet"; - return aServices; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL PageBackground::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString PageBackground::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.PageBackground"); } @@ -240,7 +221,9 @@ sal_Bool SAL_CALL PageBackground::supportsService( const OUString& rServiceName css::uno::Sequence< OUString > SAL_CALL PageBackground::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.PageBackground", + "com.sun.star.beans.PropertySet" }; } using impl::PageBackground_Base; diff --git a/chart2/source/model/main/PageBackground.hxx b/chart2/source/model/main/PageBackground.hxx index 721642059028..99abf8150929 100644 --- a/chart2/source/model/main/PageBackground.hxx +++ b/chart2/source/model/main/PageBackground.hxx @@ -59,9 +59,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// merge XInterface implementations DECLARE_XINTERFACE() @@ -106,8 +103,6 @@ protected: virtual void firePropertyChangeEvent() override; using OPropertySet::disposing; - void fireModifyEvent(); - private: css::uno::Reference< css::uno::XComponentContext > m_xContext; diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index aa982cd687f7..6c26feb60da2 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -74,20 +74,9 @@ uno::Reference< util::XCloneable > SAL_CALL PolarCoordinateSystem::createClone() } // ____ XServiceInfo ____ -Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static() -{ - return { CHART2_COOSYSTEM_POLAR_SERVICE_NAME }; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL PolarCoordinateSystem::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString PolarCoordinateSystem::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart.PolarCoordinateSystem"); } @@ -100,7 +89,7 @@ sal_Bool SAL_CALL PolarCoordinateSystem::supportsService( const OUString& rServi css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { CHART2_COOSYSTEM_POLAR_SERVICE_NAME }; } // ==== PolarCoordinateSystem2d ==== @@ -114,23 +103,9 @@ PolarCoordinateSystem2d::~PolarCoordinateSystem2d() {} // ____ XServiceInfo ____ -Sequence< OUString > PolarCoordinateSystem2d::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME; - aServices[ 1 ] = "com.sun.star.chart2.PolarCoordinateSystem2d"; - return aServices; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL PolarCoordinateSystem2d::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString PolarCoordinateSystem2d::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.PolarCoordinateSystem2d") ; } @@ -143,7 +118,9 @@ sal_Bool SAL_CALL PolarCoordinateSystem2d::supportsService( const OUString& rSer css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem2d::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + CHART2_COOSYSTEM_POLAR_SERVICE_NAME, + "com.sun.star.chart2.PolarCoordinateSystem2d" }; } // ==== PolarCoordinateSystem3d ==== @@ -157,23 +134,9 @@ PolarCoordinateSystem3d::~PolarCoordinateSystem3d() {} // ____ XServiceInfo ____ -Sequence< OUString > PolarCoordinateSystem3d::getSupportedServiceNames_Static() -{ - Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME; - aServices[ 1 ] = "com.sun.star.chart2.PolarCoordinateSystem3d"; - return aServices; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL PolarCoordinateSystem3d::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString PolarCoordinateSystem3d::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.PolarCoordinateSystem3d"); } @@ -186,7 +149,9 @@ sal_Bool SAL_CALL PolarCoordinateSystem3d::supportsService( const OUString& rSer css::uno::Sequence< OUString > SAL_CALL PolarCoordinateSystem3d::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + CHART2_COOSYSTEM_POLAR_SERVICE_NAME, + "com.sun.star.chart2.PolarCoordinateSystem3d" }; } } // namespace chart diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx index 4b922bbbe6e0..206e48bd85d9 100644 --- a/chart2/source/model/main/StockBar.cxx +++ b/chart2/source/model/main/StockBar.cxx @@ -212,11 +212,6 @@ void SAL_CALL StockBar::disposing( const lang::EventObject& /* Source */ ) // ____ OPropertySet ____ void StockBar::firePropertyChangeEvent() { - fireModifyEvent(); -} - -void StockBar::fireModifyEvent() -{ m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx index e704c1ffda81..621ec2b3143a 100644 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -372,25 +372,9 @@ void Title::fireModifyEvent() m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } -uno::Sequence< OUString > Title::getSupportedServiceNames_Static() -{ - uno::Sequence< OUString > aServices( 4 ); - aServices[ 0 ] = "com.sun.star.chart2.Title"; - aServices[ 1 ] = "com.sun.star.style.ParagraphProperties"; - aServices[ 2 ] = "com.sun.star.beans.PropertySet"; - aServices[ 3 ] = "com.sun.star.layout.LayoutElement"; - return aServices; -} - -// implement XServiceInfo methods basing upon getSupportedServiceNames_Static OUString SAL_CALL Title::getImplementationName() throw( css::uno::RuntimeException, std::exception ) { - return getImplementationName_Static(); -} - -OUString Title::getImplementationName_Static() -{ return OUString("com.sun.star.comp.chart2.Title"); } @@ -403,7 +387,11 @@ sal_Bool SAL_CALL Title::supportsService( const OUString& rServiceName ) css::uno::Sequence< OUString > SAL_CALL Title::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); + return { + "com.sun.star.chart2.Title", + "com.sun.star.style.ParagraphProperties", + "com.sun.star.beans.PropertySet", + "com.sun.star.layout.LayoutElement" }; } // needed by MSC compiler diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/model/main/Title.hxx index b484ccec66cf..e6ff363c6019 100644 --- a/chart2/source/model/main/Title.hxx +++ b/chart2/source/model/main/Title.hxx @@ -60,9 +60,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - /// merge XInterface implementations DECLARE_XINTERFACE() /// merge XTypeProvider implementations diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx index 40e7e43ce028..d47824fef502 100644 --- a/chart2/source/model/main/Wall.cxx +++ b/chart2/source/model/main/Wall.cxx @@ -205,11 +205,6 @@ void SAL_CALL Wall::disposing( const lang::EventObject& /* Source */ ) // ____ OPropertySet ____ void Wall::firePropertyChangeEvent() { - fireModifyEvent(); -} - -void Wall::fireModifyEvent() -{ m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } diff --git a/chart2/source/model/main/Wall.hxx b/chart2/source/model/main/Wall.hxx index e35d936312b7..5a67938c1684 100644 --- a/chart2/source/model/main/Wall.hxx +++ b/chart2/source/model/main/Wall.hxx @@ -95,8 +95,6 @@ protected: virtual void firePropertyChangeEvent() override; using OPropertySet::disposing; - void fireModifyEvent(); - private: css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder; |