diff options
author | Sébastien Le Ray <sebastien-libreoffice@orniz.org> | 2011-02-12 14:48:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-14 21:15:36 +0000 |
commit | 0e62527585a877bb90b0e4a25bb621b6b3540eb1 (patch) | |
tree | cbda32099ff84d96dbce0cd5dc2e2fec9c32208b /sal/inc | |
parent | b1c6e5c90c8c3b385bb73f4d46b23eea56982c6c (diff) |
Added toString() method to O(U)StringBuffer.
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/rtl/strbuf.hxx | 5 | ||||
-rw-r--r-- | sal/inc/rtl/ustrbuf.hxx | 6 |
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 |