diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 13:17:00 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:20:39 +0000 |
commit | 96c26b0d9d10fa9bac3695222980d7145f0342d7 (patch) | |
tree | d2d2b4e60e8ec98ff4025abfad42be06d29b3c13 /chart2 | |
parent | 25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (diff) |
use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"
Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx | 3 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | 3 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartFrameloader.cxx | 3 | ||||
-rw-r--r-- | chart2/source/controller/main/ElementSelector.cxx | 3 | ||||
-rw-r--r-- | chart2/source/model/main/CartesianCoordinateSystem.cxx | 3 | ||||
-rw-r--r-- | chart2/source/model/main/PolarCoordinateSystem.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/ConfigColorScheme.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/DataSource.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/InternalDataProvider.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/LabeledDataSequence.cxx | 3 | ||||
-rw-r--r-- | chart2/source/tools/NameContainer.cxx | 3 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 3 |
12 files changed, 12 insertions, 24 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx index ee42cd0988ea..d6dec7ef7316 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx @@ -58,8 +58,7 @@ css::uno::Sequence<OUString> SAL_CALL ChartTypeUnoDlg::getSupportedServiceNames( uno::Sequence< OUString > ChartTypeUnoDlg::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = CHART_TYPE_DIALOG_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_TYPE_DIALOG_SERVICE_NAME }; return aSNS; } uno::Sequence< sal_Int8 > SAL_CALL ChartTypeUnoDlg::getImplementationId() throw( uno::RuntimeException, std::exception ) diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 2a6b79dd8bdd..de804c436bab 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -82,8 +82,7 @@ css::uno::Sequence< OUString > SAL_CALL CreationWizardUnoDlg::getSupportedServic uno::Sequence< OUString > CreationWizardUnoDlg::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = CHART_WIZARD_DIALOG_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_WIZARD_DIALOG_SERVICE_NAME }; return aSNS; } diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index 8e8c7d547196..adf74ee1288b 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( 1 ); - aSNS.getArray()[ 0 ] = CHART_FRAMELOADER_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_FRAMELOADER_SERVICE_NAME }; return aSNS; } diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index 2da31d272691..4d6e114ee617 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -268,8 +268,7 @@ css::uno::Sequence< OUString > SAL_CALL ElementSelectorToolbarController::getSup Sequence< OUString > ElementSelectorToolbarController::getSupportedServiceNames_Static() { - Sequence< OUString > aServices(1); - aServices[ 0 ] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aServices { "com.sun.star.frame.ToolbarController" }; return aServices; } ElementSelectorToolbarController::ElementSelectorToolbarController( const uno::Reference< uno::XComponentContext > & xContext ) diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index 5d44bf12288d..4e1409f6d7ae 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -83,8 +83,7 @@ uno::Reference< util::XCloneable > SAL_CALL CartesianCoordinateSystem::createClo // ____ XServiceInfo ____ Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME; + Sequence<OUString> aServices { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME }; return aServices; } diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index fe6e8c9cc95c..96c9bf2f915f 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -83,8 +83,7 @@ uno::Reference< util::XCloneable > SAL_CALL PolarCoordinateSystem::createClone() // ____ XServiceInfo ____ Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME; + Sequence<OUString> aServices { CHART2_COOSYSTEM_POLAR_SERVICE_NAME }; return aServices; } diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index 52880735a320..51fb7cd8ab61 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( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.ColorScheme"; + Sequence<OUString> aServices { "com.sun.star.chart2.ColorScheme" }; return aServices; } diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx index 39c5b6462314..c2a03f9c14b7 100644 --- a/chart2/source/tools/DataSource.cxx +++ b/chart2/source/tools/DataSource.cxx @@ -65,8 +65,7 @@ void SAL_CALL DataSource::setData( const Sequence< Reference< chart2::data::XLab Sequence< OUString > DataSource::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.data.DataSource"; + Sequence<OUString> aServices { "com.sun.star.chart2.data.DataSource" }; return aServices; } diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 44b386cc1922..7ff00f157f9f 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -1545,8 +1545,7 @@ Reference< util::XCloneable > SAL_CALL InternalDataProvider::createClone() Sequence< OUString > InternalDataProvider::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.data.DataProvider"; + Sequence<OUString> aServices { "com.sun.star.chart2.data.DataProvider" }; return aServices; } diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx index 85fab94f6292..7acb72b4c6ce 100644 --- a/chart2/source/tools/LabeledDataSequence.cxx +++ b/chart2/source/tools/LabeledDataSequence.cxx @@ -152,8 +152,7 @@ void SAL_CALL LabeledDataSequence::removeModifyListener( const Reference< util:: Sequence< OUString > LabeledDataSequence::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.data.LabeledDataSequence"; + Sequence<OUString> aServices { "com.sun.star.chart2.data.LabeledDataSequence" }; return aServices; } diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx index 8961dd7b51df..107b289c83d9 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( ::com::sun::star::uno::RuntimeException, std::exception ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = m_aServicename; + Sequence<OUString> aSNS { m_aServicename }; return aSNS; } diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 19f2521c9758..9814f3cbc71d 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1404,8 +1404,7 @@ css::uno::Sequence< OUString > SAL_CALL ChartView::getSupportedServiceNames() uno::Sequence< OUString > ChartView::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = CHART_VIEW_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_VIEW_SERVICE_NAME }; return aSNS; } |