summaryrefslogtreecommitdiff
path: root/sc/source/ui/dialogs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-09 10:01:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-06-09 16:27:48 +0200
commit3dc30ae62f593a7130b5fe8f6e3b7febe845dde7 (patch)
tree9a97c85638830a0aec6af8fcb4037ce5e5879668 /sc/source/ui/dialogs
parentb2a7703bec86810f5c790622ce762e6475b6997e (diff)
tdf#133807 represent a visible search dialog when search results is closed
Change-Id: If38b2770cfdd7d88bb75cbd47f44cc8515c4e041 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/dialogs')
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 8032a7962549..b1b0e45aec5f 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -10,6 +10,8 @@
#include <searchresults.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <svx/srchdlg.hxx>
#include <dociter.hxx>
#include <document.hxx>
#include <tabvwsh.hxx>
@@ -41,6 +43,19 @@ SearchResultsDlg::SearchResultsDlg(SfxBindings* _pBindings, weld::Window* pParen
SearchResultsDlg::~SearchResultsDlg()
{
+ // tdf#133807 if the search dialog is shown then re-present that dialog
+ // when this results dialog is dismissed
+ SfxViewFrame* pViewFrame = mpBindings->GetDispatcher()->GetFrame();
+ if (!pViewFrame)
+ return;
+ SfxChildWindow* pChildWindow = pViewFrame->GetChildWindow(
+ SvxSearchDialogWrapper::GetChildWindowId());
+ if (!pChildWindow)
+ return;
+ SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get());
+ if (!pSearchDlg)
+ return;
+ pSearchDlg->getDialog()->present();
}
namespace