summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2024-03-14 00:45:43 +0100
committerRafael Lima <rafael.palma.lima@gmail.com>2024-03-19 14:48:34 +0100
commit6178387f7bcc35df9272978ec936f8b53c6da80d (patch)
tree150c8c46cd929534b0d4b77111ae2d34b7d44e2b /xmlsecurity/inc
parenta1fbfbabbf65bbddd99e1e660ea5435abc8d9ca9 (diff)
tdf#159985 Warn about the need to reload file after changing macro security level
Change-Id: I191fd5d676d6d54fb0ef15652420afdceab2fc78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164810 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'xmlsecurity/inc')
-rw-r--r--xmlsecurity/inc/macrosecurity.hxx7
-rw-r--r--xmlsecurity/inc/strings.hrc1
2 files changed, 8 insertions, 0 deletions
diff --git a/xmlsecurity/inc/macrosecurity.hxx b/xmlsecurity/inc/macrosecurity.hxx
index 5d9feb94c808..162ffad3ce72 100644
--- a/xmlsecurity/inc/macrosecurity.hxx
+++ b/xmlsecurity/inc/macrosecurity.hxx
@@ -72,6 +72,8 @@ class MacroSecurityLevelTP : public MacroSecurityTP
{
private:
sal_uInt16 mnCurLevel;
+ // Stores the security level when the dialog opens. Used to check if the value changed
+ sal_uInt16 mnInitialLevel;
std::unique_ptr<weld::RadioButton> m_xVeryHighRB;
std::unique_ptr<weld::RadioButton> m_xHighRB;
@@ -81,6 +83,11 @@ private:
std::unique_ptr<weld::Widget> m_xHighImg;
std::unique_ptr<weld::Widget> m_xMedImg;
std::unique_ptr<weld::Widget> m_xLowImg;
+ std::unique_ptr<weld::Label> m_xWarningLb;
+ std::unique_ptr<weld::Image> m_xWarningImg;
+ std::unique_ptr<weld::Box> m_xWarningBox;
+
+ void SetWarningLabel(const OUString& sMsg);
DECL_LINK(RadioButtonHdl, weld::Toggleable&, void);
public:
diff --git a/xmlsecurity/inc/strings.hrc b/xmlsecurity/inc/strings.hrc
index 7e99a58d5286..b450f885df6e 100644
--- a/xmlsecurity/inc/strings.hrc
+++ b/xmlsecurity/inc/strings.hrc
@@ -64,5 +64,6 @@
#define STR_ENCRYPT NC_("selectcertificatedialog|str_encrypt", "Encrypt")
#define STR_BROKEN_MACRO_CERTIFICATE_DATA NC_("STR_BROKEN_MACRO_CERTIFICATE_DATA", "Macro security problem!\n\nBroken certificate data: %{data}")
+#define STR_RELOAD_FILE_WARNING NC_("STR_RELOAD_FILE_WARNING", "Reload the file to apply the new macro security level")
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */