summaryrefslogtreecommitdiffstats
path: root/basctl
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 /basctl
parentcid#1489779 Uninitialized pointer field (diff)
downloadcore-1aee8678c83c637a2d5c1e0a716528b0bcf11de0.tar.gz
core-1aee8678c83c637a2d5c1e0a716528b0bcf11de0.zip
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.cxx16
-rw-r--r--basctl/source/basicide/basides1.cxx2
-rw-r--r--basctl/source/basicide/basobj3.cxx6
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;
}