[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jul 28 01:07:00 PDT 2011


 sw/source/core/bastyp/swcache.cxx |   86 +++++++++++++++++++++++++-------------
 sw/source/ui/uiview/viewsrch.cxx  |    9 ++-
 2 files changed, 62 insertions(+), 33 deletions(-)

New commits:
commit 49707cf4fb3993b13f9fe001a5f19e33fb8155e5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 27 21:50:02 2011 +0100

    ByteString->rtl::OStringBuffer

diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 2c63b26..5e1fb44 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -126,35 +126,63 @@ SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize
 SwCache::~SwCache()
 {
     {
-        ByteString sOut( aName ); sOut += '\n';
-        (( sOut += "Number of new entries:                 " )
-                    += ByteString::CreateFromInt32( nAppend ))+= '\n';
-        (( sOut += "Number of insert on free places:       " )
-                    += ByteString::CreateFromInt32( nInsertFree ))+= '\n';
-        (( sOut += "Number of replacements:                " )
-                    += ByteString::CreateFromInt32( nReplace ))+= '\n';
-        (( sOut += "Number of successful Get's:            " )
-                    += ByteString::CreateFromInt32( nGetSuccess ))+= '\n';
-        (( sOut += "Number of failed Get's:                " )
-                    += ByteString::CreateFromInt32( nGetFail ))+= '\n';
-        (( sOut += "Number or reordering (LRU):            " )
-                    += ByteString::CreateFromInt32( nToTop ))+= '\n';
-        (( sOut += "Number of suppressions:                " )
-                    += ByteString::CreateFromInt32( nDelete ))+= '\n';
-        (( sOut += "Number of Get's without Index:         " )
-                    += ByteString::CreateFromInt32( nGetSeek ))+= '\n';
-        (( sOut += "Number of Seek for Get without Index:  " )
-                    += ByteString::CreateFromInt32( nAverageSeekCnt ))+= '\n';
-        (( sOut += "Number of Flush calls:                 " )
-                    += ByteString::CreateFromInt32( nFlushCnt ))+= '\n';
-        (( sOut += "Number of flushed objects:             " )
-                    += ByteString::CreateFromInt32( nFlushedObjects ))+= '\n';
-        (( sOut += "Number of Cache expansions:            " )
-                    += ByteString::CreateFromInt32( nIncreaseMax ))+= '\n';
-        (( sOut += "Number of Cache reductions:            " )
-                    += ByteString::CreateFromInt32( nDecreaseMax ))+= '\n';
-
-        OSL_TRACE( sOut.GetBuffer() );
+        rtl::OStringBuffer sOut(aName);
+
+        sOut.append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of new entries:                 ")).
+            append(static_cast<sal_Int32>(nAppend)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of insert on free places:       ")).
+            append(static_cast<sal_Int32<(nInsertFree)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of replacements:                ")).
+            append(static_cast<sal_Int32>(nReplace)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of successful Get's:            ")).
+            append(static_cast<sal_Int32>(nGetSuccess)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of failed Get's:                ")).
+            append(static_cast<sal_Int32>(nGetFail)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number or reordering (LRU):            ")).
+            append(static_cast<sal_Int32>(nToTop)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of suppressions:                ")).
+            append(static_cast<sal_Int32>(nDelete)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of Get's without Index:         ")).
+            append(static_cast<sal_Int32>(nGetSeek)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of Seek for Get without Index:  ")).
+            append(static_cast<sal_Int32>(nAverageSeekCnt)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of Flush calls:                 " )).
+            append(static_cast<sal_Int32>(nFlushCnt)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of flushed objects:             ")).
+            append(static_cast<sal_Int32>(nFlushedObjects)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of Cache expansions:            ")).
+            append(static_cast<sal_Int32>(nIncreaseMax)).
+            append('\n').
+            append(RTL_CONSTASCII_STRINGPARAM(
+                "Number of Cache reductions:            ")).
+            append(static_cast<sal_Int32>(nDecreaseMax)).
+            append('\n');
+
+        OSL_TRACE(sOut.getStr());
     }
     Check();
 }
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 8865a5b..c127e9c 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -413,10 +413,11 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
 #if OSL_DEBUG_LEVEL > 1
             if(nSlot)
             {
-                ByteString sStr( "nSlot: " );
-                sStr += ByteString::CreateFromInt32( nSlot );
-                sStr += " wrong Dispatcher (viewsrch.cxx)";
-                OSL_FAIL(sStr.GetBuffer() );
+                rtl::OStringBuffer sStr(RTL_CONSTASCII_STRINGPARAM("nSlot: "));
+                sStr.append(static_cast<sal_Int32>(nSlot));
+                sStr.append(RTL_CONSTASCII_STRINGPARAM(
+                    " wrong Dispatcher (viewsrch.cxx)"));
+                OSL_FAIL(sStr.getStr());
             }
 #endif
             return;


More information about the Libreoffice-commits mailing list