summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/rtl/strbuf.hxx5
-rw-r--r--sal/inc/rtl/ustrbuf.hxx6
2 files changed, 11 insertions, 0 deletions
diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index b45c0ae37523..ed3ea2c1b637 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -275,6 +275,11 @@ public:
*/
const sal_Char* getStr() const { return pData->buffer; }
+ /**
+ Return a OString instance reflecting the current content
+ of this OStringBuffer.
+ */
+ const OString toString() const { return OString(pData->buffer); }
/**
The character at the specified index of this string buffer is set
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index 94b7469433e6..3f3498aa2ecf 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -274,6 +274,12 @@ public:
*/
const sal_Unicode* getStr() const { return pData->buffer; }
+ /**
+ Return a OUString instance reflecting the current content
+ of this OUStringBuffer.
+ */
+ const OUString toString() const { return OUString(pData->buffer); }
+
/**
The character at the specified index of this string buffer is set