[Libreoffice-commits] core.git: chart2/source

Muhammet Kara muhammet.kara at pardus.org.tr
Fri Aug 5 12:46:22 UTC 2016


 chart2/source/controller/main/ChartFrameloader.cxx      |    3 --
 chart2/source/controller/main/ElementSelector.cxx       |    3 --
 chart2/source/controller/main/ToolbarController.cxx     |    3 --
 chart2/source/controller/sidebar/Chart2PanelFactory.cxx |    3 --
 chart2/source/model/main/CartesianCoordinateSystem.cxx  |    3 --
 chart2/source/model/main/Legend.cxx                     |   19 ++++++----------
 chart2/source/model/main/PolarCoordinateSystem.cxx      |    3 --
 chart2/source/model/template/DataInterpreter.cxx        |    3 --
 chart2/source/tools/ConfigColorScheme.cxx               |    3 --
 chart2/source/tools/DataSource.cxx                      |    3 --
 chart2/source/tools/InternalDataProvider.cxx            |    3 --
 chart2/source/tools/LabeledDataSequence.cxx             |    3 --
 chart2/source/tools/NameContainer.cxx                   |    3 --
 chart2/source/tools/Scaling.cxx                         |   12 +++-------
 chart2/source/view/axes/DateScaling.cxx                 |    6 +----
 chart2/source/view/main/ChartView.cxx                   |    3 --
 16 files changed, 27 insertions(+), 49 deletions(-)

New commits:
commit e50a95b829b327b07ba35e831ae10fb8c40a71ee
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date:   Fri Aug 5 11:49:02 2016 +0300

    tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
    
    in chart2 module
    
    Change-Id: I9c6f2efd59b3796e0e6f5389467fe888f4465586
    Reviewed-on: https://gerrit.libreoffice.org/27895
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx
index 67244fc..594be4b 100644
--- a/chart2/source/controller/main/ChartFrameloader.cxx
+++ b/chart2/source/controller/main/ChartFrameloader.cxx
@@ -81,8 +81,7 @@ css::uno::Sequence< OUString > SAL_CALL ChartFrameLoader::getSupportedServiceNam
 
 uno::Sequence< OUString > ChartFrameLoader::getSupportedServiceNames_Static()
 {
-    uno::Sequence<OUString> aSNS { CHART_FRAMELOADER_SERVICE_NAME };
-    return aSNS;
+    return { CHART_FRAMELOADER_SERVICE_NAME };
 }
 
 // frame::XFrameLoader
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index a8b86fd..6d1453b 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -269,8 +269,7 @@ css::uno::Sequence< OUString > SAL_CALL ElementSelectorToolbarController::getSup
 
 Sequence< OUString > ElementSelectorToolbarController::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { "com.sun.star.frame.ToolbarController" };
-    return aServices;
+    return { "com.sun.star.frame.ToolbarController" };
 }
 ElementSelectorToolbarController::ElementSelectorToolbarController()
 {
diff --git a/chart2/source/controller/main/ToolbarController.cxx b/chart2/source/controller/main/ToolbarController.cxx
index 0381a3a..b7f2d35 100644
--- a/chart2/source/controller/main/ToolbarController.cxx
+++ b/chart2/source/controller/main/ToolbarController.cxx
@@ -125,8 +125,7 @@ sal_Bool ChartToolbarController::supportsService(OUString const & ServiceName)
 css::uno::Sequence<OUString> ChartToolbarController::getSupportedServiceNames()
     throw (css::uno::RuntimeException, std::exception)
 {
-    css::uno::Sequence<OUString> aServiceNames { "com.sun.star.frame.ToolbarController" };
-    return aServiceNames;
+    return { "com.sun.star.frame.ToolbarController" };
 }
 
 }
diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index ba30ff4..7265a07 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -139,8 +139,7 @@ sal_Bool ChartPanelFactory::supportsService(OUString const & ServiceName)
 css::uno::Sequence<OUString> ChartPanelFactory::getSupportedServiceNames()
     throw (css::uno::RuntimeException, std::exception)
 {
-    css::uno::Sequence<OUString> aServiceNames { "com.sun.star.ui.UIElementFactory" };
-    return aServiceNames;
+    return { "com.sun.star.ui.UIElementFactory" };
 }
 
 } } // end of namespace chart::sidebar
diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx
index 44dd8f4..ec99d52 100644
--- a/chart2/source/model/main/CartesianCoordinateSystem.cxx
+++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx
@@ -82,8 +82,7 @@ uno::Reference< util::XCloneable > SAL_CALL CartesianCoordinateSystem::createClo
 // ____ XServiceInfo ____
 Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME };
