summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authormst <mst@openoffice.org>2011-09-17 22:41:28 +0000
committerThorsten Behrens <tbehrens@suse.com>2011-11-29 17:57:29 +0100
commit1b056c65f6d612a00eefe8824c854e4577e4f4be (patch)
tree4f8d0daa2148cfce3bf925e243925969c152354d /comphelper/source
parentc9e1a120fff37a9d87c4e193cec804d2ac909f90 (diff)
fs34c: #i117625# when assigning events, only throw if there is an invalid type given, *not* if the type is correct, but the sequence is merely empty
* found as LGPLv3-only fix at svn rev 1172123 (http://svn.apache.org/viewvc?view=revision&revision=1172123)
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index a9eaccb3223b..85c2883764fd 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -127,6 +127,19 @@ namespace comphelper
}
//--------------------------------------------------------------------
+ bool NamedValueCollection::canExtractFrom( ::com::sun::star::uno::Any const & i_value )
+ {
+ Type const & aValueType = i_value.getValueType();
+ if ( aValueType.equals( ::cppu::UnoType< PropertyValue >::get() )
+ || aValueType.equals( ::cppu::UnoType< NamedValue >::get() )
+ || aValueType.equals( ::cppu::UnoType< Sequence< PropertyValue > >::get() )
+ || aValueType.equals( ::cppu::UnoType< Sequence< NamedValue > >::get() )
+ )
+ return true;
+ return false;
+ }
+
+ //--------------------------------------------------------------------
NamedValueCollection& NamedValueCollection::merge( const NamedValueCollection& _rAdditionalValues, bool _bOverwriteExisting )
{
for ( NamedValueRepository::const_iterator namedValue = _rAdditionalValues.m_pImpl->aValues.begin();