summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-07-18 16:38:45 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-18 17:05:57 +0200
commit7916ca62209ee32c46c264b8cbf0a28b1c23a2a8 (patch)
treeba3538c538b67d3ee5f1754556a26670443a6650
parent7f55c89470b3671f9702ca76317a5388bf7513f9 (diff)
Use comphelper::SequenceAsHashMap
Change-Id: I398881187001393a84e407157041d3a7d254b708
-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)