sw/source/core/doc/docredln.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit dbcc7f7c609ff9254ff3f44f0cb6cc4ae20e72e7 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Jun 13 15:26:58 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jun 14 09:55:59 2024 +0200 tdf#144208 speedup doc with lots of redline (9) only compute start/end once, the cost of calculating them is not trivial Change-Id: I48d001be00359c50ec8ca28134079d062867a520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168839 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 8c57840bbb85..68499ea3820d 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -2293,10 +2293,12 @@ const OUString& SwRangeRedline::GetComment( sal_uInt16 nPos ) const bool SwRangeRedline::operator<( const SwRangeRedline& rCmp ) const { - if (*Start() < *rCmp.Start()) + auto [pStart, pEnd] = StartEnd(); + auto [pCmpStart, pCmpEnd] = rCmp.StartEnd(); + if (*pStart < *pCmpStart) return true; - return *Start() == *rCmp.Start() && *End() < *rCmp.End(); + return *pStart == *pCmpStart && *pEnd < *pCmpEnd; } const SwRedlineData & SwRangeRedline::GetRedlineData(const sal_uInt16 nPos) const