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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 3 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 3 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx | 3 | ||||
-rw-r--r-- | svx/source/unogallery/unogalthemeprovider.cxx | 3 |
6 files changed, 6 insertions, 13 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 5cb4076026ca..692e08ec1ce9 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -158,9 +158,7 @@ sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rS Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames() throw ( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.drawing.CustomShapeEngine"; + Sequence<OUString> aRet { "com.sun.star.drawing.CustomShapeEngine" }; return aRet; } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index e905f757bf57..b9883714d1d5 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -669,8 +669,7 @@ Sequence< OUString> SAL_CALL FormController::getSupportedServiceNames() throw( R { // service names which are supported only, but cannot be used to created an // instance at a service factory - Sequence< OUString > aNonCreatableServiceNames( 1 ); - aNonCreatableServiceNames[ 0 ] = "com.sun.star.form.FormControllerDispatcher"; + Sequence<OUString> aNonCreatableServiceNames { "com.sun.star.form.FormControllerDispatcher" }; // services which can be used to created an instance at a service factory Sequence< OUString > aCreatableServiceNames( getSupportedServiceNames_Static() ); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index eb847b8e2bde..fb8132586cd5 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -239,8 +239,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO uno::Reference< ucb::XCommandEnvironment > xEnv; ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); - uno::Sequence< OUString > aProps( 1 ); - aProps.getArray()[ 0 ] = "Url"; + uno::Sequence<OUString> aProps { "Url" }; uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) ); diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index a2ca383c8993..a54d30e1e041 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1141,8 +1141,7 @@ bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_u if( bFolder ) { - uno::Sequence< OUString > aProps( 1 ); - aProps[ 0 ] = "Url"; + uno::Sequence<OUString> aProps { "Url" }; uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) ); uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY ); if( xContentAccess.is() ) diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx index bd26f4373d54..050a38572122 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx @@ -85,8 +85,7 @@ uno::Sequence< OUString > SAL_CALL ChineseTranslation_UnoDialog::getSupportedSer uno::Sequence< OUString > ChineseTranslation_UnoDialog::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS[ 0 ] = "com.sun.star.linguistic2.ChineseTranslationDialog"; + uno::Sequence<OUString> aSNS { "com.sun.star.linguistic2.ChineseTranslationDialog" }; return aSNS; } diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index 7dca671dd02d..ed6ad415cd71 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -60,8 +60,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& Service uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryThemeProvider"; + uno::Sequence<OUString> aSeq { "com.sun.star.gallery.GalleryThemeProvider" }; return aSeq; } |