From adb203bc05e3e36173cbd46b9951f79821a81799 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:27:54 +0200 Subject: Merging upstream version 4:24.2.1. Signed-off-by: Daniel Baumann --- cui/source/options/optinet2.cxx | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'cui/source/options/optinet2.cxx') diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 083c3e40f7..eaf0e8616b 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -52,7 +51,7 @@ #include #include #include -#include "securityoptions.hxx" +#include #include "webconninfo.hxx" #include "certpath.hxx" #include "tsaurls.hxx" @@ -834,25 +833,6 @@ DeactivateRC SvxSecurityTabPage::DeactivatePage( SfxItemSet* _pSet ) return DeactivateRC::LeavePage; } -namespace -{ - bool CheckAndSave( SvtSecurityOptions::EOption _eOpt, const bool _bIsChecked, bool& _rModified ) - { - bool bModified = false; - if ( !SvtSecurityOptions::IsReadOnly( _eOpt ) ) - { - bModified = SvtSecurityOptions::IsOptionSet( _eOpt ) != _bIsChecked; - if ( bModified ) - { - SvtSecurityOptions::SetOption( _eOpt, _bIsChecked ); - _rModified = true; - } - } - - return bModified; - } -} - OUString SvxSecurityTabPage::GetAllStrings() { OUString sAllStrings; @@ -892,20 +872,8 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* ) { bool bModified = false; - if (m_xSecOptDlg) - { - CheckAndSave( SvtSecurityOptions::EOption::DocWarnSaveOrSend, m_xSecOptDlg->IsSaveOrSendDocsChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnSigning, m_xSecOptDlg->IsSignDocsChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnPrint, m_xSecOptDlg->IsPrintDocsChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnCreatePdf, m_xSecOptDlg->IsCreatePdfChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, m_xSecOptDlg->IsRemovePersInfoChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo, m_xSecOptDlg->IsRemoveRedlineInfoChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo, m_xSecOptDlg->IsRemoveDocUserInfoChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo, m_xSecOptDlg->IsRemoveNoteAuthorInfoChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, m_xSecOptDlg->IsRemoveDocVersionInfoChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::DocWarnRecommendPassword, m_xSecOptDlg->IsRecommPasswdChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::CtrlClickHyperlink, m_xSecOptDlg->IsCtrlHyperlinkChecked(), bModified ); - CheckAndSave( SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, m_xSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified ); + if (m_xSecOptDlg) { + bModified = m_xSecOptDlg->SetSecurityOptions(); } std::shared_ptr pBatch( -- cgit v1.2.3