[Libreoffice-commits] .: editeng/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jul 7 04:23:33 PDT 2011


 editeng/source/editeng/editdbg.cxx  |   22 ++++++++++++----------
 editeng/source/editeng/editdbg.hxx  |    2 +-
 editeng/source/editeng/impedit4.cxx |   12 ++++++++----
 3 files changed, 21 insertions(+), 15 deletions(-)

New commits:
commit 60e6181711768149b139e2b321142da9e131f80b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 7 10:58:48 2011 +0100

    ByteString->rtl::OString

diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 2b22328..a8954ce 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -65,6 +65,8 @@
 #include <editdoc.hxx>
 #include <editdbg.hxx>
 
+#include <rtl/strbuf.hxx>
+
 #if defined( DBG_UTIL ) || ( OSL_DEBUG_LEVEL > 1 )
 
 ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
@@ -536,20 +538,20 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
     return aDebStr;
 }
 
-ByteString EditDbg::GetTextPortionInfo( TextPortionList& rPortions )
+rtl::OString EditDbg::GetTextPortionInfo(TextPortionList& rPortions)
 {
-    ByteString aDebStr;
-    for ( sal_uInt16 z = 0; z < rPortions.Count(); z++ )
+    rtl::OStringBuffer aDebStr;
+    for (sal_uInt16 z = 0; z < rPortions.Count(); ++z)
     {
         TextPortion* pPortion = rPortions.GetObject( z );
-        aDebStr += " ";
-        aDebStr += ByteString::CreateFromInt32( pPortion->GetLen() );
-        aDebStr += "(";
-        aDebStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
-        aDebStr += ")";
-        aDebStr += ";";
+        aDebStr.append(' ');
+        aDebStr.append(static_cast<sal_Int32>(pPortion->GetLen()));
+        aDebStr.append('(');
+        aDebStr.append(static_cast<sal_Int32>(pPortion->GetSize().Width()));
+        aDebStr.append(')');
+        aDebStr.append(';');
     }
-    return aDebStr;
+    return aDebStr.makeStringAndClear();
 }
 
 void EditDbg::ShowPortionData( ParaPortion* pPortion )
diff --git a/editeng/source/editeng/editdbg.hxx b/editeng/source/editeng/editdbg.hxx
index 041d3b3..c131707 100644
--- a/editeng/source/editeng/editdbg.hxx
+++ b/editeng/source/editeng/editdbg.hxx
@@ -50,7 +50,7 @@ public:
     static void			ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True );
     static void			ShowPortionData( ParaPortion* pPortion );
     static ByteString	GetPortionInfo( ParaPortion* pPPortion );
-    static ByteString	GetTextPortionInfo( TextPortionList& rPortions );
+    static rtl::OString GetTextPortionInfo(TextPortionList& rPortions);
     static ByteString	GetUndoDebStr( EditUndoList* pUndoList );
 };
 
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 04d6131..e5b0841 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -980,13 +980,17 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
             }
             // SWG:
             if ( nEsc )
-                rOutput << "{\\*\\updnprop" << ByteString::CreateFromInt32( nProp100 ).GetBuffer() << '}';
+            {
+                rOutput << "{\\*\\updnprop" << rtl::OString::valueOf(
+                    static_cast<sal_Int32>(nProp100)).getStr() << '}';
+            }
             long nUpDown = nFontHeight * Abs( nEsc ) / 100;
-            ByteString aUpDown = ByteString::CreateFromInt32( nUpDown );
+            rtl::OString aUpDown = rtl::OString::valueOf(
+                static_cast<sal_Int32>(nUpDown));
             if ( nEsc < 0 )
-                rOutput << OOO_STRING_SVTOOLS_RTF_DN << aUpDown.GetBuffer();
+                rOutput << OOO_STRING_SVTOOLS_RTF_DN << aUpDown.getStr();
             else if ( nEsc > 0 )
-                rOutput << OOO_STRING_SVTOOLS_RTF_UP << aUpDown.GetBuffer();
+                rOutput << OOO_STRING_SVTOOLS_RTF_UP << aUpDown.getStr();
         }
         break;
     }


More information about the Libreoffice-commits mailing list