From c9d96e6ac9985f4bf9e899d6d31937bae374c57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 27 Oct 2010 12:20:32 +0100 Subject: [PATCH] add dbg_dumps for string buffers --- sal/rtl/source/debugprint.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sal/rtl/source/debugprint.cxx b/sal/rtl/source/debugprint.cxx index 625efc30055c..079643b07fd4 100644 --- a/sal/rtl/source/debugprint.cxx +++ b/sal/rtl/source/debugprint.cxx @@ -29,16 +29,24 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" +#include #include #include +#include const sal_Char *dbg_dump(const rtl::OString &rStr) { - static rtl::OStringBuffer aStr; + return rStr.getStr(); +} - aStr = rtl::OStringBuffer(rStr); - aStr.append(static_cast(0)); - return aStr.getStr(); +const sal_Char *dbg_dump(const rtl::OStringBuffer &rStrBuf) +{ + return rStrBuf.getStr(); +} + +const sal_Char *dbg_dump(rtl_String *pStr) +{ + return rtl_string_getStr(pStr); } const sal_Char *dbg_dump(const rtl::OUString &rStr) @@ -46,9 +54,9 @@ const sal_Char *dbg_dump(const rtl::OUString &rStr) return dbg_dump(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_UTF8)); } -const sal_Char *dbg_dump(rtl_String *pStr) +const sal_Char *dbg_dump(const rtl::OUStringBuffer &rStrBuf) { - return dbg_dump(rtl::OString(pStr)); + return dbg_dump(rtl::OUString(rStrBuf.getStr())); } const sal_Char *dbg_dump(rtl_uString *pStr) @@ -56,6 +64,4 @@ const sal_Char *dbg_dump(rtl_uString *pStr) return dbg_dump(rtl::OUString(pStr)); } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */