[Libreoffice-commits] .: filter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 10 04:37:29 PDT 2012


 filter/source/svg/svgwriter.cxx |   24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 1a969ab932a4d76eabdb867dbc267fece3429ef8
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Oct 10 13:35:00 2012 +0200

    SVGActionWriter::ImplWriteActions: fix debug code
    
    Change-Id: I770e72673d794b4e3e52a199a05f018558b8a3c4

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index ab7efe3..c80532b 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( ... )
             {


More information about the Libreoffice-commits mailing list