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

Michael Stahl mstahl at redhat.com
Mon May 29 21:24:11 UTC 2017


 sw/source/core/crsr/crsrsh.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6f1530bfdefc8e4deabf37ab337e09a89d3841b3
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 29 22:53:16 2017 +0200

    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

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;


More information about the Libreoffice-commits mailing list