summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-08-27 20:37:45 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-09-29 06:30:45 +0100
commite87d0e50777c9c5e0f6922b97cfcdf60b47610df (patch)
treec6ff9fbbadfaad98e087e5068c3b5cec79d191c1
parentb1a031d50d3de4b722ca6b8f2afe4a8c13b79897 (diff)
Set visible range from origin for Calc Tiled Rendering.
Change-Id: I255b8865786088751c5d71da9db2ba38defed3bd
-rw-r--r--sc/source/ui/view/gridwin4.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 040fd179558d..cae7e98fec67 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -380,7 +380,21 @@ void ScGridWindow::Paint( const Rectangle& rRect, OutputDevice* pOutDev )
// We specifically need to set the visible range here -- by default it is
// set in UpdateVisibleRange which however uses the viewdata, which is
// completely irrelevant for tiled rendering.
- maVisibleRange.set( nX1, nY1, nX2, nY2 );
+ // However we don't want to fiddle with the visible range for normal
+ // rendering (i.e. pOutDev == this).
+ if ( pOutDev != this )
+ {
+ // We need to iterate positions from the origin when doing tiled
+ // rendering to ensure that tile edges actually match -- the
+ // visible area is used for FillData which is used for the
+ // position determination.
+ // However ultimately we probably want to kill the use of FillData
+ // for position determination since we no longer scale the values
+ // that we put in there?
+ nX1 = 0;
+ nY1 = 0;
+ maVisibleRange.set( nX1, nY1, nX2, nY2 );
+ }
Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS, pOutDev ); // nicht weiterzeichnen
bIsInPaint = false;
}