summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-06-01 20:46:26 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-06-14 16:19:05 +0200
commit913fbbee0bef73e7e83a4f78e5b29bc187b4d8ac (patch)
tree2e61c0ccb56ea7a247a62402ab9559974066d3d2 /sw
parent2cb3a977a797ddece91a20c5a6798403b9d5fde9 (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.hxx1
-rw-r--r--sw/source/core/inc/frmtool.hxx6
-rw-r--r--sw/source/core/layout/frmtool.cxx11
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 0d602cc6630c..eb10439cde69 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()
{