summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-01-25 13:01:24 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-01-26 07:08:19 +0100
commitba8911931c18e6a4cc737ffc9f0f415f1ba794d7 (patch)
tree47a072209e0700605ff07b2884858884aba6c289 /cui/source
parent3460799175e6c5795aa07c784e16d10ba9081d49 (diff)
Don't export printer name & config in privacy mode
Don't export printer name & printer config when RemovePersonalInfoOnSaving is enabled, as it might contain sensitive data such as printer location. Add an option to export printer settings even when RemovePersonalInfoOnSaving is enabled. Change-Id: I3d2ca91ad2032050c919d382c11c9ceabf331770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162577 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/inc/securityoptions.hxx3
-rw-r--r--cui/source/options/securityoptions.cxx6
2 files changed, 9 insertions, 0 deletions
diff --git a/cui/source/inc/securityoptions.hxx b/cui/source/inc/securityoptions.hxx
index 981c9ac29bf8..a86b4f0c605a 100644
--- a/cui/source/inc/securityoptions.hxx
+++ b/cui/source/inc/securityoptions.hxx
@@ -53,6 +53,8 @@ namespace svx
std::unique_ptr<weld::Widget> m_xNoteAuthorImg;
std::unique_ptr<weld::CheckButton> m_xDocumentVersionCB;
std::unique_ptr<weld::Widget> m_xDocumentVersionImg;
+ std::unique_ptr<weld::CheckButton> m_xPrinterSettingsCB;
+ std::unique_ptr<weld::Widget> m_xPrinterSettingsImg;
public:
SecurityOptionsDialog(weld::Window* pParent);
@@ -68,6 +70,7 @@ namespace svx
bool IsRemoveDocUserInfoChecked() const { return m_xDocPropertiesCB->get_active(); }
bool IsRemoveNoteAuthorInfoChecked() const { return m_xNoteAuthorCB->get_active(); }
bool IsRemoveDocVersionInfoChecked() const { return m_xDocumentVersionCB->get_active(); }
+ bool IsKeepPrinterSettingsChecked() const { return m_xPrinterSettingsCB->get_active(); }
bool IsRecommPasswdChecked() const { return m_xRecommPasswdCB->get_active(); }
bool IsCtrlHyperlinkChecked() const { return m_xCtrlHyperlinkCB->get_active(); }
bool IsBlockUntrustedRefererLinksChecked() const { return m_xBlockUntrustedRefererLinksCB->get_active(); }
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index f42b0c35dd4b..d99ad64e545e 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -73,6 +73,8 @@ SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* pParent)
, m_xNoteAuthorImg(m_xBuilder->weld_widget("locknoteauthor"))
, m_xDocumentVersionCB(m_xBuilder->weld_check_button("documentversion"))
, m_xDocumentVersionImg(m_xBuilder->weld_widget("lockdocumentversion"))
+ , m_xPrinterSettingsCB(m_xBuilder->weld_check_button("printersettings"))
+ , m_xPrinterSettingsImg(m_xBuilder->weld_widget("lockprintersettings"))
{
m_xRemovePersInfoCB->connect_toggled(LINK(this, SecurityOptionsDialog, ShowPersonalInfosToggle));
init();
@@ -103,6 +105,8 @@ void SecurityOptionsDialog::init()
*m_xNoteAuthorImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, *m_xDocumentVersionCB,
*m_xDocumentVersionImg);
+ enableAndSet(SvtSecurityOptions::EOption::DocKeepPrinterSettings, *m_xPrinterSettingsCB,
+ *m_xPrinterSettingsImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnRecommendPassword, *m_xRecommPasswdCB,
*m_xRecommPasswdImg);
enableAndSet(SvtSecurityOptions::EOption::CtrlClickHyperlink, *m_xCtrlHyperlinkCB,
@@ -128,6 +132,7 @@ bool SecurityOptionsDialog::SetSecurityOptions()
CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo, IsRemoveDocUserInfoChecked(), bModified);
CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo, IsRemoveNoteAuthorInfoChecked(), bModified);
CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, IsRemoveDocVersionInfoChecked(), bModified);
+ CheckAndSave(SvtSecurityOptions::EOption::DocKeepPrinterSettings, IsKeepPrinterSettingsChecked(), bModified);
CheckAndSave(SvtSecurityOptions::EOption::DocWarnRecommendPassword, IsRecommPasswdChecked(), bModified);
CheckAndSave(SvtSecurityOptions::EOption::CtrlClickHyperlink, IsCtrlHyperlinkChecked(), bModified);
CheckAndSave(SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, IsBlockUntrustedRefererLinksChecked(), bModified);
@@ -143,6 +148,7 @@ void SecurityOptionsDialog::changeKeepSecurityInfosEnabled()
m_xDocPropertiesCB->set_sensitive(bEnable);
m_xNoteAuthorCB->set_sensitive(bEnable);
m_xDocumentVersionCB->set_sensitive(bEnable);
+ m_xPrinterSettingsCB->set_sensitive(bEnable);
}
}