diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-11 22:24:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-12 12:42:15 +0200 |
commit | cbaf1fbaa6e707d939f815eda360fad68a492aca (patch) | |
tree | 20b3dfeac257130afb01572b2c117b7840d07007 /xmloff/source/script/XMLStarBasicContextFactory.cxx | |
parent | f751417b77e6573a0c639778e76ec943449f4573 (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/script/XMLStarBasicContextFactory.cxx')
-rw-r--r-- | xmloff/source/script/XMLStarBasicContextFactory.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx index eec6ded9f207..e26198978596 100644 --- a/xmloff/source/script/XMLStarBasicContextFactory.cxx +++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx @@ -24,6 +24,7 @@ #include <xmloff/namespacemap.hxx> #include <xmloff/xmlnamespace.hxx> #include <xmloff/xmltoken.hxx> +#include <o3tl/string_view.hxx> using namespace ::xmloff::token; @@ -66,14 +67,14 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext( const OUString& rApp = GetXMLToken( XML_APPLICATION ); const OUString& rDoc = GetXMLToken( XML_DOCUMENT ); if( sMacroNameVal.getLength() > rApp.getLength()+1 && - sMacroNameVal.copy(0,rApp.getLength()).equalsIgnoreAsciiCase( rApp ) && + o3tl::equalsIgnoreAsciiCase(sMacroNameVal.subView(0,rApp.getLength()), rApp ) && ':' == sMacroNameVal[rApp.getLength()] ) { sLibraryVal = "StarOffice"; sMacroNameVal = sMacroNameVal.copy( rApp.getLength()+1 ); } else if( sMacroNameVal.getLength() > rDoc.getLength()+1 && - sMacroNameVal.copy(0,rDoc.getLength()).equalsIgnoreAsciiCase( rDoc ) && + o3tl::equalsIgnoreAsciiCase(sMacroNameVal.subView(0,rDoc.getLength()), rDoc ) && ':' == sMacroNameVal[rDoc.getLength()] ) { sLibraryVal = rDoc; |