Kaydet (Commit) 7916ca62 authored tarafından Miklos Vajna's avatar Miklos Vajna

Use comphelper::SequenceAsHashMap

Change-Id: I398881187001393a84e407157041d3a7d254b708
üst 7f55c894
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp>
#include <comphelper/sequenceashashmap.hxx>
#include <editeng/unoprnms.hxx> #include <editeng/unoprnms.hxx>
#include <vcl/outdev.hxx> #include <vcl/outdev.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
...@@ -121,19 +122,15 @@ void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue a ...@@ -121,19 +122,15 @@ void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue a
xPropertySet->setPropertyValue("HelpText", uno::makeAny(rContentText)); xPropertySet->setPropertyValue("HelpText", uno::makeAny(rContentText));
// append date format to grab bag // append date format to grab bag
uno::Sequence<beans::PropertyValue> aGrabBag(5); comphelper::SequenceAsHashMap aGrabBag;
aGrabBag[0].Name = "OriginalDate"; aGrabBag["OriginalDate"] <<= aDate;
aGrabBag[0].Value = uno::makeAny(aDate); aGrabBag["OriginalContent"] <<= rContentText;
aGrabBag[1].Name = "OriginalContent"; aGrabBag["DateFormat"] <<= sDateFormat;
aGrabBag[1].Value = uno::makeAny(rContentText); aGrabBag["Locale"] <<= m_sLocale.makeStringAndClear();
aGrabBag[2].Name = "DateFormat"; aGrabBag["CharFormat"] <<= aCharFormat.Value;
aGrabBag[2].Value = uno::makeAny(sDateFormat);
aGrabBag[3].Name = "Locale";
aGrabBag[3].Value = uno::makeAny(m_sLocale.makeStringAndClear());
aGrabBag[4] = aCharFormat;
std::vector<OUString> aItems; 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) void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> xControlModel)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment