summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/crsrsh.cxx
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2019-04-11 23:42:25 -0800
committerJim Raykowski <raykowj@gmail.com>2019-04-18 04:11:34 +0200
commitaebf19251cef417b387c7830535542ff11d54cea (patch)
tree1804220fe872496def1775aead456326d07d1598 /sw/source/core/crsr/crsrsh.cxx
parent96bf1e53fba51ad42742bba66469bea911b57325 (diff)
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 <raykowj@gmail.com>
Diffstat (limited to 'sw/source/core/crsr/crsrsh.cxx')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx13
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