summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-09-15 20:22:08 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-17 14:43:57 +0200
commitf2b4227fe0ac8d2a95fdf535e37964abb510e68e (patch)
treed985cc7ec139585697aca0e19956c29c0200880a
parentffcfeada090b65a755f0e2d99cde713350df2f77 (diff)
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)
-rw-r--r--sw/inc/viewsh.hxx3
-rw-r--r--sw/source/core/view/viewsh.cxx7
2 files changed, 9 insertions, 1 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index aed6b40f4049..d0e3d12fbb4a 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -31,6 +31,7 @@
#include <vcl/mapmod.hxx>
#include <vcl/print.hxx>
#include <vcl/vclptr.hxx>
+
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
@@ -262,7 +263,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 cd676372ad77..91bae95a8be3 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -575,6 +575,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) )