Kaydet (Commit) 0f86aa5d authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Xisco Faulí

Resolves: tdf#123019 give modal dialog a parent

Change-Id: I669d8cb18ed78fcdb50aa3f452661500d75ad880
Reviewed-on: https://gerrit.libreoffice.org/67022
Tested-by: Jenkins
Reviewed-by: 's avatarXisco Faulí <xiscofauli@libreoffice.org>
üst 9c1c1e88
...@@ -245,7 +245,10 @@ bool FmFormShell::PrepareClose(bool bUI) ...@@ -245,7 +245,10 @@ bool FmFormShell::PrepareClose(bool bUI)
if ( bModified && 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")); std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog("SaveModifiedDialog"));
switch (xQry->run()) switch (xQry->run())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment