summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2015-03-24 18:05:25 -0400
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-30 09:23:47 +0200
commit4f658bf3eee7e2f5b72e979cee09188414dd0530 (patch)
tree2fce137ec6372f3a2b88fc8ea66494fc59c3b6ba
parenta7f1ec6dd6eb2d762293bb4712eec987fcb504f1 (diff)
sc tiled editing: using function GetPrintArea to calculate document size.
GetPrintArea calculate end column and end row including images. Change-Id: I256f9f1ce72f22b25cec63603de55cc0192b33ad
-rw-r--r--sc/source/ui/unoobj/docuno.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 74fb41e3938e..9ccab40c0a1d 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);