From 70b567511fb61ff12e9b2b68913a81a4a25ebd59 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 15 Sep 2015 20:22:08 +0200 Subject: [PATCH 115/398] tdf#94237 tiled rendering: Use the entire document as the visual area. Many places were already adapted for the tiled rendering, and the conditions checking for the VisArea() were changed so that the checks are ignored when tiled rendering is active. Unfortunately there are still some places left, and they are causing that various areas are invalidated only partially. Let's sort it out for good, and report the entire document as the VisArea() when the tiled rendering is active, and if there are performance problems, let's profile that & act accordingly. Change-Id: I53f18915ed0aec898704dd1350a9534cfc3f001b (cherry picked from commit 12e3b51abe883202af09769873f87b27d7de118b) --- sw/inc/viewsh.hxx | 3 ++- sw/source/core/view/viewsh.cxx | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 763af506b210..1ba064f0c16c 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -31,6 +31,7 @@ #include #include #include + #define LOK_USE_UNSTABLE_API #include @@ -269,7 +270,7 @@ public: bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser void EnableSmooth( bool b ) { mbEnableSmooth = b; } - const SwRect& VisArea() const { return maVisArea; } + const SwRect& VisArea() const; // If necessary scroll until passed Rect is situated in visible sector. void MakeVisible( const SwRect & ); diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 3d565aea254c..92480b242089 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -569,6 +569,13 @@ void SwViewShell::InvalidateWindows( const SwRect &rRect ) } } +const SwRect& SwViewShell::VisArea() const +{ + // when using the tiled rendering, consider the entire document as our + // visible area + return isTiledRendering()? GetLayout()->Frm(): maVisArea; +} + void SwViewShell::MakeVisible( const SwRect &rRect ) { if ( !VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareWin(*this) ) -- 2.12.0