diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 10:42:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 12:58:41 +0200 |
commit | 13fa6834c96d3607b44c48027e50b12024cc9f1d (patch) | |
tree | 6de926075da979a5b29bfd9686bab9b5d7b7a6b1 /xmlsecurity | |
parent | 819a4064ba03f230a4b2936662adbe56f478f8db (diff) |
loplugin:moveparam in xmlsecurity
Change-Id: I3ce77ab82529f13c5e55ea30c813f66cb5180877
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123369
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/inc/certificatechooser.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/inc/xsecctl.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/certificatechooser.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xmlsignaturehelper.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 4 |
7 files changed, 9 insertions, 9 deletions
diff --git a/xmlsecurity/inc/certificatechooser.hxx b/xmlsecurity/inc/certificatechooser.hxx index 9ced0ac39a64..8ad4c3190f29 100644 --- a/xmlsecurity/inc/certificatechooser.hxx +++ b/xmlsecurity/inc/certificatechooser.hxx @@ -76,7 +76,7 @@ private: public: CertificateChooser(weld::Window* pParent, - std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > > const & rxSecurityContexts, + std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > > && rxSecurityContexts, UserAction eAction); virtual ~CertificateChooser() override; diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx index 9ec53ecca6bb..91e334260b70 100644 --- a/xmlsecurity/inc/xsecctl.hxx +++ b/xmlsecurity/inc/xsecctl.hxx @@ -307,7 +307,7 @@ public: SignatureInformations getSignatureInformations() const; /// only verify can figure out which X509Data is the signing certificate void UpdateSignatureInformation(sal_Int32 nSecurityId, - std::vector<SignatureInformation::X509Data> const& rDatas); + std::vector<SignatureInformation::X509Data> && rDatas); static void exportSignature( const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler, diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 189c220eebd9..686c49d91b63 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -687,7 +687,7 @@ DocumentDigitalSignatures::chooseCertificatesImpl(std::map<OUString, OUString>& xSecContexts.push_back(aSignatureManager.getGpgSecurityContext()); } - CertificateChooser aChooser(Application::GetFrameWeld(mxParentWindow), xSecContexts, eAction); + CertificateChooser aChooser(Application::GetFrameWeld(mxParentWindow), std::move(xSecContexts), eAction); uno::Sequence< Reference< css::security::XCertificate > > xCerts(1); xCerts[0] = Reference< css::security::XCertificate >(nullptr); diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index cc81677b6688..a6f48625e57f 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -38,7 +38,7 @@ using namespace comphelper; using namespace css; CertificateChooser::CertificateChooser(weld::Window* _pParent, - std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > > const & rxSecurityContexts, + std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > > && rxSecurityContexts, UserAction eAction) : GenericDialogController(_pParent, "xmlsec/ui/selectcertificatedialog.ui", "SelectCertificateDialog") , meAction(eAction) @@ -63,7 +63,7 @@ CertificateChooser::CertificateChooser(weld::Window* _pParent, m_xCertLB->connect_row_activated( LINK( this, CertificateChooser, CertificateSelectHdl ) ); m_xViewBtn->connect_clicked( LINK( this, CertificateChooser, ViewButtonHdl ) ); - mxSecurityContexts = rxSecurityContexts; + mxSecurityContexts = std::move(rxSecurityContexts); mbInitialized = false; // disable buttons diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 4e561963425f..86bf4c23f12b 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -385,7 +385,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl, weld::Button&, void) if (DocumentSignatureHelper::CanSignWithGPG(maSignatureManager.getStore(), m_sODFVersion)) xSecContexts.push_back(maSignatureManager.getGpgSecurityContext()); - CertificateChooser aChooser(m_xDialog.get(), xSecContexts, UserAction::Sign); + CertificateChooser aChooser(m_xDialog.get(), std::move(xSecContexts), UserAction::Sign); if (aChooser.run() == RET_OK) { sal_Int32 nSecurityId; diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx index cad3bfab8b53..78ba5246cba9 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx @@ -706,7 +706,7 @@ XMLSignatureHelper::CheckAndUpdateSignatureInformation( } // rInfo is a copy, update the original - mpXSecController->UpdateSignatureInformation(rInfo.nSecurityId, datas); + mpXSecController->UpdateSignatureInformation(rInfo.nSecurityId, std::move(datas)); return certs; } diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index 7e8902b56f2d..a43b2abacbd6 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -921,12 +921,12 @@ void XSecController::exportOOXMLSignature(const uno::Reference<embed::XStorage>& } void XSecController::UpdateSignatureInformation(sal_Int32 const nSecurityId, - std::vector<SignatureInformation::X509Data> const& rDatas) + std::vector<SignatureInformation::X509Data> && rDatas) { SignatureInformation aInf( 0 ); int const nIndex = findSignatureInfor(nSecurityId); assert(nIndex != -1); // nothing should touch this between parsing and verify - m_vInternalSignatureInformations[nIndex].signatureInfor.X509Datas = rDatas; + m_vInternalSignatureInformations[nIndex].signatureInfor.X509Datas = std::move(rDatas); } SignatureInformation XSecController::getSignatureInformation( sal_Int32 nSecurityId ) const |