diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 10:07:53 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-31 10:30:23 +0100 |
commit | baf1b02b49e92e71490e22f0ed39beb152d99085 (patch) | |
tree | 1820191326a8d69df0a3ff5d280f4a02fea229b1 /starmath | |
parent | b3fe9d6206a5e25fe18c20314960599db05c53ee (diff) |
Prepare for removal of non-const operator[] from Sequence in starmath
Change-Id: I0ac241a5849a5c7d2726ceb0084612a7a1070b18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124392
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathml/export.cxx | 9 | ||||
-rw-r--r-- | starmath/source/mathml/import.cxx | 3 | ||||
-rw-r--r-- | starmath/source/mathml/mathmlexport.cxx | 4 | ||||
-rw-r--r-- | starmath/source/mathml/mathmlimport.cxx | 3 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 5 |
5 files changed, 9 insertions, 15 deletions
diff --git a/starmath/source/mathml/export.cxx b/starmath/source/mathml/export.cxx index 3ddc86bbc943..3254ca58b3d2 100644 --- a/starmath/source/mathml/export.cxx +++ b/starmath/source/mathml/export.cxx @@ -312,9 +312,7 @@ bool SmMLExportWrapper::WriteThroughComponentOS(const Reference<io::XOutputStrea xSaxWriter->setCustomEntityNames(starmathdatabase::icustomMathmlHtmlEntitiesExport); // prepare arguments (prepend doc handler to given arguments) - Sequence<Any> aArgs(2); - aArgs[0] <<= xSaxWriter; - aArgs[1] <<= rPropSet; + Sequence<Any> aArgs{ Any(xSaxWriter), Any(rPropSet) }; // get filter component auto xExporterData = rxContext->getServiceManager()->createInstanceWithArgumentsAndContext( @@ -594,6 +592,7 @@ void SmMLExport::GetConfigurationSettings(Sequence<PropertyValue>& rProps) Sequence<Property> aProps = xPropertySetInfo->getProperties(); const sal_Int32 nCount = aProps.getLength(); rProps.realloc(nCount); + auto pProps = rProps.getArray(); // Copy properties // This needs further revision @@ -603,8 +602,8 @@ void SmMLExport::GetConfigurationSettings(Sequence<PropertyValue>& rProps) if (aProps[i].Name != "Formula" && aProps[i].Name != "BasicLibraries" && aProps[i].Name != "DialogLibraries" && aProps[i].Name != "RuntimeUID") { - rProps[i].Name = aProps[i].Name; - rProps[i].Value = xProps->getPropertyValue(aProps[i].Name); + pProps[i].Name = aProps[i].Name; + pProps[i].Value = xProps->getPropertyValue(aProps[i].Name); } } } diff --git a/starmath/source/mathml/import.cxx b/starmath/source/mathml/import.cxx index a882e0b527cd..efafcbf89005 100644 --- a/starmath/source/mathml/import.cxx +++ b/starmath/source/mathml/import.cxx @@ -391,8 +391,7 @@ ErrCode SmMLImportWrapper::ReadThroughComponentIS( aParserInput.aInputStream = xInputStream; // Prepare property list - Sequence<Any> aArgs(1); - aArgs[0] <<= rPropSet; + Sequence<Any> aArgs{ Any(rPropSet) }; // Get filter Reference<XInterface> xFilter diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx index a6efe93ec69a..d0f5089e241c 100644 --- a/starmath/source/mathml/mathmlexport.cxx +++ b/starmath/source/mathml/mathmlexport.cxx @@ -245,9 +245,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<io::XOutputStream xSaxWriter->setCustomEntityNames(starmathdatabase::icustomMathmlHtmlEntitiesExport); // prepare arguments (prepend doc handler to given arguments) - Sequence<Any> aArgs(2); - aArgs[0] <<= xSaxWriter; - aArgs[1] <<= rPropSet; + Sequence<Any> aArgs{ Any(xSaxWriter), Any(rPropSet) }; // get filter component Reference<document::XExporter> xExporter( diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx index 7315c96808ba..ec3a3d75b66f 100644 --- a/starmath/source/mathml/mathmlimport.cxx +++ b/starmath/source/mathml/mathmlimport.cxx @@ -252,8 +252,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(const Reference<io::XInputStrea xml::sax::InputSource aParserInput; aParserInput.aInputStream = xInputStream; - Sequence<Any> aArgs(1); - aArgs[0] <<= rPropSet; + Sequence<Any> aArgs{ Any(rPropSet) }; // get filter Reference<XInterface> xFilter diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 3a5b6805b420..4b32900cbf26 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/formula/SymbolDescriptor.hpp> #include <com/sun/star/awt/Size.hpp> #include <comphelper/propertysetinfo.hxx> +#include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> #include <cppuhelper/queryinterface.hxx> @@ -143,9 +144,7 @@ SmPrintUIOptions::SmPrintUIOptions() 1000, // max value aRangeOpt); - Sequence< PropertyValue > aHintNoLayoutPage( 1 ); - aHintNoLayoutPage[0].Name = "HintNoLayoutPage"; - aHintNoLayoutPage[0].Value <<= true; + Sequence aHintNoLayoutPage{ comphelper::makePropertyValue("HintNoLayoutPage", true) }; m_aUIProperties[nIdx++].Value <<= aHintNoLayoutPage; assert(nIdx == nNumProps); |