summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-02 23:40:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-03 10:33:56 +0100
commit4c1cfdb83fa42ca64c0b64484fe826e45c911603 (patch)
tree0fc33591ac54edfc129c5bd8c230657c47dc71aa
parent1d2c51738bcc782a309455fa39f8b9baba3c9edc (diff)
make assert useful, tell me the invalid size
-rw-r--r--sfx2/source/doc/oleprops.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 3b133eaf4b..a21ce53a8c 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -35,6 +35,7 @@
#include <tools/debug.hxx>
#include <tools/datetime.hxx>
#include <rtl/tencinfo.h>
+#include <rtl/strbuf.hxx>
// ============================================================================
@@ -300,7 +301,10 @@ String SfxOleStringHelper::ImplLoadString8( SvStream& rStrm ) const
sal_Int32 nSize(0);
rStrm >> nSize;
// size field includes trailing NUL character
- DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF), "SfxOleStringHelper::ImplLoadString8 - invalid string" );
+ DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF),
+ rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM(
+ "SfxOleStringHelper::ImplLoadString8 - invalid string of len ")).
+ append(nSize).getStr() );
if( (0 < nSize) && (nSize <= 0xFFFF) )
{
// load character buffer