summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-30 11:26:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-30 14:07:26 +0100
commit6da12ca82d7bdcbe6f83e9cc46fdb560f729bd63 (patch)
treefb8b68d6c9d44442d110ae6e6a70b8d1297dae55 /xmlsecurity
parent81b3619fb59b617cda7335b5d6de32c5abf4e554 (diff)
loplugin:stringliteraldefine in various
Change-Id: Ib482e3982128dc47d88a79478d80eef43745d1b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/bitmaps.hlst8
-rw-r--r--xmlsecurity/inc/xsecctl.hxx34
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.hxx2
3 files changed, 22 insertions, 22 deletions
diff --git a/xmlsecurity/inc/bitmaps.hlst b/xmlsecurity/inc/bitmaps.hlst
index add5c78f59ef..2d4ccd0c4423 100644
--- a/xmlsecurity/inc/bitmaps.hlst
+++ b/xmlsecurity/inc/bitmaps.hlst
@@ -9,13 +9,13 @@
#pragma once
-#define BMP_STATE_NOT_VALIDATED "xmlecurity/res/notcertificate_40x56.png"
+inline constexpr OUStringLiteral BMP_STATE_NOT_VALIDATED = u"xmlecurity/res/notcertificate_40x56.png";
#define BMP_CERT_OK "xmlsecurity/res/certificate_16.png"
#define BMP_CERT_NOT_OK "xmlsecurity/res/notcertificate_16.png"
-#define BMP_SIG_VALID "xmlsecurity/res/signet_11x16.png"
-#define BMP_SIG_INVALID "svx/res/caution_11x16.png"
-#define BMP_SIG_NOT_VALIDATED "xmlsecurity/res/notcertificate_16.png"
+inline constexpr OUStringLiteral BMP_SIG_VALID = u"xmlsecurity/res/signet_11x16.png";
+inline constexpr OUStringLiteral BMP_SIG_INVALID = u"svx/res/caution_11x16.png";
+inline constexpr OUStringLiteral BMP_SIG_NOT_VALIDATED = u"xmlsecurity/res/notcertificate_16.png";
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
index 91e334260b70..2d105c8690d2 100644
--- a/xmlsecurity/inc/xsecctl.hxx
+++ b/xmlsecurity/inc/xsecctl.hxx
@@ -42,23 +42,23 @@ namespace com::sun::star::xml::crypto { class XXMLSignature; }
namespace com::sun::star::xml::crypto:: sax { class XReferenceResolvedListener; }
namespace com::sun::star::xml::sax { class XDocumentHandler; }
-#define NS_XMLDSIG "http://www.w3.org/2000/09/xmldsig#"
-#define NS_DC "http://purl.org/dc/elements/1.1/"
-#define NS_XD "http://uri.etsi.org/01903/v1.3.2#"
-#define NS_MDSSI "http://schemas.openxmlformats.org/package/2006/digital-signature"
-#define NS_LOEXT "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
-
-#define ALGO_C14N "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
-#define ALGO_RSASHA1 "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
-#define ALGO_RSASHA256 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
-#define ALGO_RSASHA512 "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
-#define ALGO_ECDSASHA1 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
-#define ALGO_ECDSASHA256 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
-#define ALGO_ECDSASHA512 "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"
-#define ALGO_XMLDSIGSHA1 "http://www.w3.org/2000/09/xmldsig#sha1"
-#define ALGO_XMLDSIGSHA256 "http://www.w3.org/2001/04/xmlenc#sha256"
-#define ALGO_XMLDSIGSHA512 "http://www.w3.org/2001/04/xmlenc#sha512"
-#define ALGO_RELATIONSHIP "http://schemas.openxmlformats.org/package/2006/RelationshipTransform"
+inline constexpr OUStringLiteral NS_XMLDSIG = u"http://www.w3.org/2000/09/xmldsig#";
+inline constexpr OUStringLiteral NS_DC = u"http://purl.org/dc/elements/1.1/";
+inline constexpr OUStringLiteral NS_XD = u"http://uri.etsi.org/01903/v1.3.2#";
+inline constexpr OUStringLiteral NS_MDSSI = u"http://schemas.openxmlformats.org/package/2006/digital-signature";
+inline constexpr OUStringLiteral NS_LOEXT = u"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0";
+
+inline constexpr OUStringLiteral ALGO_C14N = u"http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
+inline constexpr OUStringLiteral ALGO_RSASHA1 = u"http://www.w3.org/2000/09/xmldsig#rsa-sha1";
+inline constexpr OUStringLiteral ALGO_RSASHA256 = u"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
+inline constexpr OUStringLiteral ALGO_RSASHA512 = u"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";
+inline constexpr OUStringLiteral ALGO_ECDSASHA1 = u"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1";
+inline constexpr OUStringLiteral ALGO_ECDSASHA256 = u"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256";
+inline constexpr OUStringLiteral ALGO_ECDSASHA512 = u"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";
+inline constexpr OUStringLiteral ALGO_XMLDSIGSHA1 = u"http://www.w3.org/2000/09/xmldsig#sha1";
+inline constexpr OUStringLiteral ALGO_XMLDSIGSHA256 = u"http://www.w3.org/2001/04/xmlenc#sha256";
+inline constexpr OUStringLiteral ALGO_XMLDSIGSHA512 = u"http://www.w3.org/2001/04/xmlenc#sha512";
+inline constexpr OUStringLiteral ALGO_RELATIONSHIP = u"http://schemas.openxmlformats.org/package/2006/RelationshipTransform";
class XMLDocumentWrapper_XmlSecImpl;
class SAXEventKeeperImpl;
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
index f0c731560ab3..fa861c298cab 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
@@ -26,7 +26,7 @@
namespace com::sun::star::uno { class XComponentContext; }
-#define NSS_SERVICE_NAME "com.sun.star.xml.crypto.NSSInitializer"
+inline constexpr OUStringLiteral NSS_SERVICE_NAME = u"com.sun.star.xml.crypto.NSSInitializer";
class ONSSInitializer : public cppu::WeakImplHelper
<