diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-28 17:09:33 +0000 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-01-29 10:47:11 +0100 |
commit | 13d62e9c6dec6ea90bb34b1dc4cc2aa52c4bea36 (patch) | |
tree | 65a8b92d0fa908c429ca5ed5d7a6d93a28a2ebae | |
parent | 62fbee2119ba69704b65aaf03ab90caf611ef6aa (diff) |
Resolves: tdf#123019 give modal dialog a parent
Change-Id: I669d8cb18ed78fcdb50aa3f452661500d75ad880
Reviewed-on: https://gerrit.libreoffice.org/67023
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-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 4a77bfc43496..f52118659376 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -247,7 +247,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()) { |