diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 08:43:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 10:13:08 +0000 |
commit | 8e234c5b7d5bae66c544e581bee5770f3f83dd81 (patch) | |
tree | 7d78f03ce2231de4f727d1135449aeb8cba74e99 /sfx2 | |
parent | 3bdd176731c351638f541a37b94094124f3c9f52 (diff) |
use initialiser syntax for Sequence<OUString>
replaced using the script:
git grep -lP 'Sequence.*OUString.*\(1\)'
| xargs perl -0777 -pi
-e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"
Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/macroloader.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/iframe.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/plugin.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/notify/globalevents.cxx | 3 |
10 files changed, 11 insertions, 22 deletions
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 720c05c3943f..2ac45255c8cd 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -146,8 +146,7 @@ Sequence< OUString > SAL_CALL SfxTerminateListener_Impl::getSupportedServiceName // The desktop must know, which listener will terminate the SfxApplication in real ! // It must call this special listener as last one ... otherwise we shutdown the SfxApplication BEFORE other listener // can react ... - Sequence< OUString > lNames(1); - lNames[0] = "com.sun.star.frame.TerminateListener"; + Sequence< OUString > lNames { "com.sun.star.frame.TerminateListener" }; return lNames; } diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index f5704b0f3fb6..e0cfeee40af8 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -164,8 +164,7 @@ namespace using namespace org::freedesktop::PackageKit; using namespace svtools; Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); - Sequence< OUString > vPackages(1); - vPackages[0] = "libreoffice-base"; + Sequence< OUString > vPackages { "libreoffice-base" }; OUString sInteraction; xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction); // Ill be back (hopefully)! diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 6e035830dd2d..ba2de7477d84 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -73,8 +73,7 @@ sal_Bool SAL_CALL SfxMacroLoader::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> SAL_CALL SfxMacroLoader::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = "com.sun.star.frame.ProtocolHandler"; + css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.ProtocolHandler" }; return aSeq; } diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 5cb144c5c2cf..13e11cbf25f2 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -115,8 +115,7 @@ sal_Bool SAL_CALL ShutdownIcon::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> SAL_CALL ShutdownIcon::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = "com.sun.star.office.Quickstart"; + css::uno::Sequence< OUString > aSeq { "com.sun.star.office.Quickstart" }; return aSeq; } diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 13b413c9b50d..08bed4ee2c19 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1383,8 +1383,7 @@ css::uno::Sequence< OUString > SAL_CALL SfxDocumentMetaData::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > s(1); - s[0] = "com.sun.star.document.DocumentProperties"; + css::uno::Sequence< OUString > s { "com.sun.star.document.DocumentProperties" }; return s; } diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index c792d25890fe..542a1d745a1b 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1616,8 +1616,7 @@ void SfxDocTemplate_Impl::AddRegion( const OUString& rTitle, void SfxDocTemplate_Impl::CreateFromHierarchy( Content &rTemplRoot ) { uno::Reference< XResultSet > xResultSet; - Sequence< OUString > aProps(1); - aProps[0] = TITLE; + Sequence< OUString > aProps { TITLE }; try { diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 843b9d3602f8..7cb645af4e6c 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -2228,8 +2228,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override { - css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = "com.sun.star.frame.DocumentTemplates"; + css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.DocumentTemplates" }; return aSeq; } @@ -2641,8 +2640,7 @@ void SfxDocTplService_Impl::createFromContent( GroupList_Impl& rList, aUINames = ReadUINamesForTemplateDir_Impl( aLayerObj.GetMainURL( INetURLObject::NO_DECODE ) ); uno::Reference< XResultSet > xResultSet; - Sequence< OUString > aProps(1); - aProps[0] = TITLE; + Sequence< OUString > aProps { TITLE }; try { diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 692d1ee5dd2a..c42b9782afeb 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -82,8 +82,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override { - css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = "com.sun.star.frame.SpecialEmbeddedObject"; + css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.SpecialEmbeddedObject" }; return aSeq; } diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx index 2a8bd68f4817..e94c495d2b89 100644 --- a/sfx2/source/doc/plugin.cxx +++ b/sfx2/source/doc/plugin.cxx @@ -128,8 +128,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override { - css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = "com.sun.star.frame.SpecialEmbeddedObject"; + css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.SpecialEmbeddedObject" }; return aSeq; } }; diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx index 6ca80e0a4e7a..e1f794c6dc5d 100644 --- a/sfx2/source/notify/globalevents.cxx +++ b/sfx2/source/notify/globalevents.cxx @@ -90,8 +90,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override { - css::uno::Sequence< OUString > aSeq(1); - aSeq[0] = "com.sun.star.frame.GlobalEventBroadcaster"; + css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.GlobalEventBroadcaster" }; return aSeq; } |