[Libreoffice-commits] core.git: svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 28 21:09:45 UTC 2019
svx/source/form/fmshell.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 807f2202d7a974048d417279cd83effa24213759
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 28 17:09:33 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jan 28 22:09:22 2019 +0100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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())
{
More information about the Libreoffice-commits
mailing list