summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-05-29 22:53:16 +0200
committerMichael Stahl <mstahl@redhat.com>2017-05-29 23:22:48 +0200
commit6f1530bfdefc8e4deabf37ab337e09a89d3841b3 (patch)
treecb725f692c5160c26db328d3a7c3ec83a42b114c
parent20c15b2994dc433c873805ca6ef26338f0713840 (diff)
tdf#96256 sw: fix scrolling to cursor after paste
The mnStartAction hack in commit 587006cac508616f486aea45e265a170bcccdc87 has a surprising effect on SwViewShell::SizeChgNotify(), as it causes PageNumNotify() to be called instead of SizeNotify() if pages are inserted while layouting in GetCharRect(). Now SwCursorShell::UpdateCursor(SCROLLWIN) would no longer scroll to the cursor position, which is a problem for clipboard paste. Try to fix this by calling UISizeNotify() manually, which seems to work. Change-Id: Id08bfe2964564c02fe9d1ef0176939ab3eeb187a
-rw-r--r--sw/source/core/crsr/crsrsh.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 90a5c310d48a..64af2eea098f 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1772,6 +1772,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
pFrame->GetCursorOfst( pShellCursor->GetPoint(), rPt, &aTmpState );
}
--mnStartAction;
+ UISizeNotify(); // tdf#96256 update view size
if( !pShellCursor->HasMark() )
m_aCursorHeight = aTmpState.m_aRealHeight;