summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-06-08 08:12:00 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-06-08 12:31:12 +0200
commit9e87a00e11486a2be64b0dc2799e3efca4b000cc (patch)
treefc51315cd5e52b4e5a6264da7fc8c9eede90e6f5 /include
parent8c59cfb6aad60c06271ac7ae3c124132bdf223c9 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/propertyvalue.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/comphelper/propertyvalue.hxx b/include/comphelper/propertyvalue.hxx
index ba442c12a931..185d6d1e29d0 100644
--- a/include/comphelper/propertyvalue.hxx
+++ b/include/comphelper/propertyvalue.hxx
@@ -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