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>
This commit is contained in:
Julien Nabet
2021-06-09 18:27:28 +02:00
parent 5897a97bb5
commit fca7d50b17
3 changed files with 22 additions and 24 deletions

View File

@@ -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) },

View File

@@ -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;
}

View File

@@ -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())