sfx2/source/dialog/securitypage.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1aed92da7f41dffbc675102c8f7d6b7705329554
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Dec 16 12:13:01 2022 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Dec 16 19:42:56 2022 +0000

    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 <[email protected]>

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;

Reply via email to