diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-12 16:00:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-12 16:05:32 +0200 |
commit | 802f2a420859f6787c86a960aa331245423d5820 (patch) | |
tree | 7bb46760ca0371c958a4a36c966d253f2c59383c /include | |
parent | e510e9893d5ce99c8dfa9478d6972469fcc339d2 (diff) |
Don't allow O[U]StringBuffer in string concatenation
...as
OStringBuffer b("foo"); b = "bar" + b;
doesn't work as one might expect (see the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2016-October/075464.html>
"concat of OUStringBuffer". That feature was LIBO_INTERNAL_ONLY, anyway. And
of the affected places, MethodDescriptor::getSignature
(codemaker/source/javamaker/javatype.cxx) was the only one that would actually
have benefitted.
Change-Id: Ib84266f43e40c42c2e428f0c0616db8cfa90adff
Diffstat (limited to 'include')
-rw-r--r-- | include/rtl/strbuf.hxx | 15 | ||||
-rw-r--r-- | include/rtl/ustrbuf.hxx | 14 |
2 files changed, 0 insertions, 29 deletions
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index 0fc3284a89f9..90bf41b6fd54 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -995,21 +995,6 @@ private: sal_Int32 nCapacity; }; -#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" -/** - @internal -*/ -template<> -struct ToStringHelper< OStringBuffer > - { - static int length( const OStringBuffer& s ) { return s.getLength(); } - static char* addData( char* buffer, const OStringBuffer& s ) { return addDataHelper( buffer, s.getStr(), s.getLength()); } - static const bool allowOStringConcat = true; - static const bool allowOUStringConcat = false; - }; -#endif - - } #ifdef RTL_STRING_UNITTEST diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index ecae7f03e129..07188a73921e 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -1561,20 +1561,6 @@ private: sal_Int32 nCapacity; }; -#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" -/** - @internal -*/ -template<> -struct ToStringHelper< OUStringBuffer > - { - static int length( const OUStringBuffer& s ) { return s.getLength(); } - static sal_Unicode* addData( sal_Unicode* buffer, const OUStringBuffer& s ) { return addDataHelper( buffer, s.getStr(), s.getLength()); } - static const bool allowOStringConcat = false; - static const bool allowOUStringConcat = true; - }; -#endif - } #ifdef RTL_STRING_UNITTEST |