diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-19 15:09:05 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-19 16:35:03 +0100 |
commit | 162ae47a046b0c501e09d611a9834e875db884b8 (patch) | |
tree | 57b262cbbebd64d443479247f98bb20f788f6561 /editeng | |
parent | b0339005b820149f86e691f88f0540c07a306d69 (diff) |
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.
Change-Id: I74296a0f0e52c92cf3db6aefa73f28bb2b202871
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index df875edba6f7..850abc403808 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -47,6 +47,7 @@ #include <sot/formats.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/string.hxx> +#include <comphelper/lok.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -1084,6 +1085,11 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) aVisDocStartPos = pOutWin->PixelToLogic( aVisDocStartPos ); Rectangle aRect( aOutArea ); pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, ScrollFlags::Clip ); + + if (comphelper::LibreOfficeKit::isActive()) + // Need to invalidate the window, otherwise no tile will be re-painted. + pOutWin->Invalidate(); + pOutWin->Update(); pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) ); if ( bVisCursor ) |