summaryrefslogtreecommitdiff
path: root/xmloff/source/transform/EventOASISTContext.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-11 22:24:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:42:15 +0200
commitcbaf1fbaa6e707d939f815eda360fad68a492aca (patch)
tree20b3dfeac257130afb01572b2c117b7840d07007 /xmloff/source/transform/EventOASISTContext.cxx
parentf751417b77e6573a0c639778e76ec943449f4573 (diff)
loplugin:stringview more o3tl conversion
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/transform/EventOASISTContext.cxx')
-rw-r--r--xmloff/source/transform/EventOASISTContext.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index 21e3476ef8da..ea922b7ff074 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -27,6 +27,7 @@
#include "TransformerBase.hxx"
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
// Used to parse Scripting Framework URLs
#include <com/sun/star/uri/UriReferenceFactory.hpp>
@@ -287,16 +288,14 @@ void XMLEventOASISTransformerContext::StartElement(
const OUString& rDoc = GetXMLToken( XML_DOCUMENT );
OUString aAttrValue;
if( rAttrValue.getLength() > rApp.getLength()+1 &&
- rAttrValue.copy(0,rApp.getLength()).
- equalsIgnoreAsciiCase( rApp ) &&
+ o3tl::equalsIgnoreAsciiCase(rAttrValue.subView(0,rApp.getLength()), rApp) &&
':' == rAttrValue[rApp.getLength()] )
{
aLocation = rApp;
aAttrValue = rAttrValue.copy( rApp.getLength()+1 );
}
else if( rAttrValue.getLength() > rDoc.getLength()+1 &&
- rAttrValue.copy(0,rDoc.getLength()).
- equalsIgnoreAsciiCase( rDoc ) &&
+ o3tl::equalsIgnoreAsciiCase(rAttrValue.subView(0,rDoc.getLength()), rDoc) &&
':' == rAttrValue[rDoc.getLength()] )
{
aLocation= rDoc;