summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-04-10 21:17:40 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-04-10 22:39:03 +0200
commit508013d799358bb1c92b5cfea5257fe53c695cee (patch)
tree6cb80bae23c5fbf33b63ed4131654a93fed75874
parenta953fa1c0f6a40a08859570516c511f3a8410a35 (diff)
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@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r--sw/source/core/crsr/crsrsh.cxx13
1 files changed, 3 insertions, 10 deletions
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();