diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-12-12 12:37:14 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-12-12 12:37:14 +0000 |
commit | 508e0b1e293ada6320bc0385d16ef5fcaa5a5bf5 (patch) | |
tree | 431714d2b33effebf1c004fbc28ee108ccdc3c92 /comphelper/source | |
parent | 2239821d54cfe7868c08219ada8cf02d67c63589 (diff) |
CWS-TOOLING: integrate CWS dba301b_DEV300
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/property/propagg.cxx | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 3102bc97c77d..eb3a10b3dd28 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -36,6 +36,11 @@ #include <osl/diagnose.h> #include <com/sun/star/beans/PropertyAttribute.hpp> +#if OSL_DEBUG_LEVEL > 0 +#include <typeinfo.h> +#include <rtl/strbuf.hxx> +#endif + #include <algorithm> #include <set> @@ -708,7 +713,26 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues( if (!m_xAggregateSet.is()) OPropertySetHelper::setPropertyValues(_rPropertyNames, _rValues); else if (_rPropertyNames.getLength() == 1) // use the more efficient way - setPropertyValue(_rPropertyNames.getConstArray()[0], _rValues.getConstArray()[0]); + { + try + { + setPropertyValue( _rPropertyNames[0], _rValues[0] ); + } + catch( const UnknownPropertyException& ) + { + // by definition of XMultiPropertySet::setPropertyValues, unknown properties are to be ignored + #if OSL_DEBUG_LEVEL > 0 + ::rtl::OStringBuffer aMessage; + aMessage.append( "OPropertySetAggregationHelper::setPropertyValues: unknown property '" ); + aMessage.append( ::rtl::OUStringToOString( _rPropertyNames[0], RTL_TEXTENCODING_ASCII_US ) ); + aMessage.append( "'" ); + aMessage.append( "\n(implementation " ); + aMessage.append( typeid( *this ).name() ); + aMessage.append( ")" ); + OSL_ENSURE( false, aMessage.getStr() ); + #endif + } + } else { OPropertyArrayAggregationHelper& rPH = static_cast< OPropertyArrayAggregationHelper& >( getInfoHelper() ); |