sc/source/core/tool/address.cxx | 2 +- sc/source/filter/oox/worksheethelper.cxx | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-)
New commits: commit b7fbb1ee9eddd4ec6099bd3677068185e5e96473 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Dec 12 10:19:36 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Dec 12 20:13:42 2022 +0000 crashtesting: assert seen on loading forum-mso-en4-497867.xlsx Change-Id: Ifa5e2711981097a648d7127d2dc777bc96b04edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143966 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index f704290e340d..7bd66f6402e4 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -2094,7 +2094,7 @@ static void lcl_Split_DocTab( const ScDocument& rDoc, SCTAB nTab, rDoc.GetName(nTab, rTabName); rDocName.clear(); // External reference, same as in ScCompiler::MakeTabStr() - if ( rTabName[0] == '\'' ) + if (!rTabName.isEmpty() && rTabName[0] == '\'') { // "'Doc'#Tab" sal_Int32 nPos = ScCompiler::GetDocTabPos( rTabName); if (nPos != -1) commit f3fb7ade7fba0c2c4c56f155c3e048d5bcc4c3e1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Dec 12 09:48:39 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Dec 12 20:13:30 2022 +0000 crashtesting: assert see on loading forum-mso-en4-489894.xlsx Change-Id: I402705ea911ca248afb812b63a897c1df9884a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143962 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 010a4189cf7f..2c409e0d7b14 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -1378,7 +1378,18 @@ void WorksheetGlobals::finalizeDrawings() Needed if the imported document is inserted as "OLE object from file" and thus does not provide an OLE size property by itself. */ if( (maShapeBoundingBox.Width > 0) || (maShapeBoundingBox.Height > 0) ) - extendUsedArea( getCellRangeFromRectangle( maShapeBoundingBox ) ); + { + ScRange aRange(getCellRangeFromRectangle(maShapeBoundingBox)); + if (aRange.aStart.Col() < 0) + aRange.aStart.SetCol(0); + if (aRange.aStart.Row() < 0) + aRange.aStart.SetRow(0); + if (aRange.aEnd.Col() < 0) + aRange.aEnd.SetCol(0); + if (aRange.aEnd.Row() < 0) + aRange.aEnd.SetRow(0); + extendUsedArea(aRange); + } // if no used area is set, default to A1 if( maUsedArea.aStart.Col() > maUsedArea.aEnd.Col() )