summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-10-10 13:35:00 +0200
committerMichael Stahl <mstahl@redhat.com>2012-10-10 13:35:00 +0200
commit1a969ab932a4d76eabdb867dbc267fece3429ef8 (patch)
treebd1507812db3ab210739171aa5579402567f1b7c /filter/source
parentfef9d3090f7abd4371e7b7da61a5f959c208f0c1 (diff)
SVGActionWriter::ImplWriteActions: fix debug code
Change-Id: I770e72673d794b4e3e52a199a05f018558b8a3c4
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/svg/svgwriter.cxx24
1 files changed, 13 insertions, 11 deletions
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<sal_Int32>(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<sal_Unicode const*>(pData),
+ sz);
}
}
}
}
- if( !sType.isEmpty() )
- mrExport.GetDocHandler()->characters( sType );
+ if (sType.getLength())
+ {
+ mrExport.GetDocHandler()->characters(sType.makeStringAndClear());
+ }
}
catch( ... )
{