diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 09:35:34 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 09:35:34 +0000 |
commit | a999131e5140c8e61f5268f8adf2491bf9d346fd (patch) | |
tree | 5ccc70d8a129d7f612ac30c44a1a3beef760ff01 /comphelper | |
parent | ae3bfeed0f5ef86365117c877c7834a5858dd36d (diff) |
INTEGRATION: CWS dba31a (1.11.26); FILE MERGED
2008/07/04 20:39:27 fs 1.11.26.1: improved diagnostics for unknown value types
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/namedvaluecollection.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 921e49a2750e..ca182a04e691 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: namedvaluecollection.cxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.12 $ * * This file is part of OpenOffice.org. * @@ -39,6 +39,7 @@ /** === end UNO includes === **/ #include <rtl/ustrbuf.hxx> +#include <rtl/strbuf.hxx> #include <osl/diagnose.h> #include <hash_map> @@ -183,8 +184,15 @@ namespace comphelper m_pImpl->aValues[ aPropertyValue.Name ] = aPropertyValue.Value; else if ( *pArgument >>= aNamedValue ) m_pImpl->aValues[ aNamedValue.Name ] = aNamedValue.Value; - else - OSL_ENSURE( !pArgument->hasValue(), "NamedValueCollection::impl_assign: encountered a value which I cannot handle!" ); +#if OSL_DEBUG_LEVEL > 0 + else if ( pArgument->hasValue() ) + { + ::rtl::OStringBuffer message; + message.append( "NamedValueCollection::impl_assign: encountered a value type which I cannot handle:\n" ); + message.append( ::rtl::OUStringToOString( pArgument->getValueTypeName(), RTL_TEXTENCODING_ASCII_US ) ); + OSL_ENSURE( false, message.makeStringAndClear() ); + } +#endif } } |