From b8f02637131fcfa499a6397914fdf4687c88053d Mon Sep 17 00:00:00 2001 From: Mesut Çifci Date: Wed, 15 Jan 2020 11:33:29 +0300 Subject: tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor Change-Id: Ib58c66590c60175d7984af55d23b7c55a6a2383e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86828 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sw/source/core/docnode/finalthreadmanager.cxx | 3 +-- sw/source/core/unocore/unocoll.cxx | 24 ++++++++---------------- sw/source/core/unocore/unodraw.cxx | 3 +-- sw/source/core/unocore/unoportenum.cxx | 3 +-- sw/source/uibase/ribbar/workctrl.cxx | 3 +-- 5 files changed, 12 insertions(+), 24 deletions(-) (limited to 'sw') diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx index 3d9eb3859acd..80ddd75c3da9 100644 --- a/sw/source/core/docnode/finalthreadmanager.cxx +++ b/sw/source/core/docnode/finalthreadmanager.cxx @@ -284,8 +284,7 @@ sal_Bool SAL_CALL FinalThreadManager::supportsService(OUString const & serviceNa css::uno::Sequence< OUString > SAL_CALL FinalThreadManager::getSupportedServiceNames() { - css::uno::Sequence< OUString > s { "com.sun.star.util.JobManager" }; - return s; + return { "com.sun.star.util.JobManager" }; } // css::util::XJobManager: diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 213e040b2d95..bf8ea87af1e4 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -974,8 +974,7 @@ sal_Bool SwXTextTables::supportsService(const OUString& rServiceName) uno::Sequence< OUString > SwXTextTables::getSupportedServiceNames() { - uno::Sequence< OUString > aRet { "com.sun.star.text.TextTables" }; - return aRet; + return { "com.sun.star.text.TextTables" }; } uno::Reference SwXTextTables::GetObject(SwFrameFormat& rFormat) @@ -1292,8 +1291,7 @@ sal_Bool SwXTextFrames::supportsService(const OUString& rServiceName) Sequence< OUString > SwXTextFrames::getSupportedServiceNames() { - Sequence aRet { "com.sun.star.text.TextFrames" }; - return aRet; + return { "com.sun.star.text.TextFrames" }; } SwXTextFrames::SwXTextFrames(SwDoc* _pDoc) : @@ -1317,8 +1315,7 @@ sal_Bool SwXTextGraphicObjects::supportsService(const OUString& rServiceName) Sequence< OUString > SwXTextGraphicObjects::getSupportedServiceNames() { - Sequence aRet { "com.sun.star.text.TextGraphicObjects" }; - return aRet; + return { "com.sun.star.text.TextGraphicObjects" }; } SwXTextGraphicObjects::SwXTextGraphicObjects(SwDoc* _pDoc) : @@ -1342,8 +1339,7 @@ sal_Bool SwXTextEmbeddedObjects::supportsService(const OUString& rServiceName) Sequence< OUString > SwXTextEmbeddedObjects::getSupportedServiceNames() { - Sequence aRet { "com.sun.star.text.TextEmbeddedObjects" }; - return aRet; + return { "com.sun.star.text.TextEmbeddedObjects" }; } SwXTextEmbeddedObjects::SwXTextEmbeddedObjects(SwDoc* _pDoc) : @@ -1367,8 +1363,7 @@ sal_Bool SwXTextSections::supportsService(const OUString& rServiceName) Sequence< OUString > SwXTextSections::getSupportedServiceNames() { - Sequence aRet { "com.sun.star.text.TextSections" }; - return aRet; + return { "com.sun.star.text.TextSections" }; } SwXTextSections::SwXTextSections(SwDoc* _pDoc) : @@ -1543,8 +1538,7 @@ sal_Bool SwXBookmarks::supportsService(const OUString& rServiceName) Sequence< OUString > SwXBookmarks::getSupportedServiceNames() { - Sequence< OUString > aRet { "com.sun.star.text.Bookmarks" }; - return aRet; + return { "com.sun.star.text.Bookmarks" }; } SwXBookmarks::SwXBookmarks(SwDoc* _pDoc) : @@ -1742,8 +1736,7 @@ sal_Bool SwXFootnotes::supportsService(const OUString& rServiceName) Sequence< OUString > SwXFootnotes::getSupportedServiceNames() { - Sequence aRet { "com.sun.star.text.Footnotes" }; - return aRet; + return { "com.sun.star.text.Footnotes" }; } SwXFootnotes::SwXFootnotes(bool bEnd, SwDoc* _pDoc) @@ -1838,8 +1831,7 @@ sal_Bool SwXReferenceMarks::supportsService(const OUString& rServiceName) Sequence< OUString > SwXReferenceMarks::getSupportedServiceNames() { - Sequence aRet { "com.sun.star.text.ReferenceMarks" }; - return aRet; + return { "com.sun.star.text.ReferenceMarks" }; } SwXReferenceMarks::SwXReferenceMarks(SwDoc* _pDoc) : diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 685f29fbd1da..492faee1582e 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -464,8 +464,7 @@ sal_Bool SwXDrawPage::supportsService(const OUString& rServiceName) uno::Sequence< OUString > SwXDrawPage::getSupportedServiceNames() { - uno::Sequence aRet { "com.sun.star.drawing.GenericDrawPage" }; - return aRet; + return { "com.sun.star.drawing.GenericDrawPage" }; } SwXDrawPage::SwXDrawPage(SwDoc* pDc) : diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 835a592d00af..cea5fec10069 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -326,8 +326,7 @@ SwXTextPortionEnumeration::supportsService(const OUString& rServiceName) Sequence< OUString > SwXTextPortionEnumeration::getSupportedServiceNames() { - Sequence aRet { "com.sun.star.text.TextPortionEnumeration" }; - return aRet; + return { "com.sun.star.text.TextPortionEnumeration" }; } SwXTextPortionEnumeration::SwXTextPortionEnumeration( diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 65f1f48acf0e..a7f76cf9aff0 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -871,8 +871,7 @@ OUString SAL_CALL NavElementToolBoxControl::getImplementationName() uno::Sequence< OUString > SAL_CALL NavElementToolBoxControl::getSupportedServiceNames() { - uno::Sequence aSNS { "com.sun.star.frame.ToolbarController" }; - return aSNS; + return { "com.sun.star.frame.ToolbarController" }; } // XComponent -- cgit