diff options
130 files changed, 160 insertions, 380 deletions
diff --git a/avmedia/source/gstreamer/gstmanager.cxx b/avmedia/source/gstreamer/gstmanager.cxx index 1f0bc61d3a6f..d3617e5efb3c 100644 --- a/avmedia/source/gstreamer/gstmanager.cxx +++ b/avmedia/source/gstreamer/gstmanager.cxx @@ -92,8 +92,7 @@ sal_Bool SAL_CALL Manager::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL Manager::getSupportedServiceNames( ) throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aRet(1); - aRet[0] = AVMEDIA_GST_MANAGER_SERVICENAME ; + uno::Sequence<OUString> aRet { AVMEDIA_GST_MANAGER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx index ffac2987cb2e..6dd0f5c3538d 100644 --- a/avmedia/source/gstreamer/gstplayer.cxx +++ b/avmedia/source/gstreamer/gstplayer.cxx @@ -947,8 +947,7 @@ sal_Bool SAL_CALL Player::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL Player::getSupportedServiceNames() throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aRet(1); - aRet[0] = AVMEDIA_GST_PLAYER_SERVICENAME ; + uno::Sequence<OUString> aRet { AVMEDIA_GST_PLAYER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx index bee5f0a7ff0c..fc2a8ee54032 100644 --- a/avmedia/source/gstreamer/gstwindow.cxx +++ b/avmedia/source/gstreamer/gstwindow.cxx @@ -234,8 +234,7 @@ sal_Bool SAL_CALL Window::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL Window::getSupportedServiceNames( ) throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aRet(1); - aRet[0] = AVMEDIA_GST_WINDOW_SERVICENAME ; + uno::Sequence<OUString> aRet { AVMEDIA_GST_WINDOW_SERVICENAME }; return aRet; } diff --git a/avmedia/source/quicktime/framegrabber.mm b/avmedia/source/quicktime/framegrabber.mm index 401c17d0581d..9166d860c20c 100644 --- a/avmedia/source/quicktime/framegrabber.mm +++ b/avmedia/source/quicktime/framegrabber.mm @@ -128,8 +128,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] = AVMEDIA_QUICKTIME_FRAMEGRABBER_SERVICENAME; + uno::Sequence<OUString> aRet { AVMEDIA_QUICKTIME_FRAMEGRABBER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/quicktime/manager.mm b/avmedia/source/quicktime/manager.mm index 25ae118e9363..b7081844f783 100644 --- a/avmedia/source/quicktime/manager.mm +++ b/avmedia/source/quicktime/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] = AVMEDIA_QUICKTIME_MANAGER_SERVICENAME; + uno::Sequence<OUString> aRet { AVMEDIA_QUICKTIME_MANAGER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/quicktime/player.mm b/avmedia/source/quicktime/player.mm index 9b84d96f8c62..5ef7568da3a8 100644 --- a/avmedia/source/quicktime/player.mm +++ b/avmedia/source/quicktime/player.mm @@ -391,8 +391,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] = AVMEDIA_QUICKTIME_PLAYER_SERVICENAME; + uno::Sequence<OUString> aRet { AVMEDIA_QUICKTIME_PLAYER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/quicktime/window.mm b/avmedia/source/quicktime/window.mm index 683610d995ca..93b70c250a33 100644 --- a/avmedia/source/quicktime/window.mm +++ b/avmedia/source/quicktime/window.mm @@ -268,8 +268,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] = AVMEDIA_QUICKTIME_WINDOW_SERVICENAME; + uno::Sequence<OUString> aRet { AVMEDIA_QUICKTIME_WINDOW_SERVICENAME }; return aRet; } diff --git a/avmedia/source/win/framegrabber.cxx b/avmedia/source/win/framegrabber.cxx index 9ef404778213..4d6305c8ca12 100644 --- a/avmedia/source/win/framegrabber.cxx +++ b/avmedia/source/win/framegrabber.cxx @@ -213,8 +213,7 @@ sal_Bool SAL_CALL FrameGrabber::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL FrameGrabber::getSupportedServiceNames( ) throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - aRet[0] = AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME ; + uno::Sequence<OUString> aRet { AVMEDIA_WIN_FRAMEGRABBER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/win/manager.cxx b/avmedia/source/win/manager.cxx index bab1b5bf6580..d33c9c8949bd 100644 --- a/avmedia/source/win/manager.cxx +++ b/avmedia/source/win/manager.cxx @@ -70,8 +70,7 @@ sal_Bool SAL_CALL Manager::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL Manager::getSupportedServiceNames( ) throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - aRet[0] = AVMEDIA_WIN_MANAGER_SERVICENAME ; + uno::Sequence<OUString> aRet { AVMEDIA_WIN_MANAGER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx index b04eaf99ab3f..61b073d0dee2 100644 --- a/avmedia/source/win/player.cxx +++ b/avmedia/source/win/player.cxx @@ -476,8 +476,7 @@ sal_Bool SAL_CALL Player::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL Player::getSupportedServiceNames( ) throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - aRet[0] = AVMEDIA_WIN_PLAYER_SERVICENAME ; + uno::Sequence<OUString> aRet { AVMEDIA_WIN_PLAYER_SERVICENAME }; return aRet; } diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx index 1c1660c54a9d..341ea6a52ce9 100644 --- a/avmedia/source/win/window.cxx +++ b/avmedia/source/win/window.cxx @@ -597,8 +597,7 @@ sal_Bool SAL_CALL Window::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL Window::getSupportedServiceNames( ) throw (uno::RuntimeException) { - uno::Sequence< OUString > aRet(1); - aRet[0] = AVMEDIA_WIN_WINDOW_SERVICENAME ; + uno::Sequence<OUString> aRet { AVMEDIA_WIN_WINDOW_SERVICENAME }; return aRet; } diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index bb6175d3404b..8f362753782d 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -312,8 +312,7 @@ sal_Bool AccessibleDialogControlShape::supportsService( const OUString& rService Sequence< OUString > AccessibleDialogControlShape::getSupportedServiceNames() throw (RuntimeException, std::exception) { - Sequence< OUString > aNames(1); - aNames[0] = "com.sun.star.drawing.AccessibleShape" ; + Sequence<OUString> aNames { "com.sun.star.drawing.AccessibleShape" }; return aNames; } diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index 64b84755fe84..e0a34ed2a91a 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -603,8 +603,7 @@ sal_Bool AccessibleDialogWindow::supportsService( const OUString& rServiceName ) Sequence< OUString > AccessibleDialogWindow::getSupportedServiceNames() throw (RuntimeException, std::exception) { - Sequence< OUString > aNames(1); - aNames[0] = "com.sun.star.awt.AccessibleWindow" ; + Sequence<OUString> aNames { "com.sun.star.awt.AccessibleWindow" }; return aNames; } diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx index 4dae8020f58b..3639dee57d73 100644 --- a/basegfx/source/tools/unopolypolygon.cxx +++ b/basegfx/source/tools/unopolypolygon.cxx @@ -448,8 +448,7 @@ namespace unotools uno::Sequence< OUString > SAL_CALL UnoPolyPolygon::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - aRet[0] = SERVICE_NAME ; + uno::Sequence<OUString> aRet { SERVICE_NAME }; return aRet; } diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx index ee42cd0988ea..d6dec7ef7316 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx @@ -58,8 +58,7 @@ css::uno::Sequence<OUString> SAL_CALL ChartTypeUnoDlg::getSupportedServiceNames( uno::Sequence< OUString > ChartTypeUnoDlg::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = CHART_TYPE_DIALOG_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_TYPE_DIALOG_SERVICE_NAME }; return aSNS; } uno::Sequence< sal_Int8 > SAL_CALL ChartTypeUnoDlg::getImplementationId() throw( uno::RuntimeException, std::exception ) diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 2a6b79dd8bdd..de804c436bab 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -82,8 +82,7 @@ css::uno::Sequence< OUString > SAL_CALL CreationWizardUnoDlg::getSupportedServic uno::Sequence< OUString > CreationWizardUnoDlg::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = CHART_WIZARD_DIALOG_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_WIZARD_DIALOG_SERVICE_NAME }; return aSNS; } diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index 8e8c7d547196..adf74ee1288b 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -81,8 +81,7 @@ css::uno::Sequence< OUString > SAL_CALL ChartFrameLoader::getSupportedServiceNam uno::Sequence< OUString > ChartFrameLoader::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = CHART_FRAMELOADER_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_FRAMELOADER_SERVICE_NAME }; return aSNS; } diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index 2da31d272691..4d6e114ee617 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -268,8 +268,7 @@ css::uno::Sequence< OUString > SAL_CALL ElementSelectorToolbarController::getSup Sequence< OUString > ElementSelectorToolbarController::getSupportedServiceNames_Static() { - Sequence< OUString > aServices(1); - aServices[ 0 ] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aServices { "com.sun.star.frame.ToolbarController" }; return aServices; } ElementSelectorToolbarController::ElementSelectorToolbarController( const uno::Reference< uno::XComponentContext > & xContext ) diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index 5d44bf12288d..4e1409f6d7ae 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -83,8 +83,7 @@ uno::Reference< util::XCloneable > SAL_CALL CartesianCoordinateSystem::createClo // ____ XServiceInfo ____ Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME; + Sequence<OUString> aServices { CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME }; return aServices; } diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index fe6e8c9cc95c..96c9bf2f915f 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -83,8 +83,7 @@ uno::Reference< util::XCloneable > SAL_CALL PolarCoordinateSystem::createClone() // ____ XServiceInfo ____ Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = CHART2_COOSYSTEM_POLAR_SERVICE_NAME; + Sequence<OUString> aServices { CHART2_COOSYSTEM_POLAR_SERVICE_NAME }; return aServices; } diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx index 52880735a320..51fb7cd8ab61 100644 --- a/chart2/source/tools/ConfigColorScheme.cxx +++ b/chart2/source/tools/ConfigColorScheme.cxx @@ -168,8 +168,7 @@ void ConfigColorScheme::notify( const OUString & rPropertyName ) Sequence< OUString > ConfigColorScheme::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.ColorScheme"; + Sequence<OUString> aServices { "com.sun.star.chart2.ColorScheme" }; return aServices; } diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx index 39c5b6462314..c2a03f9c14b7 100644 --- a/chart2/source/tools/DataSource.cxx +++ b/chart2/source/tools/DataSource.cxx @@ -65,8 +65,7 @@ void SAL_CALL DataSource::setData( const Sequence< Reference< chart2::data::XLab Sequence< OUString > DataSource::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.data.DataSource"; + Sequence<OUString> aServices { "com.sun.star.chart2.data.DataSource" }; return aServices; } diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 44b386cc1922..7ff00f157f9f 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -1545,8 +1545,7 @@ Reference< util::XCloneable > SAL_CALL InternalDataProvider::createClone() Sequence< OUString > InternalDataProvider::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.data.DataProvider"; + Sequence<OUString> aServices { "com.sun.star.chart2.data.DataProvider" }; return aServices; } diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx index 85fab94f6292..7acb72b4c6ce 100644 --- a/chart2/source/tools/LabeledDataSequence.cxx +++ b/chart2/source/tools/LabeledDataSequence.cxx @@ -152,8 +152,7 @@ void SAL_CALL LabeledDataSequence::removeModifyListener( const Reference< util:: Sequence< OUString > LabeledDataSequence::getSupportedServiceNames_Static() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.chart2.data.LabeledDataSequence"; + Sequence<OUString> aServices { "com.sun.star.chart2.data.LabeledDataSequence" }; return aServices; } diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx index 8961dd7b51df..107b289c83d9 100644 --- a/chart2/source/tools/NameContainer.cxx +++ b/chart2/source/tools/NameContainer.cxx @@ -73,8 +73,7 @@ sal_Bool SAL_CALL NameContainer::supportsService( const OUString& ServiceName ) Sequence< OUString > SAL_CALL NameContainer::getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = m_aServicename; + Sequence<OUString> aSNS { m_aServicename }; return aSNS; } diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 19f2521c9758..9814f3cbc71d 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1404,8 +1404,7 @@ css::uno::Sequence< OUString > SAL_CALL ChartView::getSupportedServiceNames() uno::Sequence< OUString > ChartView::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = CHART_VIEW_SERVICE_NAME; + uno::Sequence<OUString> aSNS { CHART_VIEW_SERVICE_NAME }; return aSNS; } diff --git a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx index 0d6c36bbff91..8e0e9bff0fdd 100644 --- a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx @@ -168,8 +168,7 @@ css::uno::Any Empty2::queryInterface(css::uno::Type const & type) } css::uno::Sequence< rtl::OUString > sequenceThird() { - css::uno::Sequence< rtl::OUString > s(1); - s[0] = rtl::OUString("Third"); + css::uno::Sequence<OUString> s { rtl::OUString("Third") }; return s; } diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index aa93761db2b1..12a88dc2006a 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -1978,8 +1978,7 @@ css::uno::Sequence< rtl::OUString > cppuhelper::TypeManager::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< rtl::OUString > names(1); - names[0] = "com.sun.star.reflection.TypeDescriptionManager"; //TODO + css::uno::Sequence<OUString> names { "com.sun.star.reflection.TypeDescriptionManager" }; //TODO return names; } diff --git a/cppuhelper/test/testcmp/TestComponent.cxx b/cppuhelper/test/testcmp/TestComponent.cxx index f3922b70c1ed..cca70c831a1b 100644 --- a/cppuhelper/test/testcmp/TestComponent.cxx +++ b/cppuhelper/test/testcmp/TestComponent.cxx @@ -102,8 +102,7 @@ uno::Reference<uno::XInterface> SAL_CALL TestComponent::create( uno::Sequence<rtl::OUString> SAL_CALL TestComponent::getSupportedServiceNames_Static() { - uno::Sequence<rtl::OUString> serviceNames(1); - serviceNames[0] = rtl::OUString("com.sun.star.lang.ServiceInfo"); + uno::Sequence<OUString> serviceNames { rtl::OUString("com.sun.star.lang.ServiceInfo") }; return serviceNames; } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 71adb03bf59b..c7d4a0194006 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -3435,8 +3435,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo bNeedsApply = true; } - uno::Sequence< OUString > aURLSeq( 1 ); - aURLSeq[ 0 ] = pEntry->GetCommand(); + uno::Sequence<OUString> aURLSeq { pEntry->GetCommand() }; try { @@ -3534,8 +3533,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo uno::Sequence< uno::Reference< graphic::XGraphic > > aGraphicSeq( 1 ); - uno::Sequence< OUString > aURLSeq( 1 ); - aURLSeq[ 0 ] = pEntry->GetCommand(); + uno::Sequence<OUString> aURLSeq { pEntry->GetCommand() }; if ( !pEntry->GetBackupGraphic().is() ) { @@ -3604,8 +3602,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo aGraphicSeq( 1 ); aGraphicSeq[ 0 ] = backup; - uno::Sequence< OUString > aURLSeq( 1 ); - aURLSeq[ 0 ] = pEntry->GetCommand(); + uno::Sequence<OUString> aURLSeq { pEntry->GetCommand() }; try { @@ -5494,8 +5491,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) pTbSymbol->SetItemData( nId, static_cast< void * > ( xGraphic.get() ) ); - uno::Sequence< OUString > aImportURL( 1 ); - aImportURL[ 0 ] = aURL; + uno::Sequence<OUString> aImportURL { aURL }; uno::Sequence< uno::Reference<graphic::XGraphic > > aImportGraph( 1 ); aImportGraph[ 0 ] = xGraphic; m_xImportedImageManager->insertImages( GetImageType(), aImportURL, aImportGraph ); diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 514755981350..c2c496d62524 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -1165,8 +1165,7 @@ void ODocumentDefinition::onCommandInsert( const OUString& _sURL, const Referenc { OSL_FAIL( "Content::onCommandInsert - property value missing!" ); - Sequence< OUString > aProps( 1 ); - aProps[ 0 ] = PROPERTY_URL; + Sequence<OUString> aProps { PROPERTY_URL }; ucbhelper::cancelCommandExecution( makeAny( MissingPropertiesException( OUString(), diff --git a/desktop/source/deployment/inc/dp_ucb.h b/desktop/source/deployment/inc/dp_ucb.h index ee68c63ce935..324e39896e59 100644 --- a/desktop/source/deployment/inc/dp_ucb.h +++ b/desktop/source/deployment/inc/dp_ucb.h @@ -39,8 +39,7 @@ struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle { static css::uno::Sequence< OUString > getTitleSequence() { - css::uno::Sequence< OUString > aSeq( 1 ); - aSeq[ 0 ] = "Title"; + css::uno::Sequence<OUString> aSeq { "Title" }; return aSeq; } static OUString getTitle( ::ucbhelper::Content &rContent ) diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx index f86cb8b08439..daabc23c09ed 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.cxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx @@ -226,8 +226,7 @@ OUString SAL_CALL LdapUserProfileBe::getImplementationName() uno::Sequence<OUString> SAL_CALL LdapUserProfileBe::getLdapUserProfileBeServiceNames() { - uno::Sequence<OUString> aServices(1) ; - aServices[0] = "com.sun.star.configuration.backend.LdapUserProfileBe"; + uno::Sequence<OUString> aServices { "com.sun.star.configuration.backend.LdapUserProfileBe" }; return aServices ; } diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 8d8e5143889b..d4870a456f99 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -398,8 +398,7 @@ namespace pcr if ( !m_pHelper.get() ) return Sequence< OUString >(); - Sequence< OUString > aReturn( 1 ); - aReturn[ 0 ] = PROPERTY_INPUT_REQUIRED; + Sequence<OUString> aReturn { PROPERTY_INPUT_REQUIRED }; return aReturn; } diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index 3c37ad044a03..f523cc7ad7f6 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -215,8 +215,7 @@ namespace pcr if ( !m_pHelper.get() ) return Sequence< OUString >(); - Sequence< OUString > aReturn( 1 ); - aReturn[ 0 ] = PROPERTY_XFORMS_BUTTONTYPE; + Sequence<OUString> aReturn { PROPERTY_XFORMS_BUTTONTYPE }; return aReturn; } diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx index ec79ca4134ea..5d8f26914288 100644 --- a/filter/source/flash/swfdialog.cxx +++ b/filter/source/flash/swfdialog.cxx @@ -55,9 +55,7 @@ OUString SWFDialog_getImplementationName () Sequence< OUString > SAL_CALL SWFDialog_getSupportedServiceNames() throw (RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SERVICE_NAME; + Sequence<OUString> aRet { SERVICE_NAME }; return aRet; } diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx index 2975e08c4812..37b9a30c1a34 100644 --- a/filter/source/flash/swffilter.cxx +++ b/filter/source/flash/swffilter.cxx @@ -506,9 +506,7 @@ OUString FlashExportFilter_getImplementationName () Sequence< OUString > SAL_CALL FlashExportFilter_getSupportedServiceNames( ) throw (RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ExportFilter"; + Sequence<OUString> aRet { "com.sun.star.document.ExportFilter" }; return aRet; } diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index be74c017f0cf..f0e6fd2c3f5b 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -52,8 +52,7 @@ void CustomToolBarImportHelper::applyIcons() { for ( std::vector< iconcontrolitem >::iterator it = iconcommands.begin(); it != iconcommands.end(); ++it ) { - uno::Sequence< OUString > commands(1); - commands[ 0 ] = it->sCommand; + uno::Sequence<OUString> commands { it->sCommand }; uno::Sequence< uno::Reference< graphic::XGraphic > > images(1); images[ 0 ] = it->image; @@ -314,8 +313,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect OUString sBuiltInCmd = helper.MSOTCIDToOOCommand( *pSpecificInfo->getBtnFace() ); if ( !sBuiltInCmd.isEmpty() ) { - uno::Sequence< OUString> sCmds(1); - sCmds[ 0 ] = sBuiltInCmd; + uno::Sequence<OUString> sCmds { sBuiltInCmd }; uno::Reference< ui::XImageManager > xImageManager( helper.getAppCfgManager()->getImageManager(), uno::UNO_QUERY_THROW ); // 0 = default image size uno::Sequence< uno::Reference< graphic::XGraphic > > sImages = xImageManager->getImages( 0, sCmds ); diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index b55eadd69029..278112b4ef9e 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -509,8 +509,7 @@ bool executeMacro( SfxObjectShell* pShell, const OUString& sMacroName, uno::Sequ uno::Sequence< OUString > VBAMacroResolver_getSupportedServiceNames() { - uno::Sequence< OUString > aServiceNames( 1 ); - aServiceNames[ 0 ] = "com.sun.star.script.vba.VBAMacroResolver"; + uno::Sequence<OUString> aServiceNames { "com.sun.star.script.vba.VBAMacroResolver" }; return aServiceNames; } diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx index febe61f7c656..4c517cd3ead9 100644 --- a/filter/source/pdf/pdfdialog.cxx +++ b/filter/source/pdf/pdfdialog.cxx @@ -47,9 +47,7 @@ OUString PDFDialog_getImplementationName () Sequence< OUString > SAL_CALL PDFDialog_getSupportedServiceNames() throw (RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SERVICE_NAME; + Sequence<OUString> aRet { SERVICE_NAME }; return aRet; } diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx index 86af0bba5e05..6d24356ff934 100644 --- a/filter/source/pdf/pdffilter.cxx +++ b/filter/source/pdf/pdffilter.cxx @@ -199,9 +199,7 @@ OUString PDFFilter_getImplementationName () Sequence< OUString > SAL_CALL PDFFilter_getSupportedServiceNames( ) throw (RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.PDFFilter"; + Sequence<OUString> aRet { "com.sun.star.document.PDFFilter" }; return aRet; } diff --git a/filter/source/pdf/pdfinteract.cxx b/filter/source/pdf/pdfinteract.cxx index bb01fc6db46e..bae82a81d3ab 100644 --- a/filter/source/pdf/pdfinteract.cxx +++ b/filter/source/pdf/pdfinteract.cxx @@ -68,9 +68,7 @@ OUString PDFInteractionHandler_getImplementationName () Sequence< OUString > SAL_CALL PDFInteractionHandler_getSupportedServiceNames( ) throw (RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.filter.pdfexport.PDFExportInteractionHandler"; + Sequence<OUString> aRet { "com.sun.star.filter.pdfexport.PDFExportInteractionHandler" }; return aRet; } diff --git a/filter/source/placeware/filter.cxx b/filter/source/placeware/filter.cxx index 78caa2f6be14..2c257f1b53e3 100644 --- a/filter/source/placeware/filter.cxx +++ b/filter/source/placeware/filter.cxx @@ -151,9 +151,7 @@ OUString PlaceWareExportFilter_getImplementationName () Sequence< OUString > SAL_CALL PlaceWareExportFilter_getSupportedServiceNames( ) throw (RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.ExportFilter"; + Sequence<OUString> aRet { "com.sun.star.document.ExportFilter" }; return aRet; } diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index 715dc912309d..86ff3a5ad769 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -1188,9 +1188,7 @@ OUString T602ImportFilterDialog_getImplementationName () Sequence< OUString > SAL_CALL T602ImportFilterDialog_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/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 5bcf79e1f1ae..d3cbc30da9a7 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1535,8 +1535,7 @@ css::uno::Sequence<OUString> SAL_CALL OBoundControlModel::getSupportedServiceNam Sequence< OUString > SAL_CALL OBoundControlModel::getSupportedServiceNames_Static() throw( RuntimeException ) { - Sequence< OUString > aOwnServiceNames( 1 ); - aOwnServiceNames[ 0 ] = "com.sun.star.form.DataAwareControlModel"; + Sequence<OUString> aOwnServiceNames { "com.sun.star.form.DataAwareControlModel" }; return ::comphelper::concatSequences( OControlModel::getSupportedServiceNames_Static(), aOwnServiceNames diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 19b4030d0cbc..938e2a800d96 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -1135,9 +1135,7 @@ Sequence< OUString > SAL_CALL SvtFilePicker::getSupportedServiceNames() throw( R /* Helper for XServiceInfo */ Sequence< OUString > SvtFilePicker::impl_getStaticSupportedServiceNames() { - Sequence< OUString > seqServiceNames( 1 ); - OUString* pArray = seqServiceNames.getArray(); - pArray[0] = "com.sun.star.ui.dialogs.OfficeFilePicker"; + Sequence<OUString> seqServiceNames { "com.sun.star.ui.dialogs.OfficeFilePicker" }; return seqServiceNames ; } @@ -1204,9 +1202,7 @@ Sequence< OUString > SAL_CALL SvtRemoteFilePicker::getSupportedServiceNames() th /* Helper for XServiceInfo */ Sequence< OUString > SvtRemoteFilePicker::impl_getStaticSupportedServiceNames() { - Sequence< OUString > seqServiceNames( 1 ); - OUString* pArray = seqServiceNames.getArray(); - pArray[0] = "com.sun.star.ui.dialogs.RemoteFilePicker"; + Sequence<OUString> seqServiceNames { "com.sun.star.ui.dialogs.RemoteFilePicker" }; return seqServiceNames ; } diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 7b36967650b8..cdf07a17279a 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -284,9 +284,7 @@ sal_Bool WizardsToolbarController::supportsService(OUString const & rServiceName css::uno::Sequence<OUString> WizardsToolbarController::getSupportedServiceNames() throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aRet { "com.sun.star.frame.ToolbarController" }; return aRet; } @@ -329,9 +327,7 @@ sal_Bool OpenToolbarController::supportsService(OUString const & rServiceName) css::uno::Sequence<OUString> OpenToolbarController::getSupportedServiceNames() throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aRet { "com.sun.star.frame.ToolbarController" }; return aRet; } @@ -381,9 +377,7 @@ sal_Bool NewToolbarController::supportsService(OUString const & rServiceName) css::uno::Sequence<OUString> NewToolbarController::getSupportedServiceNames() throw (css::uno::RuntimeException) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aRet { "com.sun.star.frame.ToolbarController" }; return aRet; } diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index d8ac9302e4cb..56b15f435f66 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -875,8 +875,7 @@ OUString ODataOutputStream_getImplementationName() Sequence<OUString> ODataOutputStream_getSupportedServiceNames() { - Sequence<OUString> aRet(1); - aRet.getArray()[0] = "com.sun.star.io.DataOutputStream"; + Sequence<OUString> aRet { "com.sun.star.io.DataOutputStream" }; return aRet; } diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 2be418d18e06..aa60ac322227 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -672,8 +672,7 @@ uno::Sequence< OUString > SAL_CALL ConvDic::getSupportedServiceNames( ) uno::Sequence< OUString > ConvDic::getSupportedServiceNames_Static() throw() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = SN_CONV_DICTIONARY ; + uno::Sequence<OUString> aSNS { SN_CONV_DICTIONARY }; return aSNS; } diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index 5c3fd7c2cb59..44cee42733dc 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -219,8 +219,7 @@ rtl::OUString OConnection::getImplementationName() throw (css::uno::RuntimeExcep css::uno::Sequence<rtl::OUString> OConnection::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence<rtl::OUString> s(1); - s[0] = "com.sun.star.sdbc.Connection"; + css::uno::Sequence<OUString> s { "com.sun.star.sdbc.Connection" }; return s; } diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx index 3a31685d9c2e..ce2c363fb74a 100644 --- a/mysqlc/source/mysqlc_driver.cxx +++ b/mysqlc/source/mysqlc_driver.cxx @@ -85,8 +85,7 @@ Sequence< rtl::OUString > MysqlCDriver::getSupportedServiceNames_Static() OSL_TRACE("MysqlCDriver::getSupportedServiceNames_Static"); // which service is supported // for more information @see com.sun.star.sdbc.Driver - Sequence< rtl::OUString > aSNS(1); - aSNS[0] = "com.sun.star.sdbc.Driver"; + Sequence<OUString> aSNS { "com.sun.star.sdbc.Driver" }; return aSNS; } diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx index 96d756f3ef4d..cfc304233e8b 100644 --- a/mysqlc/source/mysqlc_preparedstatement.cxx +++ b/mysqlc/source/mysqlc_preparedstatement.cxx @@ -66,8 +66,7 @@ rtl::OUString OPreparedStatement::getImplementationName() css::uno::Sequence<rtl::OUString> OPreparedStatement::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence<rtl::OUString> s(1); - s[0] = "com.sun.star.sdbc.PreparedStatement"; + css::uno::Sequence<OUString> s { "com.sun.star.sdbc.PreparedStatement" }; return s; } diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx index 859f7a929a82..d9e58b0784e9 100644 --- a/mysqlc/source/mysqlc_statement.cxx +++ b/mysqlc/source/mysqlc_statement.cxx @@ -392,8 +392,7 @@ rtl::OUString OStatement::getImplementationName() throw (css::uno::RuntimeExcept css::uno::Sequence<rtl::OUString> OStatement::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence<rtl::OUString> s(1); - s[0] = "com.sun.star.sdbc.Statement"; + css::uno::Sequence<OUString> s { "com.sun.star.sdbc.Statement" }; return s; } diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx index a1950a492791..671fbd26794d 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx @@ -88,8 +88,7 @@ Sequence< ::rtl::OUString > SkeletonDriver::getSupportedServiceNames_Static( ) { /// which service is supported /// for more information @see com.sun.star.sdbc.Driver - Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); + Sequence<OUString> aSNS { ::rtl::OUString("com.sun.star.sdbc.Driver") }; return aSNS; } diff --git a/odk/examples/cpp/complextoolbarcontrols/exports.cxx b/odk/examples/cpp/complextoolbarcontrols/exports.cxx index 35a4f3910128..f66191eca316 100644 --- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx +++ b/odk/examples/cpp/complextoolbarcontrols/exports.cxx @@ -39,14 +39,12 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplNa if (sImplName == MYLISTENER_IMPLEMENTATIONNAME) { - css::uno::Sequence< ::rtl::OUString > lNames(1); - lNames[0] = MYLISTENER_IMPLEMENTATIONNAME; + css::uno::Sequence<OUString> lNames { MYLISTENER_IMPLEMENTATIONNAME }; xFactory = ::cppu::createSingleFactory(xSMGR, sImplName, MyListener::st_createInstance, lNames); } else if (sImplName == MYPROTOCOLHANDLER_IMPLEMENTATIONNAME) { - css::uno::Sequence< ::rtl::OUString > lNames(1); - lNames[0] = MYPROTOCOLHANDLER_SERVICENAME; + css::uno::Sequence<OUString> lNames { MYPROTOCOLHANDLER_SERVICENAME }; xFactory = ::cppu::createSingleComponentFactory(MyProtocolHandler_createInstance, sImplName, lNames); } diff --git a/oox/source/core/fasttokenhandler.cxx b/oox/source/core/fasttokenhandler.cxx index 3fe24ef52f2d..38854405d43f 100644 --- a/oox/source/core/fasttokenhandler.cxx +++ b/oox/source/core/fasttokenhandler.cxx @@ -38,8 +38,7 @@ OUString SAL_CALL FastTokenHandler_getImplementationName() Sequence< OUString > SAL_CALL FastTokenHandler_getSupportedServiceNames() { - Sequence< OUString > aServiceNames( 1 ); - aServiceNames[ 0 ] = "com.sun.star.xml.sax.FastTokenHandler"; + Sequence<OUString> aServiceNames { "com.sun.star.xml.sax.FastTokenHandler" }; return aServiceNames; } diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 13f195d8ad82..ede7849c599f 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -228,8 +228,7 @@ void FilterDetectDocHandler::parseContentTypesOverride( const AttributeList& rAt /* Helper for XServiceInfo */ Sequence< OUString > FilterDetect_getSupportedServiceNames() { - Sequence< OUString > aServiceNames( 1 ); - aServiceNames[ 0 ] = "com.sun.star.frame.ExtendedTypeDetection"; + Sequence<OUString> aServiceNames { "com.sun.star.frame.ExtendedTypeDetection" }; return aServiceNames; } diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index 646c09c68437..5f2199f3cac5 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -51,8 +51,7 @@ OUString SAL_CALL DocumentPropertiesImport_getImplementationName() Sequence< OUString > SAL_CALL DocumentPropertiesImport_getSupportedServiceNames() { - Sequence< OUString > aServices( 1 ); - aServices[ 0 ] = "com.sun.star.document.OOXMLDocumentPropertiesImporter"; + Sequence<OUString> aServices { "com.sun.star.document.OOXMLDocumentPropertiesImporter" }; return aServices; } diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index c0e61a78db8d..c1d847d4008d 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -195,9 +195,7 @@ OUString ScSpreadsheetSettings::getImplementationName_Static() uno::Sequence<OUString> ScSpreadsheetSettings::getSupportedServiceNames_Static() { - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SCSPREADSHEETSETTINGS_SERVICE; + uno::Sequence<OUString> aRet { SCSPREADSHEETSETTINGS_SERVICE }; return aRet; } diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx index a1149acb3bca..848ec7b69adf 100644 --- a/sc/source/ui/unoobj/miscuno.cxx +++ b/sc/source/ui/unoobj/miscuno.cxx @@ -233,9 +233,7 @@ css::uno::Sequence< OUString > SAL_CALL ScIndexEnumeration::getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = sServiceName; + css::uno::Sequence<OUString> aRet { sServiceName }; return aRet; } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 019f576376be..7b68557c944c 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -1444,8 +1444,7 @@ public: virtual uno::Sequence< OUString > SAL_CALL getElementNames() throw(uno::RuntimeException, std::exception) override { - uno::Sequence< OUString > aSeq( 1 ); - aSeq[ 0 ] = SC_EVENTACC_ONCLICK; + uno::Sequence<OUString> aSeq { SC_EVENTACC_ONCLICK }; return aSeq; } diff --git a/sccomp/source/solver/SolverComponent.cxx b/sccomp/source/solver/SolverComponent.cxx index b7df95b6ec19..4f4778cdfab0 100644 --- a/sccomp/source/solver/SolverComponent.cxx +++ b/sccomp/source/solver/SolverComponent.cxx @@ -257,8 +257,7 @@ sal_Bool SAL_CALL SolverComponent::supportsService( const OUString& rServiceName uno::Sequence<OUString> SAL_CALL SolverComponent::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aServiceNames( 1 ); - aServiceNames[ 0 ] = "com.sun.star.sheet.Solver"; + uno::Sequence<OUString> aServiceNames { "com.sun.star.sheet.Solver" }; return aServiceNames; } diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index e979c420add3..e63236f5ef17 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -371,8 +371,7 @@ MasterScriptProvider::providerCache() if ( !m_pPCache ) { OUString serviceName1 = "com.sun.star.script.provider.ScriptProviderForBasic"; - Sequence< OUString > blacklist(1); - blacklist[ 0 ] = serviceName1; + Sequence<OUString> blacklist { serviceName1 }; if ( !m_bIsPkgMSP ) { diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 61b36c212e46..4eff4b14fb55 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -147,8 +147,7 @@ sal_Bool SAL_CALL SdFilterDetect::supportsService( const OUString& sServiceName // XServiceInfo Sequence< OUString > SAL_CALL SdFilterDetect::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > seqServiceNames( 1 ); - seqServiceNames.getArray() [0] = "com.sun.star.frame.ExtendedTypeDetection" ; + Sequence<OUString> seqServiceNames { "com.sun.star.frame.ExtendedTypeDetection" }; return seqServiceNames ; } diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx index ed8162a3de27..64efae208267 100644 --- a/sdext/source/minimizer/pppoptimizerdialog.cxx +++ b/sdext/source/minimizer/pppoptimizerdialog.cxx @@ -162,9 +162,7 @@ OUString PPPOptimizerDialog_getImplementationName() Sequence< OUString > PPPOptimizerDialog_getSupportedServiceNames() { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SERVICE_NAME; + Sequence<OUString> aRet { SERVICE_NAME }; return aRet; } diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 08bed4ee2c19..98776d2c7d37 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -386,8 +386,7 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException, std::exception) override { - css::uno::Sequence< OUString > aServiceNames(1); - aServiceNames[ 0 ] = "com.sun.star.writer.DocumentProperties"; + css::uno::Sequence<OUString> aServiceNames { "com.sun.star.writer.DocumentProperties" }; return aServiceNames; } }; diff --git a/shell/source/backends/macbe/macbackend.mm b/shell/source/backends/macbe/macbackend.mm index 6832d6638213..4cfd0606fb29 100644 --- a/shell/source/backends/macbe/macbackend.mm +++ b/shell/source/backends/macbe/macbackend.mm @@ -451,8 +451,7 @@ rtl::OUString SAL_CALL MacOSXBackend::getImplementationName(void) uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getBackendServiceNames(void) { - uno::Sequence<rtl::OUString> aServiceNameList(1); - aServiceNameList[0] = "com.sun.star.configuration.backend.MacOSXBackend"; + uno::Sequence<OUString> aServiceNameList { "com.sun.star.configuration.backend.MacOSXBackend" }; return aServiceNameList; } diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index 60bbbfd56bcb..52070c2c3309 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -379,9 +379,7 @@ sal_Bool SAL_CALL SvNumberFormatterServiceObj::supportsService( const OUString& uno::Sequence<OUString> SAL_CALL SvNumberFormatterServiceObj::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.util.NumberFormatter"; + uno::Sequence<OUString> aRet { "com.sun.star.util.NumberFormatter" }; return aRet; } @@ -670,9 +668,7 @@ sal_Bool SAL_CALL SvNumberFormatsObj::supportsService( const OUString& ServiceNa uno::Sequence<OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.util.NumberFormats"; + uno::Sequence<OUString> aRet { "com.sun.star.util.NumberFormats" }; return aRet; } @@ -927,9 +923,7 @@ sal_Bool SAL_CALL SvNumberFormatObj::supportsService( const OUString& ServiceNam uno::Sequence<OUString> SAL_CALL SvNumberFormatObj::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.util.NumberFormatProperties"; + uno::Sequence<OUString> aRet { "com.sun.star.util.NumberFormatProperties" }; return aRet; } @@ -1083,9 +1077,7 @@ sal_Bool SAL_CALL SvNumberFormatSettingsObj::supportsService( const OUString& Se uno::Sequence<OUString> SAL_CALL SvNumberFormatSettingsObj::getSupportedServiceNames() throw(uno::RuntimeException, std::exception) { - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.util.NumberFormatSettings"; + uno::Sequence<OUString> aRet { "com.sun.star.util.NumberFormatSettings" }; return aRet; } diff --git a/svl/source/passwordcontainer/syscreds.cxx b/svl/source/passwordcontainer/syscreds.cxx index adb9eb28f8bf..bd1722a32e82 100644 --- a/svl/source/passwordcontainer/syscreds.cxx +++ b/svl/source/passwordcontainer/syscreds.cxx @@ -30,8 +30,7 @@ SysCredentialsConfigItem::SysCredentialsConfigItem( m_bInited( false ), m_pOwner( pOwner ) { - uno::Sequence< OUString > aNode( 1 ); - aNode[ 0 ] = "Office.Common/Passwords/AuthenticateUsingSystemCredentials"; + uno::Sequence<OUString> aNode { "Office.Common/Passwords/AuthenticateUsingSystemCredentials" }; EnableNotification( aNode ); } @@ -60,8 +59,7 @@ SysCredentialsConfigItem::getSystemCredentialsURLs() if ( !m_bInited ) { // read config item - uno::Sequence< OUString > aPropNames( 1 ); - aPropNames[ 0 ] = "AuthenticateUsingSystemCredentials"; + uno::Sequence<OUString> aPropNames { "AuthenticateUsingSystemCredentials" }; uno::Sequence< uno::Any > aAnyValues( utl::ConfigItem::GetProperties( aPropNames ) ); diff --git a/svtools/source/control/vclxaccessibleheaderbar.cxx b/svtools/source/control/vclxaccessibleheaderbar.cxx index 7430cbd5153c..9bd9272e2e89 100644 --- a/svtools/source/control/vclxaccessibleheaderbar.cxx +++ b/svtools/source/control/vclxaccessibleheaderbar.cxx @@ -91,8 +91,7 @@ void VCLXAccessibleHeaderBar::FillAccessibleStateSet( utl::AccessibleStateSetHel Sequence< ::rtl::OUString > VCLXAccessibleHeaderBar::getSupportedServiceNames() throw (RuntimeException, std::exception) { - Sequence< ::rtl::OUString > aNames(1); - aNames[0] = "com.sun.star.awt.AccessibleHeaderBar"; + Sequence<OUString> aNames { "com.sun.star.awt.AccessibleHeaderBar" }; return aNames; } diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index e1083e21b075..c7e23232db51 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -162,9 +162,7 @@ sal_Bool SAL_CALL SvFilterOptionsDialog::supportsService( const OUString& rServi uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog::getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.ui.dialogs.FilterOptionsDialog"; + uno::Sequence<OUString> aRet { "com.sun.star.ui.dialogs.FilterOptionsDialog" }; return aRet; } diff --git a/svtools/source/graphic/graphicunofactory.cxx b/svtools/source/graphic/graphicunofactory.cxx index 3d50e86172d1..eb8b75305a4d 100644 --- a/svtools/source/graphic/graphicunofactory.cxx +++ b/svtools/source/graphic/graphicunofactory.cxx @@ -61,9 +61,7 @@ public: virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.graphic.GraphicObject"; + uno::Sequence<OUString> aRet { "com.sun.star.graphic.GraphicObject" }; return aRet; } }; diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index d13cae8b7474..cce56d148ecb 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -76,8 +76,7 @@ sal_Bool SAL_CALL GraphicProvider::supportsService( const OUString& ServiceName uno::Sequence< OUString > SAL_CALL GraphicProvider::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicProvider"; + uno::Sequence<OUString> aSeq { "com.sun.star.graphic.GraphicProvider" }; return aSeq; } diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 593f8e12b504..d717522fb223 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -123,8 +123,7 @@ sal_Bool SAL_CALL GraphicRendererVCL::supportsService( const OUString& ServiceNa uno::Sequence< OUString > SAL_CALL GraphicRendererVCL::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicRendererVCL"; + uno::Sequence<OUString> aSeq { "com.sun.star.graphic.GraphicRendererVCL" }; return aSeq; } diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 5cb4076026ca..692e08ec1ce9 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -158,9 +158,7 @@ sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rS Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames() throw ( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.drawing.CustomShapeEngine"; + Sequence<OUString> aRet { "com.sun.star.drawing.CustomShapeEngine" }; return aRet; } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index e905f757bf57..b9883714d1d5 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -669,8 +669,7 @@ Sequence< OUString> SAL_CALL FormController::getSupportedServiceNames() throw( R { // service names which are supported only, but cannot be used to created an // instance at a service factory - Sequence< OUString > aNonCreatableServiceNames( 1 ); - aNonCreatableServiceNames[ 0 ] = "com.sun.star.form.FormControllerDispatcher"; + Sequence<OUString> aNonCreatableServiceNames { "com.sun.star.form.FormControllerDispatcher" }; // services which can be used to created an instance at a service factory Sequence< OUString > aCreatableServiceNames( getSupportedServiceNames_Static() ); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index eb847b8e2bde..fb8132586cd5 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -239,8 +239,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO uno::Reference< ucb::XCommandEnvironment > xEnv; ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); - uno::Sequence< OUString > aProps( 1 ); - aProps.getArray()[ 0 ] = "Url"; + uno::Sequence<OUString> aProps { "Url" }; uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) ); diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index a2ca383c8993..a54d30e1e041 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1141,8 +1141,7 @@ bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_u if( bFolder ) { - uno::Sequence< OUString > aProps( 1 ); - aProps[ 0 ] = "Url"; + uno::Sequence<OUString> aProps { "Url" }; uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) ); uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY ); if( xContentAccess.is() ) diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx index bd26f4373d54..050a38572122 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx @@ -85,8 +85,7 @@ uno::Sequence< OUString > SAL_CALL ChineseTranslation_UnoDialog::getSupportedSer uno::Sequence< OUString > ChineseTranslation_UnoDialog::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS[ 0 ] = "com.sun.star.linguistic2.ChineseTranslationDialog"; + uno::Sequence<OUString> aSNS { "com.sun.star.linguistic2.ChineseTranslationDialog" }; return aSNS; } diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index 7dca671dd02d..ed6ad415cd71 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -60,8 +60,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& Service uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryThemeProvider"; + uno::Sequence<OUString> aSeq { "com.sun.star.gallery.GalleryThemeProvider" }; return aSeq; } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index acc29c675099..107a1f1622c1 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1306,9 +1306,7 @@ sal_Bool SwXTextFrames::supportsService(const OUString& rServiceName) throw( Run Sequence< OUString > SwXTextFrames::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextFrames"; + Sequence<OUString> aRet { "com.sun.star.text.TextFrames" }; return aRet; } @@ -1333,9 +1331,7 @@ sal_Bool SwXTextGraphicObjects::supportsService(const OUString& rServiceName) th Sequence< OUString > SwXTextGraphicObjects::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextGraphicObjects"; + Sequence<OUString> aRet { "com.sun.star.text.TextGraphicObjects" }; return aRet; } @@ -1360,9 +1356,7 @@ sal_Bool SwXTextEmbeddedObjects::supportsService(const OUString& rServiceName) t Sequence< OUString > SwXTextEmbeddedObjects::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextEmbeddedObjects"; + Sequence<OUString> aRet { "com.sun.star.text.TextEmbeddedObjects" }; return aRet; } @@ -1387,9 +1381,7 @@ sal_Bool SwXTextSections::supportsService(const OUString& rServiceName) throw( R Sequence< OUString > SwXTextSections::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextSections"; + Sequence<OUString> aRet { "com.sun.star.text.TextSections" }; return aRet; } @@ -1782,9 +1774,7 @@ sal_Bool SwXFootnotes::supportsService(const OUString& rServiceName) throw( Runt Sequence< OUString > SwXFootnotes::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.Footnotes"; + Sequence<OUString> aRet { "com.sun.star.text.Footnotes" }; return aRet; } @@ -1882,9 +1872,7 @@ sal_Bool SwXReferenceMarks::supportsService(const OUString& rServiceName) throw( Sequence< OUString > SwXReferenceMarks::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.ReferenceMarks"; + Sequence<OUString> aRet { "com.sun.star.text.ReferenceMarks" }; return aRet; } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index c2e8b5fe6726..11ce3dcead4d 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -458,9 +458,7 @@ sal_Bool SwXDrawPage::supportsService(const OUString& rServiceName) throw( uno:: uno::Sequence< OUString > SwXDrawPage::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.drawing.GenericDrawPage"; + uno::Sequence<OUString> aRet { "com.sun.star.drawing.GenericDrawPage" }; return aRet; } diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 258b4f1de1f1..cbf3d98d84b3 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2680,9 +2680,7 @@ sal_Bool SwXTextFieldMasters::supportsService(const OUString& rServiceName) thro uno::Sequence< OUString > SwXTextFieldMasters::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextFieldMasters"; + uno::Sequence<OUString> aRet { "com.sun.star.text.TextFieldMasters" }; return aRet; } @@ -2891,9 +2889,7 @@ sal_Bool SwXTextFieldTypes::supportsService(const OUString& rServiceName) throw( uno::Sequence< OUString > SwXTextFieldTypes::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextFields"; + uno::Sequence<OUString> aRet { "com.sun.star.text.TextFields" }; return aRet; } @@ -3004,9 +3000,7 @@ throw (uno::RuntimeException, std::exception) uno::Sequence< OUString > SAL_CALL SwXFieldEnumeration::getSupportedServiceNames() throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.FieldEnumeration"; + uno::Sequence<OUString> aRet { "com.sun.star.text.FieldEnumeration" }; return aRet; } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 76f85dc3d56a..24447de5ba87 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2992,9 +2992,7 @@ sal_Bool SAL_CALL SwXTextCursor::hasElements() throw (uno::RuntimeException, std uno::Sequence< OUString > SAL_CALL SwXTextCursor::getAvailableServiceNames() throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextContent"; + uno::Sequence<OUString> aRet { "com.sun.star.text.TextContent" }; return aRet; } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index a80c428477e0..5e35fa3e43c2 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1299,9 +1299,7 @@ sal_Bool SAL_CALL SwXTextRange::hasElements() throw (uno::RuntimeException, std: uno::Sequence< OUString > SAL_CALL SwXTextRange::getAvailableServiceNames() throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextContent"; + uno::Sequence<OUString> aRet { "com.sun.star.text.TextContent" }; return aRet; } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 6845a9a508be..c76943b61eb2 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -1442,9 +1442,7 @@ throw (uno::RuntimeException, std::exception) uno::Sequence< OUString > SAL_CALL SwXParagraph::getAvailableServiceNames() throw (uno::RuntimeException, std::exception) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextContent"; + uno::Sequence<OUString> aRet { "com.sun.star.text.TextContent" }; return aRet; } diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 6e1de3db7667..8af520380d4a 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -855,9 +855,7 @@ uno::Sequence< OUString > SwXTextPortion::getAvailableServiceNames() throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextContent"; + uno::Sequence<OUString> aRet { "com.sun.star.text.TextContent" }; return aRet; } diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 890f4d50af80..cd6d41354dea 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -350,9 +350,7 @@ throw( RuntimeException, std::exception ) Sequence< OUString > SwXTextPortionEnumeration::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextPortionEnumeration"; + Sequence<OUString> aRet { "com.sun.star.text.TextPortionEnumeration" }; return aRet; } diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 903e47074ae3..e34c0d259635 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -269,9 +269,7 @@ sal_Bool SwXFootnoteProperties::supportsService(const OUString& rServiceName) th Sequence< OUString > SwXFootnoteProperties::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.FootnoteSettings"; + Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" }; return aRet; } @@ -573,9 +571,7 @@ sal_Bool SwXEndnoteProperties::supportsService(const OUString& rServiceName) thr Sequence< OUString > SwXEndnoteProperties::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.FootnoteSettings"; + Sequence<OUString> aRet { "com.sun.star.text.FootnoteSettings" }; return aRet; } @@ -799,9 +795,7 @@ sal_Bool SwXLineNumberingProperties::supportsService(const OUString& rServiceNam Sequence< OUString > SwXLineNumberingProperties::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.LineNumberingProperties"; + Sequence<OUString> aRet { "com.sun.star.text.LineNumberingProperties" }; return aRet; } @@ -1095,9 +1089,7 @@ sal_Bool SwXNumberingRules::supportsService(const OUString& rServiceName) throw( Sequence< OUString > SwXNumberingRules::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.NumberingRules"; + Sequence<OUString> aRet { "com.sun.star.text.NumberingRules" }; return aRet; } @@ -2309,9 +2301,7 @@ sal_Bool SwXTextColumns::supportsService(const OUString& rServiceName) throw( Ru Sequence< OUString > SwXTextColumns::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextColumns"; + Sequence<OUString> aRet { "com.sun.star.text.TextColumns" }; return aRet; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 16dfb092a078..7b284c339b51 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -158,9 +158,7 @@ sal_Bool SwXStyleFamilies::supportsService(const OUString& rServiceName) throw( uno::Sequence< OUString > SwXStyleFamilies::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.style.StyleFamilies"; + uno::Sequence<OUString> aRet { "com.sun.star.style.StyleFamilies" }; return aRet; } @@ -391,9 +389,7 @@ sal_Bool SwXStyleFamily::supportsService(const OUString& rServiceName) throw( un uno::Sequence< OUString > SwXStyleFamily::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.style.StyleFamily"; + uno::Sequence<OUString> aRet { "com.sun.star.style.StyleFamily" }; return aRet; } diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index ddba7056014b..e9d2fe53dc86 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -691,9 +691,7 @@ sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::Sequence< OUString > SwXAutoTextGroup::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.AutoTextGroup"; + uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextGroup" }; return aRet; } @@ -974,9 +972,7 @@ sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::Sequence< OUString > SwXAutoTextEntry::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.AutoTextEntry"; + uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextEntry" }; return aRet; } diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 31114c711d52..33281bab84e3 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -533,9 +533,7 @@ sal_Bool SwXPrintSettings::supportsService(const OUString& rServiceName) throw( Sequence< OUString > SwXPrintSettings::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.PrintSettings"; + Sequence<OUString> aRet { "com.sun.star.text.PrintSettings" }; return aRet; } @@ -997,9 +995,7 @@ sal_Bool SwXViewSettings::supportsService(const OUString& rServiceName) throw( R Sequence< OUString > SwXViewSettings::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.ViewSettings"; + Sequence<OUString> aRet { "com.sun.star.text.ViewSettings" }; return aRet; } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 094e374d0e16..546d3c40e0e5 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -4136,9 +4136,7 @@ sal_Bool SwXOutlineTarget::supportsService(const OUString& ServiceName) throw( R Sequence< OUString > SwXOutlineTarget::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.document.LinkTarget"; + Sequence<OUString> aRet { "com.sun.star.document.LinkTarget" }; return aRet; } diff --git a/toolkit/source/controls/roadmapentry.cxx b/toolkit/source/controls/roadmapentry.cxx index d8734a03a656..1bfb4565a6b6 100644 --- a/toolkit/source/controls/roadmapentry.cxx +++ b/toolkit/source/controls/roadmapentry.cxx @@ -90,9 +90,7 @@ sal_Bool SAL_CALL ORoadmapEntry::supportsService( const OUString& ServiceName ) css::uno::Sequence< OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames( ) throw (css::uno::RuntimeException, std::exception) { - css::uno::Sequence< OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.awt.RoadmapItem"; + css::uno::Sequence<OUString> aRet { "com.sun.star.awt.RoadmapItem" }; return aRet; } diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx index e0f53fc6b6d9..f412435f3e84 100644 --- a/ucb/source/core/cmdenv.cxx +++ b/ucb/source/core/cmdenv.cxx @@ -113,8 +113,7 @@ OUString UcbCommandEnvironment::getImplementationName_Static() uno::Sequence< OUString > UcbCommandEnvironment::getSupportedServiceNames_Static() { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = "com.sun.star.ucb.CommandEnvironment"; + uno::Sequence<OUString> aSNS { "com.sun.star.ucb.CommandEnvironment" }; return aSNS; } diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index 0030cdc6a731..4487e979918c 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -123,8 +123,7 @@ css::uno::Sequence< OUString > SAL_CALL SortedDynamicResultSet::getSupportedServ css::uno::Sequence< OUString > SortedDynamicResultSet::getSupportedServiceNames_Static() { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = DYNAMIC_RESULTSET_SERVICE_NAME; + css::uno::Sequence<OUString> aSNS { DYNAMIC_RESULTSET_SERVICE_NAME }; return aSNS; } @@ -501,8 +500,7 @@ SortedDynamicResultSetFactory_CreateInstance( const css::uno::Reference< css::uno::Sequence< OUString > SortedDynamicResultSetFactory::getSupportedServiceNames_Static() { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = DYNAMIC_RESULTSET_FACTORY_NAME; + css::uno::Sequence<OUString> aSNS { DYNAMIC_RESULTSET_FACTORY_NAME }; return aSNS; } diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 1a4707e75212..945fee5c9834 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -192,8 +192,7 @@ css::uno::Sequence< OUString > SAL_CALL SortedResultSet::getSupportedServiceName css::uno::Sequence< OUString >SortedResultSet::getSupportedServiceNames_Static() { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = RESULTSET_SERVICE_NAME; + css::uno::Sequence<OUString> aSNS { RESULTSET_SERVICE_NAME }; return aSNS; } diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 6cf2f195e8f8..44dba8919213 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -1706,8 +1706,7 @@ namespace cmis uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = "com.sun.star.ucb.CmisContent"; + uno::Sequence<OUString> aSNS { "com.sun.star.ucb.CmisContent" }; return aSNS; } diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx index 644c5c2a3569..0073108bc2a6 100644 --- a/ucb/source/ucp/cmis/cmis_repo_content.cxx +++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx @@ -330,8 +330,7 @@ namespace cmis uno::Sequence< OUString > SAL_CALL RepoContent::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = "com.sun.star.ucb.Content"; + uno::Sequence<OUString> aSNS { "com.sun.star.ucb.Content" }; return aSNS; } diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 37468de43e22..cac9bdb2b065 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -201,8 +201,7 @@ css::uno::Sequence< OUString > SAL_CALL FTPContent::getSupportedServiceNames() css::uno::Sequence< OUString > FTPContent::getSupportedServiceNames_Static() { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = "com.sun.star.ucb.FTPContent"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.ucb.FTPContent" }; return aSNS; } diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index f85f0a335db6..c6bc270ddb06 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -147,8 +147,7 @@ FTPContentProvider_CreateInstance( const css::uno::Reference< css::uno::Sequence< OUString > FTPContentProvider::getSupportedServiceNames_Static() { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = FTP_CONTENT_PROVIDER_SERVICE_NAME; + css::uno::Sequence<OUString> aSNS { FTP_CONTENT_PROVIDER_SERVICE_NAME }; return aSNS; } diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index b02e33ef5923..10b24e79a83b 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -1353,8 +1353,7 @@ OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException, uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = "com.sun.star.ucb.GIOContent"; + uno::Sequence<OUString> aSNS { "com.sun.star.ucb.GIOContent" }; return aSNS; } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 7978064596bf..4260e7fffa5f 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -1398,8 +1398,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, // Check, if all required properties were set. if ( m_aProps.getTitle().isEmpty() ) { - uno::Sequence< OUString > aProps( 1 ); - aProps[ 0 ] = "Title"; + uno::Sequence<OUString> aProps { "Title" }; ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( OUString(), diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index e843b516f777..33c2686adbf6 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -345,8 +345,7 @@ OUString SAL_CALL Content::getImplementationName() uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS[ 0 ] = WEBDAV_CONTENT_SERVICE_NAME; + uno::Sequence<OUString> aSNS { WEBDAV_CONTENT_SERVICE_NAME }; return aSNS; } @@ -2269,8 +2268,7 @@ void Content::insert( { OSL_FAIL( "Content::insert - Title missing!" ); - uno::Sequence< OUString > aProps( 1 ); - aProps[ 0 ] = "Title"; + uno::Sequence<OUString> aProps { "Title" }; ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( OUString(), diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 1fb3547f7de6..f35c3d99a6bb 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -450,8 +450,7 @@ OUString SAL_CALL Content::getImplementationName() uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = WEBDAV_CONTENT_SERVICE_NAME; + uno::Sequence<OUString> aSNS { WEBDAV_CONTENT_SERVICE_NAME }; return aSNS; } @@ -2409,8 +2408,7 @@ void Content::insert( { SAL_WARN( "ucb.ucp.webdav", "Content::insert - Title missing!" ); - uno::Sequence< OUString > aProps( 1 ); - aProps[ 0 ] = "Title"; + uno::Sequence<OUString> aProps { "Title" }; ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( OUString(), diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index 5962255dfcf2..6a5b09f71896 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -448,8 +448,7 @@ Reference< XPropertySetInfo > Content::getProperties() Any Content::getPropertyValue( const OUString& rPropertyName ) throw( CommandAbortedException, RuntimeException, Exception ) { - Sequence< OUString > aNames( 1 ); - aNames.getArray()[ 0 ] = rPropertyName; + Sequence<OUString> aNames { rPropertyName }; Sequence< Any > aRet = getPropertyValues( aNames ); return aRet.getConstArray()[ 0 ]; @@ -460,8 +459,7 @@ Any Content::setPropertyValue( const OUString& rName, const Any& rValue ) throw( CommandAbortedException, RuntimeException, Exception ) { - Sequence< OUString > aNames( 1 ); - aNames.getArray()[ 0 ] = rName; + Sequence<OUString> aNames { rName }; Sequence< Any > aValues( 1 ); aValues.getArray()[ 0 ] = rValue; diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx index 0f57a66f1f42..cfbb043de7c9 100644 --- a/writerperfect/source/common/DirectoryStream.cxx +++ b/writerperfect/source/common/DirectoryStream.cxx @@ -55,8 +55,7 @@ uno::Reference<io::XInputStream> findStream(ucbhelper::Content &rContent, const { uno::Reference<io::XInputStream> xInputStream; - uno::Sequence<rtl::OUString> lPropNames(1); - lPropNames[0] = "Title"; + uno::Sequence<OUString> lPropNames { "Title" }; try { const uno::Reference<sdbc::XResultSet> xResultSet( diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx index d036ab961b58..24019cd2ad9b 100644 --- a/xmlhelp/source/cxxhelp/provider/content.cxx +++ b/xmlhelp/source/cxxhelp/provider/content.cxx @@ -139,8 +139,7 @@ OUString SAL_CALL Content::getImplementationName() uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = "com.sun.star.ucb.CHelpContent"; + uno::Sequence<OUString> aSNS { "com.sun.star.ucb.CHelpContent" }; return aSNS; } diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index 5c93fe68bd34..b8b0f93197ab 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -280,8 +280,7 @@ void PageStyleContext::FillPropertySet(const uno::Reference<beans::XPropertySet } catch(::com::sun::star::lang::IllegalArgumentException& e) { - Sequence< rtl::OUString > aSeq(1); - aSeq[0] = sStyleName; + Sequence<OUString> aSeq { sStyleName }; GetImport().SetError( XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, aSeq,e.Message,nullptr); diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 9e2f8a93e397..17a4b0ce5e14 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -590,8 +590,7 @@ void XMLTextStyleContext::FillPropertySet( } catch(::com::sun::star::lang::IllegalArgumentException& e) { - Sequence< rtl::OUString > aSeq(1); - aSeq[0] = sStyleName; + Sequence<OUString> aSeq { sStyleName }; GetImport().SetError(XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, aSeq, e.Message, nullptr); } break; diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index a0cee496d30d..3ee458fc9f66 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -502,9 +502,7 @@ OUString DocumentDigitalSignatures::GetImplementationName() throw (RuntimeExcept Sequence< OUString > DocumentDigitalSignatures::GetSupportedServiceNames() throw (css::uno::RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.security.DocumentDigitalSignatures"; + Sequence<OUString> aRet { "com.sun.star.security.DocumentDigitalSignatures" }; return aRet; } diff --git a/xmlsecurity/source/framework/decryptorimpl.cxx b/xmlsecurity/source/framework/decryptorimpl.cxx index 03e15f618e02..13577cffd837 100644 --- a/xmlsecurity/source/framework/decryptorimpl.cxx +++ b/xmlsecurity/source/framework/decryptorimpl.cxx @@ -187,9 +187,7 @@ OUString DecryptorImpl_getImplementationName () cssu::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( ) throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.crypto.sax.Decryptor"; + cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.sax.Decryptor" }; return aRet; } diff --git a/xmlsecurity/source/framework/encryptorimpl.cxx b/xmlsecurity/source/framework/encryptorimpl.cxx index 52652c95d3ca..03823e5facbc 100644 --- a/xmlsecurity/source/framework/encryptorimpl.cxx +++ b/xmlsecurity/source/framework/encryptorimpl.cxx @@ -221,9 +221,7 @@ OUString EncryptorImpl_getImplementationName () Sequence< OUString > SAL_CALL EncryptorImpl_getSupportedServiceNames( ) throw (RuntimeException) { - Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.crypto.sax.Encryptor"; + Sequence<OUString> aRet { "com.sun.star.xml.crypto.sax.Encryptor" }; return aRet; } diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index 583aeb7cf3ef..c226edf3e1f3 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -1357,9 +1357,7 @@ OUString SAXEventKeeperImpl_getImplementationName () cssu::Sequence< OUString > SAL_CALL SAXEventKeeperImpl_getSupportedServiceNames( ) throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.crypto.sax.SAXEventKeeper"; + cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.sax.SAXEventKeeper" }; return aRet; } diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx index b9e3b6985613..ee9064224f4a 100644 --- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx +++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx @@ -235,9 +235,7 @@ OUString SignatureCreatorImpl_getImplementationName () cssu::Sequence< OUString > SAL_CALL SignatureCreatorImpl_getSupportedServiceNames( ) throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.crypto.sax.SignatureCreator"; + cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.sax.SignatureCreator" }; return aRet; } diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx index 9cad609e147f..6d3f0efe28a4 100644 --- a/xmlsecurity/source/framework/signatureverifierimpl.cxx +++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx @@ -181,9 +181,7 @@ OUString SignatureVerifierImpl_getImplementationName () cssu::Sequence< OUString > SAL_CALL SignatureVerifierImpl_getSupportedServiceNames( ) throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.crypto.sax.SignatureVerifier"; + cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.sax.SignatureVerifier" }; return aRet; } diff --git a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx b/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx index b5cd81f523df..fc90a1dc450b 100644 --- a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx +++ b/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx @@ -102,8 +102,7 @@ Sequence< OUString > SAL_CALL XMLEncryptionTemplateImpl::getSupportedServiceName //Helper for XServiceInfo Sequence< OUString > XMLEncryptionTemplateImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLEncryptionTemplate"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLEncryptionTemplate" }; return seqServiceNames; } diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx index b7dac4045121..9532e12c1d22 100644 --- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx +++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx @@ -128,8 +128,7 @@ Sequence< OUString > SAL_CALL XMLSignatureTemplateImpl::getSupportedServiceNames //Helper for XServiceInfo Sequence< OUString > XMLSignatureTemplateImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSignatureTemplate"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignatureTemplate" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index ab794e8036ea..7c99df8b4813 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -195,8 +195,7 @@ Sequence< OUString > SAL_CALL SecurityEnvironment_MSCryptImpl::getSupportedServi //Helper for XServiceInfo Sequence< OUString > SecurityEnvironment_MSCryptImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.SecurityEnvironment"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.SecurityEnvironment" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx index 8ca0d7dec2a9..985dc2cdc149 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx @@ -156,9 +156,7 @@ OUString SEInitializer_MSCryptImpl_getImplementationName() cssu::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames() throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.crypto.SEInitializer"; + cssu::Sequence<OUString> aRet { "com.sun.star.xml.crypto.SEInitializer" }; return aRet; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx index 93c20b85855a..3d59737e6ef4 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx @@ -343,8 +343,7 @@ Sequence< OUString > SAL_CALL XMLEncryption_MSCryptImpl::getSupportedServiceName //Helper for XServiceInfo Sequence< OUString > XMLEncryption_MSCryptImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLEncryption"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLEncryption" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx index 018c003a48fe..39fa1e2bf235 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx @@ -139,8 +139,7 @@ Sequence< OUString > SAL_CALL XMLSecurityContext_MSCryptImpl::getSupportedServic //Helper for XServiceInfo Sequence< OUString > XMLSecurityContext_MSCryptImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSecurityContext"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSecurityContext" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx index 9dbaac4365ea..98ba66295d3f 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx @@ -272,8 +272,7 @@ Sequence< OUString > SAL_CALL XMLSignature_MSCryptImpl::getSupportedServiceNames //Helper for XServiceInfo Sequence< OUString > XMLSignature_MSCryptImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSignature"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignature" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index dff7cd7a1a4c..b7276688f034 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -471,9 +471,7 @@ OUString ONSSInitializer_getImplementationName () cssu::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames( ) throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = NSS_SERVICE_NAME; + cssu::Sequence<OUString> aRet { NSS_SERVICE_NAME }; return aRet; } diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index ff08ce67c1ba..8d367b782edc 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -166,8 +166,7 @@ Sequence< OUString > SAL_CALL SecurityEnvironment_NssImpl::getSupportedServiceNa //Helper for XServiceInfo Sequence< OUString > SecurityEnvironment_NssImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.SecurityEnvironment"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.SecurityEnvironment" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx index 921178f0dac4..176d56f2cc77 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx @@ -333,8 +333,7 @@ Sequence< OUString > SAL_CALL XMLEncryption_NssImpl::getSupportedServiceNames() //Helper for XServiceInfo Sequence< OUString > XMLEncryption_NssImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLEncryption"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLEncryption" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx index 967a50ab38f9..7cd8ba5b8d7a 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx @@ -146,8 +146,7 @@ Sequence< OUString > SAL_CALL XMLSecurityContext_NssImpl::getSupportedServiceNam //Helper for XServiceInfo Sequence< OUString > XMLSecurityContext_NssImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSecurityContext"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSecurityContext" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx index 5d30bf716300..9607753446ec 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx @@ -296,8 +296,7 @@ Sequence< OUString > SAL_CALL XMLSignature_NssImpl::getSupportedServiceNames() t //Helper for XServiceInfo Sequence< OUString > XMLSignature_NssImpl::impl_getSupportedServiceNames() { ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ; - Sequence< OUString > seqServiceNames( 1 ) ; - seqServiceNames[0] = "com.sun.star.xml.crypto.XMLSignature"; + Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignature" }; return seqServiceNames ; } diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx index 5af8716c96b8..af7543b8b4fd 100644 --- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx @@ -1064,9 +1064,7 @@ OUString XMLDocumentWrapper_XmlSecImpl_getImplementationName () cssu::Sequence< OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames( ) throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.wrapper.XMLDocumentWrapper"; + cssu::Sequence<OUString> aRet { "com.sun.star.xml.wrapper.XMLDocumentWrapper" }; return aRet; } diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx index 14e6ff342827..a9ce4eda5c2a 100644 --- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx @@ -80,9 +80,7 @@ OUString XMLElementWrapper_XmlSecImpl_getImplementationName () cssu::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( ) throw (cssu::RuntimeException) { - cssu::Sequence < OUString > aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.xml.wrapper.XMLElementWrapper"; + cssu::Sequence<OUString> aRet { "com.sun.star.xml.wrapper.XMLElementWrapper" }; return aRet; } |