sc/source/ui/view/printfun.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0fd7ede0fbf93c1c8e2baa95bc76ef9d8fbf3eb0
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Jan 14 12:16:48 2024 +0600
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Jan 23 16:36:54 2024 +0100

    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.kagan...@collabora.com>
    (cherry picked from commit 0b93cc83993b3cd78aa05556342839a21c96dc5a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162092
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 41afcf4fa89abe23177e6a26d1a9e8611f351852)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162100
    Reviewed-by: Hossein <hoss...@libreoffice.org>
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Michael Weghorn <m.wegh...@posteo.de>

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;

Reply via email to