From 1a969ab932a4d76eabdb867dbc267fece3429ef8 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 10 Oct 2012 13:35:00 +0200 Subject: SVGActionWriter::ImplWriteActions: fix debug code Change-Id: I770e72673d794b4e3e52a199a05f018558b8a3c4 --- filter/source/svg/svgwriter.cxx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'filter') diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index ab7efe341e4b..c80532ba6276 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2933,36 +2933,38 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, "desc", sal_False, sal_False ); - ::rtl::OUString sType = ::rtl::OUString::valueOf( ( (sal_Int32) nType ) ); + OUStringBuffer sType; + sType.append(static_cast(nType)); if( pAction && ( nType == META_COMMENT_ACTION ) ) { - sType += B2UCONST( ": " ); + sType.append(": "); const MetaCommentAction* pA = (const MetaCommentAction*) pAction; rtl::OString sComment = pA->GetComment(); if( !sComment.isEmpty() ) { OUString ssComment = OUString( sComment.getStr(), sComment.getLength(), RTL_TEXTENCODING_UTF8 ); - sType += ssComment; + sType.append(ssComment); } if( sComment.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("FIELD_SEQ_BEGIN")) ) { - const sal_uInt8* pData = NULL; - pData = pA->GetData(); + sal_uInt8 const*const pData = pA->GetData(); if( pData && ( pA->GetDataSize() ) ) { sal_uInt16 sz = (sal_uInt16)( ( pA->GetDataSize() ) / 2 ); if( sz ) { - String sData( ( (const sal_Unicode*) pData ), sz ); - OUString ssData = OUString::valueOf( (sal_Int32) pA->GetDataSize() ); - sType += B2UCONST( "; " ); - sType += sData; + sType.append("; "); + sType.append( + reinterpret_cast(pData), + sz); } } } } - if( !sType.isEmpty() ) - mrExport.GetDocHandler()->characters( sType ); + if (sType.getLength()) + { + mrExport.GetDocHandler()->characters(sType.makeStringAndClear()); + } } catch( ... ) { -- cgit