summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-14 12:16:48 +0600
committerAndras Timar <andras.timar@collabora.com>2024-01-15 16:27:16 +0100
commit3aa40eb74b7488d9a51b9f3f680fabc0c1ec059f (patch)
treea20604a67b57bbb75c61580cbf0c5c2dadd27e09 /sc
parent763d8d48cd774bcf0b49954dff726245f77b9677 (diff)
tdf#159174: there may be no tabs in the clipboard document
Change-Id: I053d91bf44e39e14ade9face14084a107d0df898 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162041 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 0b93cc83993b3cd78aa05556342839a21c96dc5a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162092 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/printfun.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index a61520875238..84e21da02214 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -466,6 +466,9 @@ static void lcl_HidePrint( const ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 )
void ScPrintFunc::DrawToDev(ScDocument& rDoc, OutputDevice* pDev, double /* nPrintFactor */,
const tools::Rectangle& rBound, ScViewData* pViewData, bool bMetaFile)
{
+ if (rDoc.GetMaxTableNumber() < 0)
+ return;
+
//! evaluate nPrintFactor !!!
SCTAB nTab = 0;