diff options
author | heiko tietze <tietze.heiko@gmail.com> | 2019-05-07 14:17:48 +0200 |
---|---|---|
committer | Heiko Tietze <tietze.heiko@gmail.com> | 2019-05-17 10:45:01 +0200 |
commit | 019c6ae2ee20a5923055c261abdd22575b69299b (patch) | |
tree | 9c360dfac8b292ac375d589ccecc714f4508a6fb /sc/source/ui/dialogs/searchresults.cxx | |
parent | 5187d3ae495a07373a12fd5980c9269bc8ce3f8f (diff) |
Resolves tdf#87965 - Make 'Search Results' dialog optional
* Option introduced at Tools > Options > Calc > View (Windows)
* Convenience checkbox added to the dialog
Change-Id: Ic30fb302e61e77b0eefacd504f61f955bcf6e595
Reviewed-on: https://gerrit.libreoffice.org/71910
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'sc/source/ui/dialogs/searchresults.cxx')
-rw-r--r-- | sc/source/ui/dialogs/searchresults.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index 9491123f77e5..8b896b466ab6 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -26,9 +26,10 @@ SearchResultsDlg::SearchResultsDlg(SfxBindings* _pBindings, weld::Window* pParen , mpDoc(nullptr) , mxList(m_xBuilder->weld_tree_view("results")) , mxSearchResults(m_xBuilder->weld_label("lbSearchResults")) + , mxShowDialog(m_xBuilder->weld_check_button("cbShow")) { mxList->set_size_request(mxList->get_approximate_digit_width() * 50, mxList->get_height_rows(15)); - + mxShowDialog->connect_toggled(LINK(this, SearchResultsDlg, OnShowToggled)); std::vector<int> aWidths; aWidths.push_back(mxList->get_approximate_digit_width() * 10); aWidths.push_back(mxList->get_approximate_digit_width() * 10); @@ -187,6 +188,14 @@ IMPL_LINK_NOARG( SearchResultsDlg, ListSelectHdl, weld::TreeView&, void ) pScViewShell->AlignToCursor(aPos.Col(), aPos.Row(), SC_FOLLOW_JUMP); } +IMPL_STATIC_LINK( SearchResultsDlg, OnShowToggled, weld::ToggleButton&, rButton, void ) +{ + ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell(); + ScViewOptions aViewOpt( pScViewShell->GetViewData().GetOptions() ); + aViewOpt.SetOption( VOPT_SUMMARY, rButton.get_active() ); + pScViewShell->GetViewData().SetOptions( aViewOpt ); +} + SearchResultsDlgWrapper::SearchResultsDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* /*pInfo*/) : SfxChildWindow(_pParent, nId) |