sc/source/core/data/documen4.cxx | 5 ----- sc/source/core/data/patattr.cxx | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-)
New commits: commit 641a0e3d9a668f38651831f2a99db02edd50f21e Author: Noel Grandin <[email protected]> AuthorDate: Tue Sep 2 11:52:38 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Sep 3 21:39:35 2025 +0200 tdf#168159 CRASH: deleting columns and undoing revert commit 68db5b64b8db405f9e6c0368836a8ee671b46830 Author: Noel Grandin <[email protected]> Date: Sat Jun 28 16:13:53 2025 +0200 crashtesting ooo120243-1.ods and commit c8742f36fa2bdc9d23042378f5b587ccda8b54dd Author: Noel Grandin <[email protected]> Date: Thu May 22 10:18:48 2025 +0200 tdf#166684 reduce cost of CellAttributeHelper::registerAndCheck Change-Id: I4d4442c6927121e7f18e3e08eb1736fa94a896bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190521 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190539 diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index 61b9670a6f84..771c4d81964a 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -804,11 +804,6 @@ const SfxItemSet* ScDocument::GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab, aCell.assign(const_cast<ScDocument&>(*this), aPos); pCell = &aCell; } - // if the underlying cell needs evaluation, ScPatternAttr - // and ScCondFormatIndexes might end up being deleted under - // us, so we need to trigger evaluation before accessing them. - if (pCell->getType() == CELLTYPE_FORMULA) - pCell->getFormula()->IsValue(); const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab ); const ScCondFormatIndexes& rIndex = pPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData(); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 3a0a6aa2d6ae..541498d5740c 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -114,10 +114,12 @@ const ScPatternAttr* CellAttributeHelper::registerAndCheck(const ScPatternAttr& return mpLastHit; } const OUString* pCandidateStyleName = rCandidate.GetStyleName(); - auto [it, itEnd] = maRegisteredCellAttributes.equal_range(pCandidateStyleName); - for (; it != itEnd; ++it) + auto it = maRegisteredCellAttributes.lower_bound(pCandidateStyleName); + for (; it != maRegisteredCellAttributes.end(); ++it) { const ScPatternAttr* pCheck = *it; + if (CompareStringPtr(pCheck->GetStyleName(), pCandidateStyleName) != 0) + break; if (ScPatternAttr::areSame(pCheck, &rCandidate)) { pCheck->mnRefCount++;
