summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-27 21:50:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-27 21:50:02 +0100
commitd541c21e72dcd1154562145d189067983f40dc35 (patch)
treef961b06a128841baf5570a5c3f1f7ceb0ec275e9 /sw
parent319df529878026e8c4e449e0f6d6c04e2693ac8e (diff)
ByteString->rtl::OStringBuffer
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/swcache.cxx86
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx9
2 files changed, 62 insertions, 33 deletions
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index fc647aa5d754..8907e9080940 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 ac20c09956b9..ca6a1a4b16ef 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;