summaryrefslogtreecommitdiff
path: root/sal/inc/rtl/ustrbuf.hxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-12-10 23:51:22 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-12-10 23:55:20 +0100
commit17b272effc206875fe4165e58d6452f0ecd82222 (patch)
treeed316530d0d2b471e0bd05774bce8fa462510160 /sal/inc/rtl/ustrbuf.hxx
parentc13ad097fb224a2fd110234db7a60f133735dfa6 (diff)
operator+ for stringbuffer
This is to complement the RTL_FAST_STRING variant, which allows any combination, so even two stringbuffers. Change-Id: Ic15d81246b3d0f3e22b51c0516409e95c3a4dc8d
Diffstat (limited to 'sal/inc/rtl/ustrbuf.hxx')
-rw-r--r--sal/inc/rtl/ustrbuf.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index 3814a6f5b96c..d48245beeeb4 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -1298,6 +1298,21 @@ public:
return stripStart(c) + stripEnd(c);
}
+#ifdef LIBO_INTERNAL_ONLY
+ // This is to complement the RTL_FAST_STRING operator+, which allows any combination of valid operands,
+ // even two buffers. It's intentional it returns OUString, just like the operator+ would in the fast variant.
+#ifndef RTL_FAST_STRING
+ /**
+ @internal
+ @since LibreOffice 4.1
+ */
+ friend OUString operator+( const OUStringBuffer& str1, const OUStringBuffer& str2 ) SAL_THROW(())
+ {
+ return OUString( str1.pData ).concat( str2.pData );
+ }
+#endif
+#endif
+
private:
/**
A pointer to the data structur which contains the data.