[Libreoffice-commits] core.git: avmedia/source basctl/source connectivity/source cppuhelper/qa dbaccess/source dtrans/source extensions/source filter/source fpicker/source framework/inc framework/source i18npool/source include/connectivity include/ucbhelper io/source io/test lingucomponent/source linguistic/source linguistic/workben package/source sax/test sc/inc scripting/source sc/source sd/source sfx2/source shell/source sot/source stoc/source svl/source svtools/source svx/source sw/source ucb/source unotools/source uui/source writerperfect/source xmloff/source

Noel Grandin noel at peralex.com
Mon Nov 16 00:36:07 PST 2015


 avmedia/source/macavf/framegrabber.mm                       |    3 +--
 avmedia/source/macavf/manager.mm                            |    3 +--
 avmedia/source/macavf/player.mm                             |    3 +--
 avmedia/source/macavf/window.mm                             |    4 +---
 basctl/source/basicide/unomodel.cxx                         |    4 +---
 connectivity/source/drivers/file/FConnection.cxx            |    8 ++------
 cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx    |    7 +++----
 dbaccess/source/inc/apitools.hxx                            |    6 ++----
 dbaccess/source/ui/browser/brwctrlr.cxx                     |    3 +--
 dtrans/source/generic/clipboardmanager.cxx                  |    4 +---
 dtrans/source/win32/clipb/wcbentry.cxx                      |    3 +--
 dtrans/source/win32/dnd/dndentry.cxx                        |    6 ++----
 dtrans/source/win32/ftransl/ftranslentry.cxx                |    3 +--
 extensions/source/logging/csvformatter.cxx                  |    3 +--
 extensions/source/scanner/scanner.cxx                       |    5 +----
 filter/source/svg/svgdialog.cxx                             |    5 +----
 filter/source/xmlfilterdetect/filterdetect.cxx              |    3 +--
 fpicker/source/office/fpsmartcontent.cxx                    |    4 +---
 framework/inc/macros/xserviceinfo.hxx                       |    3 +--
 framework/source/fwe/classes/actiontriggercontainer.cxx     |    4 +---
 framework/source/fwe/classes/rootactiontriggercontainer.cxx |    4 +---
 i18npool/source/indexentry/indexentrysupplier_common.cxx    |    3 +--
 i18npool/source/nativenumber/nativenumbersupplier.cxx       |    3 +--
 i18npool/source/registerservices/registerservices.cxx       |    5 ++---
 include/connectivity/CommonTools.hxx                        |    3 +--
 include/ucbhelper/macros.hxx                                |    9 +++------
 io/source/TextOutputStream/TextOutputStream.cxx             |    3 +--
 io/test/stm/datatest.cxx                                    |    9 ++-------
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx       |    3 +--
 lingucomponent/source/spellcheck/macosxspell/macspellimp.mm |    3 +--
 lingucomponent/source/spellcheck/spell/sspellimp.cxx        |    3 +--
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx         |    3 +--
 linguistic/source/dlistimp.cxx                              |    3 +--
 linguistic/source/lngopt.cxx                                |    3 +--
 linguistic/source/lngsvcmgr.cxx                             |    4 +---
 linguistic/workben/sspellimp.cxx                            |    4 +---
 package/source/manifest/ManifestReader.cxx                  |    3 +--
 package/source/manifest/ManifestWriter.cxx                  |    3 +--
 sax/test/sax/testsax.cxx                                    |    5 +----
 sax/test/sax/testwriter.cxx                                 |    5 +----
 sc/inc/miscuno.hxx                                          |    4 +---
 sc/source/filter/oox/ooxformulaparser.cxx                   |    3 +--
 sc/source/ui/dbgui/csvruler.cxx                             |    8 ++------
 sc/source/ui/unoobj/filtuno.cxx                             |    8 ++------
 scripting/source/protocolhandler/scripthandler.cxx          |    4 +---
 sd/source/ui/unoidl/DrawController.cxx                      |    4 +---
 sfx2/source/doc/doctemplates.cxx                            |   11 +++--------
 shell/source/win32/SysShentry.cxx                           |    3 +--
 shell/source/win32/simplemail/smplmailentry.cxx             |    3 +--
 sot/source/sdstor/ucbstorage.cxx                            |    3 +--
 stoc/source/implementationregistration/implreg.cxx          |    4 +---
 svl/source/config/languageoptions.cxx                       |    4 +---
 svl/source/inc/passwordcontainer.hxx                        |    4 +---
 svtools/source/config/colorcfg.cxx                          |    6 ++----
 svtools/source/config/extcolorcfg.cxx                       |    6 ++----
 svtools/source/dialogs/addresstemplate.cxx                  |    3 +--
 svtools/source/graphic/descriptor.cxx                       |    5 +----
 svtools/source/graphic/graphic.cxx                          |    5 +----
 svx/source/unogallery/unogalitem.cxx                        |    5 +----
 svx/source/unogallery/unogaltheme.cxx                       |    5 +----
 sw/source/core/doc/number.cxx                               |    4 +---
 sw/source/core/ole/ndole.cxx                                |    4 +---
 sw/source/core/unocore/unocoll.cxx                          |    4 +---
 sw/source/core/unocore/unodraw.cxx                          |    4 +---
 sw/source/core/unocore/unoframe.cxx                         |    4 +---
 sw/source/core/unocore/unoobj.cxx                           |    3 +--
 sw/source/core/unocore/unostyle.cxx                         |    8 ++------
 sw/source/uibase/uno/unodoc.cxx                             |    5 +----
 sw/source/uibase/uno/unotxdoc.cxx                           |    8 ++------
 ucb/source/core/FileAccess.cxx                              |    8 ++------
 ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx         |    4 +---
 unotools/source/ucbhelper/localfilehelper.cxx               |    4 +---
 uui/source/passwordcontainer.cxx                            |    4 +---
 writerperfect/source/writer/WordPerfectImportFilter.cxx     |    4 +---
 xmloff/source/core/xmlimp.cxx                               |    7 ++-----
 xmloff/source/script/XMLEventsImportContext.cxx             |    4 +---
 76 files changed, 95 insertions(+), 247 deletions(-)

New commits:
commit 8569c6d0ad70c32a08774fa6f5ec25b465ea98ee
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Nov 16 09:23:41 2015 +0200

    use initialiser list for Sequence<OUString>
    
    Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02
    Reviewed-on: https://gerrit.libreoffice.org/19978
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/avmedia/source/macavf/framegrabber.mm b/avmedia/source/macavf/framegrabber.mm
index dd6a5c5..7fcf287 100644
--- a/avmedia/source/macavf/framegrabber.mm
+++ b/avmedia/source/macavf/framegrabber.mm
@@ -133,8 +133,7 @@ sal_Bool SAL_CALL FrameGrabber::supportsService( const ::rtl::OUString& ServiceN
 uno::Sequence< ::rtl::OUString > SAL_CALL FrameGrabber::getSupportedServiceNames(  )
     throw (uno::RuntimeException)
 {
-    uno::Sequence< ::rtl::OUString > aRet(1);
-    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_MACAVF_FRAMEGRABBER_SERVICENAME ) );
+    uno::Sequence< ::rtl::OUString > aRet { AVMEDIA_MACAVF_FRAMEGRABBER_SERVICENAME };
 
     return aRet;
 }
