diff options
-rw-r--r-- | include/unotools/securityoptions.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/securityoptions.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/macrosecurity.cxx | 2 |
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 |