diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-12 12:08:00 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-14 11:37:19 +0000 |
commit | 62633dfe026bc3badf7066e5fb454036bae9cfdc (patch) | |
tree | b1a30ddd709ba80b8629d916d54c03d733651d12 /xmlsecurity | |
parent | aa458c31a5dfa2be8b6bd8f1b4e402ce8c27edde (diff) |
clang-tidy performance-unnecessary-value-param in various
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907
Reviewed-on: https://gerrit.libreoffice.org/24019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlsecurity')
6 files changed, 14 insertions, 14 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx index c0fbe5a1a3bd..fa9e33f14f2b 100644 --- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx @@ -133,7 +133,7 @@ private: DECL_LINK_TYPED( CertSelectHdl, SvTreeListBox*, void ); void Clear(); SvTreeListEntry* InsertCert( SvTreeListEntry* _pParent, const OUString& _rName, - css::uno::Reference< css::security::XCertificate > rxCert, + const css::uno::Reference< css::security::XCertificate >& rxCert, bool bValid); public: diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx index 51c07d26952b..869d66bbab6d 100644 --- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx +++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx @@ -182,15 +182,15 @@ public: /// Read and verify a single OOXML signature. bool ReadAndVerifySignatureStorageStream(const css::uno::Reference<css::io::XInputStream>& xInputStream); /// Adds or removes an OOXML digital signature relation to _rels/.rels if there wasn't any before. - void EnsureSignaturesRelation(css::uno::Reference<css::embed::XStorage> xStorage, bool bAdd); + void EnsureSignaturesRelation(const css::uno::Reference<css::embed::XStorage>& xStorage, bool bAdd); /// Given that xStorage is an OOXML _xmlsignatures storage, create origin.sigs and its relations. - void ExportSignatureRelations(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount); + void ExportSignatureRelations(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount); /// Given that xSignatureStorage is an OOXML _xmlsignatures storage, create and write a new signature. - bool CreateAndWriteOOXMLSignature(css::uno::Reference<css::embed::XStorage> xRootStorage, css::uno::Reference<css::embed::XStorage> xSignatureStorage, int nSignatureIndex); + bool CreateAndWriteOOXMLSignature(const css::uno::Reference<css::embed::XStorage>& xRootStorage, const css::uno::Reference<css::embed::XStorage>& xSignatureStorage, int nSignatureIndex); /// Similar to CreateAndWriteOOXMLSignature(), but used to write the signature to the persistent storage, not the temporary one. - void ExportOOXMLSignature(css::uno::Reference<css::embed::XStorage> xRootStorage, css::uno::Reference<css::embed::XStorage> xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex); + void ExportOOXMLSignature(const css::uno::Reference<css::embed::XStorage>& xRootStorage, const css::uno::Reference<css::embed::XStorage>& xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex); /// Given that xStorage is an OOXML root storage, advertise signatures in its [Content_Types].xml stream. - void ExportSignatureContentTypes(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount); + void ExportSignatureContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount); }; #endif // INCLUDED_XMLSECURITY_INC_XMLSECURITY_XMLSIGNATUREHELPER_HXX diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 1fd368570133..21584b8d9d35 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -461,7 +461,7 @@ void CertificateViewerCertPathTP::Clear() } SvTreeListEntry* CertificateViewerCertPathTP::InsertCert( - SvTreeListEntry* _pParent, const OUString& _rName, css::uno::Reference< css::security::XCertificate > rxCert, + SvTreeListEntry* _pParent, const OUString& _rName, const css::uno::Reference< css::security::XCertificate >& rxCert, bool bValid) { Image aImage = bValid ? maCertImage : maCertNotValidatedImage; diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index 1a3effb253d0..e7e8e05cdb06 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -204,7 +204,7 @@ void XMLSignatureHelper::ExportSignature( XSecController::exportSignature(xDocumentHandler, signatureInfo); } -void XMLSignatureHelper::ExportOOXMLSignature(uno::Reference<embed::XStorage> xRootStorage, uno::Reference<embed::XStorage> xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex) +void XMLSignatureHelper::ExportOOXMLSignature(const uno::Reference<embed::XStorage>& xRootStorage, const uno::Reference<embed::XStorage>& xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex) { sal_Int32 nOpenMode = embed::ElementModes::READWRITE; uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", nOpenMode), uno::UNO_QUERY); @@ -487,7 +487,7 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorageStream(const css::uno::Ref return !mbError; } -void XMLSignatureHelper::EnsureSignaturesRelation(css::uno::Reference<css::embed::XStorage> xStorage, bool bAdd) +void XMLSignatureHelper::EnsureSignaturesRelation(const css::uno::Reference<css::embed::XStorage>& xStorage, bool bAdd) { sal_Int32 nOpenMode = embed::ElementModes::READWRITE; uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode); @@ -544,7 +544,7 @@ void XMLSignatureHelper::EnsureSignaturesRelation(css::uno::Reference<css::embed xTransact->commit(); } -void XMLSignatureHelper::ExportSignatureRelations(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount) +void XMLSignatureHelper::ExportSignatureRelations(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount) { // Write the empty file, its relations will be the signatures. sal_Int32 nOpenMode = embed::ElementModes::READWRITE; @@ -570,7 +570,7 @@ void XMLSignatureHelper::ExportSignatureRelations(css::uno::Reference<css::embed xTransact->commit(); } -void XMLSignatureHelper::ExportSignatureContentTypes(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount) +void XMLSignatureHelper::ExportSignatureContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount) { sal_Int32 nOpenMode = embed::ElementModes::READWRITE; uno::Reference<io::XStream> xStream(xStorage->openStreamElement("[Content_Types].xml", nOpenMode), uno::UNO_QUERY); @@ -620,7 +620,7 @@ void XMLSignatureHelper::ExportSignatureContentTypes(css::uno::Reference<css::em uno::Reference<embed::XTransactedObject> xTransact(xStorage, uno::UNO_QUERY); xTransact->commit(); } -bool XMLSignatureHelper::CreateAndWriteOOXMLSignature(uno::Reference<embed::XStorage> xRootStorage, uno::Reference<embed::XStorage> xSignatureStorage, int nSignatureIndex) +bool XMLSignatureHelper::CreateAndWriteOOXMLSignature(const uno::Reference<embed::XStorage>& xRootStorage, const uno::Reference<embed::XStorage>& xSignatureStorage, int nSignatureIndex) { sal_Int32 nOpenMode = embed::ElementModes::READWRITE; uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", nOpenMode), uno::UNO_QUERY); diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx index 9fcf9ab5dfd3..a850a83fbc60 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx @@ -46,7 +46,7 @@ ImplXMLSignatureListener::~ImplXMLSignatureListener() } void ImplXMLSignatureListener::setNextHandler( - uno::Reference< xml::sax::XDocumentHandler > xNextHandler) + const uno::Reference< xml::sax::XDocumentHandler >& xNextHandler) { m_xNextHandler = xNextHandler; } diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx index f8d3d5b5429a..320723938ff9 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx @@ -61,7 +61,7 @@ public: const Link<LinkParamNone*, void>& rStartVerifySignatureElement); virtual ~ImplXMLSignatureListener(); - void setNextHandler(css::uno::Reference< css::xml::sax::XDocumentHandler > xNextHandler); + void setNextHandler(const css::uno::Reference< css::xml::sax::XDocumentHandler >& xNextHandler); // css::xml::crypto::sax::XSignatureCreationResultListener virtual void SAL_CALL signatureCreated( sal_Int32 securityId, css::xml::crypto::SecurityOperationStatus creationResult ) |