From 4c1cfdb83fa42ca64c0b64484fe826e45c911603 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 2 Aug 2011 23:40:14 +0100 Subject: make assert useful, tell me the invalid size --- sfx2/source/doc/oleprops.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 #include #include +#include // ============================================================================ @@ -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 -- cgit v1.2.3