svx/source/form/fmshell.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0f86aa5dec8ec6961736f66ef83f049fa2049982
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Jan 28 17:09:33 2019 +0000
Commit:     Xisco Faulí <[email protected]>
CommitDate: Tue Jan 29 10:46:48 2019 +0100

    Resolves: tdf#123019 give modal dialog a parent
    
    Change-Id: I669d8cb18ed78fcdb50aa3f452661500d75ad880
    Reviewed-on: https://gerrit.libreoffice.org/67022
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <[email protected]>

diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 3404c091c21c..a149925dd7be 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -245,7 +245,10 @@ bool FmFormShell::PrepareClose(bool bUI)
 
                     if ( bModified && bUI )
                     {
-                        std::unique_ptr<weld::Builder> 
xBuilder(Application::CreateBuilder(nullptr, "svx/ui/savemodifieddialog.ui"));
+                        SfxViewShell* pShell = GetViewShell();
+                        vcl::Window* pShellWnd = pShell ? pShell->GetWindow() 
: nullptr;
+                        weld::Widget* pFrameWeld = pShellWnd ? 
pShellWnd->GetFrameWeld() : nullptr;
+                        std::unique_ptr<weld::Builder> 
xBuilder(Application::CreateBuilder(pFrameWeld, 
"svx/ui/savemodifieddialog.ui"));
                         std::unique_ptr<weld::MessageDialog> 
xQry(xBuilder->weld_message_dialog("SaveModifiedDialog"));
                         switch (xQry->run())
                         {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to