diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 13:55:20 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 13:55:20 +0000 |
commit | 029de919be9d17236d07202bdd5486da8bfc809b (patch) | |
tree | f485ec66017fc99399d18f934da5eb5576a6f315 /comphelper | |
parent | c1574decfacf9b72a868857c20d260b12b7aacc8 (diff) |
INTEGRATION: CWS sdblogging (1.6.18); FILE MERGED
2007/05/22 19:41:12 fs 1.6.18.2: #i10000#
2007/05/22 19:15:57 fs 1.6.18.1: #i76119# +size/empty/remove
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/namedvaluecollection.cxx | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 16dc12118b41..c82688f60f93 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -4,9 +4,9 @@ * * $RCSfile: namedvaluecollection.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: vg $ $Date: 2007-01-15 14:44:35 $ + * last change: $Author: hr $ $Date: 2007-06-27 14:55:20 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -118,11 +118,23 @@ namespace comphelper } //-------------------------------------------------------------------- + size_t NamedValueCollection::size() const + { + return m_pImpl->aValues.size(); + } + + //-------------------------------------------------------------------- + bool NamedValueCollection::empty() const + { + return m_pImpl->aValues.empty(); + } + + //-------------------------------------------------------------------- void NamedValueCollection::impl_assign( const Sequence< Any >& _rArguments ) { { - NamedValueRepository empty; - m_pImpl->aValues.swap( empty ); + NamedValueRepository aEmpty; + m_pImpl->aValues.swap( aEmpty ); } PropertyValue aPropertyValue; @@ -145,8 +157,8 @@ namespace comphelper void NamedValueCollection::impl_assign( const Sequence< PropertyValue >& _rArguments ) { { - NamedValueRepository empty; - m_pImpl->aValues.swap( empty ); + NamedValueRepository aEmpty; + m_pImpl->aValues.swap( aEmpty ); } const PropertyValue* pArgument = _rArguments.getConstArray(); @@ -159,8 +171,8 @@ namespace comphelper void NamedValueCollection::impl_assign( const Sequence< NamedValue >& _rArguments ) { { - NamedValueRepository empty; - m_pImpl->aValues.swap( empty ); + NamedValueRepository aEmpty; + m_pImpl->aValues.swap( aEmpty ); } const NamedValue* pArgument = _rArguments.getConstArray(); @@ -218,6 +230,16 @@ namespace comphelper return ( pos != m_pImpl->aValues.end() ); } + //-------------------------------------------------------------------- + bool NamedValueCollection::impl_remove( const ::rtl::OUString& _rValueName ) + { + NamedValueRepository::iterator pos = m_pImpl->aValues.find( _rValueName ); + if ( pos == m_pImpl->aValues.end() ) + return false; + m_pImpl->aValues.erase( pos ); + return true; + } + //........................................................................ } // namespace comphelper //........................................................................ |