sc/source/core/data/patattr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 02abba61eb3adbf1071e84c95bc0f372e9dca7d4 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Mon May 12 10:26:16 2025 +0200 Commit: Noel Grandin <noelgran...@gmail.com> CommitDate: Mon May 12 13:20:28 2025 +0200 optimise CellAttributeHelper::doUnregister a little no need to call getDefaultCellAttribute() here and instantiate it, if it has not already been instantiated, then we cannot be pointing to it. Shaves 5% off a profile for me. Change-Id: I2b0a9cfbbf0429bb55e8a0394b9efa92dfa798e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185201 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 2bbed442afb4..002017455999 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -140,7 +140,7 @@ const ScPatternAttr* CellAttributeHelper::registerAndCheck(const ScPatternAttr& void CellAttributeHelper::doUnregister(const ScPatternAttr& rCandidate) { - if (&rCandidate == &getDefaultCellAttribute()) + if (&rCandidate == mpDefaultCellAttribute) return; assert(rCandidate.isRegistered());