sc/source/core/data/dociter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit f3af1998741aeb7897aa5306ff16e7788bda2aa0 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Dec 14 16:46:55 2023 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Dec 14 20:46:57 2023 +0100 Related: cool#6893 ScFormulaGroupIterator::next creates columns that didn't exist before. Lots of time spent in ScColContainer::resize on getting document statistics. ScColContainer: :resize ScTable: :CreateColumnIfNotExistsImpl ScTable: :FetchColumn ScFormulaGroupIterator: :next ScDocument: :GetFormulaGroupCount ScDocument: :GetDocStat Change-Id: I52d4ab052e21215eb650bdccf4abc056ee2dd405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160784 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 6fd13c2e3885..222a8f1fba26 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -803,7 +803,7 @@ sc::FormulaGroupEntry* ScFormulaGroupIterator::next() return nullptr; } ScTable *pTab = mrDoc.FetchTable(mnTab); - ScColumn *pCol = pTab ? pTab->FetchColumn(mnCol) : nullptr; + ScColumn *pCol = (pTab && pTab->IsColValid(mnCol)) ? pTab->FetchColumn(mnCol) : nullptr; if (pCol) { mbNullCol = false;