crashtesting: a lot of crashes on exporting to ods

since:

commit 1d2380516ac9871743c5a5455f0734d02be8eade
Date:   Thu Apr 20 20:33:56 2023 +0530

    tdf#129847 Show "more content" red arrow along with ### indication

e.g.

soffice --headless --convert-to ods forums/xlsx/forum-mso-en4-566515.xlsx

 #3  0x00007ffff7b61662 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
 #4  0x00007fffe1f6cd02 in RowInfo::cellInfo (nCol=187, this=<optimized out>) at sc/inc/fillinfo.hxx:201
 #5  ScOutputData::LayoutStrings (this=this@entry=0x7fffffffb0d0, bPixelToLogic=bPixelToLogic@entry=false)
     at sc/source/ui/view/output2.cxx:1908
 #6  0x00007fffe1f6df21 in ScOutputData::DrawStrings (this=this@entry=0x7fffffffb0d0, bPixelToLogic=bPixelToLogic@entry=false)
     at sc/source/ui/view/output2.cxx:1478
 #7  0x00007fffe1f9d52e in ScPrintFunc::DrawToDev (rDoc=..., pDev=pDev@entry=0x5555567d9890, rBound=..., pViewData=pViewData@entry=0x7fffffffb270,
     bMetaFile=bMetaFile@entry=true) at sc/source/ui/view/printfun.cxx:619
 #8  0x00007fffe1a49150 in ScDocShell::Draw (this=0x55555652c630, pDev=0x5555567d9890, nAspect=<optimized out>)
     at sc/source/ui/docshell/docsh4.cxx:2205
 #9  0x00007ffff5c66771 in SfxObjectShell::DoDraw_Impl (this=this@entry=0x55555652c630, pDev=pDev@entry=0x5555567d9890, rViewPos=Point = {...}, rScaleX=...,
     rScaleY=..., rSetup=..., nAspect=2, bOutputForScreen=false) at sfx2/source/doc/objembed.cxx:204
 #10 0x00007ffff5c66976 in SfxObjectShell::DoDraw (this=this@entry=0x55555652c630, pDev=pDev@entry=0x5555567d9890, rObjPos=Point = {...}, rSize=Size = {...},
     rSetup=..., nAspect=nAspect@entry=2, bOutputForScreen=false) at sfx2/source/doc/objembed.cxx:151
 #11 0x00007ffff5c6207d in SfxObjectShell::CreatePreview_Impl (this=this@entry=0x55555652c630, bFullContent=bFullContent@entry=false, pDevice=0x5555567d9890,
     pFile=pFile@entry=0x0) at sfx2/source/doc/objcont.cxx:197
 #12 0x00007ffff5c6412c in SfxObjectShell::GetPreviewBitmap (this=this@entry=0x55555652c630) at include/rtl/ref.hxx:206
 #13 0x00007ffff5c9c5a4 in SfxObjectShell::WriteThumbnail (this=this@entry=0x55555652c630, bEncrypted=bEncrypted@entry=false, xStream=
     uno::Reference to (OWriteStream *) 0x555557e84818) at sfx2/source/doc/objstor.cxx:3748

use the same guard around accessing cellInfo as used elsewhere in this
method

Change-Id: If1fd5cff92655f8b51436f27a9b3d22fdc7a390b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154879
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index f2596bc..a5008e3 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1893,20 +1893,25 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)

                            if ( eOutHorJust == SvxCellHorJustify::Left )
                            {
                                pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
                                if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
                                    pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
                                bAnyClipped = true;
                                aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) );
                            }
                            else if ( eOutHorJust == SvxCellHorJustify::Right )
                            {
                                pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
                                if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
                                    pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
                                bAnyClipped = true;
                                aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign);
                            }
                            else
                            {
                                pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
                                pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
                                if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
                                {
                                    pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
                                    pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
                                }
                                bAnyClipped = true;
                                aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) );
                                aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign);