summaryrefslogtreecommitdiff
path: root/xmlreader
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-02-19 12:41:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-02-19 15:33:17 +0000
commita062799bd6902061895e19cace0099fadf696bb4 (patch)
tree93f21e983895f9ba9d1947851736386a2c541d14 /xmlreader
parentb8da61acb2bb887a7335a5db82b8b5ae1e0fab69 (diff)
add equals(OString const &text) to Span
useful when removing RTL_CONST_STRINGPARAM Change-Id: Ic131876a3fb38e69185342c4c7a46d536d60c8e5 Reviewed-on: https://gerrit.libreoffice.org/2256 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlreader')
-rw-r--r--xmlreader/inc/xmlreader/span.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmlreader/inc/xmlreader/span.hxx b/xmlreader/inc/xmlreader/span.hxx
index 6233b5b0098c..58266e9262d7 100644
--- a/xmlreader/inc/xmlreader/span.hxx
+++ b/xmlreader/inc/xmlreader/span.hxx
@@ -53,6 +53,11 @@ struct OOO_DLLPUBLIC_XMLREADER Span {
return equals(Span(textBegin, textLength));
}
+ inline bool equals(rtl::OString const & text) const {
+ return rtl_str_compare_WithLength(
+ begin, length, text.getStr(), text.getLength()) == 0;
+ }
+
rtl::OUString convertFromUtf8() const;
};