Kaydet (Commit) 9e87a00e authored tarafından Miklos Vajna's avatar Miklos Vajna

oox: replace PUT_PROP macro with comphelper::makePropertyValue() calls

This way it's not necessary to state the size of the array in advance,
which is kind of redundant. It's also easy to forget to adjust it when
adding new elements.

Change-Id: I5fe24fd24954afb69ead014941b8f8b90bcaeac3
üst 8c59cfb6
......@@ -30,6 +30,18 @@ template<typename T> css::beans::PropertyValue makePropertyValue(const OUString&
return aValue;
}
/**
* Overload for uno::Any where an additional toAny() is not needed (and is
* actually a deleted function).
*/
template<> inline css::beans::PropertyValue makePropertyValue(const OUString& rName, const css::uno::Any& rValue)
{
css::beans::PropertyValue aValue;
aValue.Name = rName;
aValue.Value = rValue;
return aValue;
}
}
#endif // INCLUDED_COMPHELPER_PROPERTYVALUE_HXX
......
This diff is collapsed.
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