summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-10 20:23:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 10:39:38 +0200
commit64937ff98a970050b0d5d89e3a4734d93e13ad00 (patch)
treeccab35b3626e98b3a02faa5c6d4ce531ff4bf23a
parent81a1691cfb1290dc7ccc274cf3abc8ea91c73d55 (diff)
loplugin:moveparam in unotools
Change-Id: Idd014c93e2e85d2ffc7a2535a9c65cffc8a9d403 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123348 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/unotools/securityoptions.hxx2
-rw-r--r--sfx2/source/appl/appcfg.cxx2
-rw-r--r--unotools/source/config/securityoptions.cxx4
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx2
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx2
5 files changed, 6 insertions, 6 deletions
diff --git a/include/unotools/securityoptions.hxx b/include/unotools/securityoptions.hxx
index 93363c48210f..332ba457fc4d 100644
--- a/include/unotools/securityoptions.hxx
+++ b/include/unotools/securityoptions.hxx
@@ -90,7 +90,7 @@ namespace SvtSecurityOptions
*//*-*****************************************************************************************************/
UNOTOOLS_DLLPUBLIC std::vector< OUString > GetSecureURLs();
- UNOTOOLS_DLLPUBLIC void SetSecureURLs( const std::vector< OUString >& seqURLList );
+ UNOTOOLS_DLLPUBLIC void SetSecureURLs( std::vector< OUString >&& seqURLList );
/*-****************************************************************************************************
@short interface methods to get and set value of config key "org.openoffice.Office.Common/Security/Scripting/StarOfficeBasic"
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index c37e01281977..feeb621b1596 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -640,7 +640,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState(SID_SECURE_URL, true, &pItem))
{
DBG_ASSERT(dynamic_cast< const SfxStringListItem *>( pItem ) != nullptr, "StringListItem expected");
- SvtSecurityOptions::SetSecureURLs( static_cast<const SfxStringListItem*>(pItem)->GetList() );
+ SvtSecurityOptions::SetSecureURLs( std::vector(static_cast<const SfxStringListItem*>(pItem)->GetList()) );
}
// Store changed data
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index cd41f92a0eac..e3cab9d1a557 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -104,12 +104,12 @@ std::vector< OUString > GetSecureURLs()
return aRet;
}
-void SetSecureURLs( const std::vector< OUString >& urlList )
+void SetSecureURLs( std::vector< OUString >&& urlList )
{
// DBG_ASSERT(!officecfg::SecureURL::isReadOnly(), "SvtSecurityOptions_Impl::SetSecureURLs()\nYou tried to write on a readonly value!\n");
// if (officecfg::SecureURL::isReadOnly())
// return;
- std::vector< OUString > lURLs( urlList );
+ std::vector< OUString > lURLs( std::move(urlList) );
SvtPathOptions aOpt;
std::transform(lURLs.begin(), lURLs.end(), lURLs.begin(),
[&aOpt](const OUString& rUrl) -> OUString { return aOpt.UseVariable( rUrl ); });
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 625bbbd0d4be..189c220eebd9 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -788,7 +788,7 @@ void DocumentDigitalSignatures::addLocationToTrustedSources( const OUString& Loc
std::vector< OUString > aSecURLs = SvtSecurityOptions::GetSecureURLs();
aSecURLs.push_back(Location);
- SvtSecurityOptions::SetSecureURLs( aSecURLs );
+ SvtSecurityOptions::SetSecureURLs( std::move(aSecURLs) );
}
sal_Bool DocumentDigitalSignatures::signDocumentWithCertificate(
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index dbfa41e96d58..d4a7e9f7c23f 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -430,7 +430,7 @@ void MacroSecurityTrustedSourcesTP::ClosePage()
aSecureURLs.push_back(aURL);
}
- SvtSecurityOptions::SetSecureURLs( aSecureURLs );
+ SvtSecurityOptions::SetSecureURLs( std::move(aSecureURLs) );
}
// Trusted Path could not be removed (#i33584#)
// don't forget to remove the old saved SecureURLs