diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-25 16:02:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-27 19:01:42 +0200 |
commit | d5e922f0864b88ff44c49e75f984e96659171771 (patch) | |
tree | 1eb76f130d033892e259814a3c2cd6a03f09bd0c /sw/source/core/doc/docredln.cxx | |
parent | baf8d2c1c16cb3bdc4edad2560f95fea807a034f (diff) |
tdf#119840 Store pointer to redline
in SwContentIndex, so we can walk the sw::Ring of SwContentIndex attached
to a SwContentNode, which is considerably faster than scanning
the redline array.
Shaves 10% off load time
Change-Id: I98c9815d98846862280f5a2b0a656667cf63f05d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137438
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/docredln.cxx')
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 4a1134f0d78e..916d81c48d9b 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1110,6 +1110,9 @@ SwRangeRedline::SwRangeRedline(RedlineType eTyp, const SwPaM& rPam ) m_pContentSect( nullptr ), m_nId( s_nLastId++ ) { + GetBound().nContent.SetRedline(this); + GetBound(false).nContent.SetRedline(this); + m_bDelLastPara = false; m_bIsVisible = true; if( !rPam.HasMark() ) @@ -1130,6 +1133,9 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam ) m_pContentSect( nullptr ), m_nId( s_nLastId++ ) { + GetBound().nContent.SetRedline(this); + GetBound(false).nContent.SetRedline(this); + m_bDelLastPara = false; m_bIsVisible = true; if( !rPam.HasMark() ) @@ -1142,6 +1148,9 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPosition& rP m_pContentSect( nullptr ), m_nId( s_nLastId++ ) { + GetBound().nContent.SetRedline(this); + GetBound(false).nContent.SetRedline(this); + m_bDelLastPara = false; m_bIsVisible = true; } @@ -1152,6 +1161,9 @@ SwRangeRedline::SwRangeRedline( const SwRangeRedline& rCpy ) m_pContentSect( nullptr ), m_nId( s_nLastId++ ) { + GetBound().nContent.SetRedline(this); + GetBound(false).nContent.SetRedline(this); + m_bDelLastPara = false; m_bIsVisible = true; if( !rCpy.HasMark() ) |