[Libreoffice-commits] core.git: xmlsecurity/inc xmlsecurity/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jun 22 07:06:56 UTC 2017


 xmlsecurity/inc/digitalsignaturesdialog.hxx            |    2 +-
 xmlsecurity/inc/documentsignaturemanager.hxx           |    2 +-
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |    2 +-
 xmlsecurity/source/helper/documentsignaturemanager.cxx |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 686dfc5ed53e37bc4a60227fcb10c1d537c8aa62
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jun 22 09:06:31 2017 +0200

    xmlsecurity: fix loplugin:passstuffbyref warnings
    
    Change-Id: I627abfe33e9c2fc4243276706c1624ce19943678

diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index e49419e57a4a..9f488bb91c9f 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -103,7 +103,7 @@ private:
 
     css::uno::Reference<css::security::XCertificate> getCertificate(const SignatureInformation& rInfo);
     css::uno::Reference<css::xml::crypto::XSecurityEnvironment> getSecurityEnvironmentForCertificate(
-        css::uno::Reference<css::security::XCertificate> xCert);
+        const css::uno::Reference<css::security::XCertificate>& xCert);
 
     //Checks if adding is allowed.
     //See the spec at specs/www/appwide/security/Electronic_Signatures_and_Security.sxw
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index eed54a5a32c7..f354ad8c8cbb 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -62,7 +62,7 @@ public:
     SignatureStreamHelper ImplOpenSignatureStream(sal_Int32 eStreamMode, bool bTempStream);
     /// Add a new signature, using xCert as a signing certificate, and rDescription as description.
     bool add(const css::uno::Reference<css::security::XCertificate>& xCert,
-             const css::uno::Reference<css::xml::crypto::XXMLSecurityContext> xSecurityContext,
+             const css::uno::Reference<css::xml::crypto::XXMLSecurityContext>& xSecurityContext,
              const OUString& rDescription, sal_Int32& nSecurityId, bool bAdESCompliant);
     /// Remove signature at nPosition.
     void remove(sal_uInt16 nPosition);
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index a9fbe930b30d..f52b65dc9917 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -675,7 +675,7 @@ uno::Reference<security::XCertificate> DigitalSignaturesDialog::getCertificate(c
     return xCert;
 }
 
-uno::Reference<xml::crypto::XSecurityEnvironment> DigitalSignaturesDialog::getSecurityEnvironmentForCertificate(uno::Reference<security::XCertificate> xCert)
+uno::Reference<xml::crypto::XSecurityEnvironment> DigitalSignaturesDialog::getSecurityEnvironmentForCertificate(const uno::Reference<security::XCertificate>& xCert)
 {
     if (xCert->getCertificateKind() == CertificateKind_OPENPGP)
         return maSignatureManager.getGpgSecurityEnvironment();
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index ded3de8d9960..21c55c687125 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -254,7 +254,7 @@ SignatureStreamHelper DocumentSignatureManager::ImplOpenSignatureStream(sal_Int3
 }
 
 bool DocumentSignatureManager::add(const uno::Reference<security::XCertificate>& xCert,
-                                   const uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext,
+                                   const uno::Reference<xml::crypto::XXMLSecurityContext>& xSecurityContext,
                                    const OUString& rDescription,
                                    sal_Int32& nSecurityId,
                                    bool bAdESCompliant)


More information about the Libreoffice-commits mailing list