diff options
author | Jim Raykowski <raykowj@gmail.com> | 2018-06-02 21:34:56 -0800 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-13 09:49:40 +0200 |
commit | f056cb7cec76b0769703176a27ac298461ff411a (patch) | |
tree | 03e08e6905bc40af6b3dfbb77dc942408616fe4a | |
parent | f83998da411ca5dfc1b22ac32d5aeac9e7b8792d (diff) |
tdf#115600 Display messages in FindBar for Comment navigation
...and make Comment navigation wrap
Change-Id: I2d56d1d1fdcef45f5dee10c5fa8fbfff49c3d3e4
Reviewed-on: https://gerrit.libreoffice.org/55304
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | sw/source/uibase/uiview/viewmdi.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 7bd549d0f7d2..b3ac8c5b152b 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -460,19 +460,28 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void ) break; case NID_POSTIT: + { + if ( m_pPostItMgr->HasNotes() ) { rSh.EnterStdMode(); sw::annotation::SwAnnotationWin* pPostIt = GetPostItMgr()->GetActiveSidebarWin(); if (pPostIt) GetPostItMgr()->SetActiveSidebarWin(nullptr); SwFieldType* pFieldType = rSh.GetFieldType(0, SwFieldIds::Postit); - if ( rSh.MoveFieldType( pFieldType, bNext ) ) - GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT); + if ( !rSh.MoveFieldType( pFieldType, bNext ) ) + { + bNext ? (*(m_pPostItMgr->begin()))->pPostIt->GotoPos() : + (*(m_pPostItMgr->end()-1))->pPostIt->GotoPos(); + SvxSearchDialogWrapper::SetSearchLabel( bNext ? SearchLabel::EndWrapped : SearchLabel::StartWrapped ); + } else - //first/last item - GetPostItMgr()->SetActiveSidebarWin(pPostIt); + SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty ); + GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT); } - break; + else + SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::NavElementNotFound ); + } + break; case NID_SRCH_REP: if(m_pSrchItem) |