diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 21:32:22 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 19:40:38 +0200 |
commit | 4cf77dbe47acab8ff66bc7129c352e243f45b1ad (patch) | |
tree | 9f9de40a286c99fe62923f89982447dd99273425 | |
parent | 939dd8638f8bf247cfe7992ed13d86b2364649ef (diff) |
sw_redlinehide: SwContentFrame::LeftMargin()/RightMargin() pure virtual
... because it's using GetNode().
Change-Id: Iba99a2c4213d389e8b281b689f7bcfc6027baf28
-rw-r--r-- | sw/source/core/inc/cntfrm.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/notxtfrm.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 4 |
4 files changed, 9 insertions, 6 deletions
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index cf3eae039e84..62413e38de8c 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -79,8 +79,8 @@ public: SwTextFrame* FindMaster() const; // layout dependent cursor travelling - virtual bool LeftMargin( SwPaM * ) const; - virtual bool RightMargin( SwPaM *, bool bAPI = false ) const; + virtual bool LeftMargin(SwPaM *) const = 0; + virtual bool RightMargin(SwPaM *, bool bAPI = false) const = 0; virtual bool UnitUp( SwPaM *, const SwTwips nOffset, bool bSetInReadOnly ) const; virtual bool UnitDown( SwPaM *, const SwTwips nOffset, diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index 8685aa948895..9de5fd31abfe 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -54,6 +54,9 @@ protected: public: SwNoTextFrame( SwNoTextNode * const, SwFrame* ); + virtual bool LeftMargin(SwPaM *) const override; + virtual bool RightMargin(SwPaM *, bool bAPI = false) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, SwPrintData const*const pPrintData = nullptr ) const override; virtual bool GetCharRect( SwRect &, const SwPosition&, diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 48689d421a93..240d57078038 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -615,7 +615,7 @@ bool SwFlyFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, } /** Layout dependent cursor travelling */ -bool SwContentFrame::LeftMargin(SwPaM *pPam) const +bool SwNoTextFrame::LeftMargin(SwPaM *pPam) const { if( &pPam->GetNode() != GetNode() ) return false; @@ -624,7 +624,7 @@ bool SwContentFrame::LeftMargin(SwPaM *pPam) const return true; } -bool SwContentFrame::RightMargin(SwPaM *pPam, bool) const +bool SwNoTextFrame::RightMargin(SwPaM *pPam, bool) const { if( &pPam->GetNode() != GetNode() ) return false; diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index c57764acb569..64b4721f3bab 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -670,7 +670,7 @@ bool SwTextFrame::GetCursorOfst(SwPosition* pPos, Point& rPoint, bool SwTextFrame::LeftMargin(SwPaM *pPam) const { - assert(&pPam->GetNode() == GetNode() || GetMergedPara()); + assert(GetMergedPara() || &pPam->GetNode() == static_cast<SwContentNode const*>(GetDep())); SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); @@ -704,7 +704,7 @@ bool SwTextFrame::LeftMargin(SwPaM *pPam) const bool SwTextFrame::RightMargin(SwPaM *pPam, bool bAPI) const { - assert(&pPam->GetNode() == GetNode() || GetMergedPara()); + assert(GetMergedPara() || &pPam->GetNode() == static_cast<SwContentNode const*>(GetDep())); SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); |