-    return aServices;
+    return { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx
index d7eabc9..2d3d691 100644
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -264,17 +264,14 @@ void Legend::fireModifyEvent()
 
 Sequence< OUString > Legend::getSupportedServiceNames_Static()
 {
-    const sal_Int32 nNumServices( 6 );
-    sal_Int32 nI = 0;
-    Sequence< OUString > aServices( nNumServices );
-    aServices[ nI++ ] = "com.sun.star.chart2.Legend";
-    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";
-    aServices[ nI++ ] = "com.sun.star.layout.LayoutElement";
-    OSL_ASSERT( nNumServices == nI );
-    return aServices;
+    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 ____
diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx
index c702dfa..44433a0 100644
--- a/chart2/source/model/main/PolarCoordinateSystem.cxx
+++ b/chart2/source/model/main/PolarCoordinateSystem.cxx
@@ -82,8 +82,7 @@ uno::Reference< util::XCloneable > SAL_CALL PolarCoordinateSystem::createClone()
 // ____ XServiceInfo ____
 Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { CHART2_COOSYSTEM_POLAR_SERVICE_NAME };
-    return aServices;
+    return { CHART2_COOSYSTEM_POLAR_SERVICE_NAME };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 163ac44..73899a6 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -381,8 +381,7 @@ bool DataInterpreter::UseCategoriesAsX( const Sequence< beans::PropertyValue > &
 
 Sequence< OUString > DataInterpreter::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { "com.sun.star.chart2.DataInterpreter" };
-    return aServices;
+    return { "com.sun.star.chart2.DataInterpreter" };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 5d474dd..6ecd3f3 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -168,8 +168,7 @@ void ConfigColorScheme::notify( const OUString & rPropertyName )
 
 Sequence< OUString > ConfigColorScheme::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { "com.sun.star.chart2.ColorScheme" };
-    return aServices;
+    return { "com.sun.star.chart2.ColorScheme" };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx
index 724775d..0617e68 100644
--- a/chart2/source/tools/DataSource.cxx
+++ b/chart2/source/tools/DataSource.cxx
@@ -63,8 +63,7 @@ void SAL_CALL DataSource::setData( const Sequence< Reference< chart2::data::XLab
 
 Sequence< OUString > DataSource::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { "com.sun.star.chart2.data.DataSource" };
-    return aServices;
+    return { "com.sun.star.chart2.data.DataSource" };
 }
 
 OUString SAL_CALL DataSource::getImplementationName()
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index fb8004f..eaab547 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -1547,8 +1547,7 @@ Reference< util::XCloneable > SAL_CALL InternalDataProvider::createClone()
 
 Sequence< OUString > InternalDataProvider::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { "com.sun.star.chart2.data.DataProvider" };
-    return aServices;
+    return { "com.sun.star.chart2.data.DataProvider" };
 }
 
 OUString SAL_CALL InternalDataProvider::getImplementationName()
diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx
index a407008..2900b37 100644
--- a/chart2/source/tools/LabeledDataSequence.cxx
+++ b/chart2/source/tools/LabeledDataSequence.cxx
@@ -151,8 +151,7 @@ void SAL_CALL LabeledDataSequence::removeModifyListener( const Reference< util::
 
 Sequence< OUString > LabeledDataSequence::getSupportedServiceNames_Static()
 {
-    Sequence<OUString> aServices { "com.sun.star.chart2.data.LabeledDataSequence" };
-    return aServices;
+    return { "com.sun.star.chart2.data.LabeledDataSequence" };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx
index c3d14ce..ab2d48e 100644
--- a/chart2/source/tools/NameContainer.cxx
+++ b/chart2/source/tools/NameContainer.cxx
@@ -73,8 +73,7 @@ sal_Bool SAL_CALL NameContainer::supportsService( const OUString& ServiceName )
 Sequence< OUString > SAL_CALL NameContainer::getSupportedServiceNames()
     throw( css::uno::RuntimeException, std::exception )
 {
-    Sequence<OUString> aSNS { m_aServicename };
-    return aSNS;
+    return { m_aServicename };
 }
 
 // XNameContainer
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index cc5af4d..bfdd3f4 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -78,8 +78,7 @@ OUString SAL_CALL LogarithmicScaling::getServiceName()
 
 uno::Sequence< OUString > LogarithmicScaling::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aSeq { lcl_aServiceName_Logarithmic };
-    return aSeq;
+    return { lcl_aServiceName_Logarithmic };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
@@ -145,8 +144,7 @@ OUString SAL_CALL ExponentialScaling::getServiceName()
 
 uno::Sequence< OUString > ExponentialScaling::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aSeq { lcl_aServiceName_Exponential };
-    return aSeq;
+    return { lcl_aServiceName_Exponential };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
@@ -216,8 +214,7 @@ OUString SAL_CALL LinearScaling::getServiceName()
 
 uno::Sequence< OUString > LinearScaling::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aSeq { lcl_aServiceName_Linear };
-    return aSeq;
+    return { lcl_aServiceName_Linear };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
@@ -286,8 +283,7 @@ PowerScaling::getServiceName()
 
 uno::Sequence< OUString > PowerScaling::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aSeq { lcl_aServiceName_Power };
-    return aSeq;
+    return { lcl_aServiceName_Power };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx
index 0dd3c69..d6d8323 100644
--- a/chart2/source/view/axes/DateScaling.cxx
+++ b/chart2/source/view/axes/DateScaling.cxx
@@ -106,8 +106,7 @@ OUString SAL_CALL DateScaling::getServiceName()
 
 uno::Sequence< OUString > DateScaling::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aSeq { lcl_aServiceName_DateScaling };
-    return aSeq;
+    return { lcl_aServiceName_DateScaling };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
@@ -207,8 +206,7 @@ OUString SAL_CALL InverseDateScaling::getServiceName()
 
 uno::Sequence< OUString > InverseDateScaling::getSupportedServiceNames_Static()
 {
-    uno::Sequence<OUString> aSeq { lcl_aServiceName_InverseDateScaling };
-    return aSeq;
+    return { lcl_aServiceName_InverseDateScaling };
 }
 
 // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index adc8c88..b52ca24 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1403,8 +1403,7 @@ css::uno::Sequence< OUString > SAL_CALL ChartView::getSupportedServiceNames()
 
 uno::Sequence< OUString > ChartView::getSupportedServiceNames_Static()
 {
-    uno::Sequence<OUString> aSNS { CHART_VIEW_SERVICE_NAME };
-    return aSNS;
+    return { CHART_VIEW_SERVICE_NAME };
 }
 
 ::basegfx::B3DHomMatrix createTransformationSceneToScreen(


More information about the Libreoffice-commits mailing list