summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-10-21 22:34:40 +0200
committerCaolán McNamara <caolanm@redhat.com>2019-10-22 09:58:55 +0200
commite7bb875b3e9b5d35e8077484b4b43fcca79d30b7 (patch)
treee988292a239af707fc82f6d4027ea06b0ab3e7f5 /sfx2
parent6dd4e88c41bca12c2b7a97aee1f078bba7873960 (diff)
tdf#128230 Require password if the Unprotect button is visible
Regression from commit a2279bb2f52ee5bbe8d38433aac55aa1a16661fb Before that requiring password depended on the current text of the Protect/Unprotect button, which was changed dynamically. This commit changed that logic and introduced two buttons in the new .ui file that are hidden/shown dynamically. The password condition however was changed to check the visibility of the new Protect button instead of the Unprotect button. Change-Id: Ie24e1b2d45fa92a375a29b7bc71689f9b83ae9dc Reviewed-on: https://gerrit.libreoffice.org/81283 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/securitypage.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 53197688fa68..2e673538d913 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -331,7 +331,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl, weld::ToggleButt
}
const bool bNeedPasssword = !m_bOrigPasswordIsConfirmed
- && m_xProtectPB->get_visible();
+ && m_xUnProtectPB->get_visible(); // tdf#128230 Require password if the Unprotect button is visible
if (!bAlreadyDone && bNeedPasssword)
{
OUString aPasswordText;