summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/SdtHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/dmapper/SdtHelper.cxx')
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index aeb129dd7561..18c3c066a4f4 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -12,6 +12,7 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
+#include <comphelper/sequenceashashmap.hxx>
#include <editeng/unoprnms.hxx>
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
@@ -121,19 +122,15 @@ void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue a
xPropertySet->setPropertyValue("HelpText", uno::makeAny(rContentText));
// append date format to grab bag
- uno::Sequence<beans::PropertyValue> aGrabBag(5);
- aGrabBag[0].Name = "OriginalDate";
- aGrabBag[0].Value = uno::makeAny(aDate);
- aGrabBag[1].Name = "OriginalContent";
- aGrabBag[1].Value = uno::makeAny(rContentText);
- aGrabBag[2].Name = "DateFormat";
- aGrabBag[2].Value = uno::makeAny(sDateFormat);
- aGrabBag[3].Name = "Locale";
- aGrabBag[3].Value = uno::makeAny(m_sLocale.makeStringAndClear());
- aGrabBag[4] = aCharFormat;
+ comphelper::SequenceAsHashMap aGrabBag;
+ aGrabBag["OriginalDate"] <<= aDate;
+ aGrabBag["OriginalContent"] <<= rContentText;
+ aGrabBag["DateFormat"] <<= sDateFormat;
+ aGrabBag["Locale"] <<= m_sLocale.makeStringAndClear();
+ aGrabBag["CharFormat"] <<= aCharFormat.Value;
std::vector<OUString> aItems;
- createControlShape(lcl_getOptimalWidth(m_rDM_Impl.GetStyleSheetTable(), rContentText, aItems), xControlModel, aGrabBag);
+ createControlShape(lcl_getOptimalWidth(m_rDM_Impl.GetStyleSheetTable(), rContentText, aItems), xControlModel, aGrabBag.getAsConstPropertyValueList());
}
void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> xControlModel)