diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-07-30 17:43:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-07-31 12:51:43 +0200 |
commit | d55e9567b5e0f5fa0499ccfabee6b756dff0ad7e (patch) | |
tree | abe7ead5aef1dc721a079d809f987d05b84ea046 /xmlsecurity/source | |
parent | 634844354ee6ed884128086a80c3ee32c889d8c9 (diff) |
Improved loplugin:stringconstant (now that GCC 7 supports it): xmlsecurity
Change-Id: I47c93247b9a34abf4b95966833664e63eb57f133
Reviewed-on: https://gerrit.libreoffice.org/76621
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlsecurity/source')
20 files changed, 31 insertions, 31 deletions
diff --git a/xmlsecurity/source/component/certificatecontainer.cxx b/xmlsecurity/source/component/certificatecontainer.cxx index e8482d328511..648d72c13c20 100644 --- a/xmlsecurity/source/component/certificatecontainer.cxx +++ b/xmlsecurity/source/component/certificatecontainer.cxx @@ -122,7 +122,7 @@ CertificateContainer::hasCertificate( const OUString & url, const OUString & cer OUString SAL_CALL CertificateContainer::getImplementationName( ) { - return OUString("com.sun.star.security.CertificateContainer"); + return "com.sun.star.security.CertificateContainer"; } sal_Bool SAL_CALL diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index bca8c68b45de..dcfaad0af773 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -230,7 +230,7 @@ void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments) OUString DocumentDigitalSignatures::getImplementationName() { - return OUString("com.sun.star.security.DocumentDigitalSignatures"); + return "com.sun.star.security.DocumentDigitalSignatures"; } sal_Bool DocumentDigitalSignatures::supportsService( diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index a0d77ce3fcef..945280d8b55d 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -1138,7 +1138,7 @@ void SAL_CALL SAXEventKeeperImpl::initialize( const cssu::Sequence< cssu::Any >& OUString SAXEventKeeperImpl_getImplementationName () { - return OUString ( IMPLEMENTATION_NAME ); + return IMPLEMENTATION_NAME; } cssu::Sequence< OUString > SAXEventKeeperImpl_getSupportedServiceNames( ) diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx index 95e17b646cb0..131365ac9fb0 100644 --- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx +++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx @@ -154,7 +154,7 @@ void SAL_CALL SignatureCreatorImpl::initialize( const cssu::Sequence< cssu::Any OUString SignatureCreatorImpl_getImplementationName () { - return OUString ( IMPLEMENTATION_NAME ); + return IMPLEMENTATION_NAME; } cssu::Sequence< OUString > SignatureCreatorImpl_getSupportedServiceNames( ) diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx index bafaaf8df5b3..7a697f355b0c 100644 --- a/xmlsecurity/source/framework/signatureverifierimpl.cxx +++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx @@ -109,7 +109,7 @@ void SAL_CALL SignatureVerifierImpl::initialize( OUString SignatureVerifierImpl_getImplementationName () { - return OUString( IMPLEMENTATION_NAME ); + return IMPLEMENTATION_NAME; } cssu::Sequence< OUString > SignatureVerifierImpl_getSupportedServiceNames( ) diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx index 869f1bf26371..586a8f70c7a1 100644 --- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx +++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx @@ -113,7 +113,7 @@ Sequence< OUString > XMLSignatureTemplateImpl::impl_getSupportedServiceNames() { } OUString XMLSignatureTemplateImpl::impl_getImplementationName() { - return OUString("com.sun.star.xml.security.framework.XMLSignatureTemplateImpl") ; + return "com.sun.star.xml.security.framework.XMLSignatureTemplateImpl" ; } //Helper for registry diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx index 3e0ba3fe0e25..3b005629ba7a 100644 --- a/xmlsecurity/source/gpg/CertificateImpl.cxx +++ b/xmlsecurity/source/gpg/CertificateImpl.cxx @@ -255,7 +255,7 @@ const GpgME::Key* CertificateImpl::getCertificate() const /* XServiceInfo */ OUString SAL_CALL CertificateImpl::getImplementationName() { - return OUString("com.sun.star.xml.security.gpg.XCertificate_GpgImpl"); + return "com.sun.star.xml.security.gpg.XCertificate_GpgImpl"; } /* XServiceInfo */ diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx index f11ad59d8ba1..cb502e8c9793 100644 --- a/xmlsecurity/source/gpg/SEInitializer.cxx +++ b/xmlsecurity/source/gpg/SEInitializer.cxx @@ -68,7 +68,7 @@ uno::Sequence< OUString > SAL_CALL SEInitializerGpg::getSupportedServiceNames() OUString SAL_CALL SEInitializerGpg::getImplementationName() { - return OUString("com.sun.star.xml.security.SEInitializer_Gpg"); + return "com.sun.star.xml.security.SEInitializer_Gpg"; } extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* diff --git a/xmlsecurity/source/gpg/XMLSecurityContext.cxx b/xmlsecurity/source/gpg/XMLSecurityContext.cxx index 460ed94dbfc7..d27e552829d1 100644 --- a/xmlsecurity/source/gpg/XMLSecurityContext.cxx +++ b/xmlsecurity/source/gpg/XMLSecurityContext.cxx @@ -68,7 +68,7 @@ void SAL_CALL XMLSecurityContextGpg::setDefaultSecurityEnvironmentIndex(sal_Int3 /* XServiceInfo */ OUString SAL_CALL XMLSecurityContextGpg::getImplementationName() { - return OUString("com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl"); + return "com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl"; } /* XServiceInfo */ diff --git a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx index f836eca9cf02..62c188eff244 100644 --- a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx +++ b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx @@ -516,7 +516,7 @@ Sequence< OUString > XMLSignature_GpgImpl::impl_getSupportedServiceNames() { } OUString XMLSignature_GpgImpl::impl_getImplementationName() { - return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_GpgImpl") ; + return "com.sun.star.xml.security.bridge.xmlsec.XMLSignature_GpgImpl" ; } //Helper for registry diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx index 6e173afdebff..ee5fb4989ec1 100644 --- a/xmlsecurity/source/helper/documentsignaturehelper.cxx +++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx @@ -470,17 +470,17 @@ bool DocumentSignatureHelper::equalsReferenceUriManifestPath( OUString DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName() { - return OUString("documentsignatures.xml"); + return "documentsignatures.xml"; } OUString DocumentSignatureHelper::GetScriptingContentSignatureDefaultStreamName() { - return OUString("macrosignatures.xml"); + return "macrosignatures.xml"; } OUString DocumentSignatureHelper::GetPackageSignatureDefaultStreamName() { - return OUString("packagesignatures.xml"); + return "packagesignatures.xml"; } void DocumentSignatureHelper::writeDigestMethod( diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 83396b5e7312..6dbd44b091be 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -54,13 +54,13 @@ OUString getDigestURI(sal_Int32 nID) switch( nID ) { case cssxc::DigestID::SHA1: - return OUString(ALGO_XMLDSIGSHA1); + return ALGO_XMLDSIGSHA1; case cssxc::DigestID::SHA256: - return OUString(ALGO_XMLDSIGSHA256); + return ALGO_XMLDSIGSHA256; case cssxc::DigestID::SHA512: - return OUString(ALGO_XMLDSIGSHA512); + return ALGO_XMLDSIGSHA512; default: - return OUString(ALGO_XMLDSIGSHA1); + return ALGO_XMLDSIGSHA1; } } OUString getSignatureURI(svl::crypto::SignatureMethodAlgorithm eAlgorithm, sal_Int32 nDigestID) @@ -91,13 +91,13 @@ OUString getSignatureURI(svl::crypto::SignatureMethodAlgorithm eAlgorithm, sal_I switch (nDigestID) { case cssxc::DigestID::SHA1: - return OUString(ALGO_RSASHA1); + return ALGO_RSASHA1; case cssxc::DigestID::SHA256: - return OUString(ALGO_RSASHA256); + return ALGO_RSASHA256; case cssxc::DigestID::SHA512: - return OUString(ALGO_RSASHA512); + return ALGO_RSASHA512; default: - return OUString(ALGO_RSASHA1); + return ALGO_RSASHA1; } } } diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 4813d9cac10c..4288e1ed426d 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -243,7 +243,7 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen SAL_INFO( "xmlsecurity.xmlsec", "Using Mozilla profile from MOZILLA_CERTIFICATE_FOLDER=" << pEnv); - return OString(pEnv); + return pEnv; } // second, try to get saved user-preference @@ -582,7 +582,7 @@ css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL ONSSInitializer /* XServiceInfo */ OUString SAL_CALL ONSSInitializer::getImplementationName() { - return OUString("com.sun.star.xml.crypto.NSSInitializer"); + return "com.sun.star.xml.crypto.NSSInitializer"; } sal_Bool SAL_CALL ONSSInitializer::supportsService( const OUString& rServiceName ) diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 7c0b4f2af489..a703fb79be7f 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -136,7 +136,7 @@ SecurityEnvironment_NssImpl::~SecurityEnvironment_NssImpl() { /* XServiceInfo */ OUString SAL_CALL SecurityEnvironment_NssImpl::getImplementationName() { - return OUString("com.sun.star.xml.crypto.SecurityEnvironment"); + return "com.sun.star.xml.crypto.SecurityEnvironment"; } /* XServiceInfo */ diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx index 7795d76a1ed2..707f050330f1 100644 --- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx @@ -92,7 +92,7 @@ void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const uno::Reference< /* XServiceInfo */ OUString SAL_CALL SEInitializer_NssImpl::getImplementationName( ) { - return OUString("com.sun.star.xml.crypto.SEInitializer"); + return "com.sun.star.xml.crypto.SEInitializer"; } sal_Bool SAL_CALL SEInitializer_NssImpl::supportsService( const OUString& rServiceName ) { @@ -119,7 +119,7 @@ NSSInitializer_NssImpl::NSSInitializer_NssImpl(const uno::Reference<uno::XCompon OUString NSSInitializer_NssImpl::getImplementationName() { - return OUString("com.sun.star.xml.crypto.NSSInitializer"); + return "com.sun.star.xml.crypto.NSSInitializer"; } uno::Sequence<OUString> SAL_CALL NSSInitializer_NssImpl::getSupportedServiceNames() diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx index fb68b0cac410..374c9f83671e 100644 --- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx @@ -521,7 +521,7 @@ sal_Int32 SAL_CALL X509Certificate_NssImpl::getCertificateUsage( ) /* XServiceInfo */ OUString SAL_CALL X509Certificate_NssImpl::getImplementationName() { - return OUString("com.sun.star.xml.security.gpg.XCertificate_NssImpl"); + return "com.sun.star.xml.security.gpg.XCertificate_NssImpl"; } /* XServiceInfo */ diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx index 1ed575e92300..18c0bd3ecd5e 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx @@ -122,7 +122,7 @@ void SAL_CALL XMLSecurityContext_NssImpl::setDefaultSecurityEnvironmentIndex( sa /* XServiceInfo */ OUString SAL_CALL XMLSecurityContext_NssImpl::getImplementationName() { - return OUString("com.sun.star.xml.crypto.XMLSecurityContext"); + return "com.sun.star.xml.crypto.XMLSecurityContext"; } /* XServiceInfo */ diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx index 7ad39d3a765a..19818823980b 100644 --- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx @@ -282,7 +282,7 @@ SAL_CALL XMLSignature_NssImpl::validate( /* XServiceInfo */ OUString SAL_CALL XMLSignature_NssImpl::getImplementationName() { - return OUString("com.sun.star.xml.crypto.XMLSignature"); + return "com.sun.star.xml.crypto.XMLSignature"; } /* XServiceInfo */ diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx index b8479fc5afae..8f9ebb1c18e4 100644 --- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx @@ -887,7 +887,7 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedSetDocumentLocator( sal_I /* XServiceInfo */ OUString SAL_CALL XMLDocumentWrapper_XmlSecImpl::getImplementationName( ) { - return OUString("com.sun.star.xml.wrapper.XMLDocumentWrapper"); + return "com.sun.star.xml.wrapper.XMLDocumentWrapper"; } sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl::supportsService( const OUString& rServiceName ) diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx index 60b9714256b7..31085431b453 100644 --- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx @@ -59,7 +59,7 @@ sal_Int64 SAL_CALL XMLElementWrapper_XmlSecImpl::getSomething( const uno::Sequen /* XServiceInfo */ OUString SAL_CALL XMLElementWrapper_XmlSecImpl::getImplementationName( ) { - return OUString("com.sun.star.xml.wrapper.XMLElementWrapper"); + return "com.sun.star.xml.wrapper.XMLElementWrapper"; } sal_Bool SAL_CALL XMLElementWrapper_XmlSecImpl::supportsService( const OUString& rServiceName ) |