diff options
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/xml/XMLStylesExportHelper.cxx | 15 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 8 |
2 files changed, 10 insertions, 13 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index a9d0464a82d8..6236dd6e7369 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/sheet/XSheetCondition.hpp> #include <com/sun/star/sheet/TableValidationVisibility.hpp> #include <comphelper/extract.hxx> +#include <comphelper/propertysequence.hxx> #include <sfx2/app.hxx> #include <o3tl/make_unique.hxx> @@ -411,15 +412,11 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport) bool bScriptURL = SfxApplication::IsXScriptURL( aItr->sErrorTitle ); const OUString sScript("Script"); - uno::Sequence<beans::PropertyValue> aSeq(3); - beans::PropertyValue* pArr(aSeq.getArray()); - pArr[0].Name = "EventType"; - pArr[0].Value <<= bScriptURL ? sScript : OUString("StarBasic"); - pArr[1].Name = "Library"; - pArr[1].Value <<= OUString(); - pArr[2].Name = bScriptURL ? sScript : OUString("MacroName"); - pArr[2].Value <<= aItr->sErrorTitle; - + uno::Sequence<beans::PropertyValue> aSeq( comphelper::InitPropertySequence({ + { "EventType", uno::Any(bScriptURL ? sScript : OUString("StarBasic")) }, + { "Library", uno::Any(OUString()) }, + { bScriptURL ? sScript : OUString("MacroName"), uno::Any(aItr->sErrorTitle) } + })); // 2) export the sequence rExport.GetEventExport().ExportSingleEvent( aSeq, "OnError"); } diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 0e702d0e5a13..880c2f5320ea 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -24,6 +24,7 @@ #include <sot/storage.hxx> #include <osl/diagnose.h> #include <comphelper/processfactory.hxx> +#include <comphelper/propertysequence.hxx> #include <unotools/streamwrap.hxx> #include <svx/xmlgrhlp.hxx> #include <svtools/sfxecode.hxx> @@ -747,10 +748,9 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) if (pMedium) sFileName = pMedium->GetName(); SfxObjectShell* pObjSh = rDoc.GetDocumentShell(); - uno::Sequence<beans::PropertyValue> aDescriptor(1); - beans::PropertyValue* pProps = aDescriptor.getArray(); - pProps[0].Name = "FileName"; - pProps[0].Value <<= sFileName; + uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({ + { "FileName", uno::Any(sFileName) } + })); /** property map for export info set */ comphelper::PropertyMapEntry const aExportInfoMap[] = |