sc/source/ui/unoobj/docuno.cxx | 15 +++++++-------- sc/source/ui/view/gridwin4.cxx | 12 +++++++----- 2 files changed, 14 insertions(+), 13 deletions(-)
New commits: commit c4203c7226a9c354552cfb36b92899bab83b6eb9 Author: Jan Holesovsky <[email protected]> Date: Wed Mar 25 10:21:49 2015 +0100 sc tiled editing: Use GetPrintArea() for FillInfo()/ScOutputData too. Necessary in order to get the grid for the entire document. Change-Id: I3935694b15c1bec3f8c5f22c62f787a4bf0d62de diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index cdef76d..ac2cd85 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -952,19 +952,21 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice, 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(); + SCCOL nStartCol = 0, nEndCol = 0; + SCROW nStartRow = 0, nEndRow = 0; + + // size of the document including drawings, charts, etc. + pDoc->GetPrintArea(nTab, nEndCol, nEndRow, false); double fPPTX = pViewData->GetPPTX(); double fPPTY = pViewData->GetPPTY(); ScTableInfo aTabInfo; - pDoc->FillInfo(aTabInfo, nCol1, nRow1, nCol2, nRow2, nTab, fPPTX, fPPTY, false, false, NULL); + pDoc->FillInfo(aTabInfo, nStartCol, nStartRow, nEndCol, nEndRow, nTab, fPPTX, fPPTY, false, false, NULL); ScOutputData aOutputData(&rDevice, OUTTYPE_WINDOW, aTabInfo, pDoc, nTab, - -fTilePosXPixel, -fTilePosYPixel, nCol1, nRow1, nCol2, nRow2, + -fTilePosXPixel, -fTilePosYPixel, nStartCol, nStartRow, nEndCol, nEndRow, fPPTX, fPPTY); // create a temporary SdrPaintWindow to avoid warnings commit 5cbb4268dacb8ba4526dbbd5bdcd6a8abfcc0e55 Author: Jan Holesovsky <[email protected]> Date: Wed Mar 25 10:11:52 2015 +0100 No need to create ScAddress here. Change-Id: Ide41495574e8a1d89f9be4f823e4d85d3742b450 diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 6447c98..c34f0f7 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -514,14 +514,9 @@ Size ScModelObj::getDocumentSize() if (!rDoc.GetPrintArea( nTab, nEndCol, nEndRow, false )) return aSize; - ScAddress aPos( nEndCol, nEndRow, nTab ); - - // TWIPS - sal_uLong nH = rDoc.GetRowHeight(0, aPos.Row(), nTab, true); - sal_uLong nW = rDoc.GetColWidth(0, aPos.Col(), nTab, true); - - aSize.setWidth(nW); - aSize.setHeight(nH); + // convert to twips + aSize.setWidth(rDoc.GetColWidth(0, nEndCol, nTab, true)); + aSize.setHeight(rDoc.GetRowHeight(0, nEndRow, nTab, true)); return aSize; } commit 690698efdb6f8e4b37a3226377e864f818492de8 Author: Henry Castro <[email protected]> Date: Tue Mar 24 18:05:25 2015 -0400 sc tiled editing: using function GetPrintArea to calculate document size. GetPrintArea calculate end column and end row including images. Change-Id: I256f9f1ce72f22b25cec63603de55cc0192b33ad diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index c1c3e4e..6447c98 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -507,11 +507,15 @@ Size ScModelObj::getDocumentSize() return aSize; SCTAB nTab = pViewData->GetTabNo(); + SCCOL nEndCol = 0; + SCROW nEndRow = 0; const ScDocument& rDoc = pDocShell->GetDocument(); - ScAddress aPos = rDoc.GetLastDataPos(nTab); - if (!aPos.IsValid()) + + if (!rDoc.GetPrintArea( nTab, nEndCol, nEndRow, false )) return aSize; + ScAddress aPos( nEndCol, nEndRow, nTab ); + // TWIPS sal_uLong nH = rDoc.GetRowHeight(0, aPos.Row(), nTab, true); sal_uLong nW = rDoc.GetColWidth(0, aPos.Col(), nTab, true); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
