summaryrefslogtreecommitdiff
path: root/xmlsecurity
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 /xmlsecurity
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 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/xsecctl.hxx2
-rw-r--r--xmlsecurity/source/component/certificatecontainer.cxx12
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx2
3 files changed, 8 insertions, 8 deletions
diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
index ff0b9e232137..a3551d4218b3 100644
--- a/xmlsecurity/inc/xsecctl.hxx
+++ b/xmlsecurity/inc/xsecctl.hxx
@@ -367,7 +367,7 @@ public:
/*
* For signature verification
*/
- void collectToVerify( const OUString& referenceId );
+ void collectToVerify( std::u16string_view referenceId );
void addSignature( sal_Int32 nSignatureId );
css::uno::Reference< css::xml::sax::XDocumentHandler > const & createSignatureReader(XMLSignatureHelper& rXMLSignatureHelper, sal_Int32 nType = 0);
void releaseSignatureReader();
diff --git a/xmlsecurity/source/component/certificatecontainer.cxx b/xmlsecurity/source/component/certificatecontainer.cxx
index 7e9db35583ca..8f921d881715 100644
--- a/xmlsecurity/source/component/certificatecontainer.cxx
+++ b/xmlsecurity/source/component/certificatecontainer.cxx
@@ -44,11 +44,11 @@ private:
Map certMap;
Map certTrustMap;
- static bool searchMap(const OUString& url, const OUString& certificate_name, Map& _certMap);
+ static bool searchMap(const OUString& url, std::u16string_view certificate_name, Map& _certMap);
/// @throws css::uno::RuntimeException
- bool isTemporaryCertificate(const OUString& url, const OUString& certificate_name);
+ bool isTemporaryCertificate(const OUString& url, std::u16string_view certificate_name);
/// @throws css::uno::RuntimeException
- bool isCertificateTrust(const OUString& url, const OUString& certificate_name);
+ bool isCertificateTrust(const OUString& url, std::u16string_view certificate_name);
public:
explicit CertificateContainer(const uno::Reference<uno::XComponentContext>&) {}
@@ -67,7 +67,7 @@ public:
}
bool
-CertificateContainer::searchMap( const OUString & url, const OUString & certificate_name, Map &_certMap )
+CertificateContainer::searchMap( const OUString & url, std::u16string_view certificate_name, Map &_certMap )
{
Map::iterator p = _certMap.find(url);
@@ -85,13 +85,13 @@ CertificateContainer::searchMap( const OUString & url, const OUString & certific
}
bool
-CertificateContainer::isTemporaryCertificate ( const OUString & url, const OUString & certificate_name )
+CertificateContainer::isTemporaryCertificate ( const OUString & url, std::u16string_view certificate_name )
{
return searchMap( url, certificate_name, certMap);
}
bool
-CertificateContainer::isCertificateTrust ( const OUString & url, const OUString & certificate_name )
+CertificateContainer::isCertificateTrust ( const OUString & url, std::u16string_view certificate_name )
{
return searchMap( url, certificate_name, certTrustMap);
}
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 24cf8b33091a..ec8d4f34f6b3 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -451,7 +451,7 @@ void XSecController::setPropertyId( OUString const & ouPropertyId )
}
/* public: for signature verify */
-void XSecController::collectToVerify( const OUString& referenceId )
+void XSecController::collectToVerify( std::u16string_view referenceId )
{
/* SAL_WARN_IF( !m_xSAXEventKeeper.is(), "xmlsecurity", "the SAXEventKeeper is NULL" ); */