summaryrefslogtreecommitdiff
path: root/svx/source/dialog
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-16 21:37:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-06-17 15:55:53 +0200
commit9da14cf5461a1883718da9f92e03dd0dd6e28efd (patch)
treef57295105f18be0fe953cc6cae6efe82e81dcb83 /svx/source/dialog
parentf9383f75af46efbb319110921158dcd6b5e91913 (diff)
tdf#133807 re-present search dialog after a short timeout
Change-Id: Icc6016b3a9e3f25fd4c9e065e9f2d9570ad040c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96524 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/dialog')
-rw-r--r--svx/source/dialog/srchdlg.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index adab6f86b642..6653be858078 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -255,6 +255,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi
: SfxModelessDialogController(&rBind, pChildWin, pParent,
"svx/ui/findreplacedialog.ui", "FindReplaceDialog")
, rBindings(rBind)
+ , m_aPresentIdle("Bring SvxSearchDialog to Foreground")
, bWriter(false)
, bSearch(true)
, bFormat(false)
@@ -312,6 +313,9 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi
, m_xAllSheetsCB(m_xBuilder->weld_check_button("allsheets"))
, m_xCalcStrFT(m_xBuilder->weld_label("entirecells"))
{
+ m_aPresentIdle.SetTimeout(50);
+ m_aPresentIdle.SetInvokeHandler(LINK(this, SvxSearchDialog, PresentTimeoutHdl_Impl));
+
m_xSearchTmplLB->make_sorted();
m_xSearchAttrText->hide();
m_xSearchLabel->show();
@@ -338,6 +342,18 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi
Construct_Impl();
}
+IMPL_LINK_NOARG(SvxSearchDialog, PresentTimeoutHdl_Impl, Timer*, void)
+{
+ getDialog()->present();
+}
+
+void SvxSearchDialog::Present()
+{
+ PresentTimeoutHdl_Impl(nullptr);
+ // tdf#133807 try again in a short timeout
+ m_aPresentIdle.Start();
+}
+
void SvxSearchDialog::ChildWinDispose()
{
rBindings.EnterRegistrations();
@@ -350,6 +366,7 @@ void SvxSearchDialog::ChildWinDispose()
SvxSearchDialog::~SvxSearchDialog()
{
+ m_aPresentIdle.Stop();
}
void SvxSearchDialog::Construct_Impl()