[Libreoffice-commits] core.git: sw/source

Jim Raykowski raykowj at gmail.com
Wed Jun 13 07:50:13 UTC 2018


 sw/source/uibase/uiview/viewmdi.cxx |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

New commits:
commit f056cb7cec76b0769703176a27ac298461ff411a
Author: Jim Raykowski <raykowj at gmail.com>
Date:   Sat Jun 2 21:34:56 2018 -0800

    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 at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

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)


More information about the Libreoffice-commits mailing list