sc/source/core/data/patattr.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 76a1ccd1e831442865bd808434cf41d3e6062d8d
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Sep 2 11:52:38 2025 +0200
Commit:     Bayram Çiçek <[email protected]>
CommitDate: Thu Oct 9 09:16:22 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]>
    (cherry picked from commit 4834c568532ef76e156d56365d704ac68413a0b0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192068
    Reviewed-by: Bayram Çiçek <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 67498a98cc4a..60225c17532a 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++;

Reply via email to