summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-04-07 14:09:12 +0200
committersb <sb@openoffice.org>2010-04-07 14:09:12 +0200
commit47d21f39d34919284ded6aa0a6378e3d8340c346 (patch)
tree14cc5bacb48ad54392a0254d3b7400647985062d /comphelper
parentcb5e4d69f0c8539ef8d60d8c5cd3e50bb6acdc2f (diff)
parent4a366e4ee7fdab32d36922554319a0ce9d2a956d (diff)
sb120: merged in re/DEV300_next towards DEV300_m76 via cws/sb118
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/inc/comphelper/namedvaluecollection.hxx7
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx9
2 files changed, 15 insertions, 1 deletions
diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx b/comphelper/inc/comphelper/namedvaluecollection.hxx
index 81aed9171408..72cd0e7cdfbe 100644
--- a/comphelper/inc/comphelper/namedvaluecollection.hxx
+++ b/comphelper/inc/comphelper/namedvaluecollection.hxx
@@ -61,6 +61,8 @@ namespace comphelper
NamedValueCollection( const NamedValueCollection& _rCopySource );
+ NamedValueCollection& operator=( const NamedValueCollection& i_rCopySource );
+
/** constructs a collection
@param _rElements
the wrapped elements of the collection. The <code>Any</code> might contain a sequence of
@@ -104,6 +106,11 @@ namespace comphelper
impl_assign( _rArguments );
}
+ inline void clear()
+ {
+ impl_assign( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() );
+ }
+
/// returns the number of elements in the collection
size_t size() const;
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index 570a85122c96..8bab7fa3d7c7 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -85,7 +85,14 @@ namespace comphelper
NamedValueCollection::NamedValueCollection( const NamedValueCollection& _rCopySource )
:m_pImpl( new NamedValueCollection_Impl )
{
- m_pImpl->aValues = _rCopySource.m_pImpl->aValues;
+ *this = _rCopySource;
+ }
+
+ //--------------------------------------------------------------------
+ NamedValueCollection& NamedValueCollection::operator=( const NamedValueCollection& i_rCopySource )
+ {
+ m_pImpl->aValues = i_rCopySource.m_pImpl->aValues;
+ return *this;
}
//--------------------------------------------------------------------