sc/source/ui/dialogs/searchresults.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 8f364a1f2786be2a9c0953f9548765928c0610ae Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jun 9 10:01:32 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jun 9 17:51:31 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/+/95883 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index 76cffa4664a5..11e670fae161 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> @@ -39,6 +41,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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits