diff options
author | Eike Rathke <erack@redhat.com> | 2015-05-06 15:11:41 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-05-06 15:50:31 +0200 |
commit | 853f119c479f6bb2b8cdf4dbe49542f362a0cbb9 (patch) | |
tree | f7a64c7004d8975bb3fd9ec91a3e660596983ce6 | |
parent | 0005d50f07f35fa1cb2063cf2cbad465c4068225 (diff) |
document's visible tab may be out of sync
Change-Id: If94504f08cca6dcab009142cc18799bafecb3ece
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 994c51fda678..a379f6f18b37 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1898,7 +1898,13 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const if( nAspect == ASPECT_THUMBNAIL ) { - Size aSize = aDocument.GetPageSize(aDocument.GetVisibleTab()); + SCTAB nVisTab = aDocument.GetVisibleTab(); + if (!aDocument.HasTable(nVisTab)) + { + nVisTab = 0; + const_cast<ScDocShell*>(this)->aDocument.SetVisibleTab(nVisTab); + } + Size aSize = aDocument.GetPageSize(nVisTab); const long SC_PREVIEW_SIZE_X = 10000; const long SC_PREVIEW_SIZE_Y = 12400; Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y); |