diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-06-09 18:27:28 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-06-09 19:57:46 +0200 |
commit | fca7d50b17fae217bd34e9e6f5e3a8b0fda93833 (patch) | |
tree | 035cc1dd4e4957a05055970cf035deca68518c1e /sd | |
parent | 5897a97bb53bcbf2283161cc22f43d87f575f3d6 (diff) |
Simplify Sequences initializations (sd)
Change-Id: I968f1209961ba30ad0837846ae1ba4a9249663c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116934
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/dlg/TemplateScanner.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterCanvas.cxx | 15 |
3 files changed, 22 insertions, 24 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 4bd5b043e089..9a6e8d9a9afe 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -1007,11 +1007,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportFODP(SvStream &rStream) uno::Reference<io::XInputStream> xStream(new ::utl::OSeekableInputStreamWrapper(rStream)); uno::Reference<uno::XInterface> xInterface(xMultiServiceFactory->createInstance("com.sun.star.comp.Writer.XmlFilterAdaptor"), uno::UNO_SET_THROW); - css::uno::Sequence<OUString> aUserData(7); - aUserData[0] = "com.sun.star.comp.filter.OdfFlatXml"; - aUserData[2] = "com.sun.star.comp.Impress.XMLOasisImporter"; - aUserData[3] = "com.sun.star.comp.Impress.XMLOasisExporter"; - aUserData[6] = "true"; + css::uno::Sequence<OUString> aUserData + { + "com.sun.star.comp.filter.OdfFlatXml", + "", + "com.sun.star.comp.Impress.XMLOasisImporter", + "com.sun.star.comp.Impress.XMLOasisExporter", + "", + "", + "true" + }; uno::Sequence<beans::PropertyValue> aAdaptorArgs(comphelper::InitPropertySequence( { { "UserData", uno::Any(aUserData) }, diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx index 4afc801df5f2..5d302c26156f 100644 --- a/sd/source/ui/dlg/TemplateScanner.cxx +++ b/sd/source/ui/dlg/TemplateScanner.cxx @@ -141,15 +141,10 @@ TemplateScanner::State TemplateScanner::InitializeEntryScanning() { mxEntryEnvironment.clear(); + // Create a cursor to iterate over the templates in this folders. // We are interested only in three properties: the entry's name, // its URL, and its content type. - Sequence<OUString> aProps (3); - aProps[0] = TITLE; - aProps[1] = "TargetURL"; - aProps[2] = "TypeDescription"; - - // Create a cursor to iterate over the templates in this folders. - mxEntryResultSet.set( maFolderContent.createCursor(aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY)); + mxEntryResultSet.set( maFolderContent.createCursor({ TITLE, "TargetURL", "TypeDescription" }, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY)); } else eNextState = ERROR; @@ -218,13 +213,8 @@ TemplateScanner::State TemplateScanner::InitializeFolderScanning() mxFolderEnvironment.clear(); ::ucbhelper::Content aTemplateDir (mxTemplateRoot, mxFolderEnvironment, comphelper::getProcessComponentContext()); - // Define the list of properties we are interested in. - Sequence<OUString> aProps (2); - aProps[0] = TITLE; - aProps[1] = "TargetDirURL"; - // Create a cursor to iterate over the template folders. - mxFolderResultSet.set( aTemplateDir.createCursor(aProps, ::ucbhelper::INCLUDE_FOLDERS_ONLY)); + mxFolderResultSet.set( aTemplateDir.createCursor({ TITLE, "TargetDirURL" }, ::ucbhelper::INCLUDE_FOLDERS_ONLY)); if (mxFolderResultSet.is()) eNextState = GATHER_FOLDER_LIST; } diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index f1f2271a1098..d657d6f37596 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -660,12 +660,15 @@ Reference<rendering::XPolyPolygon2D> PresenterCanvas::UpdateSpriteClip ( else { // Create a new clip polygon from the window clip rectangle. - Sequence<Sequence<geometry::RealPoint2D> > aPoints (1); - aPoints[0] = Sequence<geometry::RealPoint2D>(4); - aPoints[0][0] = geometry::RealPoint2D(nMinX,nMinY); - aPoints[0][1] = geometry::RealPoint2D(nMaxX,nMinY); - aPoints[0][2] = geometry::RealPoint2D(nMaxX,nMaxY); - aPoints[0][3] = geometry::RealPoint2D(nMinX,nMaxY); + Sequence<Sequence<geometry::RealPoint2D> > aPoints + { + { + { nMinX,nMinY }, + { nMaxX,nMinY }, + { nMaxX,nMaxY }, + { nMinX,nMaxY } + } + }; Reference<rendering::XLinePolyPolygon2D> xLinePolygon( xDevice->createCompatibleLinePolyPolygon(aPoints)); if (xLinePolygon.is()) |