diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2015-05-02 17:21:24 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-10 19:49:19 +0000 |
commit | 69b35cb45375c324c1e28fd4547ce874e4894f30 (patch) | |
tree | 9154b89ca5612498ddf25f0e247de26397fc9dbc | |
parent | 2523972f6a066488c649ab97dcba4f458126f18b (diff) |
related tdf#88608: find: add string for reaching start of document
If you searched backwards and reached the start of the document,
the text "Reached the end of the document" was shown.
Change-Id: Ic35884de2f1ada07e76c9c3e27cf6c81c4a83304
Reviewed-on: https://gerrit.libreoffice.org/15597
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/svx/dialogs.hrc | 1 | ||||
-rw-r--r-- | include/svx/srchdlg.hxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.src | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 7 |
5 files changed, 14 insertions, 1 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index e6abab7a62ae..709bd3b26de9 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -227,6 +227,7 @@ #define RID_SVXSTR_CALC_STYLES (RID_SVX_START + 85) #define RID_SVXSTR_SEARCH_NOT_FOUND (RID_SVX_START + 88) #define RID_SVXSTR_QUERY_EXIT_RECOVERY (RID_SVX_START + 89) +#define RID_SVXSTR_SEARCH_START (RID_SVX_START + 90) // ResIds for the PageDialog // Strings of the ToolBox-Controls from tbcontrl.cxx diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 0ad7edb914fe..81728a9a670f 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -82,6 +82,7 @@ enum SearchLabel { SL_Empty, SL_End, + SL_Start, SL_EndSheet, SL_NotFound }; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 415c14020e1a..33dbbb806797 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2319,6 +2319,8 @@ void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL) OUString sStr; if (rSL == SL_End) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END); + else if (rSL == SL_Start) + sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_START); else if (rSL == SL_EndSheet) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END_SHEET); else if (rSL == SL_NotFound) diff --git a/svx/source/dialog/srchdlg.src b/svx/source/dialog/srchdlg.src index c0fd4e5b6933..e50d3d7014e5 100644 --- a/svx/source/dialog/srchdlg.src +++ b/svx/source/dialog/srchdlg.src @@ -54,5 +54,9 @@ String RID_SVXSTR_SEARCH_NOT_FOUND { Text [ en-US ] = "Search key not found" ; }; +String RID_SVXSTR_SEARCH_START +{ + Text [ en-US ] = "Reached the beginning of the document" ; +}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index e23c53c30194..e1deaba8a0c4 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -544,7 +544,12 @@ bool SwView::SearchAndWrap(bool bApi) pWait.reset(); #if HAVE_FEATURE_DESKTOP if (m_bFound) - SvxSearchDialogWrapper::SetSearchLabel(SL_End); + { + if (!bSrchBkwrd) + SvxSearchDialogWrapper::SetSearchLabel(SL_End); + else + SvxSearchDialogWrapper::SetSearchLabel(SL_Start); + } else if(!bApi) SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); #endif |