sw/source/core/crsr/crsrsh.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+)
New commits: commit aebf19251cef417b387c7830535542ff11d54cea Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Thu Apr 11 23:42:25 2019 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Thu Apr 18 04:11:34 2019 +0200 tdf#115600 Display not found message for Navigate by Selection ...if there is no selection found Change-Id: Ie4857e8d1bb98e41565aef47d3a794dcbe9bbd66 Reviewed-on: https://gerrit.libreoffice.org/70645 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index f04c7a06e1f8..22a84c6b4f75 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -22,6 +22,7 @@ #include <hintids.hxx> #include <svx/svdmodel.hxx> +#include <svx/srchdlg.hxx> #include <editeng/frmdiritem.hxx> #include <sfx2/viewsh.hxx> #include <SwSmartTagMgr.hxx> @@ -1343,8 +1344,14 @@ void SwCursorShell::NotifyCursor(SfxViewShell* pOtherShell) const /// go to the next SSelection bool SwCursorShell::GoNextCursor() { + SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty ); + if( !m_pCurrentCursor->IsMultiSelection() ) + { + if( !m_pCurrentCursor->HasMark() ) + SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::NavElementNotFound ); return false; + } SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed @@ -1362,8 +1369,14 @@ bool SwCursorShell::GoNextCursor() /// go to the previous SSelection bool SwCursorShell::GoPrevCursor() { + SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty ); + if( !m_pCurrentCursor->IsMultiSelection() ) + { + if( !m_pCurrentCursor->HasMark() ) + SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::NavElementNotFound ); return false; + } SET_CURR_SHELL( this ); SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits