Kaydet (Commit) 952e9eed authored tarafından Miklos Vajna's avatar Miklos Vajna

editeng lok: invalidate on scroll

E.g. when a Witer comment has long enough contents to get scrolled, the
desktop case repaints its contents by vcl::Window::Scroll(), followed by
a vcl::Window::Update(), i.e. vcl::Window::Invalidate() is not called.

The result of this in case of tiled rendering is that no tile is
repainted, so call vcl::Window::Invalidate() after scrolling manually.

A generic VCL-level invalidate-after-scroll is not wanted, as the
scrolling of the document contents and the main document window is not
in sync when tiled rendering.

(cherry picked from commit 162ae47a)

Conflicts:
	editeng/source/editeng/impedit.cxx

Change-Id: I74296a0f0e52c92cf3db6aefa73f28bb2b202871
üst 9615d10f
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <sot/formats.hxx> #include <sot/formats.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <comphelper/lok.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -1085,6 +1086,11 @@ Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck ) ...@@ -1085,6 +1086,11 @@ Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck )
aVisDocStartPos = pOutWin->PixelToLogic( aVisDocStartPos ); aVisDocStartPos = pOutWin->PixelToLogic( aVisDocStartPos );
Rectangle aRect( aOutArea ); Rectangle aRect( aOutArea );
pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, SCROLL_CLIP ); pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, SCROLL_CLIP );
if (comphelper::LibreOfficeKit::isActive())
// Need to invalidate the window, otherwise no tile will be re-painted.
pOutWin->Invalidate();
pOutWin->Update(); pOutWin->Update();
pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) ); pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) );
if ( bVisCursor ) if ( bVisCursor )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment