summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /sax
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sax')
-rw-r--r--sax/qa/cppunit/xmlimport.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 1ae4a0320a47..261b46f284c3 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -75,7 +75,7 @@ private:
stack<sal_uInt16> m_aCountStack;
OUString canonicalform(const OUString &sName, const OUString &sValue, bool isElement);
- OUString getNamespace(const OUString &sName);
+ OUString getNamespace(std::u16string_view sName);
public:
TestDocumentHandler() {}
@@ -107,12 +107,12 @@ OUString TestDocumentHandler::canonicalform(const OUString &sName, const OUStrin
{
if ( nIndex >= 0 )
{
- OUString sNamespace = getNamespace( sName.copy( 0, nIndex ) );
+ OUString sNamespace = getNamespace( sName.subView( 0, nIndex ) );
return sNamespace + sName.subView(nIndex);
}
else
{
- OUString sDefaultns = getNamespace( "default" );
+ OUString sDefaultns = getNamespace( u"default" );
if ( !isElement || sDefaultns.isEmpty() )
return sName;
else
@@ -122,7 +122,7 @@ OUString TestDocumentHandler::canonicalform(const OUString &sName, const OUStrin
return OUString();
}
-OUString TestDocumentHandler::getNamespace(const OUString &sName)
+OUString TestDocumentHandler::getNamespace(std::u16string_view sName)
{
for (sal_Int16 i = m_aNamespaceStack.size() - 1; i>=0; i--)
{