summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/docshell/docsh4.cxx8
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);