From 96c26b0d9d10fa9bac3695222980d7145f0342d7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 15 Nov 2015 13:17:00 +0200 Subject: use initialiser for Sequence using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- 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 +-- 5 files changed, 5 insertions(+), 10 deletions(-) (limited to 'chart2/source/tools') 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 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 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 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 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 aSNS { m_aServicename }; return aSNS; } -- cgit v1.2.3