summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-05 19:46:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-06 10:55:18 +0200
commit1aee8678c83c637a2d5c1e0a716528b0bcf11de0 (patch)
tree922a5e37d98f547bf0880c2e57a8bbedd0709a63 /basic
parent373da7a00986ea95ce959242c0876a5eaf18a1b6 (diff)
drop intermediate vcl::Window from Application::GetDefDialogParent
Change-Id: I96be984cbefeb8e45bf49de4c50a225a46fbefb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120089 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/inputbox.cxx3
-rw-r--r--basic/source/runtime/iosys.cxx6
-rw-r--r--basic/source/runtime/methods.cxx3
3 files changed, 4 insertions, 8 deletions
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx
index 50b19ee51273..e409b1352bfd 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -133,8 +133,7 @@ void SbRtl_InputBox(StarBASIC *, SbxArray & rPar, bool)
nX = rPar.Get(4)->GetLong();
nY = rPar.Get(5)->GetLong();
}
- vcl::Window* pParent = Application::GetDefDialogParent();
- SvRTLInputBox aDlg(pParent ? pParent->GetFrameWeld() : nullptr,rPrompt,aTitle,aDefault,nX,nY);
+ SvRTLInputBox aDlg(Application::GetDefDialogParent(), rPrompt, aTitle, aDefault, nX, nY);
aDlg.run();
rPar.Get(0)->PutString(aDlg.GetText());
}
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 5b177b906d2d..43ee1c4d6856 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -691,8 +691,7 @@ void SbiIoSystem::Shutdown()
// anything left to PRINT?
if( !aOut.isEmpty() )
{
- vcl::Window* pParent = Application::GetDefDialogParent();
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Warning,
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(Application::GetDefDialogParent(), VclMessageType::Warning,
VclButtonsType::Ok, aOut));
xBox->run();
}
@@ -831,8 +830,7 @@ void SbiIoSystem::WriteCon(std::u16string_view rText)
{
SolarMutexGuard aSolarGuard;
- vcl::Window* pParent = Application::GetDefDialogParent();
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Warning,
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(Application::GetDefDialogParent(), VclMessageType::Warning,
VclButtonsType::OkCancel, s));
xBox->set_default_response(RET_OK);
if (!xBox->run())
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 39309f06a4f4..27da5fdac33d 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4410,8 +4410,7 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
WinBits nDialogType = nType & (16+32+64);
SolarMutexGuard aSolarGuard;
- vcl::Window* pParentWin = Application::GetDefDialogParent();
- weld::Widget* pParent = pParentWin ? pParentWin->GetFrameWeld() : nullptr;
+ weld::Widget* pParent = Application::GetDefDialogParent();
VclMessageType eType = VclMessageType::Other;