diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-05 19:46:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-06 10:55:18 +0200 |
commit | 1aee8678c83c637a2d5c1e0a716528b0bcf11de0 (patch) | |
tree | 922a5e37d98f547bf0880c2e57a8bbedd0709a63 /basctl | |
parent | 373da7a00986ea95ce959242c0876a5eaf18a1b6 (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 'basctl')
-rw-r--r-- | basctl/source/basicide/IDEComboBox.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/basobj3.cxx | 6 |
3 files changed, 15 insertions, 9 deletions
diff --git a/basctl/source/basicide/IDEComboBox.cxx b/basctl/source/basicide/IDEComboBox.cxx index 87a45e5a9c22..e295e44ff1ed 100644 --- a/basctl/source/basicide/IDEComboBox.cxx +++ b/basctl/source/basicide/IDEComboBox.cxx @@ -194,14 +194,20 @@ void LibBox::ReleaseFocus() SfxViewShell* pCurSh = SfxViewShell::Current(); DBG_ASSERT(pCurSh, "Current ViewShell not found!"); - if (pCurSh) - { - vcl::Window* pShellWin = pCurSh->GetWindow(); - if (!pShellWin) - pShellWin = Application::GetDefDialogParent(); + if (!pCurSh) + return; + vcl::Window* pShellWin = pCurSh->GetWindow(); + if (pShellWin) + { pShellWin->GrabFocus(); + return; } + + weld::Window* pWin = Application::GetDefDialogParent(); + if (!pWin) + return; + pWin->grab_focus(); } void LibBox::FillBox() diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 8942d87f4ae0..70991525331a 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1295,7 +1295,7 @@ BasicDebugFlags Shell::CallBasicBreakHdl( StarBASIC const * pBasic ) if ( StarBASIC::IsRunning() ) // if cancelled... { if ( bAppWindowDisabled ) - Application::GetDefDialogParent()->Enable(false); + Application::GetDefDialogParent()->set_sensitive(false); if ( nWaitCount ) { diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index fa7c2fc3d220..06f7c6a9e08c 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -332,10 +332,10 @@ void BasicStopped( *pnWaitCount = nWait; } - vcl::Window* pDefParent = Application::GetDefDialogParent(); - if ( pDefParent && !pDefParent->IsEnabled() ) + weld::Window* pDefParent = Application::GetDefDialogParent(); + if (pDefParent && !pDefParent->get_sensitive()) { - pDefParent->Enable(); + pDefParent->set_sensitive(true); if ( pbAppWindowDisabled ) *pbAppWindowDisabled = true; } |