summaryrefslogtreecommitdiffstats
path: root/cui/source/options/securityoptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options/securityoptions.cxx')
-rw-r--r--cui/source/options/securityoptions.cxx30
1 files changed, 29 insertions, 1 deletions
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index d583f62618..d7523973e3 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <securityoptions.hxx>
#include <unotools/securityoptions.hxx>
-#include "securityoptions.hxx"
namespace
{
@@ -31,6 +31,15 @@ namespace
rCheckBox.set_active(SvtSecurityOptions::IsOptionSet(eOption));
return bEnable;
}
+
+ void CheckAndSave(SvtSecurityOptions::EOption _eOpt, const bool _bIsChecked, bool& _rModified)
+ {
+ if (!SvtSecurityOptions::IsReadOnly(_eOpt) && SvtSecurityOptions::IsOptionSet(_eOpt) != _bIsChecked)
+ {
+ SvtSecurityOptions::SetOption(_eOpt, _bIsChecked);
+ _rModified = true;
+ }
+ }
}
namespace svx
@@ -103,6 +112,25 @@ void SecurityOptionsDialog::init()
changeKeepSecurityInfosEnabled();
}
+bool SecurityOptionsDialog::SetSecurityOptions()
+{
+ bool bModified = false;
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnSaveOrSend, IsSaveOrSendDocsChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnSigning, IsSignDocsChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnPrint, IsPrintDocsChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnCreatePdf, IsCreatePdfChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, IsRemovePersInfoChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo, IsRemoveRedlineInfoChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo, IsRemoveDocUserInfoChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo, IsRemoveNoteAuthorInfoChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, IsRemoveDocVersionInfoChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocWarnRecommendPassword, IsRecommPasswdChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::CtrlClickHyperlink, IsCtrlHyperlinkChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, IsBlockUntrustedRefererLinksChecked(), bModified);
+
+ return bModified;
+}
+
void SecurityOptionsDialog::changeKeepSecurityInfosEnabled()
{
bool bEnable = m_xRemovePersInfoCB->get_active();