diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-21 15:48:26 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-21 15:48:26 +0000 |
commit | 29080012f4f375c8bd4ab6cbf29de026f949f725 (patch) | |
tree | 0210d745c3c50cc99455990263e1df61e2a551ea /cppu | |
parent | 2f8c141518713a51f972514a372ea121eb62ba56 (diff) |
INTEGRATION: CWS impress23 (1.3.68); FILE MERGED
2004/12/29 11:57:40 dbo 1.3.68.1: #i38957# added Any <<= bool, Any::get<>(), Any::has<>(), tests
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/source/cppu/cppu_opt.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/cppu/source/cppu/cppu_opt.cxx b/cppu/source/cppu/cppu_opt.cxx index 051f8a149..8265bed4b 100644 --- a/cppu/source/cppu/cppu_opt.cxx +++ b/cppu/source/cppu/cppu_opt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cppu_opt.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: obo $ $Date: 2003-09-04 10:52:35 $ + * last change: $Author: kz $ $Date: 2005-01-21 16:48:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,6 +60,7 @@ ************************************************************************/ #include "typelib/typedescription.h" +#include "uno/any2.h" #include "rtl/ustrbuf.hxx" @@ -78,3 +79,20 @@ extern "C" rtl_uString * SAL_CALL cppu_unsatisfied_iquery_msg( rtl_uString_acquire( ret.pData ); return ret.pData; } + +//############################################################################## +extern "C" rtl_uString * SAL_CALL cppu_Any_extraction_failure_msg( + uno_Any * pAny, typelib_TypeDescriptionReference * pType ) + SAL_THROW_EXTERN_C() +{ + OUStringBuffer buf; + buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( + "Cannot extract an Any(") ); + buf.append( OUString::unacquired(&pAny->pType->pTypeName) ); + buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(") to ") ); + buf.append( OUString::unacquired(&pType->pTypeName) ); + buf.append( static_cast<sal_Unicode>('!') ); + const OUString ret( buf.makeStringAndClear() ); + rtl_uString_acquire( ret.pData ); + return ret.pData; +} |