diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 20:46:26 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 21:51:35 +0200 |
commit | ba8c14f488a0bf9f1b10b5f1a24a367b8b98caf6 (patch) | |
tree | 34bd0fda4b2977a179e5774ac03852f580623e91 /sw | |
parent | a8b0e93c4271e3574ec8b8705ecf3b34be37d8ab (diff) |
sw_redlinehide: convert SwDeletionChecker to GetDep()
Such a lovely class!
Change-Id: Id03795b1c62c35829cab093198daf082ca78d174
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/frame.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/inc/frmtool.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 11 |
3 files changed, 13 insertions, 5 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index b9d90f9a0f37..482f60c8dca0 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -287,6 +287,7 @@ class SW_DLLPUBLIC SwFrame : public SwFrameAreaDefinition, public SwClient, publ friend class SwFlowFrame; friend class SwLayoutFrame; friend class SwLooping; + friend class SwDeletionChecker; // for GetDep() // voids lower during creation of a column friend SwFrame *SaveContent( SwLayoutFrame *, SwFrame* pStart ); diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index c0ecd3463b02..0ffe4a75c0f6 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -544,11 +544,7 @@ private: const SwModify* mpRegIn; public: - SwDeletionChecker( const SwFrame* pFrame ) - : mpFrame( pFrame ), - mpRegIn( pFrame ? const_cast<SwFrame*>(pFrame)->GetRegisteredIn() : nullptr ) - { - } + SwDeletionChecker(const SwFrame* pFrame); /** * return diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 277d155d06aa..6552f45a6e0a 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -3418,6 +3418,17 @@ const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell ) return pContent; } +SwDeletionChecker::SwDeletionChecker(const SwFrame* pFrame) + : mpFrame( pFrame ) + , mpRegIn( pFrame + ? pFrame->IsTextFrame() + // sw_redlinehide: GetDep() may be a member of SwTextFrame! + ? static_cast<SwTextFrame const*>(pFrame)->GetTextNodeFirst() + : const_cast<SwFrame*>(pFrame)->GetDep() + : nullptr ) +{ +} + /// Can be used to check if a frame has been deleted bool SwDeletionChecker::HasBeenDeleted() { |