sc/source/ui/view/gridwin4.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 7f947e2eec8ee34086924734396e2b0910bb1808 Author: Andrzej Hunt <[email protected]> Date: Tue Sep 30 16:12:56 2014 +0100 Don't render infinitely large document if empty. Change-Id: I887d8cef0c24b1e5155969a9f571660ca54ef463 diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 302bcee..6811de4 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -410,6 +410,13 @@ Size ScGridWindow::GetDataAreaSize() // Actual data area pDoc->ShrinkToDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow ); + // We need to ensure we have at least one cell, since a 0x0 document + // cannot be rendered. If we have no content then ShrinkToDataArea simply + // leaves nEndCol/Row at MAXCOL/ROW. + if ( nEndCol == MAXCOL ) + nEndCol = 1; + if ( nEndRow == MAXROW ) + nEndRow = 1; // Drawing layer area -- is completely independent of the data area. ScTabViewShell* pTabViewShell = pViewData->GetViewShell(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
