diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-28 17:09:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-01-28 22:09:22 +0100 |
commit | 807f2202d7a974048d417279cd83effa24213759 (patch) | |
tree | bac56efcf550ac048efd897ce4986920b82a9e81 /svx/source/form | |
parent | 61da05ebd0cd73507484ce11c8ba6401d5c562fe (diff) |
Resolves: tdf#123019 give modal dialog a parent
Change-Id: I669d8cb18ed78fcdb50aa3f452661500d75ad880
Reviewed-on: https://gerrit.libreoffice.org/67021
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/fmshell.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index e24ca7ca09ea..67191161c8af 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()) { |