summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-08-05 02:56:30 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-08-08 04:04:55 +0000
commit87ef2d8f2808a951c92387ba0582ea02a19f89e7 (patch)
treea424e939c0f422211be155aaa46d64d5b7beeb4c /sc
parent855df248c8a380e253a35feefec21ebc1dee1aca (diff)
workaround missing SetSelectedSheet call for print preview, tdf#99333
Change-Id: If986b156397e15d2f1faa52b7d52b1ce0b37d213 Reviewed-on: https://gerrit.libreoffice.org/27889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/preview.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index a8dc2400b5f9..a629d0a5fbf8 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -224,6 +224,12 @@ void ScPreview::CalcPages()
ScDocument& rDoc = pDocShell->GetDocument();
nTabCount = rDoc.GetTableCount();
+ if (maSelectedTabs.empty())
+ {
+ SCTAB nCurrentTab = ScDocShell::GetCurTab();
+ maSelectedTabs.insert(nCurrentTab);
+ }
+
SCTAB nStart = nTabsTested;
if (!bValid)
{