Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3799

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/99/3799/1

Drop String.AppendAscii from filter

Change-Id: I73f61b9a20297b6b704aca52b1fc9efac563a224
---
M filter/source/graphicfilter/ieps/ieps.cxx
M filter/source/pdf/pdfexport.cxx
2 files changed, 20 insertions(+), 20 deletions(-)



diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 0ba2dae..5a8fa51 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -404,7 +404,7 @@
     Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) );
     aVDev.DrawRect( aRect );
 
-    String aString;
+    OUString aString;
     int nLen;
     sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%Title:", nBytesRead - 32, 8 );
     if ( pDest )
@@ -416,9 +416,9 @@
         sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
         if ( strcmp( (const char*)pDest, "none" ) != 0 )
         {
-            aString.AppendAscii( " Title:" );
-            aString.AppendAscii( (char*)pDest );
-            aString.AppendAscii( "\n" );
+            aString += " Title:";
+            aString += OUString::createFromAscii( (char*)pDest );
+            aString += "\n";
         }
         pDest[ nLen ] = aOldValue;
     }
@@ -430,9 +430,9 @@
             pDest++;
         nLen = ImplGetLen( pDest, 32 );
         sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
-        aString.AppendAscii( " Creator:" );
-        aString.AppendAscii( (char*)pDest );
-        aString.AppendAscii( "\n" );
+        aString += " Creator:";
+        aString += OUString::createFromAscii( (char*)pDest );
+        aString += "\n";
         pDest[ nLen ] = aOldValue;
     }
     pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%CreationDate:", nBytesRead - 32, 15 );
@@ -445,9 +445,9 @@
         sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
         if ( strcmp( (const char*)pDest, "none" ) != 0 )
         {
-            aString.AppendAscii( " CreationDate:" );
-            aString.AppendAscii( (char*)pDest );
-            aString.AppendAscii( "\n" );
+            aString += " CreationDate:";
+            aString += OUString::createFromAscii( (char*)pDest );
+            aString += "\n";
         }
         pDest[ nLen ] = aOldValue;
     }
@@ -459,8 +459,8 @@
         long nNumber = ImplGetNumber( &pDest, nCount );
         if ( nCount && ( (sal_uInt32)nNumber < 10 ) )
         {
-            aString.AppendAscii( " LanguageLevel:" );
-            aString.Append( OUString::valueOf( nNumber ) );
+            aString += " LanguageLevel:";
+            aString += OUString::valueOf( nNumber );
         }
     }
     aVDev.DrawText( aRect, aString, TEXT_DRAW_CLIP | TEXT_DRAW_MULTILINE );
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index c6e2648..23eea97 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -400,20 +400,20 @@
 
 
             // getting the string for the creator
-            String aCreator;
+            OUString aCreator;
             Reference< XServiceInfo > xInfo( mxSrcDoc, UNO_QUERY );
             if ( xInfo.is() )
             {
                 if ( xInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) )
-                    aCreator.AppendAscii( "Impress" );
+                    aCreator += "Impress";
                 else if ( xInfo->supportsService( "com.sun.star.drawing.DrawingDocument" ) )
-                    aCreator.AppendAscii( "Draw" );
+                    aCreator += "Draw";
                 else if ( xInfo->supportsService( "com.sun.star.text.TextDocument" ) )
-                    aCreator.AppendAscii( "Writer" );
+                    aCreator += "Writer";
                 else if ( xInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
-                    aCreator.AppendAscii( "Calc" );
+                    aCreator += "Calc";
                 else if ( xInfo->supportsService( "com.sun.star.formula.FormulaProperties"  ) )
-                    aCreator.AppendAscii( "Math" );
+                    aCreator += "Math";
             }
 
             Reference< document::XDocumentPropertiesSupplier > xDocumentPropsSupplier( mxSrcDoc, 
UNO_QUERY );
@@ -846,7 +846,7 @@
                   OUString sShowOnlineLayout( "ShowOnlineLayout" );
                   uno::Reference< beans::XPropertySet > xViewProperties;
 
-                if ( aCreator.EqualsAscii( "Writer" ) )
+                if ( aCreator.equalsAscii( "Writer" ) )
                 {
                     //i92835 if Writer is in web layout mode this has to be switched to normal 
view and back to web view in the end
                     try
@@ -867,7 +867,7 @@
 
                 const sal_Int32 nPageCount = xRenderable->getRendererCount( aSelection, 
aRenderOptions );
 
-                if ( mbExportNotesPages && aCreator.EqualsAscii( "Impress" ) )
+                if ( mbExportNotesPages && aCreator.equalsAscii( "Impress" ) )
                 {
                     uno::Reference< drawing::XShapes > xShapes;     // sj: do not allow to export 
notes when
                     if ( ! ( aSelection >>= xShapes ) )             // exporting a selection -> 
todo: in the dialog

-- 
To view, visit https://gerrit.libreoffice.org/3799
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73f61b9a20297b6b704aca52b1fc9efac563a224
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ricardo Montania <ricardo@linuxafundo.com.br>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.