tdf#157484 UI: Add UI controls for personal information to be kept
or removed upon save.
With the new options button we can keep the security infos upon save
such as (even if we set the remove personal infos):
- RedLine Info
- Document User Info
- Author and date of notes
- Document version infos
Also on the infobar, if we have a warning, clicking on the infobar button
the security option dialog will open where we can set/modify these options.
follow-up of: 1f440348eb0892fd2c9597806d87b5fe9d60d49a
(tdf#157482 UI: Turn Security Warnings popup windows into infobars)
Change-Id: I8d5d944d76dbdd31653401246113de097ca6d57b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158112
Tested-by: Jenkins
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 22cd480..8ca6a548 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -897,6 +897,10 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* )
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 );
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index 4b00176..d583f62 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -54,6 +54,25 @@ SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* pParent)
, m_xCtrlHyperlinkImg(m_xBuilder->weld_widget("lockctrlclick"))
, m_xBlockUntrustedRefererLinksCB(m_xBuilder->weld_check_button("blockuntrusted"))
, m_xBlockUntrustedRefererLinksImg(m_xBuilder->weld_widget("lockblockuntrusted"))
, m_xRedlineinfoCB(m_xBuilder->weld_check_button("redlineinfo"))
, m_xRedlineinfoImg(m_xBuilder->weld_widget("lockredlineinfo"))
, m_xDocPropertiesCB(m_xBuilder->weld_check_button("docproperties"))
, m_xDocPropertiesImg(m_xBuilder->weld_widget("lockdocproperties"))
, m_xNoteAuthorCB(m_xBuilder->weld_check_button("noteauthor"))
, m_xNoteAuthorImg(m_xBuilder->weld_widget("locknoteauthor"))
, m_xDocumentVersionCB(m_xBuilder->weld_check_button("documentversion"))
, m_xDocumentVersionImg(m_xBuilder->weld_widget("lockdocumentversion"))
{
m_xRemovePersInfoCB->connect_toggled(LINK(this, SecurityOptionsDialog, ShowPersonalInfosToggle));
init();
}
IMPL_LINK_NOARG(SecurityOptionsDialog, ShowPersonalInfosToggle, weld::Toggleable&, void)
{
changeKeepSecurityInfosEnabled();
}
void SecurityOptionsDialog::init()
{
enableAndSet(SvtSecurityOptions::EOption::DocWarnSaveOrSend, *m_xSaveOrSendDocsCB,
*m_xSaveOrSendDocsImg);
@@ -65,12 +84,32 @@ SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* pParent)
*m_xCreatePdfImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo, *m_xRemovePersInfoCB,
*m_xRemovePersInfoImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo, *m_xRedlineinfoCB,
*m_xRedlineinfoImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo, *m_xDocPropertiesCB,
*m_xDocPropertiesImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo, *m_xNoteAuthorCB,
*m_xNoteAuthorImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, *m_xDocumentVersionCB,
*m_xDocumentVersionImg);
enableAndSet(SvtSecurityOptions::EOption::DocWarnRecommendPassword, *m_xRecommPasswdCB,
*m_xRecommPasswdImg);
enableAndSet(SvtSecurityOptions::EOption::CtrlClickHyperlink, *m_xCtrlHyperlinkCB,
*m_xCtrlHyperlinkImg);
enableAndSet(SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, *m_xBlockUntrustedRefererLinksCB,
*m_xBlockUntrustedRefererLinksImg);
if (!SvtSecurityOptions::IsReadOnly(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo))
changeKeepSecurityInfosEnabled();
}
void SecurityOptionsDialog::changeKeepSecurityInfosEnabled()
{
bool bEnable = m_xRemovePersInfoCB->get_active();
m_xRedlineinfoCB->set_sensitive(bEnable);
m_xDocPropertiesCB->set_sensitive(bEnable);
m_xNoteAuthorCB->set_sensitive(bEnable);
m_xDocumentVersionCB->set_sensitive(bEnable);
}
}
diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx
index dc05f5bb..7884ccf 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/options/securityoptions.hxx
@@ -22,7 +22,6 @@
namespace svx
{
class SecurityOptionsDialog : public weld::GenericDialogController
{
private:
@@ -44,17 +43,36 @@ namespace svx
std::unique_ptr<weld::CheckButton> m_xBlockUntrustedRefererLinksCB;
std::unique_ptr<weld::Widget> m_xBlockUntrustedRefererLinksImg;
std::unique_ptr<weld::CheckButton> m_xRedlineinfoCB;
std::unique_ptr<weld::Widget> m_xRedlineinfoImg;
std::unique_ptr<weld::CheckButton> m_xDocPropertiesCB;
std::unique_ptr<weld::Widget> m_xDocPropertiesImg;
std::unique_ptr<weld::CheckButton> m_xNoteAuthorCB;
std::unique_ptr<weld::Widget> m_xNoteAuthorImg;
std::unique_ptr<weld::CheckButton> m_xDocumentVersionCB;
std::unique_ptr<weld::Widget> m_xDocumentVersionImg;
public:
SecurityOptionsDialog(weld::Window* pParent);
void init();
bool IsSaveOrSendDocsChecked() const { return m_xSaveOrSendDocsCB->get_active(); }
bool IsSignDocsChecked() const { return m_xSignDocsCB->get_active(); }
bool IsPrintDocsChecked() const { return m_xPrintDocsCB->get_active(); }
bool IsCreatePdfChecked() const { return m_xCreatePdfCB->get_active(); }
bool IsRemovePersInfoChecked() const { return m_xRemovePersInfoCB->get_active(); }
bool IsRemoveRedlineInfoChecked() const { return m_xRedlineinfoCB->get_active(); }
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 IsRecommPasswdChecked() const { return m_xRecommPasswdCB->get_active(); }
bool IsCtrlHyperlinkChecked() const { return m_xCtrlHyperlinkCB->get_active(); }
bool IsBlockUntrustedRefererLinksChecked() const { return m_xBlockUntrustedRefererLinksCB->get_active(); }
DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void);
void changeKeepSecurityInfosEnabled();
};
}
diff --git a/cui/uiconfig/ui/securityoptionsdialog.ui b/cui/uiconfig/ui/securityoptionsdialog.ui
index 6367621..c6f9221a 100644
--- a/cui/uiconfig/ui/securityoptionsdialog.ui
+++ b/cui/uiconfig/ui/securityoptionsdialog.ui
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.36.0 -->
<!-- Generated with glade 3.38.2 -->
<interface domain="cui">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="SecurityOptionsDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="can-focus">False</property>
<property name="border-width">6</property>
<property name="title" translatable="yes" context="securityoptionsdialog|SecurityOptionsDialog">Security Options and Warnings</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="default_width">0</property>
<property name="default_height">0</property>
<property name="type_hint">dialog</property>
<property name="default-width">0</property>
<property name="default-height">0</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="can-focus">True</property>
<property name="can-default">True</property>
<property name="has-default">True</property>
<property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -40,8 +40,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -54,8 +54,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -69,46 +69,46 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<!-- n-columns=1 n-rows=2 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
<property name="row-spacing">6</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<!-- n-columns=4 n-rows=2 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<property name="can-focus">False</property>
<property name="row-spacing">6</property>
<property name="column-spacing">12</property>
<child>
<object class="GtkCheckButton" id="savesenddocs">
<property name="label" translatable="yes" context="securityoptionsdialog|savesenddocs">_When saving or sending</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="savesenddocs-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|savesenddocs">Select to see a warning dialog when you try to save or send a document that contains recorded changes, versions, or comments.</property>
@@ -116,18 +116,18 @@
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="whensigning">
<property name="label" translatable="yes" context="securityoptionsdialog|whensigning">When _signing</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="whensigning-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|whensigning">Select to see a warning dialog when you try to sign a document that contains recorded changes, versions, fields, references to other sources (for example linked sections or linked pictures), or comments.</property>
@@ -135,18 +135,18 @@
</child>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
<property name="left-attach">3</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="whenprinting">
<property name="label" translatable="yes" context="securityoptionsdialog|whenprinting">When _printing</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="whenprinting-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|whenprinting">Select to see a warning dialog when you try to print a document that contains recorded changes or comments.</property>
@@ -154,18 +154,18 @@
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="whenpdf">
<property name="label" translatable="yes" context="securityoptionsdialog|whenpdf">When creating PDF _files</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="whenpdf-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|whenpdf">Select to see a warning dialog when you try to export a document to PDF format that displays recorded changes in Writer, or that displays comments.</property>
@@ -173,79 +173,79 @@
</child>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">1</property>
<property name="left-attach">3</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockwhenprinting">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkImage" id="locksavesenddocs">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockwhensigning">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockwhenpdf">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes" context="securityoptionsdialog|label3">Warn if document contains recorded changes, versions or notes:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
@@ -253,7 +253,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="securityoptionsdialog|label1">Security Warnings</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -270,28 +270,28 @@
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
<property name="row-spacing">6</property>
<property name="column-spacing">12</property>
<child>
<object class="GtkCheckButton" id="removepersonal">
<property name="label" translatable="yes" context="securityoptionsdialog|removepersonal">_Remove personal information on saving</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="removepersonal-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|removepersonal">Select to always remove user data from the file properties. If this option is not selected, you can still remove the personal information for the current document with the Reset Properties button on File - Properties - General.</property>
@@ -299,59 +299,32 @@
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="password">
<property name="label" translatable="yes" context="securityoptionsdialog|password">Recommend password protection on sa_ving</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="password-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|password">Select to always enable the Save with password option in the file save dialogs. Deselect the option to save files by default without password.</property>
</object>
</child>
<object class="GtkImage" id="lockremovepersonal">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ctrlclick">
<property name="label" translatable="yes" context="securityoptionsdialog|ctrlclick">Ctrl-click required _to open hyperlinks</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="ctrlclick-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|ctrlclick">If enabled, you must hold down the Ctrl key while clicking a hyperlink to follow that link. If not enabled, a click opens the hyperlink.</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="blockuntrusted">
<property name="label" translatable="yes" context="securityoptionsdialog|blockuntrusted">Block any links from documents not among the trusted locations (see Macro Security)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="blockuntrusted-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|blockuntrusted">Blocks the use of linked images by documents not in the trusted locations defined on the Trusted Sources tab of the Macro Security dialog.</property>
@@ -359,57 +332,204 @@
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockremovepersonal">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockpassword">
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockctrlclick">
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockblockuntrusted">
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon_name">res/lock.png</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ctrlclick">
<property name="label" translatable="yes" context="securityoptionsdialog|ctrlclick">Ctrl-click required _to open hyperlinks</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="hexpand">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="ctrlclick-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|ctrlclick">If enabled, you must hold down the Ctrl key while clicking a hyperlink to follow that link. If not enabled, a click opens the hyperlink.</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockctrlclick">
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="password">
<property name="label" translatable="yes" context="securityoptionsdialog|password">Recommend password protection on sa_ving</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="hexpand">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="password-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|password">Select to always enable the Save with password option in the file save dialogs. Deselect the option to save files by default without password.</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockpassword">
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="redlineinfo">
<property name="label" translatable="yes" context="securityoptionsdialog|redlineinfo">Keep track changes information</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="margin-start">20</property>
<property name="hexpand">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="docproperties">
<property name="label" translatable="yes" context="securityoptionsdialog|docproperties">Keep document user informations</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="margin-start">20</property>
<property name="hexpand">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="noteauthor">
<property name="label" translatable="yes" context="securityoptionsdialog|noteauthor">Keep author name and date of notes</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="margin-start">20</property>
<property name="hexpand">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="documentversion">
<property name="label" translatable="yes" context="securityoptionsdialog|documentversion">Keep document version information</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="margin-start">20</property>
<property name="hexpand">True</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockredlineinfo">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-start">20</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockdocproperties">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-start">20</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkImage" id="locknoteauthor">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-start">20</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkImage" id="lockdocumentversion">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-start">20</property>
<property name="icon-name">res/lock.png</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
</object>
@@ -417,7 +537,7 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="securityoptionsdialog|label2">Security Options</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -431,6 +551,9 @@
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
@@ -445,9 +568,6 @@
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
<child type="titlebar">
<placeholder/>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="SecurityOptionsDialog-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|SecurityOptionsDialog">Set security related options and warnings about hidden information in documents.</property>
diff --git a/include/unotools/securityoptions.hxx b/include/unotools/securityoptions.hxx
index dfc405c..3e462c9 100644
--- a/include/unotools/securityoptions.hxx
+++ b/include/unotools/securityoptions.hxx
@@ -41,6 +41,10 @@ namespace SvtSecurityOptions
DocWarnPrint,
DocWarnCreatePdf,
DocWarnRemovePersonalInfo,
DocWarnKeepRedlineInfo,
DocWarnKeepDocUserInfo,
DocWarnKeepNoteAuthorDateInfo,
DocWarnKeepDocVersionInfo,
DocWarnRecommendPassword,
MacroSecLevel,
MacroTrustedAuthors,
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index b71a8c2..afa217c 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2407,6 +2407,42 @@
</info>
<value>false</value>
</prop>
<prop oor:name="KeepRedlineInfoOnSaving" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>
Specifies whether to keep track changed information on
saving if RemovePersonalInfoOnSaving is true.
</desc>
</info>
<value>false</value>
</prop>
<prop oor:name="KeepDocUserInfoOnSaving" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>
Specifies whether to keep document user information on
saving if RemovePersonalInfoOnSaving is true.
</desc>
</info>
<value>false</value>
</prop>
<prop oor:name="KeepNoteAuthorDateInfoOnSaving" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>
Specifies whether to keep note author and date information on
saving if RemovePersonalInfoOnSaving is true.
</desc>
</info>
<value>false</value>
</prop>
<prop oor:name="KeepDocVersionInfoOnSaving" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>
Specifies whether to keep document version information on
saving if RemovePersonalInfoOnSaving is true.
</desc>
</info>
<value>false</value>
</prop>
<prop oor:name="RecommendPasswordProtection" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Specifies whether to recommend password protection when saving
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 7caf864..156e1ae 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -209,7 +209,8 @@ void SfxObjectShell::UpdateDocInfoForSave()
// clear user data if recommend (see 'Tools - Options - LibreOffice - Security')
if ( SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) )
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo))
{
xDocProps->resetUserData( OUString() );
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 023780d..fcdc66f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -55,6 +55,7 @@
#include <basic/sberrors.hxx>
#include <unotools/moduleoptions.hxx>
#include <unotools/saveopt.hxx>
#include <unotools/securityoptions.hxx>
#include <svtools/DocumentToGraphicRenderer.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/svapp.hxx>
@@ -940,6 +941,15 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// by default versions should be preserved always except in case of an explicit
// SaveAs via GUI, so the flag must be set accordingly
pImpl->bPreserveVersions = (nId == SID_SAVEDOC);
// do not save version infos --> (see 'Tools - Options - LibreOffice - Security')
if (SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo))
{
pImpl->bPreserveVersions = false;
}
try
{
SfxErrorContext aEc( ERRCTX_SFX_SAVEASDOC, GetTitle() ); // ???
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index b17b67a..28cda91 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2603,7 +2603,8 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
}
// copy version list from "old" medium to target medium, so it can be used on saving
pMediumTmp->TransferVersionList_Impl( *pRetrMedium );
if (pImpl->bPreserveVersions)
pMediumTmp->TransferVersionList_Impl( *pRetrMedium );
// an interaction handler here can acquire only in case of GUI Saving
// and should be removed after the saving is done
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6921b32..41bed36 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2194,7 +2194,8 @@ void DocxAttributeOutput::DoWriteMoveRangeTagStart(std::u16string_view bookmarkN
bool bFrom, const SwRedlineData* pRedlineData)
{
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
const OUString &rAuthor( SW_MOD()->GetRedlineAuthor( pRedlineData->GetAuthor() ) );
const DateTime aDateTime = pRedlineData->GetTimeStamp();
@@ -3991,7 +3992,8 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
return;
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
OString aId( OString::number( pRedlineData->GetSeqNo() ) );
const OUString &rAuthor( SW_MOD()->GetRedlineAuthor( pRedlineData->GetAuthor() ) );
@@ -4148,7 +4150,8 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData * pRedlineData, bool
OString aId( OString::number( m_nRedlineId++ ) );
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
const OUString &rAuthor( SW_MOD()->GetRedlineAuthor( pRedlineData->GetAuthor() ) );
OString aAuthor( OUStringToOString( bRemovePersonalInfo
@@ -8305,7 +8308,8 @@ void DocxAttributeOutput::WritePostitFieldReference()
DocxAttributeOutput::hasProperties DocxAttributeOutput::WritePostitFields()
{
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
hasProperties eResult = hasProperties::no;
for (auto& [f1, data1] : m_postitFields)
diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx
index b3e2d01..5972903 100644
--- a/sw/source/filter/ww8/docxtableexport.cxx
+++ b/sw/source/filter/ww8/docxtableexport.cxx
@@ -628,7 +628,8 @@ void DocxAttributeOutput::TableRowRedline(
const SwTableLine* pTabLine = pTabBox->GetUpper();
bool bRemovePersonalInfo
= SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo);
= SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo)
&& !SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
// check table row property "HasTextChangesOnly"
SwRedlineTable::size_type nPos(0);
@@ -703,7 +704,8 @@ void DocxAttributeOutput::TableCellRedline(
const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox();
bool bRemovePersonalInfo
= SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo);
= SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo)
&& !SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
// check table row property "HasTextChangesOnly"
SwRedlineTable::size_type nChange = pTabBox->GetRedline();
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index b222b8e..44517a6 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -68,6 +68,18 @@ bool IsReadOnly( EOption eOption )
case SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo:
bReadonly = officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::isReadOnly();
break;
case SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo:
bReadonly = officecfg::Office::Common::Security::Scripting::KeepRedlineInfoOnSaving::isReadOnly();
break;
case SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo:
bReadonly = officecfg::Office::Common::Security::Scripting::KeepDocUserInfoOnSaving::isReadOnly();
break;
case SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo:
bReadonly = officecfg::Office::Common::Security::Scripting::KeepNoteAuthorDateInfoOnSaving::isReadOnly();
break;
case SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo:
bReadonly = officecfg::Office::Common::Security::Scripting::KeepDocVersionInfoOnSaving::isReadOnly();
break;
case SvtSecurityOptions::EOption::DocWarnRecommendPassword:
bReadonly = officecfg::Office::Common::Security::Scripting::RecommendPasswordProtection::isReadOnly();
break;
@@ -284,6 +296,18 @@ bool IsOptionSet( EOption eOption )
case SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo:
bSet = officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::get();
break;
case SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo:
bSet = officecfg::Office::Common::Security::Scripting::KeepRedlineInfoOnSaving::get();
break;
case SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo:
bSet = officecfg::Office::Common::Security::Scripting::KeepDocUserInfoOnSaving::get();
break;
case SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo:
bSet = officecfg::Office::Common::Security::Scripting::KeepNoteAuthorDateInfoOnSaving::get();
break;
case SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo:
bSet = officecfg::Office::Common::Security::Scripting::KeepDocVersionInfoOnSaving::get();
break;
case SvtSecurityOptions::EOption::DocWarnRecommendPassword:
bSet = officecfg::Office::Common::Security::Scripting::RecommendPasswordProtection::get();
break;
@@ -321,6 +345,18 @@ void SetOption( EOption eOption, bool bValue )
case SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo:
officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::set(bValue, xChanges);
break;
case SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo:
officecfg::Office::Common::Security::Scripting::KeepRedlineInfoOnSaving::set(bValue, xChanges);
break;
case SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo:
officecfg::Office::Common::Security::Scripting::KeepDocUserInfoOnSaving::set(bValue, xChanges);
break;
case SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo:
officecfg::Office::Common::Security::Scripting::KeepNoteAuthorDateInfoOnSaving::set(bValue, xChanges);
break;
case SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo:
officecfg::Office::Common::Security::Scripting::KeepDocVersionInfoOnSaving::set(bValue, xChanges);
break;
case SvtSecurityOptions::EOption::DocWarnRecommendPassword:
officecfg::Office::Common::Security::Scripting::RecommendPasswordProtection::set(bValue, xChanges);
break;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index b23570d..1fdf818 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2549,7 +2549,8 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
if( xAnnotationEnumeration.is() && xAnnotationEnumeration->hasMoreElements() )
{
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo);
OUStringBuffer sStringBuffer;
do
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index b779d05..a24c89e 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -436,7 +436,8 @@ void XMLRedlineExport::ExportChangeInfo(
const Reference<XPropertySet> & rPropSet)
{
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
SvXMLElementExport aChangeInfo(rExport, XML_NAMESPACE_OFFICE,
XML_CHANGE_INFO, true, true);
@@ -480,7 +481,8 @@ void XMLRedlineExport::ExportChangeInfo(
{
OUString sComment;
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepRedlineInfo);
SvXMLElementExport aChangeInfo(rExport, XML_NAMESPACE_OFFICE,
XML_CHANGE_INFO, true, true);
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 8441037c..2299773 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1720,7 +1720,8 @@ void XMLTextFieldExport::ExportFieldHelper(
"Unexpected presentation for annotation field");
bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo ) && !SvtSecurityOptions::IsOptionSet(
SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo);
// annotation element + content
OUString aName;