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/source/tools | |
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/source/tools')
-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 |
5 files changed, 5 insertions, 10 deletions
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; } |