diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-27 12:20:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-27 16:04:46 +0100 |
commit | c9d96e6ac9985f4bf9e899d6d31937bae374c57d (patch) | |
tree | d20bb750e5413e7158522ee57bdfceea46085492 /sal/rtl | |
parent | a32099d4e7163c4bf1136432fbcc1743a35e3f83 (diff) |
add dbg_dumps for string buffers
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/source/debugprint.cxx | 22 |
1 files 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 <rtl/string.hxx> #include <rtl/strbuf.hxx> #include <rtl/ustring.hxx> +#include <rtl/ustrbuf.hxx> const sal_Char *dbg_dump(const rtl::OString &rStr) { - static rtl::OStringBuffer aStr; + return rStr.getStr(); +} + +const sal_Char *dbg_dump(const rtl::OStringBuffer &rStrBuf) +{ + return rStrBuf.getStr(); +} - aStr = rtl::OStringBuffer(rStr); - aStr.append(static_cast<char>(0)); - return aStr.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: */ |