summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-04-10 21:17:40 +0200
committerJan Holesovsky <kendy@collabora.com>2018-04-11 11:30:17 +0200
commit075112bc4de73ab581b65f8ae5bb2db0d84ec87d (patch)
tree8f3ca41b6a9a0da3cdac47ce24b902118eeeb33c
parent715d76c61f5ae114df607e91cc4204b62530c8e4 (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. Reviewed-on: https://gerrit.libreoffice.org/52684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 508013d799358bb1c92b5cfea5257fe53c695cee) Change-Id: I885c9f3da622052685d1e46f6358783fc7f8cb9a Reviewed-on: https://gerrit.libreoffice.org/52702 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@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 02439fbb437c..37a81c0cd679 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1428,13 +1428,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)
- {
- bScrollWin = SfxLokHelper::getView() != SfxLokHelper::getView(GetSfxViewShell());
- }
-
// In a BasicAction the cursor must be updated, e.g. to create the
// TableCursor. EndAction now calls UpdateCursor!
if( ActionPend() && BasicActionPend() )
@@ -1577,7 +1570,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()) )
{
@@ -1832,7 +1825,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()) )
{
@@ -1844,7 +1837,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
m_bSVCursorVis = bSav;
}
- } while( bScrollWin );
+ } while( eFlags & SwCursorShell::SCROLLWIN );
if( m_pBlockCursor )
RefreshBlockCursor();