Kaydet (Commit) bbc3dfce authored tarafından Jan Holesovsky's avatar Jan Holesovsky

sc lok: Always provide a reasonable document size.

With an empty document, GetPrintArea() returned false, causing nothing visible
on the screen.

Also increase the values when I'm touching this.

Change-Id: Iee7544a428d5d4d5d5931230a51e605302557f41
üst 2e324090
...@@ -708,15 +708,14 @@ bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) ...@@ -708,15 +708,14 @@ bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow )
bool ScDocument::GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const bool ScDocument::GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const
{ {
if (!GetPrintArea(nTab, rEndCol, rEndRow, false)) bool bHasPrintArea = GetPrintArea(nTab, rEndCol, rEndRow, false);
return false;
// we need some reasonable minimal document size // we need some reasonable minimal document size
if (rEndCol < 12) if (!bHasPrintArea || rEndCol < 20)
rEndCol = 12; rEndCol = 20;
if (rEndRow < 36) if (!bHasPrintArea || rEndRow < 50)
rEndRow = 36; rEndRow = 50;
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment