diff options
Diffstat (limited to 'sw/source/core/crsr/crsrsh.cxx')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
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 |