[Libreoffice-commits] core.git: sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 7 08:06:20 UTC 2021


 sc/source/ui/docshell/impex.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit a3f0459e57980a70bcb13f0e639bbed26d2d8b62
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Apr 6 21:29:26 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Apr 7 10:05:35 2021 +0200

    ScDocShell::GetActiveDialogParent instead of Application::GetDefDialogParent
    
    which is more likely to be the relevant calc window
    
    Change-Id: I7c939c42752e103494a1df7154b3318643d5206c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113705
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 1087b2bcec51..3abb445590a9 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -238,8 +238,7 @@ bool ScImportExport::StartPaste()
         ScEditableTester aTester( rDoc, aRange );
         if ( !aTester.IsEditable() )
         {
-            vcl::Window* pWin = Application::GetDefDialogParent();
-            std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+            std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(ScDocShell::GetActiveDialogParent(),
                                                           VclMessageType::Info, VclButtonsType::Ok,
                                                           ScResId(aTester.GetMessageId())));
             xInfoBox->run();


More information about the Libreoffice-commits mailing list