diff options
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/contentindex.hxx | 7 | ||||
-rw-r--r-- | sw/inc/redline.hxx | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sw/inc/contentindex.hxx b/sw/inc/contentindex.hxx index c05845b378c7..0e2abc582116 100644 --- a/sw/inc/contentindex.hxx +++ b/sw/inc/contentindex.hxx @@ -28,6 +28,7 @@ class SwContentNode; class SwContentIndexReg; struct SwPosition; +class SwRangeRedline; namespace sw::mark { class IMark; } @@ -43,6 +44,9 @@ private: SwContentIndex * m_pNext; SwContentIndex * m_pPrev; + /// points to the SwRangeRedline (if any) that contains this SwIndex, via SwPosition and SwPaM + SwRangeRedline * m_pRangeRedline = nullptr; + /// Pointer to a mark that owns this position to allow fast lookup of marks of an SwContentIndexReg. const sw::mark::IMark* m_pMark; @@ -101,6 +105,9 @@ public: const sw::mark::IMark* GetMark() const { return m_pMark; } void SetMark(const sw::mark::IMark* pMark); + + SwRangeRedline* GetRedline() const { return m_pRangeRedline; } + void SetRedline(SwRangeRedline* pRangeRedline) { m_pRangeRedline = pRangeRedline; } }; SW_DLLPUBLIC std::ostream& operator <<(std::ostream& s, const SwContentIndex& index); diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index dfbfa177a855..181001fed6b1 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -178,7 +178,10 @@ public: bool bDelLP) : SwPaM( rPos ), m_pRedlineData( pData ), m_pContentSect( nullptr ), m_nId( s_nLastId++ ), m_bDelLastPara( bDelLP ), m_bIsVisible( true ) - {} + { + GetBound().nContent.SetRedline(this); + GetBound(false).nContent.SetRedline(this); + } SwRangeRedline( const SwRangeRedline& ); virtual ~SwRangeRedline() override; |