diff --git a/avmedia/source/macavf/manager.mm b/avmedia/source/macavf/manager.mm
index 19dda1f..0bc5abd 100644
--- a/avmedia/source/macavf/manager.mm
+++ b/avmedia/source/macavf/manager.mm
@@ -79,8 +79,7 @@ sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName )
 uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames(  )
     throw (uno::RuntimeException)
 {
-    uno::Sequence< ::rtl::OUString > aRet(1);
-    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_MACAVF_MANAGER_SERVICENAME ) );
+    uno::Sequence< ::rtl::OUString > aRet { AVMEDIA_MACAVF_MANAGER_SERVICENAME };
 
     return aRet;
 }
diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm
index 81a5329..bbe9bf3 100644
--- a/avmedia/source/macavf/player.mm
+++ b/avmedia/source/macavf/player.mm
@@ -426,8 +426,7 @@ sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
 uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames(  )
     throw (uno::RuntimeException)
 {
-    uno::Sequence< ::rtl::OUString > aRet(1);
-    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_MACAVF_PLAYER_SERVICENAME ) );
+    uno::Sequence< ::rtl::OUString > aRet { AVMEDIA_MACAVF_PLAYER_SERVICENAME };
 
     return aRet;
 }
diff --git a/avmedia/source/macavf/window.mm b/avmedia/source/macavf/window.mm
index e6c4d7f..a546501 100644
--- a/avmedia/source/macavf/window.mm
+++ b/avmedia/source/macavf/window.mm
@@ -322,9 +322,7 @@ sal_Bool SAL_CALL Window::supportsService( const ::rtl::OUString& ServiceName )
 uno::Sequence< ::rtl::OUString > SAL_CALL Window::getSupportedServiceNames(  )
     throw (uno::RuntimeException)
 {
-    uno::Sequence< ::rtl::OUString > aRet(1);
-    aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_MACAVF_WINDOW_SERVICENAME ) );
-
+    uno::Sequence< ::rtl::OUString > aRet { AVMEDIA_MACAVF_WINDOW_SERVICENAME };
     return aRet;
 }
 
diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx
index db1c9bc..fe1942b 100644
--- a/basctl/source/basicide/unomodel.cxx
+++ b/basctl/source/basicide/unomodel.cxx
@@ -99,9 +99,7 @@ uno::Sequence< OUString > SIDEModel::getSupportedServiceNames() throw( uno::Runt
 
 uno::Sequence< OUString > SIDEModel::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aRet(1);
-    OUString* pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.script.BasicIDE" ;
+    uno::Sequence< OUString > aRet { "com.sun.star.script.BasicIDE" };
     return aRet;
 }
 
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 4c60592..fe5c84e 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -171,9 +171,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
         }
 
         // set fields to fetch
