[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 9 14:28:31 UTC 2020
sc/source/ui/dialogs/searchresults.cxx | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit 3dc30ae62f593a7130b5fe8f6e3b7febe845dde7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 9 10:01:32 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 9 16:27:48 2020 +0200
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 at redhat.com>
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
More information about the Libreoffice-commits
mailing list