diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-12-16 12:13:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-16 19:42:56 +0000 |
commit | 1aed92da7f41dffbc675102c8f7d6b7705329554 (patch) | |
tree | 1e4eebccfbad4741b609b7e06f8ef37205944ff4 | |
parent | 39ffd246450cbf5feb68d7f5ab058b92a951066a (diff) |
provide a parent for potential message dialog
Change-Id: I7b417c64ce08cddc2c413dae3bcab3b9fe083bc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144337
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 39bdc7cb1eba..3b6666edf173 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -106,7 +106,7 @@ static bool lcl_GetPassword( } -static bool lcl_IsPasswordCorrect( std::u16string_view rPassword ) +static bool lcl_IsPasswordCorrect(weld::Window *pParent, std::u16string_view rPassword) { bool bRes = false; @@ -138,7 +138,7 @@ static bool lcl_IsPasswordCorrect( std::u16string_view rPassword ) if ( !bRes ) { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent, VclMessageType::Info, VclButtonsType::Ok, SfxResId(RID_SVXSTR_INCORRECT_PASSWORD))); xInfoBox->run(); @@ -360,7 +360,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl, weld::Toggleable bAlreadyDone = true; // ask for password and if dialog is canceled or no password provided return - if (lcl_IsPasswordCorrect( aPasswordText )) + if (lcl_IsPasswordCorrect(m_rMyTabPage.GetFrameWeld(), aPasswordText)) m_bOrigPasswordIsConfirmed = true; else bAlreadyDone = true; @@ -400,7 +400,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl, weld::Button&, void // provided password still needs to be checked? if (!bNewProtection && !m_bOrigPasswordIsConfirmed) { - if (lcl_IsPasswordCorrect( aPasswordText )) + if (lcl_IsPasswordCorrect(m_rMyTabPage.GetFrameWeld(), aPasswordText)) m_bOrigPasswordIsConfirmed = true; else return; |