-        Sequence< OUString > aProps(1);
-        OUString* pProps = aProps.getArray();
-        pProps[ 0 ] = "Title";
+        Sequence< OUString > aProps { "Title" };
 
         try
         {
@@ -398,9 +396,7 @@ Reference< XTablesSupplier > OConnection::createCatalog()
 Reference< XDynamicResultSet > OConnection::getDir() const
 {
     Reference<XDynamicResultSet> xContent;
-    Sequence< OUString > aProps(1);
-    OUString* pProps = aProps.getArray();
-    pProps[ 0 ] = "Title";
+    Sequence< OUString > aProps { "Title" };
     try
     {
         Reference<XContentIdentifier> xIdent = getContent()->getIdentifier();
diff --git a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
index 8e0e9bf..f6b96e2 100644
--- a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
+++ b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
@@ -384,10 +384,9 @@ rtl::OUString SAL_CALL getImplementationName() {
             "test.cppuhelper.propertysetmixin.comp.CppSupplier");
 }
 
-css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() {
-    css::uno::Sequence< rtl::OUString > s(1);
-    s[0] = rtl::OUString(
-            "test.cppuhelper.propertysetmixin.CppSupplier");
+css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames()
+{
+    css::uno::Sequence< rtl::OUString > s { "test.cppuhelper.propertysetmixin.CppSupplier") };
     return s;
 }
 
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index 7821741..0d342c5 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -92,8 +92,7 @@ public:
 #define IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname)   \
     css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames(  ) throw(css::uno::RuntimeException, std::exception)  \
     {   \
-        css::uno::Sequence< OUString > aSupported(1);   \
-        aSupported[0] = serviceasciiname; \
+        css::uno::Sequence< OUString > aSupported { serviceasciiname }; \
         return aSupported;  \
     }   \
 
@@ -104,8 +103,7 @@ public:
     }   \
     css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames_Static(  ) throw(css::uno::RuntimeException)   \
     {   \
-        css::uno::Sequence< OUString > aSupported(1);   \
-        aSupported[0] = serviceasciiname; \
+        css::uno::Sequence< OUString > aSupported { serviceasciiname }; \
         return aSupported;  \
     }   \
 
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 8b63e0c..92e1778c 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -430,8 +430,7 @@ OUString SAL_CALL SbaXDataBrowserController::FormControllerImpl::getMode(  ) thr
 
 Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getSupportedModes(  ) throw (RuntimeException, std::exception)
 {
-    Sequence< OUString > aModes(1);
-    aModes[1] = "DataMode";
+    Sequence< OUString > aModes { "DataMode" };
     return aModes;
 }
 
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx
index e538a7f..ad8d9e3 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/dtrans/source/generic/clipboardmanager.cxx
@@ -210,9 +210,7 @@ Reference< XInterface > SAL_CALL ClipboardManager_createInstance(
 
 Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames()
 {
-    Sequence < OUString > SupportedServicesNames( 1 );
-    SupportedServicesNames[0] =
-        OUString("com.sun.star.datatransfer.clipboard.ClipboardManager");
+    Sequence < OUString > SupportedServicesNames { "com.sun.star.datatransfer.clipboard.ClipboardManager" };
     return SupportedServicesNames;
 }
 
diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx
index 5427dcd..ff4c149 100644
--- a/dtrans/source/win32/clipb/wcbentry.cxx
+++ b/dtrans/source/win32/clipb/wcbentry.cxx
@@ -66,8 +66,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sysdtrans_component_getFactory( const sal_Ch
 
     if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, WINCLIPBOARD_IMPL_NAME ) ) )
     {
-        Sequence< OUString > aSNS( 1 );
-        aSNS.getArray( )[0] = OUString( WINCLIPBOARD_SERVICE_NAME );
+        Sequence< OUString > aSNS { WINCLIPBOARD_SERVICE_NAME };
 
         //OUString( FPS_IMPL_NAME )
         Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx
index 5e4c63e..79aa8cc 100644
--- a/dtrans/source/win32/dnd/dndentry.cxx
+++ b/dtrans/source/win32/dnd/dndentry.cxx
@@ -53,8 +53,7 @@ dnd_component_getFactory( const sal_Char* pImplName, void* pSrvManager, void* /*
 
     if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, DNDSOURCE_IMPL_NAME ) ) )
     {
-        Sequence< OUString > aSNS( 1 );
-        aSNS.getArray( )[0] = OUString( DNDSOURCE_SERVICE_NAME );
+        Sequence< OUString > aSNS { DNDSOURCE_SERVICE_NAME };
 
         xFactory= createSingleFactory(
             reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
@@ -65,8 +64,7 @@ dnd_component_getFactory( const sal_Char* pImplName, void* pSrvManager, void* /*
     }
     else if( pSrvManager && ( 0 == rtl_str_compare( pImplName, DNDTARGET_IMPL_NAME ) ) )
     {
-        Sequence< OUString > aSNS( 1 );
-        aSNS.getArray( )[0] = OUString( DNDTARGET_SERVICE_NAME );
+        Sequence< OUString > aSNS { DNDTARGET_SERVICE_NAME };
 
         xFactory= createSingleFactory(
             reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx
index 3ddc84a..a81b2d0 100644
--- a/dtrans/source/win32/ftransl/ftranslentry.cxx
+++ b/dtrans/source/win32/ftransl/ftranslentry.cxx
@@ -68,8 +68,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL ftransl_component_getFactory( const sal_Char
 
     if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, IMPL_NAME ) ) )
     {
-        Sequence< OUString > aSNS( 1 );
-        aSNS.getArray( )[0] = OUString( SERVICE_NAME );
+        Sequence< OUString > aSNS { SERVICE_NAME };
 
         Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
             reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx
index 87503f3..708dfbc 100644
--- a/extensions/source/logging/csvformatter.cxx
+++ b/extensions/source/logging/csvformatter.cxx
@@ -145,8 +145,7 @@ namespace
 
     css::uno::Sequence< OUString> initialColumns()
     {
-        css::uno::Sequence< OUString> result = css::uno::Sequence< OUString>(1);
-        result[0] = "message";
+        css::uno::Sequence< OUString> result { "message" };
         return result;
     };
 }
diff --git a/extensions/source/scanner/scanner.cxx b/extensions/source/scanner/scanner.cxx
index e982097..2cf61f5 100644
--- a/extensions/source/scanner/scanner.cxx
+++ b/extensions/source/scanner/scanner.cxx
@@ -76,10 +76,7 @@ OUString ScannerManager::getImplementationName_Static() throw()
 
 Sequence< OUString > ScannerManager::getSupportedServiceNames_Static() throw ()
 {
-    Sequence< OUString > aSNS( 1 );
-
-    aSNS.getArray()[0] = "com.sun.star.scanner.ScannerManager";
-
+    Sequence< OUString > aSNS { "com.sun.star.scanner.ScannerManager" };
     return aSNS;
 }
 
diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx
index c4417f5..c10f892 100644
--- a/filter/source/svg/svgdialog.cxx
+++ b/filter/source/svg/svgdialog.cxx
@@ -54,10 +54,7 @@ OUString SVGDialog_getImplementationName ()
 Sequence< OUString > SAL_CALL SVGDialog_getSupportedServiceNames()
     throw (RuntimeException)
 {
-    Sequence< OUString > aRet( 1 );
-
-    aRet.getArray()[ 0 ] = SVG_DIALOG_SERVICE_NAME;
-
+    Sequence< OUString > aRet { SVG_DIALOG_SERVICE_NAME };
     return aRet;
 }
 
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index 81d639b..8cce08f 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -186,8 +186,7 @@ OUString FilterDetect_getImplementationName ()
 
 Sequence< OUString > FilterDetect_getSupportedServiceNames()
 {
-    Sequence < OUString > aRet(1);
-    aRet[0] = "com.sun.star.document.ExtendedTypeDetection";
+    Sequence < OUString > aRet { "com.sun.star.document.ExtendedTypeDetection" };
     return aRet;
 }
 
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index c122a0d..719dda1 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -325,9 +325,7 @@ namespace svt
             if ( !sFolderType.isEmpty() )
             {
                 ucbhelper::Content aCreated;
-                Sequence< OUString > aNames( 1 );
-                OUString* pNames = aNames.getArray();
-                pNames[0] = "Title";
+                Sequence< OUString > aNames { "Title" };
                 Sequence< Any > aValues( 1 );
                 Any* pValues = aValues.getArray();
                 pValues[0] = makeAny( _rTitle );
diff --git a/framework/inc/macros/xserviceinfo.hxx b/framework/inc/macros/xserviceinfo.hxx
index a465957..2a39faf 100644
--- a/framework/inc/macros/xserviceinfo.hxx
+++ b/framework/inc/macros/xserviceinfo.hxx
@@ -69,8 +69,7 @@ namespace framework{
                                                                                                                                                     \
     css::uno::Sequence< OUString > CLASS::impl_getStaticSupportedServiceNames()                                                                     \
     {                                                                                                                                               \
-        css::uno::Sequence< OUString > seqServiceNames( 1 );                                                                                        \
-        seqServiceNames.getArray() [0] = SERVICENAME;                                                                                              \
+        css::uno::Sequence< OUString > seqServiceNames { SERVICENAME };                                                                             \
         return seqServiceNames;                                                                                                                     \
     }                                                                                                                                               \
                                                                                                                                                     \
diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx
index 48cda46..8144dfe 100644
--- a/framework/source/fwe/classes/actiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/actiontriggercontainer.cxx
@@ -117,9 +117,7 @@ throw ( RuntimeException, std::exception )
 Sequence< OUString > SAL_CALL ActionTriggerContainer::getSupportedServiceNames()
 throw ( RuntimeException, std::exception )
 {
-    Sequence< OUString > seqServiceNames( 1 );
-
-    seqServiceNames[0] = SERVICENAME_ACTIONTRIGGERCONTAINER;
+    Sequence< OUString > seqServiceNames { SERVICENAME_ACTIONTRIGGERCONTAINER };
     return seqServiceNames;
 }
 
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index 87fd715..8c2d94e 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -229,9 +229,7 @@ throw ( RuntimeException, std::exception )
 Sequence< OUString > SAL_CALL RootActionTriggerContainer::getSupportedServiceNames()
 throw ( RuntimeException, std::exception )
 {
-    Sequence< OUString > seqServiceNames( 1 );
-
-    seqServiceNames[0] = SERVICENAME_ACTIONTRIGGERCONTAINER;
+    Sequence< OUString > seqServiceNames { SERVICENAME_ACTIONTRIGGERCONTAINER };
     return seqServiceNames;
 }
 
diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx
index 5caf73d..0c32c00 100644
--- a/i18npool/source/indexentry/indexentrysupplier_common.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx
@@ -131,8 +131,7 @@ IndexEntrySupplier_Common::supportsService(const OUString& rServiceName) throw(
 Sequence< OUString > SAL_CALL
 IndexEntrySupplier_Common::getSupportedServiceNames() throw( RuntimeException, std::exception )
 {
-    Sequence< OUString > aRet(1);
-    aRet[0] = OUString::createFromAscii( implementationName );
+    Sequence< OUString > aRet { OUString::createFromAscii( implementationName ) };
     return aRet;
 }
 
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 36a626d..b0bd76d 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -917,8 +917,7 @@ NativeNumberSupplierService::supportsService(const OUString& rServiceName) throw
 Sequence< OUString > SAL_CALL
 NativeNumberSupplierService::getSupportedServiceNames() throw( RuntimeException, std::exception )
 {
-    Sequence< OUString > aRet(1);
-    aRet[0] = OUString::createFromAscii( implementationName );
+    Sequence< OUString > aRet { OUString::createFromAscii( implementationName ) };
     return aRet;
 }
 
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index ba6f03d..7ba4e53 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -574,9 +574,8 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL i18npool_component_getFactory( const sal_Cha
     {
         if( 0 == rtl_str_compare( sImplementationName, pArr->pImplementationNm ) )
         {
-            uno::Sequence< OUString > aServiceNames(1);
-            aServiceNames.getArray()[0] =
-                OUString::createFromAscii( pArr->pServiceNm );
+            uno::Sequence< OUString > aServiceNames {
+                OUString::createFromAscii( pArr->pServiceNm ) };
             xFactory = ::cppu::createSingleFactory(
                     pServiceManager,
                     OUString::createFromAscii( pArr->pImplementationNm ),
diff --git a/include/connectivity/CommonTools.hxx b/include/connectivity/CommonTools.hxx
index 7a798c6..55471fe 100644
--- a/include/connectivity/CommonTools.hxx
+++ b/include/connectivity/CommonTools.hxx
@@ -166,8 +166,7 @@ namespace connectivity
     }   \
     css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames(  ) throw(css::uno::RuntimeException, std::exception)  \
     {   \
-        css::uno::Sequence< OUString > aSupported(1);   \
-        aSupported[0] = serviceasciiname; \
+        css::uno::Sequence< OUString > aSupported { serviceasciiname }; \
         return aSupported;  \
     }   \
     sal_Bool SAL_CALL classname::supportsService( const OUString& _rServiceName ) throw(css::uno::RuntimeException, std::exception) \
diff --git a/include/ucbhelper/macros.hxx b/include/ucbhelper/macros.hxx
index 97e8045..4a4ead7 100644
--- a/include/ucbhelper/macros.hxx
+++ b/include/ucbhelper/macros.hxx
@@ -245,8 +245,7 @@ XSERVICEINFO_COMMOM_IMPL( Class, ImplName )                                 \
 css::uno::Sequence< OUString >                              \
 Class::getSupportedServiceNames_Static()                                    \
 {                                                                           \
-    css::uno::Sequence< OUString > aSNS( 1 );               \
-    aSNS.getArray()[ 0 ] = Service1;                                        \
+    css::uno::Sequence< OUString > aSNS { Service1 };                       \
     return aSNS;                                                            \
 }
 
@@ -268,8 +267,7 @@ XSERVICEINFO_CREATE_INSTANCE_IMPL( Class )                                  \
 css::uno::Sequence< OUString >                              \
 Class::getSupportedServiceNames_Static()                                    \
 {                                                                           \
-    css::uno::Sequence< OUString > aSNS( 1 );               \
-    aSNS.getArray()[ 0 ] = Service1;                                        \
+    css::uno::Sequence< OUString > aSNS { Service1 };                       \
     return aSNS;                                                            \
 }
 
@@ -281,8 +279,7 @@ XSERVICEINFO_CREATE_INSTANCE_IMPL_CTX( Class )
 css::uno::Sequence< OUString >                              \
 Class::getSupportedServiceNames_Static()                                    \
 {                                                                           \
-    css::uno::Sequence< OUString > aSNS( 1 );               \
-    aSNS.getArray()[ 0 ] = Service1;                                        \
+    css::uno::Sequence< OUString > aSNS { Service1 };                       \
     return aSNS;                                                            \
 }
 
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx
index 802e0a7..f3533ef 100644
--- a/io/source/TextOutputStream/TextOutputStream.cxx
+++ b/io/source/TextOutputStream/TextOutputStream.cxx
@@ -253,8 +253,7 @@ OUString TextOutputStream_getImplementationName()
 
 Sequence< OUString > TextOutputStream_getSupportedServiceNames()
 {
-    Sequence< OUString > seqNames(1);
-    seqNames.getArray()[0] =  SERVICE_NAME;
+    Sequence< OUString > seqNames { SERVICE_NAME };
     return seqNames;
 }
 
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index 3d03080..9ac2440 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -337,11 +337,7 @@ Reference < XInterface > SAL_CALL ODataStreamTest_CreateInstance( const Referenc
 
 Sequence<OUString> ODataStreamTest_getSupportedServiceNames( int i) throw ()
 {
-    Sequence<OUString> aRet(1);
-
-    aRet.getArray()[0] = ODataStreamTest_getImplementationName( i);
-
-
+    Sequence<OUString> aRet { ODataStreamTest_getImplementationName( i) };
     return aRet;
 }
 
@@ -1062,8 +1058,7 @@ Reference < XInterface > SAL_CALL OObjectStreamTest_CreateInstance( const Refere
 
 Sequence<OUString> OObjectStreamTest_getSupportedServiceNames( int i) throw ()
 {
-    Sequence<OUString> aRet(1);
-    aRet.getArray()[0] = OObjectStreamTest_getImplementationName( i);
+    Sequence<OUString> aRet { OObjectStreamTest_getImplementationName( i) };
     return aRet;
 }
 
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index ddbb843..9a6ea3e 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -875,8 +875,7 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
 {
     MutexGuard  aGuard( GetLinguMutex() );
 
-    Sequence< OUString > aSNS( 1 ); // more than 1 service is possible, too
-    aSNS.getArray()[0] = SN_HYPHENATOR;
+    Sequence< OUString > aSNS { SN_HYPHENATOR };
     return aSNS;
 }
 
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index e23b752..9334d6b 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -548,8 +548,7 @@ Sequence< OUString > MacSpellChecker::getSupportedServiceNames_Static()
 {
     MutexGuard  aGuard( GetLinguMutex() );
 
-    Sequence< OUString > aSNS( 1 ); // auch mehr als 1 Service moeglich
-    aSNS.getArray()[0] = SN_SPELLCHECKER;
+    Sequence< OUString > aSNS { SN_SPELLCHECKER };
     return aSNS;
 }
 
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index ccb3c3b..48d2b4a 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -637,8 +637,7 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
 {
     MutexGuard  aGuard( GetLinguMutex() );
 
-    Sequence< OUString > aSNS( 1 ); // more than 1 service is possible, too
-    aSNS.getArray()[0] = SN_SPELLCHECKER;
+    Sequence< OUString > aSNS { SN_SPELLCHECKER };
     return aSNS;
 }
 
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 8aa4dcd..f1841c2 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -645,8 +645,7 @@ Sequence< OUString > Thesaurus::getSupportedServiceNames_Static()
 {
     MutexGuard  aGuard( GetLinguMutex() );
 
-    Sequence< OUString > aSNS( 1 ); // more than 1 service is possible, too
-    aSNS.getArray()[0] = SN_THESAURUS;
+    Sequence< OUString > aSNS { SN_THESAURUS };
     return aSNS;
 }
 
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 21667e4..a3c798f 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -750,8 +750,7 @@ uno::Sequence< OUString > DicList::getSupportedServiceNames_Static() throw()
 {
     osl::MutexGuard aGuard( GetLinguMutex() );
 
-    uno::Sequence< OUString > aSNS( 1 );   // more than 1 service possible
-    aSNS.getArray()[0] = "com.sun.star.linguistic2.DictionaryList";
+    uno::Sequence< OUString > aSNS { "com.sun.star.linguistic2.DictionaryList" };
     return aSNS;
 }
 
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index d70ebe8..4df40e8 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -449,8 +449,7 @@ uno::Sequence< OUString > LinguProps::getSupportedServiceNames_Static()
 {
     MutexGuard  aGuard( GetLinguMutex() );
 
-    uno::Sequence< OUString > aSNS( 1 );    // more than 1 service possible
-    aSNS.getArray()[0] = "com.sun.star.linguistic2.LinguProperties";
+    uno::Sequence< OUString > aSNS { "com.sun.star.linguistic2.LinguProperties" };
     return aSNS;
 }
 
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 22249cb..2e479ec 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -2052,9 +2052,7 @@ uno::Sequence< OUString > LngSvcMgr::getSupportedServiceNames_Static()
         throw()
 {
     osl::MutexGuard aGuard( GetLinguMutex() );
-
-    uno::Sequence< OUString > aSNS( 1 );    // more than 1 service possible
-    aSNS.getArray()[0] = "com.sun.star.linguistic2.LinguServiceManager";
+    uno::Sequence< OUString > aSNS { "com.sun.star.linguistic2.LinguServiceManager" };
     return aSNS;
 }
 
diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx
index c1570f3..32b8686 100644
--- a/linguistic/workben/sspellimp.cxx
+++ b/linguistic/workben/sspellimp.cxx
@@ -431,9 +431,7 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
         throw()
 {
     MutexGuard  aGuard( GetLinguMutex() );
-
-    Sequence< OUString > aSNS( 1 ); // more than 1 service possible
-    aSNS.getArray()[0] = SN_SPELLCHECKER;
+    Sequence< OUString > aSNS { SN_SPELLCHECKER };
     return aSNS;
 }
 
diff --git a/package/source/manifest/ManifestReader.cxx b/package/source/manifest/ManifestReader.cxx
index 7bd5916..485c45c 100644
--- a/package/source/manifest/ManifestReader.cxx
+++ b/package/source/manifest/ManifestReader.cxx
@@ -94,8 +94,7 @@ OUString ManifestReader::static_getImplementationName()
 
 Sequence < OUString > ManifestReader::static_getSupportedServiceNames()
 {
-    Sequence < OUString > aNames(1);
-    aNames[0] = "com.sun.star.packages.manifest.ManifestReader";
+    Sequence < OUString > aNames { "com.sun.star.packages.manifest.ManifestReader" };
     return aNames;
 }
 
diff --git a/package/source/manifest/ManifestWriter.cxx b/package/source/manifest/ManifestWriter.cxx
index a56011e..0e40d99 100644
--- a/package/source/manifest/ManifestWriter.cxx
+++ b/package/source/manifest/ManifestWriter.cxx
@@ -81,8 +81,7 @@ OUString ManifestWriter::static_getImplementationName()
 
 Sequence < OUString > ManifestWriter::static_getSupportedServiceNames()
 {
-    Sequence < OUString > aNames(1);
-    aNames[0] = "com.sun.star.packages.manifest.ManifestWriter";
+    Sequence<OUString> aNames { "com.sun.star.packages.manifest.ManifestWriter" };
     return aNames;
 }
 
diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx
index 8dbfdfb..6b382be 100644
--- a/sax/test/sax/testsax.cxx
+++ b/sax/test/sax/testsax.cxx
@@ -99,10 +99,7 @@ OUString    OSaxParserTest_getImplementationName( ) throw ()
 
 Sequence<OUString> OSaxParserTest_getSupportedServiceNames( ) throw ()
 {
-    Sequence<OUString> aRet(1);
-
-    aRet.getArray()[0] = OSaxParserTest_getImplementationName( );
-
+    Sequence<OUString> aRet { OSaxParserTest_getImplementationName() };
     return aRet;
 }
 
diff --git a/sax/test/sax/testwriter.cxx b/sax/test/sax/testwriter.cxx
index c0af020..f07097f 100644
--- a/sax/test/sax/testwriter.cxx
+++ b/sax/test/sax/testwriter.cxx
@@ -326,10 +326,7 @@ OUString    OSaxWriterTest_getImplementationName( ) throw  ()
 
 Sequence<OUString> OSaxWriterTest_getSupportedServiceNames( ) throw  ()
 {
-    Sequence<OUString> aRet(1);
-
-    aRet.getArray()[0] = OSaxWriterTest_getImplementationName( );
-
+    Sequence<OUString> aRet { OSaxWriterTest_getImplementationName( ) };
     return aRet;
 }
 
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index acb837c..b5936af 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -45,9 +45,7 @@ css::uno::Sequence< OUString >                                   \
     SAL_CALL ClassName::getSupportedServiceNames()                           \
     throw(css::uno::RuntimeException, std::exception)                                   \
 {                                                                                    \
-    css::uno::Sequence< OUString > aRet(1);                      \
-    OUString* pArray = aRet.getArray();                                       \
-    pArray[0] = ServiceAscii;                  \
+    css::uno::Sequence< OUString > aRet { ServiceAscii };                  \
     return aRet;                                                                     \
 }
 
diff --git a/sc/source/filter/oox/ooxformulaparser.cxx b/sc/source/filter/oox/ooxformulaparser.cxx
index c4c6852..2647b7d 100644
--- a/sc/source/filter/oox/ooxformulaparser.cxx
+++ b/sc/source/filter/oox/ooxformulaparser.cxx
@@ -120,8 +120,7 @@ sal_Bool SAL_CALL OOXMLFormulaParser::supportsService( const OUString& rService
 
 Sequence< OUString > SAL_CALL OOXMLFormulaParser::getSupportedServiceNames() throw( RuntimeException, std::exception )
 {
-    Sequence< OUString > aServiceNames( 1 );
-    aServiceNames[ 0 ] =  "com.sun.star.sheet.FilterFormulaParser";
+    Sequence< OUString > aServiceNames { "com.sun.star.sheet.FilterFormulaParser" };
     return aServiceNames;
 }
 
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index abe5375..f268274 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -39,11 +39,9 @@ static void load_FixedWidthList(ScCsvSplits &rSplits)
 
     Sequence<Any>aValues;
     const Any *pProperties;
-    Sequence<OUString> aNames(1);
-    OUString* pNames = aNames.getArray();
+    Sequence<OUString> aNames { FIXED_WIDTH_LIST };
     ScLinkConfigItem aItem( OUString( SEP_PATH ) );
 
-    pNames[0] = FIXED_WIDTH_LIST;
     aValues = aItem.GetProperties( aNames );
     pProperties = aValues.getConstArray();
 
@@ -74,11 +72,9 @@ static void save_FixedWidthList(const ScCsvSplits& rSplits)
     OUString sFixedWidthLists = sSplits.makeStringAndClear();
     Sequence<Any> aValues;
     Any *pProperties;
-    Sequence<OUString> aNames(1);
-    OUString* pNames = aNames.getArray();
+    Sequence<OUString> aNames { FIXED_WIDTH_LIST };
     ScLinkConfigItem aItem( OUString( SEP_PATH ) );
 
-    pNames[0] = FIXED_WIDTH_LIST;
     aValues = aItem.GetProperties( aNames );
     pProperties = aValues.getArray();
     pProperties[0] <<= sFixedWidthLists;
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index bcb87b9..b1b289d 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -62,12 +62,10 @@ static void load_CharSet( rtl_TextEncoding &nCharSet, bool bExport )
 {
     Sequence<Any> aValues;
     const Any *pProperties;
-    Sequence<OUString> aNames(1);
-    OUString* pNames = aNames.getArray();
+    Sequence<OUString> aNames { DBF_CHAR_SET };
     ScLinkConfigItem aItem( OUString::createFromAscii(
                                 bExport?DBF_SEP_PATH_EXPORT:DBF_SEP_PATH_IMPORT ) );
 
-    pNames[0] = DBF_CHAR_SET;
     aValues = aItem.GetProperties( aNames );
     pProperties = aValues.getConstArray();
 
@@ -89,12 +87,10 @@ static void save_CharSet( rtl_TextEncoding nCharSet, bool bExport )
 {
     Sequence<Any> aValues;
     Any *pProperties;
-    Sequence<OUString> aNames(1);
-    OUString* pNames = aNames.getArray();
+    Sequence<OUString> aNames { DBF_CHAR_SET };
     ScLinkConfigItem aItem( OUString::createFromAscii(
                                 bExport?DBF_SEP_PATH_EXPORT:DBF_SEP_PATH_IMPORT ) );
 
-    pNames[0] = DBF_CHAR_SET;
     aValues = aItem.GetProperties( aNames );
     pProperties = aValues.getArray();
     pProperties[0] <<= (sal_Int32) nCharSet;
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 6d5306d..e1a1e61 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -469,9 +469,7 @@ throw( RuntimeException, std::exception )
 Sequence< OUString > ScriptProtocolHandler::impl_getStaticSupportedServiceNames()
 {
     ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-    Sequence< OUString > seqServiceNames( 1 );
-    seqServiceNames.getArray() [ 0 ] =
-        OUString::createFromAscii( ::scripting_protocolhandler::MYSERVICENAME );
+    Sequence< OUString > seqServiceNames { OUString::createFromAscii(::scripting_protocolhandler::MYSERVICENAME) };
     return seqServiceNames ;
 }
 
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 5574ce0..7612ca1 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -223,9 +223,7 @@ Sequence<OUString> SAL_CALL DrawController::getSupportedServiceNames()
     throw(RuntimeException, std::exception)
 {
     ThrowIfDisposed();
-    Sequence<OUString> aSupportedServices (1);
-    OUString* pServices = aSupportedServices.getArray();
-    pServices[0] = ssServiceName;
+    Sequence<OUString> aSupportedServices { ssServiceName };
     return aSupportedServices;
 }
 
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 7cb645a..8cd3f57 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -1569,9 +1569,7 @@ bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
 
         // now get the content of the Group
         uno::Reference< XResultSet > xResultSet;
-        Sequence< OUString > aProps( 1 );
-
-        aProps[0] = TARGET_URL;
+        Sequence< OUString > aProps { TARGET_URL };
 
         try
         {
@@ -1686,9 +1684,7 @@ bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
        try
        {
         uno::Reference< XResultSet > xResultSet;
-        Sequence< OUString > aProps( 1 );
-
-        aProps[0] = TARGET_URL;
+        Sequence< OUString > aProps { TARGET_URL };
         ResultSetInclude eInclude = INCLUDE_DOCUMENTS_ONLY;
         xResultSet = aGroup.createCursor( aProps, eInclude );
 
@@ -2574,8 +2570,7 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
     // now get the content of the Group
     Content                 aContent;
     uno::Reference< XResultSet > xResultSet;
-    Sequence< OUString >    aProps(1);
-    aProps[0] = TITLE;
+    Sequence< OUString >    aProps { TITLE };
 
     try
     {
diff --git a/shell/source/win32/SysShentry.cxx b/shell/source/win32/SysShentry.cxx
index a0551ad..d6d2bf4 100644
--- a/shell/source/win32/SysShentry.cxx
+++ b/shell/source/win32/SysShentry.cxx
@@ -60,8 +60,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL syssh_component_getFactory(
 
     if ( 0 == rtl_str_compare( pImplName, SYSSHEXEC_IMPL_NAME ) )
     {
-        Sequence< OUString > aSNS( 1 );
-        aSNS.getArray( )[0] = OUString(SYSSHEXEC_SERVICE_NAME );
+        Sequence< OUString > aSNS { SYSSHEXEC_SERVICE_NAME };
 
         Reference< XSingleComponentFactory > xFactory ( createSingleComponentFactory(
             createInstance,
diff --git a/shell/source/win32/simplemail/smplmailentry.cxx b/shell/source/win32/simplemail/smplmailentry.cxx
index c192d3c..651aba7 100644
--- a/shell/source/win32/simplemail/smplmailentry.cxx
+++ b/shell/source/win32/simplemail/smplmailentry.cxx
@@ -60,8 +60,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL smplmail_component_getFactory(
 
     if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, COMP_IMPL_NAME ) ) )
     {
-        Sequence< OUString > aSNS( 1 );
-        aSNS.getArray( )[0] = OUString(COMP_SERVICE_NAME );
+        Sequence< OUString > aSNS { COMP_SERVICE_NAME };
 
         Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
             reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index a68b0a5..1668d6d 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2060,8 +2060,7 @@ bool UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
                 if ( rProps[ 0 ].Name != "Title" )
                     continue;
 
-                Sequence < OUString > aNames(1);
-                aNames[0] = "Title";
+                Sequence < OUString > aNames { "Title" };
                 Sequence < Any > aValues(1);
                 aValues[0] = makeAny( OUString( m_aName ) );
 
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 886ead9..008991d 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -367,9 +367,7 @@ static void createUniqueSubEntry(const Reference < XRegistryKey > & xSuperKey,
             }
         } else
         {
-            Sequence<OUString> implEntriesNew(1);
-
-            implEntriesNew.getArray()[0] = value;
+            Sequence<OUString> implEntriesNew { value };
 
             xSuperKey->setAsciiListValue(implEntriesNew);
         }
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index 3ec918d..4d1990c 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -191,9 +191,7 @@ sal_Int16 SvtLanguageOptions::GetI18NScriptTypeOfLanguage( sal_uInt16 nLang )
 SvtSystemLanguageOptions::SvtSystemLanguageOptions() :
     utl::ConfigItem( "System/L10N")
 {
-    uno::Sequence< OUString > aPropertyNames(1);
-    OUString* pNames = aPropertyNames.getArray();
-    pNames[0] = "SystemLocale";
+    uno::Sequence< OUString > aPropertyNames { "SystemLocale" };
     uno::Sequence< uno::Any > aValues = GetProperties( aPropertyNames );
 
     if ( aValues.getLength() )
diff --git a/svl/source/inc/passwordcontainer.hxx b/svl/source/inc/passwordcontainer.hxx
index 3b75cc2..bfecda1 100644
--- a/svl/source/inc/passwordcontainer.hxx
+++ b/svl/source/inc/passwordcontainer.hxx
@@ -206,9 +206,7 @@ public:
         mainCont( point ),
         hasEncoded( false )
     {
-        css::uno::Sequence< OUString > aNode( 1 );
-        *aNode.getArray()  = path;
-        *aNode.getArray() += "/Store";
+        css::uno::Sequence< OUString > aNode { path + "/Store" };
         EnableNotification( aNode );
     }
 
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 8ab8e1c..76f22af 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -220,8 +220,7 @@ void ColorConfig_Impl::Load(const OUString& rScheme)
     if(sScheme.isEmpty())
     {
         //detect current scheme name
-        uno::Sequence < OUString > aCurrent(1);
-        aCurrent.getArray()[0] = "CurrentColorScheme";
+        uno::Sequence < OUString > aCurrent { "CurrentColorScheme" };
         uno::Sequence< uno::Any > aCurrentVal = GetProperties( aCurrent );
         aCurrentVal.getConstArray()[0] >>= sScheme;
     }
@@ -298,8 +297,7 @@ void ColorConfig_Impl::ImplCommit()
 void ColorConfig_Impl::CommitCurrentSchemeName()
 {
     //save current scheme name
-    uno::Sequence < OUString > aCurrent(1);
-    aCurrent.getArray()[0] = "CurrentColorScheme";
+    uno::Sequence < OUString > aCurrent { "CurrentColorScheme" };
     uno::Sequence< uno::Any > aCurrentVal(1);
     aCurrentVal.getArray()[0] <<= m_sLoadedScheme;
     PutProperties(aCurrent, aCurrentVal);
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 8585532..9db6d6d 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -294,8 +294,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
     if(sScheme.isEmpty())
     {
         //detect current scheme name
-        uno::Sequence < OUString > aCurrent(1);
-        aCurrent.getArray()[0] = "ExtendedColorScheme/CurrentColorScheme";
+        uno::Sequence < OUString > aCurrent { "ExtendedColorScheme/CurrentColorScheme" };
         uno::Sequence< uno::Any > aCurrentVal = GetProperties( aCurrent );
         aCurrentVal.getConstArray()[0] >>= sScheme;
     } // if(!sScheme.getLength())
@@ -460,8 +459,7 @@ void ExtendedColorConfig_Impl::ImplCommit()
 void ExtendedColorConfig_Impl::CommitCurrentSchemeName()
 {
     //save current scheme name
-    uno::Sequence < OUString > aCurrent(1);
-    aCurrent.getArray()[0] = "ExtendedColorScheme/CurrentColorScheme";
+    uno::Sequence < OUString > aCurrent { "ExtendedColorScheme/CurrentColorScheme" };
     uno::Sequence< uno::Any > aCurrentVal(1);
     aCurrentVal.getArray()[0] <<= m_sLoadedScheme;
     PutProperties(aCurrent, aCurrentVal);
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 6ca87a9..bf66e5e 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -360,9 +360,8 @@ void AssignmentPersistentData::ImplCommit()
 
     void AssignmentPersistentData::setStringProperty(const sal_Char* _pLocalName, const OUString& _rValue)
     {
-        Sequence< OUString > aNames(1);
+        Sequence< OUString > aNames { OUString::createFromAscii(_pLocalName) };
         Sequence< Any > aValues(1);
-        aNames[0] = OUString::createFromAscii(_pLocalName);
         aValues[0] <<= _rValue;
         PutProperties(aNames, aValues);
     }
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index eff107d..a762bde 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -166,10 +166,7 @@ OUString GraphicDescriptor::getImplementationName_Static()
 uno::Sequence< OUString > GraphicDescriptor::getSupportedServiceNames_Static()
     throw(  )
 {
-    uno::Sequence< OUString > aSeq( 1 );
-
-    aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicDescriptor";
-
+    uno::Sequence< OUString > aSeq { "com.sun.star.graphic.GraphicDescriptor" };
     return aSeq;
 }
 
diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx
index 980f04b..ccfea39 100644
--- a/svtools/source/graphic/graphic.cxx
+++ b/svtools/source/graphic/graphic.cxx
@@ -111,10 +111,7 @@ OUString Graphic::getImplementationName_Static()
 uno::Sequence< OUString > Graphic::getSupportedServiceNames_Static()
     throw()
 {
-    uno::Sequence< OUString > aSeq( 1 );
-
-    aSeq.getArray()[ 0 ] = "com.sun.star.graphic.Graphic";
-
+    uno::Sequence< OUString > aSeq { "com.sun.star.graphic.Graphic" };
     return aSeq;
 }
 
diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx
index 2cc2c89..8abfe5c 100644
--- a/svx/source/unogallery/unogalitem.cxx
+++ b/svx/source/unogallery/unogalitem.cxx
@@ -138,10 +138,7 @@ OUString GalleryItem::getImplementationName_Static()
 uno::Sequence< OUString > GalleryItem::getSupportedServiceNames_Static()
     throw()
 {
-    uno::Sequence< OUString > aSeq( 1 );
-
-    aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryItem";
-
+    uno::Sequence< OUString > aSeq { "com.sun.star.gallery.GalleryItem" };
     return aSeq;
 }
 
diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx
index 1fd2dfa..085cdb1 100644
--- a/svx/source/unogallery/unogaltheme.cxx
+++ b/svx/source/unogallery/unogaltheme.cxx
@@ -83,10 +83,7 @@ OUString GalleryTheme::getImplementationName_Static()
 uno::Sequence< OUString > GalleryTheme::getSupportedServiceNames_Static()
     throw()
 {
-    uno::Sequence< OUString > aSeq( 1 );
-
-    aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryTheme";
-
+    uno::Sequence< OUString > aSeq { "com.sun.star.gallery.GalleryTheme" };
     return aSeq;
 }
 
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index f529315..e4152e5 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -1359,9 +1359,7 @@ namespace numfunc
 
     css::uno::Sequence<OUString> SwNumberingUIBehaviorConfig::GetPropNames()
     {
-        css::uno::Sequence<OUString> aPropNames(1);
-        OUString* pNames = aPropNames.getArray();
-        pNames[0] = "ChangeIndentOnTabAtFirstPosOfFirstListItem";
+        css::uno::Sequence<OUString> aPropNames { "ChangeIndentOnTabAtFirstPosOfFirstListItem" };
 
         return aPropNames;
     }
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 3628918..579caab 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -910,9 +910,7 @@ SwOLELRUCache::SwOLELRUCache()
 
 uno::Sequence< OUString > SwOLELRUCache::GetPropertyNames()
 {
-    Sequence< OUString > aNames( 1 );
-    OUString* pNames = aNames.getArray();
-    pNames[0] = "Writer/OLE_Objects";
+    Sequence< OUString > aNames { "Writer/OLE_Objects" };
     return aNames;
 }
 
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 107a1f1..4cd0973 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -975,9 +975,7 @@ sal_Bool SwXTextTables::supportsService(const OUString& rServiceName) throw( uno
 
 uno::Sequence< OUString > SwXTextTables::getSupportedServiceNames() throw( uno::RuntimeException, std::exception )
 {
-    uno::Sequence< OUString > aRet(1);
-    OUString* pArr = aRet.getArray();
-    pArr[0] = "com.sun.star.text.TextTables";
+    uno::Sequence< OUString > aRet { "com.sun.star.text.TextTables" };
     return aRet;
 }
 
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 11ce3dc..171592f 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1805,9 +1805,7 @@ beans::PropertyState SwXShape::getPropertyState( const OUString& rPropertyName )
     throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
-    uno::Sequence< OUString > aNames(1);
-    OUString* pStrings = aNames.getArray();
-    pStrings[0] = rPropertyName;
+    uno::Sequence< OUString > aNames { rPropertyName };
     uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames);
     return aStates.getConstArray()[0];
 }
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index eb0e408..fe19720 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2384,9 +2384,7 @@ beans::PropertyState SwXFrame::getPropertyState( const OUString& rPropertyName )
     throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
-    uno::Sequence< OUString > aPropertyNames(1);
-    OUString* pNames = aPropertyNames.getArray();
-    pNames[0] = rPropertyName;
+    uno::Sequence< OUString > aPropertyNames { rPropertyName };
     uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aPropertyNames);
     return aStates.getConstArray()[0];
 }
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 24447de..e71a2fc 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1987,8 +1987,7 @@ beans::PropertyState SwUnoCursorHelper::GetPropertyState(
     const OUString& rPropertyName)
 throw (beans::UnknownPropertyException, uno::RuntimeException)
 {
-    uno::Sequence< OUString > aStrings ( 1 );
-    aStrings[0] = rPropertyName;
+    uno::Sequence< OUString > aStrings { rPropertyName };
     uno::Sequence< beans::PropertyState > aSeq =
         GetPropertyStates(rPaM, rPropSet, aStrings,
                 SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY );
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 7b284c3..c8a06ca 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2822,9 +2822,7 @@ beans::PropertyState SwXStyle::getPropertyState(const OUString& rPropertyName)
         throw( beans::UnknownPropertyException, uno::RuntimeException, std::exception )
 {
     SolarMutexGuard aGuard;
-    uno::Sequence< OUString > aNames(1);
-    OUString* pNames = aNames.getArray();
-    pNames[0] = rPropertyName;
+    uno::Sequence< OUString > aNames { rPropertyName };
     uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames);
     return aStates.getConstArray()[0];
 }
@@ -4800,9 +4798,7 @@ beans::PropertyState SwXAutoStyle::getPropertyState( const OUString& rPropertyNa
 {
     SolarMutexGuard aGuard;
 
-    uno::Sequence< OUString > aNames(1);
-    OUString* pNames = aNames.getArray();
-    pNames[0] = rPropertyName;
+    uno::Sequence< OUString > aNames { rPropertyName };
     uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames);
     return aStates.getConstArray()[0];
 }
diff --git a/sw/source/uibase/uno/unodoc.cxx b/sw/source/uibase/uno/unodoc.cxx
index 80f3ca8..aded8e9 100644
--- a/sw/source/uibase/uno/unodoc.cxx
+++ b/sw/source/uibase/uno/unodoc.cxx
@@ -35,10 +35,7 @@ uno::Sequence< OUString > SAL_CALL SwTextDocument_getSupportedServiceNames() thr
 {
     // return only top level services here! All others must be
     // resolved by rtti!
-    uno::Sequence< OUString > aRet ( 1 );
-    OUString* pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.text.TextDocument";
-
+    uno::Sequence< OUString > aRet { "com.sun.star.text.TextDocument" };
     return aRet;
 }
 
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 546d3c4..2331a97 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3771,9 +3771,7 @@ sal_Bool SwXLinkTargetSupplier::supportsService(const OUString& rServiceName)
 Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames()
                                                 throw( RuntimeException, std::exception )
 {
-    Sequence< OUString > aRet(1);
-    OUString* pNames = aRet.getArray();
-    pNames[0] = "com.sun.star.document.LinkTargets";
+    Sequence< OUString > aRet { "com.sun.star.document.LinkTargets" };
     return aRet;
 }
 
@@ -4059,9 +4057,7 @@ sal_Bool SwXLinkNameAccessWrapper::supportsService(const OUString& rServiceName)
 Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames()
                                                     throw( RuntimeException, std::exception )
 {
-    Sequence< OUString > aRet(1);
-    OUString* pNames = aRet.getArray();
-    pNames[0] = "com.sun.star.document.LinkTargets";
+    Sequence< OUString > aRet { "com.sun.star.document.LinkTargets" };
     return aRet;
 }
 
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index 0593044..f386d14 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -395,9 +395,7 @@ void OFileAccess::createFolder( const OUString& NewFolderURL )
             if ( rProps[ 0 ].Name != "Title" )
                 continue;
 
-            Sequence<OUString> aNames(1);
-            OUString* pNames = aNames.getArray();
-            pNames[0] = "Title";
+            Sequence<OUString> aNames { "Title" };
             Sequence< Any > aValues(1);
             Any* pValues = aValues.getArray();
             pValues[0] = makeAny( OUString( aTitle ) );
@@ -668,9 +666,7 @@ bool OFileAccess::createNewFile( const OUString & rParentURL,
             if ( rProps[ 0 ].Name != "Title" )
                 continue;
 
-            Sequence<OUString> aNames(1);
-            OUString* pNames = aNames.getArray();
-            pNames[0] = "Title";
+            Sequence<OUString> aNames { "Title" };
             Sequence< Any > aValues(1);
             Any* pValues = aValues.getArray();
             pValues[0] = makeAny( OUString( rTitle ) );
diff --git a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx
index c896e83..7cf07b8 100644
--- a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx
@@ -94,9 +94,7 @@ OUString DocumentContentFactory::getImplementationName_Static()
 uno::Sequence< OUString >
 DocumentContentFactory::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[ 0 ]
-        = "com.sun.star.frame.TransientDocumentsDocumentContentFactory";
+    uno::Sequence< OUString > aSNS { "com.sun.star.frame.TransientDocumentsDocumentContentFactory" };
     return aSNS;
 }
 
diff --git a/unotools/source/ucbhelper/localfilehelper.cxx b/unotools/source/ucbhelper/localfilehelper.cxx
index 377babb..266f20f 100644
--- a/unotools/source/ucbhelper/localfilehelper.cxx
+++ b/unotools/source/ucbhelper/localfilehelper.cxx
@@ -47,9 +47,7 @@ typedef ::std::vector< OUString* > StringList_Impl;
             rFolder, Reference< XCommandEnvironment >(),
             comphelper::getProcessComponentContext() );
         Reference< ::com::sun::star::sdbc::XResultSet > xResultSet;
-        ::com::sun::star::uno::Sequence< OUString > aProps(1);
-        OUString* pProps = aProps.getArray();
-        pProps[0] = "Url";
+        ::com::sun::star::uno::Sequence< OUString > aProps { "Url" };
 
         try
         {
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 285f7b8..342aa65 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -333,9 +333,7 @@ PasswordContainerInteractionHandler::getImplementationName_Static()
 uno::Sequence< OUString >
 PasswordContainerInteractionHandler::getSupportedServiceNames_Static()
 {
-    uno::Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[ 0 ] =
-                          "com.sun.star.task.PasswordContainerInteractionHandler";
+    uno::Sequence< OUString > aSNS { "com.sun.star.task.PasswordContainerInteractionHandler" };
     return aSNS;
 }
 
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index 867ea03..2500c34 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -381,9 +381,7 @@ throw (RuntimeException)
 Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames()
 throw (RuntimeException)
 {
-    Sequence < OUString > aRet(1);
-    OUString *pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.ui.dialogs.FilterOptionsDialog";
+    Sequence < OUString > aRet { "com.sun.star.ui.dialogs.FilterOptionsDialog" };
     return aRet;
 }
 
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 5d3c9fa8..e34de76 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -712,8 +712,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
         {
             OUString aMsg( "Root element unknown" );
             Reference<xml::sax::XLocator> xDummyLocator;
-            Sequence < OUString > aParams(1);
-            aParams.getArray()[0] = rName;
+            Sequence < OUString > aParams { rName };
 
             SetError( XMLERROR_FLAG_SEVERE|XMLERROR_UNKNOWN_ROOT,
                       aParams, aMsg, xDummyLocator );
@@ -1808,9 +1807,7 @@ void SvXMLImport::SetError(
     sal_Int32 nId,
     const OUString& rMsg1)
 {
-    Sequence<OUString> aSeq(1);
-    OUString* pSeq = aSeq.getArray();
-    pSeq[0] = rMsg1;
+    Sequence<OUString> aSeq { rMsg1 };
     SetError( nId, aSeq );
 }
 
diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx
index 16bbd79..e9dfc24 100644
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -200,9 +200,7 @@ void XMLEventsImportContext::AddEventValues(
                 xEvents->replaceByName(rEventName, aAny);
             } catch ( const IllegalArgumentException & rException )
             {
-                Sequence<OUString> aMsgParams(1);
-
-                aMsgParams[0] = rEventName;
+                Sequence<OUString> aMsgParams { rEventName };
 
                 GetImport().SetError(XMLERROR_FLAG_ERROR |
                                      XMLERROR_ILLEGAL_EVENT,


More information about the Libreoffice-commits mailing list