sc/source/filter/excel/excrecds.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit d6c714e456d21105c59b061995621f68e3b0304e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Dec 11 20:06:01 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Dec 15 15:20:23 2022 +0000 crashtesting: assert on import of forum-mso-en4-85437.xls aParam.nCol1 of 180 aParam.nRow1 of 0 aParam.nCol2 of 0 aParam.nRow2 of 0 so a negative nColCnt Change-Id: Ifa58287190389b61c36f4ace864516631b025548 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143948 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 90dc1ce8a1976b3c2e26791bdbabb2651ba45224) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144127 diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 3feac86be5a2..f69a5ca431c8 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -946,7 +946,8 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab, const ScRange aRange( aParam.nCol1, aParam.nRow1, aParam.nTab, aParam.nCol2, aParam.nRow2, aParam.nTab ); - SCCOL nColCnt = aParam.nCol2 - aParam.nCol1 + 1; + aRange.PutInOrder(); + SCCOL nColCnt = aRange.aEnd.Col() - aRange.aStart.Col() + 1; maRef = aRange;