summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2015-01-13 18:21:55 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2015-01-14 22:17:27 -0500
commit6a5f3ff796db42a616845323731bf796907797b8 (patch)
tree77f34a57a0e2749ce989b35e72d1417c786e2616 /sc
parent8a0a1fbfc3aacb7e71c79da75c56698c1ea2378d (diff)
Tiled rendering, first cut.
Very simple, without zooming. Change-Id: Ia5bd5c02dab3eedbaad07ebd81c4d7fe3c6a00c1
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin4.cxx34
1 files changed, 27 insertions, 7 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index e163d4dd3aef..54d9d0e7fbf7 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -877,13 +877,33 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
int nTilePosX, int nTilePosY,
long nTileWidth, long nTileHeight )
{
- (void) rDevice;
- (void) nOutputWidth;
- (void) nOutputHeight;
- (void) nTilePosX;
- (void) nTilePosY;
- (void) nTileWidth;
- (void) nTileHeight;
+ // Output size is in pixels while tile position and size are in logical units (twips).
+
+ // Assumption: always paint the whole sheet i.e. "visible" range is always
+ // from (0,0) to last data position.
+
+ SCTAB nTab = pViewData->GetTabNo();
+ ScDocument* pDoc = pViewData->GetDocument();
+ ScAddress aLastPos = pDoc->GetLastDataPos(nTab);
+
+ SCCOL nCol1 = 0, nCol2 = aLastPos.Col();
+ SCROW nRow1 = 0, nRow2 = aLastPos.Row();
+
+ double fPPTX = pViewData->GetPPTX();
+ double fPPTY = pViewData->GetPPTY();
+
+ ScTableInfo aTabInfo;
+ pDoc->FillInfo(aTabInfo, nCol1, nRow1, nCol2, nRow2, nTab, fPPTX, fPPTY, false, false, NULL);
+
+ ScOutputData aOutData(
+ &rDevice, OUTTYPE_WINDOW, aTabInfo, pDoc, nTab, 0, 0, nCol1, nRow1, nCol2, nRow2, fPPTX, fPPTY);
+ aOutData.DrawGrid(true, false);
+
+ aOutData.DrawShadow();
+ aOutData.DrawFrame();
+
+ aOutData.DrawStrings(true);
+ aOutData.DrawEdit(true);
}
void ScGridWindow::CheckNeedsRepaint()