Kaydet (Commit) d9dde5e5 authored tarafından Caolán McNamara's avatar Caolán McNamara

improve Sttb dumping for truncated case

Change-Id: Ie4c1d01540274e3782487d376168f561766b7a39
üst a52028d5
......@@ -458,9 +458,10 @@ public:
OUString getStringAtIndex( sal_uInt32 );
};
Sttb::Sttb() : fExtend( 0 )
,cData( 0 )
,cbExtra( 0 )
Sttb::Sttb()
: fExtend(0)
, cData(0)
, cbExtra(0)
{
}
......@@ -499,8 +500,12 @@ void Sttb::Print( FILE* fp )
if ( cData )
{
for ( sal_Int32 index = 0; index < cData; ++index )
for (sal_Int32 index = 0; index < cData; ++index)
{
if (index >= dataItems.size())
fprintf(fp, " Sttb truncated at entry %d(0x%x)\n", static_cast< int >( index ), static_cast< unsigned int >( index ));
fprintf(fp," string dataItem[ %d(0x%x) ] has name %s\n", static_cast< int >( index ), static_cast< unsigned int >( index ), OUStringToOString( dataItems[ index ].data, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment