diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-25 08:14:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-30 12:32:14 +0100 |
commit | 8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch) | |
tree | dd45d452202998297b8562743ea6345462304d04 /sax/qa | |
parent | d05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff) |
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sax/qa')
-rw-r--r-- | sax/qa/cppunit/xmlimport.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index 261b46f284c3..6ef6c81626cd 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -211,14 +211,14 @@ public: virtual void SAL_CALL setDocumentLocator( const Reference< XLocator >& /* xLocator */ ) override {} }; -OUString getNamespaceValue( const OUString& rNamespacePrefix ) +OUString getNamespaceValue( std::u16string_view rNamespacePrefix ) { OUString aNamespaceURI; - if (rNamespacePrefix == "office") + if (rNamespacePrefix == u"office") aNamespaceURI = "urn:oasis:names:tc:opendocument:xmlns:office:1.0"; - else if (rNamespacePrefix == "text") + else if (rNamespacePrefix == u"text") aNamespaceURI = "urn:oasis:names:tc:opendocument:xmlns:text:1.0"; - else if (rNamespacePrefix == "note") + else if (rNamespacePrefix == u"note") aNamespaceURI = "urn:oasis:names:tc:opendocument:xmlns:text:1.0"; return aNamespaceURI; } @@ -230,7 +230,7 @@ OUString resolveNamespace( const OUString& aName ) { if ( aName.getLength() > index + 1 ) { - OUString aAttributeName = getNamespaceValue( aName.copy( 0, index ) ) + + OUString aAttributeName = getNamespaceValue( aName.subView( 0, index ) ) + ":" + aName.subView( index + 1 ); return aAttributeName; } |