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

Tamás Zolnai tamas.zolnai at collabora.com
Tue Apr 10 20:39:26 UTC 2018


 sw/source/core/crsr/crsrsh.cxx |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 508013d799358bb1c92b5cfea5257fe53c695cee
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Tue Apr 10 21:17:40 2018 +0200

    sw lok: followup commit for change about scrolling to visible cursor
    
    Revert small part of this commit:
    83b7bfc0efefb3c77e5c59553320e98539250c62
    
    Thanks Jan Holesovsky to catching it.
    
    Change-Id: I885c9f3da622052685d1e46f6358783fc7f8cb9a
    Reviewed-on: https://gerrit.libreoffice.org/52684
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 9fc5a8cb7fc9..3f8880312b24 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1411,13 +1411,6 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
     SET_CURR_SHELL( this );
     ClearUpCursors();
 
-    bool bScrollWin = eFlags & SwCursorShell::SCROLLWIN;
-    // Don't scroll to the cursor if it's moved by an other view
-    if(comphelper::LibreOfficeKit::isActive())
-    {
-        bScrollWin = SfxLokHelper::getView() != SfxLokHelper::getView(GetSfxViewShell());
-    }
-
     if (ActionPend())
     {
         if ( eFlags & SwCursorShell::READONLY )
@@ -1560,7 +1553,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
 
             m_pVisibleCursor->Hide(); // always hide visible Cursor
             // scroll Cursor to visible area
-            if( bScrollWin &&
+            if( eFlags & SwCursorShell::SCROLLWIN &&
                 (HasSelection() || eFlags & SwCursorShell::READONLY ||
                  !IsCursorReadonly()) )
             {
@@ -1818,7 +1811,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
         }
 
         // scroll Cursor to visible area
-        if( m_bHasFocus && bScrollWin&&
+        if( m_bHasFocus && eFlags & SwCursorShell::SCROLLWIN &&
             (HasSelection() || eFlags & SwCursorShell::READONLY ||
              !IsCursorReadonly() || GetViewOptions()->IsSelectionInReadonly()) )
         {
@@ -1830,7 +1823,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
             m_bSVCursorVis = bSav;
         }
 
-    } while( bScrollWin );
+    } while( eFlags & SwCursorShell::SCROLLWIN );
 
     if( m_pBlockCursor )
         RefreshBlockCursor();


More information about the Libreoffice-commits mailing list