diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-17 15:14:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-17 18:16:28 +0200 |
commit | 3ebbb150242cf049a9ddab7f498c63f3a44aa034 (patch) | |
tree | 3bdf235f490b173919369e7062570322effa795d /include/rtl | |
parent | 73df133143daaff14c364468598bb250db6aecb1 (diff) |
loplugin:buffereadd find stuff involving adding *StringBuffer
and create conversion methods on *StringBuffer to make this work
Change-Id: I3cf5ee3e139826168894b46eff8ee4bcde00cb7e
Reviewed-on: https://gerrit.libreoffice.org/80949
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/strbuf.hxx | 7 | ||||
-rw-r--r-- | include/rtl/ustrbuf.hxx | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index afead770298d..ffb67d25c42d 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -1035,6 +1035,13 @@ public: *pInternalCapacity = &nCapacity; } +#if defined LIBO_INTERNAL_ONLY + operator OStringView() const + { + return OStringView(getStr(), getLength()); + } +#endif + private: /** A pointer to the data structure which contains the data. diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index 1f12ef9caeb9..1d73a7fbd843 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -1634,6 +1634,13 @@ public: return OUStringBuffer( pNew, count + 16 ); } +#if defined LIBO_INTERNAL_ONLY + operator OUStringView() const + { + return OUStringView(getStr(), getLength()); + } +#endif + private: OUStringBuffer( rtl_uString * value, const sal_Int32 capacity ) { |