diff options
Diffstat (limited to 'sc/source/ui/view/gridwin4.cxx')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 7cf261cecf02..4b48eefb0aa7 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -575,7 +575,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI { ScDocShell* pDocSh = pViewData->GetDocShell(); ScPrintFunc aPrintFunc(pDocSh, pDocSh->GetPrinter(), nTab); - aPrintFunc.UpdatePages(); + if (aPrintFunc.HasPrintRange()) + { + // We have a non-empty print range, so we can assume that calling UpdatePages() will + // result in non-empty col/row breaks next time we get here. + aPrintFunc.UpdatePages(); + } } } |