summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-16 09:23:41 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-16 08:35:42 +0000
commit8569c6d0ad70c32a08774fa6f5ec25b465ea98ee (patch)
tree3287608f4bb3170cc609b64c70d8d5e806c83b46
parent57b4c4bcb0cb3c48190670b4c46ab9e92a489729 (diff)
use initialiser list for Sequence<OUString>
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02 Reviewed-on: https://gerrit.libreoffice.org/19978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--avmedia/source/macavf/framegrabber.mm3
-rw-r--r--avmedia/source/macavf/manager.mm3
-rw-r--r--avmedia/source/macavf/player.mm3
-rw-r--r--avmedia/source/macavf/window.mm4
-rw-r--r--basctl/source/basicide/unomodel.cxx4
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx8
-rw-r--r--cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx7
-rw-r--r--dbaccess/source/inc/apitools.hxx6
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx3
-rw-r--r--dtrans/source/generic/clipboardmanager.cxx4
-rw-r--r--dtrans/source/win32/clipb/wcbentry.cxx3
-rw-r--r--dtrans/source/win32/dnd/dndentry.cxx6
-rw-r--r--dtrans/source/win32/ftransl/ftranslentry.cxx3
-rw-r--r--extensions/source/logging/csvformatter.cxx3
-rw-r--r--extensions/source/scanner/scanner.cxx5
-rw-r--r--filter/source/svg/svgdialog.cxx5
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.cxx3
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx4
-rw-r--r--framework/inc/macros/xserviceinfo.hxx3
-rw-r--r--framework/source/fwe/classes/actiontriggercontainer.cxx4
-rw-r--r--framework/source/fwe/classes/rootactiontriggercontainer.cxx4
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_common.cxx3
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx3
-rw-r--r--i18npool/source/registerservices/registerservices.cxx5
-rw-r--r--include/connectivity/CommonTools.hxx3
-rw-r--r--include/ucbhelper/macros.hxx9
-rw-r--r--io/source/TextOutputStream/TextOutputStream.cxx3
-rw-r--r--io/test/stm/datatest.cxx9
-rw-r--r--lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx3
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.mm3
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx3
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx3
-rw-r--r--linguistic/source/dlistimp.cxx3
-rw-r--r--linguistic/source/lngopt.cxx3
-rw-r--r--linguistic/source/lngsvcmgr.cxx4
-rw-r--r--linguistic/workben/sspellimp.cxx4
-rw-r--r--package/source/manifest/ManifestReader.cxx3
-rw-r--r--package/source/manifest/ManifestWriter.cxx3
-rw-r--r--sax/test/sax/testsax.cxx5
-rw-r--r--sax/test/sax/testwriter.cxx5
-rw-r--r--sc/inc/miscuno.hxx4
-rw-r--r--sc/source/filter/oox/ooxformulaparser.cxx3
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx8
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx8
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx4
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx4
-rw-r--r--sfx2/source/doc/doctemplates.cxx11
-rw-r--r--shell/source/win32/SysShentry.cxx3
-rw-r--r--shell/source/win32/simplemail/smplmailentry.cxx3
-rw-r--r--sot/source/sdstor/ucbstorage.cxx3
-rw-r--r--stoc/source/implementationregistration/implreg.cxx4
-rw-r--r--svl/source/config/languageoptions.cxx4
-rw-r--r--svl/source/inc/passwordcontainer.hxx4
-rw-r--r--svtools/source/config/colorcfg.cxx6
-rw-r--r--svtools/source/config/extcolorcfg.cxx6
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx3
-rw-r--r--svtools/source/graphic/descriptor.cxx5
-rw-r--r--svtools/source/graphic/graphic.cxx5
-rw-r--r--svx/source/unogallery/unogalitem.cxx5
-rw-r--r--svx/source/unogallery/unogaltheme.cxx5
-rw-r--r--sw/source/core/doc/number.cxx4
-rw-r--r--sw/source/core/ole/ndole.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx4
-rw-r--r--sw/source/core/unocore/unodraw.cxx4
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/core/unocore/unoobj.cxx3
-rw-r--r--sw/source/core/unocore/unostyle.cxx8
-rw-r--r--sw/source/uibase/uno/unodoc.cxx5
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx8
-rw-r--r--ucb/source/core/FileAccess.cxx8
-rw-r--r--ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx4
-rw-r--r--unotools/source/ucbhelper/localfilehelper.cxx4
-rw-r--r--uui/source/passwordcontainer.cxx4
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx7
-rw-r--r--xmloff/source/script/XMLEventsImportContext.cxx4
76 files changed, 95 insertions, 247 deletions
diff --git a/avmedia/source/macavf/framegrabber.mm b/avmedia/source/macavf/framegrabber.mm
index dd6a5c530582..7fcf287fd58f 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 19dda1fa5b30..0bc5abda1119 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 81a5329cf01e..bbe9bf373e09 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 e6c4d7fc92af..a5465017c896 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 db1c9bc1c42d..fe1942b07018 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 4c60592ae90d..fe5c84e424fc 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 8e0e9bff0fdd..f6b96e26df57 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 78217418bf45..0d342c55dab7 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 8b63e0ca5df7..92e1778cdaf2 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 e538a7fc8525..ad8d9e333e39 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 5427dcde17c3..ff4c14912cd3 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 5e4c63ecf713..79aa8cc08324 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 3ddc84a25f68..a81b2d0f6ce5 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 87503f3f8283..708dfbc71726 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 e9820977f4c3..2cf61f5d5f53 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 c4417f56eea9..c10f892e312b 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 81d639bd6886..8cce08fc2d76 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 c122a0df8f21..719dda1a2824 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 a465957181c1..2a39fafccf80 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 48cda46538c4..8144dfec7d7a 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 87fd71595ad1..8c2d94ea4b3a 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 5caf73d4532e..0c32c0027f48 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 36a626dcad06..b0bd76ded5bf 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 ba6f03d898a5..7ba4e5300cd0 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 7a798c6e4696..55471fe83a1b 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 97e80454f871..4a4ead773d79 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 802e0a75bc58..f3533ef1c4a7 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 3d030805971a..9ac2440e5772 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 ddbb8436aa6d..9a6ea3e0d57d 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 e23b752afc25..9334d6b3854d 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 ccb3c3beb2c4..48d2b4a23e76 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 8aa4dcd960e4..f1841c2f5330 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 21667e496c98..a3c798f00dff 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 d70ebe8f9d73..4df40e87be97 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 22249cbd57b8..2e479ecf4a58 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 c1570f39ab21..32b8686f0587 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 7bd59161940d..485c45c58ffd 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 a56011ec9034..0e40d999356f 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 8dbfdfbaac82..6b382befdab0 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 c0af020601f2..f07097fd1bfd 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 acb837cffd66..b5936afeba76 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 c4c68522ffcb..2647b7d46005 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 abe53759067c..f26827417ce1 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 bcb87b94998f..b1b289d78006 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 6d5306dbad88..e1a1e6162b9d 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 5574ce080be7..7612ca1d6a0a 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 7cb645af4e6c..8cd3f576a453 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 a0551ad0ed3a..d6d2bf403d86 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 c192d3c2e024..651aba743d87 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 a68b0a5efe20..1668d6df343e 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 886ead94c8b4..008991d91046 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 3ec918d881b3..4d1990cce6d2 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 3b75cc265cfc..bfecda117f57 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 8ab8e1c2d3c2..76f22afa5e84 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 85855328076b..9db6d6dc0963 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 6ca87a9b625d..bf66e5e31e7e 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 eff107dd3a02..a762bde811a6 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 980f04bc11d1..ccfea396b7d7 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 2cc2c892668b..8abfe5c3339c 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 1fd2dfabcb04..085cdb118958 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 f529315bbaff..e4152e5b10ba 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 36289181918d..579caab46067 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 107a1f1622c1..4cd09735e93f 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 11ce3dcead4d..171592f3e3e8 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 eb0e40822504..fe197200e6d5 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 24447de5ba87..e71a2fc1fa25 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 7b284c339b51..c8a06ca629d2 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 80f3ca86e80a..aded8e90c06c 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 546d3c40e0e5..2331a972cad4 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 0593044db820..f386d14e69ca 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 c896e834f410..7cf07b8c7c33 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 377babbcf9f9..266f20f6e6ce 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 285f7b8a6877..342aa651f0d7 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 867ea03a1f94..2500c34d5217 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 5d3c9fa84d4a..e34de76ee37a 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 16bbd7943caf..e9dfc24c0a91 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,