summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-08 17:45:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-08 17:45:08 +0200
commit9222f5d065bb2aafcfef93e77c58a82672a9ad22 (patch)
tree0dfad9f13099a73ecf3893e9cbdd5020b55cd7b3 /include/comphelper
parentc4dca26eafd60dc4c4f19e0be0b8e086108b3048 (diff)
A UNO Any can't contain an Any
...and css::uno::makeAny<css::uno::Any>() was never meant to be used. Introduce css::uno::toAny for the (template-code) cases that shall return an Any for both Any and non-Any inputs. Change-Id: Ifa977d73f1da71b2fedde7e8140b19497c4a0257
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/sequence.hxx3
-rw-r--r--include/comphelper/sequenceashashmap.hxx2
2 files changed, 2 insertions, 3 deletions
diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx
index f09ff1c67af1..fcaab6b48c78 100644
--- a/include/comphelper/sequence.hxx
+++ b/include/comphelper/sequence.hxx
@@ -198,10 +198,9 @@ namespace comphelper
template <class TYPE>
inline ::com::sun::star::uno::Any OSequenceIterator<TYPE>::nextElement()
{
- return ::com::sun::star::uno::makeAny(*m_pCurrent++);
+ return ::com::sun::star::uno::toAny(*m_pCurrent++);
}
-
/** Copy from a plain C/C++ array into a Sequence.
@tpl SrcType
diff --git a/include/comphelper/sequenceashashmap.hxx b/include/comphelper/sequenceashashmap.hxx
index 801d2d19a1fd..32e67b784257 100644
--- a/include/comphelper/sequenceashashmap.hxx
+++ b/include/comphelper/sequenceashashmap.hxx
@@ -265,7 +265,7 @@ class COMPHELPER_DLLPUBLIC SequenceAsHashMap : public SequenceAsHashMapBase
{
if (find(sKey) == end())
{
- (*this)[sKey] = ::com::sun::star::uno::makeAny(aValue);
+ (*this)[sKey] = ::com::sun::star::uno::toAny(aValue);
return true;
}