diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-07 13:07:28 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-08 15:44:34 -0400 |
commit | ee8fad644e28d1e298afb7c6eed4d454617e7dc7 (patch) | |
tree | 4322f6186d17fa14f3ce2ff3cfef024238bb88bd /svl/source/misc/sharedstring.cxx | |
parent | 80df5277585d69be5c3d5f32184db94831113f95 (diff) |
ContentInfo to store svl::SharedString instead of OUString.
Change-Id: I633e3bb633317eeb61cd804faf20e79312f569f7
Diffstat (limited to 'svl/source/misc/sharedstring.cxx')
-rw-r--r-- | svl/source/misc/sharedstring.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/svl/source/misc/sharedstring.cxx b/svl/source/misc/sharedstring.cxx index d5b27bdf0d10..7286cba37a2d 100644 --- a/svl/source/misc/sharedstring.cxx +++ b/svl/source/misc/sharedstring.cxx @@ -56,6 +56,23 @@ SharedString& SharedString::operator= ( const SharedString& r ) return *this; } +bool SharedString::operator== ( const SharedString& r ) const +{ + // Only compare case sensitive strings. + if (mpData) + { + if (!r.mpData) + return false; + + if (mpData->length != r.mpData->length) + return false; + + return rtl_ustr_compare_WithLength(mpData->buffer, mpData->length, r.mpData->buffer, r.mpData->length); + } + + return !r.mpData; +} + rtl_uString* SharedString::getData() { return mpData; |