summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-10 15:06:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-11 06:59:15 +0000
commit22d0d2455f9aa699fac95c450da725c603333132 (patch)
tree2f619071b7967291b3767292c2a91fbc8b7a2d09 /chart2/source/tools
parent78b4a1fb01af9ad3b3395a22f6e396be914b553e (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/tools')
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx23
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx13
-rw-r--r--chart2/source/tools/DataSource.cxx12
-rw-r--r--chart2/source/tools/ErrorBar.cxx19
-rw-r--r--chart2/source/tools/ImplOPropertySet.cxx12
-rw-r--r--chart2/source/tools/ImplOPropertySet.hxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx20
-rw-r--r--chart2/source/tools/LabeledDataSequence.cxx13
-rw-r--r--chart2/source/tools/ModifyListenerHelper.cxx7
-rw-r--r--chart2/source/tools/RegressionCurveModel.cxx119
-rw-r--r--chart2/source/tools/RegressionCurveModel.hxx21
-rw-r--r--chart2/source/tools/RegressionEquation.cxx26
-rw-r--r--chart2/source/tools/RegressionEquation.hxx3
-rw-r--r--chart2/source/tools/Scaling.cxx52
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx23
15 files changed, 52 insertions, 313 deletions
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index 02ddf0f0b3ee..14792358c3b1 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -221,16 +221,6 @@ Sequence< Any > CachedDataSequence::Impl_getMixedData() const
return aResult;
}
-Sequence< OUString > CachedDataSequence::getSupportedServiceNames_Static()
-{
- Sequence< OUString > aServices( 4 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.data.DataSequence";
- aServices[ 2 ] = "com.sun.star.chart2.data.NumericalDataSequence";
- aServices[ 3 ] = "com.sun.star.chart2.data.TextualDataSequence";
- return aServices;
-}
-
IMPLEMENT_FORWARD_XINTERFACE2( CachedDataSequence, CachedDataSequence_Base, OPropertyContainer )
IMPLEMENT_FORWARD_XTYPEPROVIDER2( CachedDataSequence, CachedDataSequence_Base, OPropertyContainer )
@@ -257,15 +247,9 @@ Reference< beans::XPropertySetInfo > SAL_CALL CachedDataSequence::getPropertySet
return new ::cppu::OPropertyArrayHelper( aProps );
}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL CachedDataSequence::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString CachedDataSequence::getImplementationName_Static()
-{
return OUString(lcl_aServiceName);
}
@@ -278,7 +262,12 @@ sal_Bool SAL_CALL CachedDataSequence::supportsService( const OUString& rServiceN
css::uno::Sequence< OUString > SAL_CALL CachedDataSequence::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return {
+ lcl_aServiceName,
+ "com.sun.star.chart2.data.DataSequence",
+ "com.sun.star.chart2.data.NumericalDataSequence",
+ "com.sun.star.chart2.data.TextualDataSequence"
+ };
}
// ________ XNumericalDataSequence ________
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 309c05650495..2093878539b0 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -166,20 +166,9 @@ void ConfigColorScheme::notify( const OUString & rPropertyName )
m_bNeedsUpdate = true;
}
-Sequence< OUString > ConfigColorScheme::getSupportedServiceNames_Static()
-{
- return { "com.sun.star.chart2.ColorScheme" };
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL ConfigColorScheme::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString ConfigColorScheme::getImplementationName_Static()
-{
return OUString("com.sun.star.comp.chart2.ConfigDefaultColorScheme") ;
}
@@ -192,7 +181,7 @@ sal_Bool SAL_CALL ConfigColorScheme::supportsService( const OUString& rServiceNa
css::uno::Sequence< OUString > SAL_CALL ConfigColorScheme::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { "com.sun.star.chart2.ColorScheme" };
}
} // namespace chart
diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx
index 3bf13bced5a1..16c18ddb8e2b 100644
--- a/chart2/source/tools/DataSource.cxx
+++ b/chart2/source/tools/DataSource.cxx
@@ -57,19 +57,9 @@ void SAL_CALL DataSource::setData( const Sequence< Reference< chart2::data::XLab
m_aDataSeq = aData;
}
-Sequence< OUString > DataSource::getSupportedServiceNames_Static()
-{
- return { "com.sun.star.chart2.data.DataSource" };
-}
-
OUString SAL_CALL DataSource::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString DataSource::getImplementationName_Static()
-{
return OUString("com.sun.star.comp.chart.DataSource");
}
@@ -82,7 +72,7 @@ sal_Bool SAL_CALL DataSource::supportsService( const OUString& rServiceName )
css::uno::Sequence< OUString > SAL_CALL DataSource::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { "com.sun.star.chart2.data.DataSource" };
}
} // namespace chart
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index d40d25145325..ee4c228fe3e5 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -475,23 +475,9 @@ uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > SAL_CALL E
return comphelper::containerToSequence( m_aDataSequences );
}
-uno::Sequence< OUString > ErrorBar::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.ErrorBar";
- return aServices;
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL ErrorBar::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString ErrorBar::getImplementationName_Static()
-{
return OUString(lcl_aServiceName);
}
@@ -504,7 +490,10 @@ sal_Bool SAL_CALL ErrorBar::supportsService( const OUString& rServiceName )
css::uno::Sequence< OUString > SAL_CALL ErrorBar::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return {
+ lcl_aServiceName,
+ "com.sun.star.chart2.ErrorBar"
+ };
}
// needed by MSC compiler
diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx
index f86fe8007f8b..52c2c971ef5c 100644
--- a/chart2/source/tools/ImplOPropertySet.cxx
+++ b/chart2/source/tools/ImplOPropertySet.cxx
@@ -99,7 +99,11 @@ ImplOPropertySet::ImplOPropertySet( const ImplOPropertySet & rOther )
{
::std::copy( rOther.m_aProperties.begin(), rOther.m_aProperties.end(),
::std::inserter( m_aProperties, m_aProperties.begin() ));
- cloneInterfaceProperties();
+
+ // clone interface properties
+ ::std::for_each( m_aProperties.begin(), m_aProperties.end(),
+ lcl_replaceInterfacePropertiesByClones());
+
m_xStyle.set( ::chart::CloneHelper::CreateRefClone< style::XStyle >()( rOther.m_xStyle ));
}
@@ -174,12 +178,6 @@ bool ImplOPropertySet::SetStyle( const Reference< style::XStyle > & xStyle )
return true;
}
-void ImplOPropertySet::cloneInterfaceProperties()
-{
- ::std::for_each( m_aProperties.begin(), m_aProperties.end(),
- lcl_replaceInterfacePropertiesByClones());
-}
-
} // namespace impl
} // namespace chart
diff --git a/chart2/source/tools/ImplOPropertySet.hxx b/chart2/source/tools/ImplOPropertySet.hxx
index dc015b0921a9..0881c89e4ac4 100644
--- a/chart2/source/tools/ImplOPropertySet.hxx
+++ b/chart2/source/tools/ImplOPropertySet.hxx
@@ -73,8 +73,6 @@ public:
tPropertyMap;
private:
- void cloneInterfaceProperties();
-
tPropertyMap m_aProperties;
css::uno::Reference< css::style::XStyle >
m_xStyle;
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index a8a59a6cae67..e2e1ad333202 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -646,11 +646,6 @@ Reference< chart2::data::XDataSequence > InternalDataProvider::createDataSequenc
return xSeq;
}
-void InternalDataProvider::createDefaultData()
-{
- m_aInternalData.createDefaultData();
-}
-
// ____ XDataProvider ____
sal_Bool SAL_CALL InternalDataProvider::createDataSourcePossible( const Sequence< beans::PropertyValue >& /* aArguments */ )
throw (uno::RuntimeException, std::exception)
@@ -1526,8 +1521,9 @@ void SAL_CALL InternalDataProvider::initialize(const uno::Sequence< uno::Any > &
{
comphelper::SequenceAsHashMap aArgs(_aArguments);
if ( aArgs.getUnpackedValueOrDefault( "CreateDefaultData", false ) )
- createDefaultData();
+ m_aInternalData.createDefaultData();
}
+
// ____ XCloneable ____
Reference< util::XCloneable > SAL_CALL InternalDataProvider::createClone()
throw (uno::RuntimeException, std::exception)
@@ -1535,19 +1531,9 @@ Reference< util::XCloneable > SAL_CALL InternalDataProvider::createClone()
return Reference< util::XCloneable >( new InternalDataProvider( *this ));
}
-Sequence< OUString > InternalDataProvider::getSupportedServiceNames_Static()
-{
- return { "com.sun.star.chart2.data.DataProvider" };
-}
-
OUString SAL_CALL InternalDataProvider::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString InternalDataProvider::getImplementationName_Static()
-{
// note: in xmloff this name is used to indicate usage of own data
return OUString("com.sun.star.comp.chart.InternalDataProvider");
}
@@ -1561,7 +1547,7 @@ sal_Bool SAL_CALL InternalDataProvider::supportsService( const OUString& rServic
css::uno::Sequence< OUString > SAL_CALL InternalDataProvider::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { "com.sun.star.chart2.data.DataProvider" };
}
} // namespace chart
diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx
index 2900b3789a01..d5c45694d9c6 100644
--- a/chart2/source/tools/LabeledDataSequence.cxx
+++ b/chart2/source/tools/LabeledDataSequence.cxx
@@ -149,20 +149,9 @@ void SAL_CALL LabeledDataSequence::removeModifyListener( const Reference< util::
}
}
-Sequence< OUString > LabeledDataSequence::getSupportedServiceNames_Static()
-{
- return { "com.sun.star.chart2.data.LabeledDataSequence" };
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL LabeledDataSequence::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString LabeledDataSequence::getImplementationName_Static()
-{
return OUString("com.sun.star.comp.chart2.LabeledDataSequence");
}
@@ -175,7 +164,7 @@ sal_Bool SAL_CALL LabeledDataSequence::supportsService( const OUString& rService
css::uno::Sequence< OUString > SAL_CALL LabeledDataSequence::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { "com.sun.star.chart2.data.LabeledDataSequence" };
}
} // namespace chart
diff --git a/chart2/source/tools/ModifyListenerHelper.cxx b/chart2/source/tools/ModifyListenerHelper.cxx
index 167d3a0ddb96..7b4c26156e11 100644
--- a/chart2/source/tools/ModifyListenerHelper.cxx
+++ b/chart2/source/tools/ModifyListenerHelper.cxx
@@ -101,11 +101,6 @@ ModifyEventForwarder::ModifyEventForwarder() :
{
}
-void ModifyEventForwarder::FireEvent( const lang::EventObject & rEvent )
-{
- lcl_fireModifyEvent( m_aModifyListeners, Reference< uno::XWeak >(), & rEvent );
-}
-
void ModifyEventForwarder::AddListener( const Reference< util::XModifyListener >& aListener )
{
try
@@ -177,7 +172,7 @@ void SAL_CALL ModifyEventForwarder::removeModifyListener( const Reference< util:
void SAL_CALL ModifyEventForwarder::modified( const lang::EventObject& aEvent )
throw (uno::RuntimeException, std::exception)
{
- FireEvent( aEvent );
+ lcl_fireModifyEvent( m_aModifyListeners, Reference< uno::XWeak >(), &aEvent );
}
// ____ XEventListener (base of XModifyListener) ____
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index d09e46e558ef..addd33acdb30 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -122,14 +122,9 @@ struct StaticXXXDefaults_Initializer
::chart::tPropertyValueMap* operator()()
{
static ::chart::tPropertyValueMap aStaticDefaults;
- lcl_AddDefaultsToMap( aStaticDefaults );
+ ::chart::LinePropertiesHelper::AddDefaultsToMap( aStaticDefaults );
return &aStaticDefaults;
}
-private:
- static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
- {
- ::chart::LinePropertiesHelper::AddDefaultsToMap( rOutMap );
- }
};
struct StaticXXXDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticXXXDefaults_Initializer >
@@ -360,22 +355,10 @@ MeanValueRegressionCurve::MeanValueRegressionCurve(
{}
MeanValueRegressionCurve::~MeanValueRegressionCurve()
{}
-uno::Sequence< OUString > MeanValueRegressionCurve::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.MeanValueRegressionCurve";
- return aServices;
-}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+
OUString SAL_CALL MeanValueRegressionCurve::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-const OUString& MeanValueRegressionCurve::getImplementationName_Static()
-{
return lcl_aImplementationName_MeanValue;
}
@@ -388,7 +371,7 @@ sal_Bool SAL_CALL MeanValueRegressionCurve::supportsService( const OUString& rSe
css::uno::Sequence< OUString > SAL_CALL MeanValueRegressionCurve::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName, "com.sun.star.chart2.MeanValueRegressionCurve" };
}
uno::Reference< util::XCloneable > SAL_CALL MeanValueRegressionCurve::createClone()
@@ -407,22 +390,10 @@ LinearRegressionCurve::LinearRegressionCurve(
{}
LinearRegressionCurve::~LinearRegressionCurve()
{}
-uno::Sequence< OUString > LinearRegressionCurve::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.LinearRegressionCurve";
- return aServices;
-}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+
OUString SAL_CALL LinearRegressionCurve::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-const OUString& LinearRegressionCurve::getImplementationName_Static()
-{
return lcl_aImplementationName_Linear;
}
@@ -435,7 +406,7 @@ sal_Bool SAL_CALL LinearRegressionCurve::supportsService( const OUString& rServi
css::uno::Sequence< OUString > SAL_CALL LinearRegressionCurve::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName, "com.sun.star.chart2.LinearRegressionCurve" };
}
uno::Reference< util::XCloneable > SAL_CALL LinearRegressionCurve::createClone()
@@ -454,22 +425,10 @@ LogarithmicRegressionCurve::LogarithmicRegressionCurve(
{}
LogarithmicRegressionCurve::~LogarithmicRegressionCurve()
{}
-uno::Sequence< OUString > LogarithmicRegressionCurve::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.LogarithmicRegressionCurve";
- return aServices;
-}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+
OUString SAL_CALL LogarithmicRegressionCurve::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-const OUString& LogarithmicRegressionCurve::getImplementationName_Static()
-{
return lcl_aImplementationName_Logarithmic;
}
@@ -482,7 +441,7 @@ sal_Bool SAL_CALL LogarithmicRegressionCurve::supportsService( const OUString& r
css::uno::Sequence< OUString > SAL_CALL LogarithmicRegressionCurve::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName, "com.sun.star.chart2.LogarithmicRegressionCurve" };
}
uno::Reference< util::XCloneable > SAL_CALL LogarithmicRegressionCurve::createClone()
@@ -501,22 +460,10 @@ ExponentialRegressionCurve::ExponentialRegressionCurve(
{}
ExponentialRegressionCurve::~ExponentialRegressionCurve()
{}
-uno::Sequence< OUString > ExponentialRegressionCurve::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.ExponentialRegressionCurve";
- return aServices;
-}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+
OUString SAL_CALL ExponentialRegressionCurve::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-const OUString& ExponentialRegressionCurve::getImplementationName_Static()
-{
return lcl_aImplementationName_Exponential;
}
@@ -529,7 +476,7 @@ sal_Bool SAL_CALL ExponentialRegressionCurve::supportsService( const OUString& r
css::uno::Sequence< OUString > SAL_CALL ExponentialRegressionCurve::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName, "com.sun.star.chart2.ExponentialRegressionCurve" };
}
uno::Reference< util::XCloneable > SAL_CALL ExponentialRegressionCurve::createClone()
@@ -548,22 +495,10 @@ PotentialRegressionCurve::PotentialRegressionCurve(
{}
PotentialRegressionCurve::~PotentialRegressionCurve()
{}
-uno::Sequence< OUString > PotentialRegressionCurve::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.PotentialRegressionCurve";
- return aServices;
-}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+
OUString SAL_CALL PotentialRegressionCurve::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-const OUString& PotentialRegressionCurve::getImplementationName_Static()
-{
return lcl_aImplementationName_Potential;
}
@@ -576,7 +511,7 @@ sal_Bool SAL_CALL PotentialRegressionCurve::supportsService( const OUString& rSe
css::uno::Sequence< OUString > SAL_CALL PotentialRegressionCurve::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName, "com.sun.star.chart2.PotentialRegressionCurve" };
}
uno::Reference< util::XCloneable > SAL_CALL PotentialRegressionCurve::createClone()
@@ -595,22 +530,10 @@ PolynomialRegressionCurve::PolynomialRegressionCurve(
{}
PolynomialRegressionCurve::~PolynomialRegressionCurve()
{}
-uno::Sequence< OUString > PolynomialRegressionCurve::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.PolynomialRegressionCurve";
- return aServices;
-}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+
OUString SAL_CALL PolynomialRegressionCurve::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-const OUString& PolynomialRegressionCurve::getImplementationName_Static()
-{
return lcl_aImplementationName_Polynomial;
}
@@ -623,7 +546,7 @@ sal_Bool SAL_CALL PolynomialRegressionCurve::supportsService( const OUString& rS
css::uno::Sequence< OUString > SAL_CALL PolynomialRegressionCurve::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName, "com.sun.star.chart2.PolynomialRegressionCurve" };
}
uno::Reference< util::XCloneable > SAL_CALL PolynomialRegressionCurve::createClone()
@@ -642,22 +565,10 @@ MovingAverageRegressionCurve::MovingAverageRegressionCurve(
{}
MovingAverageRegressionCurve::~MovingAverageRegressionCurve()
{}
-uno::Sequence< OUString > MovingAverageRegressionCurve::getSupportedServiceNames_Static()
-{
- uno::Sequence< OUString > aServices( 2 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.MovingAverageRegressionCurve";
- return aServices;
-}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
+
OUString SAL_CALL MovingAverageRegressionCurve::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-const OUString& MovingAverageRegressionCurve::getImplementationName_Static()
-{
return lcl_aImplementationName_MovingAverage;
}
@@ -670,7 +581,7 @@ sal_Bool SAL_CALL MovingAverageRegressionCurve::supportsService( const OUString&
css::uno::Sequence< OUString > SAL_CALL MovingAverageRegressionCurve::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName, "com.sun.star.chart2.MovingAverageRegressionCurve" };
}
uno::Reference< util::XCloneable > SAL_CALL MovingAverageRegressionCurve::createClone()
diff --git a/chart2/source/tools/RegressionCurveModel.hxx b/chart2/source/tools/RegressionCurveModel.hxx
index 5f56f766b672..db135247c52d 100644
--- a/chart2/source/tools/RegressionCurveModel.hxx
+++ b/chart2/source/tools/RegressionCurveModel.hxx
@@ -158,9 +158,6 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception ) override;
-
- static const OUString& getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
};
class LinearRegressionCurve : public RegressionCurveModel
@@ -184,9 +181,6 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception ) override;
-
- static const OUString& getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
};
class LogarithmicRegressionCurve : public RegressionCurveModel
@@ -210,9 +204,6 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception ) override;
-
- static const OUString& getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
};
class ExponentialRegressionCurve : public RegressionCurveModel
@@ -235,9 +226,6 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception ) override;
-
- static const OUString& getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
};
class PotentialRegressionCurve : public RegressionCurveModel
@@ -261,9 +249,6 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception ) override;
-
- static const OUString& getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
};
class PolynomialRegressionCurve : public RegressionCurveModel
@@ -286,9 +271,6 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception ) override;
-
- static const OUString& getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
};
class MovingAverageRegressionCurve : public RegressionCurveModel
@@ -311,9 +293,6 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception ) override;
-
- static const OUString& getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
};
} // namespace chart
diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx
index 658c7c365359..ce759a3fb68f 100644
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -314,29 +314,9 @@ void SAL_CALL RegressionEquation::setText( const uno::Sequence< uno::Reference<
fireModifyEvent();
}
-uno::Sequence< OUString > RegressionEquation::getSupportedServiceNames_Static()
-{
- const sal_Int32 nNumServices( 5 );
- sal_Int32 nI = 0;
- uno::Sequence< OUString > aServices( nNumServices );
- 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";
- aServices[ nI++ ] = "com.sun.star.style.CharacterProperties";
- OSL_ASSERT( nNumServices == nI );
- return aServices;
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL RegressionEquation::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString RegressionEquation::getImplementationName_Static()
-{
return OUString("com.sun.star.comp.chart2.RegressionEquation");
}
@@ -349,7 +329,11 @@ sal_Bool SAL_CALL RegressionEquation::supportsService( const OUString& rServiceN
css::uno::Sequence< OUString > SAL_CALL RegressionEquation::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { "com.sun.star.chart2.RegressionEquation",
+ "com.sun.star.beans.PropertySet",
+ "com.sun.star.drawing.FillProperties",
+ "com.sun.star.drawing.LineProperties",
+ "com.sun.star.style.CharacterProperties" };
}
using impl::RegressionEquation_Base;
diff --git a/chart2/source/tools/RegressionEquation.hxx b/chart2/source/tools/RegressionEquation.hxx
index cd2d4456843a..6dcdd605f2d8 100644
--- a/chart2/source/tools/RegressionEquation.hxx
+++ b/chart2/source/tools/RegressionEquation.hxx
@@ -68,9 +68,6 @@ public:
getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
override;
- static OUString getImplementationName_Static();
- static css::uno::Sequence< OUString >
- getSupportedServiceNames_Static();
/// merge XInterface implementations
DECLARE_XINTERFACE()
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index bfdd3f4404e0..83084b9126ae 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -76,20 +76,9 @@ OUString SAL_CALL LogarithmicScaling::getServiceName()
return OUString(lcl_aServiceName_Logarithmic);
}
-uno::Sequence< OUString > LogarithmicScaling::getSupportedServiceNames_Static()
-{
- return { lcl_aServiceName_Logarithmic };
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL LogarithmicScaling::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString LogarithmicScaling::getImplementationName_Static()
-{
return OUString(lcl_aServiceName_Logarithmic);
}
@@ -102,7 +91,7 @@ sal_Bool SAL_CALL LogarithmicScaling::supportsService( const OUString& rServiceN
css::uno::Sequence< OUString > SAL_CALL LogarithmicScaling::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName_Logarithmic };
}
ExponentialScaling::ExponentialScaling() :
@@ -142,20 +131,9 @@ OUString SAL_CALL ExponentialScaling::getServiceName()
return OUString(lcl_aServiceName_Exponential);
}
-uno::Sequence< OUString > ExponentialScaling::getSupportedServiceNames_Static()
-{
- return { lcl_aServiceName_Exponential };
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL ExponentialScaling::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString ExponentialScaling::getImplementationName_Static()
-{
return OUString(lcl_aServiceName_Exponential);
}
@@ -168,7 +146,7 @@ sal_Bool SAL_CALL ExponentialScaling::supportsService( const OUString& rServiceN
css::uno::Sequence< OUString > SAL_CALL ExponentialScaling::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName_Exponential };
}
LinearScaling::LinearScaling() :
@@ -212,20 +190,9 @@ OUString SAL_CALL LinearScaling::getServiceName()
return OUString(lcl_aServiceName_Linear);
}
-uno::Sequence< OUString > LinearScaling::getSupportedServiceNames_Static()
-{
- return { lcl_aServiceName_Linear };
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL LinearScaling::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString LinearScaling::getImplementationName_Static()
-{
return OUString(lcl_aServiceName_Linear) ;
}
@@ -238,7 +205,7 @@ sal_Bool SAL_CALL LinearScaling::supportsService( const OUString& rServiceName )
css::uno::Sequence< OUString > SAL_CALL LinearScaling::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName_Linear };
}
PowerScaling::PowerScaling() :
@@ -281,20 +248,9 @@ PowerScaling::getServiceName()
return OUString(lcl_aServiceName_Power);
}
-uno::Sequence< OUString > PowerScaling::getSupportedServiceNames_Static()
-{
- return { lcl_aServiceName_Power };
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL PowerScaling::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString PowerScaling::getImplementationName_Static()
-{
return OUString(lcl_aServiceName_Power);
}
@@ -307,7 +263,7 @@ sal_Bool SAL_CALL PowerScaling::supportsService( const OUString& rServiceName )
css::uno::Sequence< OUString > SAL_CALL PowerScaling::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return { lcl_aServiceName_Power };
}
} //namespace chart
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index 1531ae253007..67a99d72c361 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -120,16 +120,6 @@ void UncachedDataSequence::registerProperties()
cppu::UnoType<decltype(m_aXMLRange)>::get() );
}
-Sequence< OUString > UncachedDataSequence::getSupportedServiceNames_Static()
-{
- Sequence< OUString > aServices( 4 );
- aServices[ 0 ] = lcl_aServiceName;
- aServices[ 1 ] = "com.sun.star.chart2.data.DataSequence";
- aServices[ 2 ] = "com.sun.star.chart2.data.NumericalDataSequence";
- aServices[ 3 ] = "com.sun.star.chart2.data.TextualDataSequence";
- return aServices;
-}
-
IMPLEMENT_FORWARD_XINTERFACE2( UncachedDataSequence, UncachedDataSequence_Base, OPropertyContainer )
IMPLEMENT_FORWARD_XTYPEPROVIDER2( UncachedDataSequence, UncachedDataSequence_Base, OPropertyContainer )
@@ -156,15 +146,9 @@ Reference< beans::XPropertySetInfo > SAL_CALL UncachedDataSequence::getPropertyS
return new ::cppu::OPropertyArrayHelper( aProps );
}
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
OUString SAL_CALL UncachedDataSequence::getImplementationName()
throw( css::uno::RuntimeException, std::exception )
{
- return getImplementationName_Static();
-}
-
-OUString UncachedDataSequence::getImplementationName_Static()
-{
return OUString(lcl_aServiceName);
}
@@ -177,7 +161,12 @@ sal_Bool SAL_CALL UncachedDataSequence::supportsService( const OUString& rServic
css::uno::Sequence< OUString > SAL_CALL UncachedDataSequence::getSupportedServiceNames()
throw( css::uno::RuntimeException, std::exception )
{
- return getSupportedServiceNames_Static();
+ return {
+ lcl_aServiceName,
+ "com.sun.star.chart2.data.DataSequence",
+ "com.sun.star.chart2.data.NumericalDataSequence",
+ "com.sun.star.chart2.data.TextualDataSequence"
+ };
}
// ________ XNumericalDataSequence ________