diff options
author | Akshay Deep <akshaydeepiitr@gmail.com> | 2016-03-08 19:54:57 +0530 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-04-04 08:51:17 +0000 |
commit | beeef93480fae65840646e4e36aa888efe92579a (patch) | |
tree | 7bd736c58b22f84429828e32870d669cd6ea91e1 /sw/source | |
parent | 0085eb42fdb7cceece11004841c50f3008c9e120 (diff) |
Added Find Previous Button.
Replaced backward checkbox with 'Replace Backward' from other options.
Modified Dialog Layout as per the attachment in bug report.
Removed vertical spacing in parent_container_box to reduce height of the dialog.
Removed InfoBox from ReplaceAll functionality in writer, shifted it to SearchLabel.
Attribute labels only show up when attribues are used in search, else they remain hidden.
Change-Id: I0e9ded854fc2601524d6fc2a0ba5e9cb602e11a4
Reviewed-on: https://gerrit.libreoffice.org/23057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 23283de9d6b0..58012322104b 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -85,11 +85,6 @@ struct SwSearchOptions SwSearchOptions( SwWrtShell* pSh, bool bBackward ); }; -static vcl::Window* GetParentWindow( SvxSearchDialog* pSrchDlg ) -{ - return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : nullptr; -} - /// Adds rMatches using rKey as a key to the rTree tree. static void lcl_addContainerToJson(boost::property_tree::ptree& rTree, const OString& rKey, const std::vector<OString>& rMatches) { @@ -193,7 +188,7 @@ void SwView::ExecSearch(SfxRequest& rReq) { // We will remember the search-/replace items. const SearchAttrItemList* pList = pSrchDlg->GetSearchItemList(); - if( pList && pList->Count() ) + if( nullptr != pList && pList->Count() ) m_pSrchList = new SearchAttrItemList( *pList ); pList = pSrchDlg->GetReplaceItemList(); @@ -218,7 +213,7 @@ void SwView::ExecSearch(SfxRequest& rReq) DELETEZ( m_pReplList ); const SearchAttrItemList* pList = pSrchDlg->GetSearchItemList(); - if( pList && pList->Count() ) + if( nullptr != pList && pList->Count() ) m_pSrchList = new SearchAttrItemList( *pList ); pList = pSrchDlg->GetReplaceItemList(); @@ -414,11 +409,9 @@ void SwView::ExecSearch(SfxRequest& rReq) if( !bQuiet && ULONG_MAX != nFound) { - OUString aText( SW_RES( STR_NB_REPLACED ) ); - aText = aText.replaceFirst("XX", OUString::number( nFound )); - pSrchDlg = GetSearchDialog(); - vcl::Window* pParentWindow = GetParentWindow(pSrchDlg); - ScopedVclPtr<InfoBox>::Create( pParentWindow, aText )->Execute(); + OUString sText( SW_RES( STR_NB_REPLACED ) ); + sText = sText.replaceFirst("XX", OUString::number( nFound )); + SvxSearchDialogWrapper::SetSearchLabel(sText); } } #if HAVE_FEATURE_DESKTOP |