Blame SOURCES/0249-sc-lok-Always-provide-a-reasonable-document-size.patch

f325b2
From abae8af12a4ecb926261a4cee6f92561478ac606 Mon Sep 17 00:00:00 2001
f325b2
From: Jan Holesovsky <kendy@collabora.com>
f325b2
Date: Sat, 31 Oct 2015 00:24:17 +0100
f325b2
Subject: [PATCH 249/398] sc lok: Always provide a reasonable document size.
f325b2
f325b2
With an empty document, GetPrintArea() returned false, causing nothing visible
f325b2
on the screen.
f325b2
f325b2
Also increase the values when I'm touching this.
f325b2
f325b2
Change-Id: Iee7544a428d5d4d5d5931230a51e605302557f41
f325b2
(cherry picked from commit 5409dc0847a4ec17f5791f577249d47913f12b48)
f325b2
---
f325b2
 sc/source/core/data/documen2.cxx | 11 +++++------
f325b2
 1 file changed, 5 insertions(+), 6 deletions(-)
f325b2
f325b2
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
f325b2
index 8d3e4e3d3b8f..2a305c032f2b 100644
f325b2
--- a/sc/source/core/data/documen2.cxx
f325b2
+++ b/sc/source/core/data/documen2.cxx
f325b2
@@ -708,15 +708,14 @@ bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow )
f325b2
 
f325b2
 bool ScDocument::GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const
f325b2
 {
f325b2
-    if (!GetPrintArea(nTab, rEndCol, rEndRow, false))
f325b2
-        return false;
f325b2
+    bool bHasPrintArea = GetPrintArea(nTab, rEndCol, rEndRow, false);
f325b2
 
f325b2
     // we need some reasonable minimal document size
f325b2
-    if (rEndCol < 12)
f325b2
-        rEndCol = 12;
f325b2
+    if (!bHasPrintArea || rEndCol < 20)
f325b2
+        rEndCol = 20;
f325b2
 
f325b2
-    if (rEndRow < 36)
f325b2
-        rEndRow = 36;
f325b2
+    if (!bHasPrintArea || rEndRow < 50)
f325b2
+        rEndRow = 50;
f325b2
 
f325b2
     return true;
f325b2
 }
f325b2
-- 
f325b2
2.12.0
f325b2