diff options
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 8 |
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); |