Kaydet (Commit) 770011ca authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide: move SwContentNode::GetNode() to SwNoTextNode

SwTextNode's GetDep() may be a WriterMultiListener, which isn't even a
node.

SwTextNode has GetTextNodeForParaProps()/GetTextNodeFirst().

Change-Id: Ica177a6a3cf7c886c9a8d2733fb9cb452a475450
üst a854a097
......@@ -71,9 +71,6 @@ public:
virtual void Cut() override;
virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override;
inline const SwContentNode *GetNode() const;
inline SwContentNode *GetNode();
inline const SwContentFrame *GetFollow() const;
inline SwContentFrame *GetFollow();
SwTextFrame* FindMaster() const;
......@@ -114,15 +111,6 @@ inline SwContentFrame* SwContentFrame::GetPrevContentFrame() const
return const_cast<SwContentFrame*>(ImplGetNextContentFrame( false ));
}
inline SwContentNode *SwContentFrame::GetNode()
{
return static_cast< SwContentNode* >( GetDep() );
}
inline const SwContentNode *SwContentFrame::GetNode() const
{
return static_cast< const SwContentNode* >( GetDep() );
}
inline const SwContentFrame *SwContentFrame::GetFollow() const
{
return static_cast<const SwContentFrame*>(SwFlowFrame::GetFollow());
......
......@@ -54,6 +54,11 @@ protected:
public:
SwNoTextFrame( SwNoTextNode * const, SwFrame* );
const SwContentNode *GetNode() const
{ return static_cast<SwContentNode const*>(GetDep()); }
SwContentNode *GetNode()
{ return static_cast<SwContentNode *>(GetDep()); }
virtual bool LeftMargin(SwPaM *) const override;
virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
......
......@@ -398,9 +398,9 @@ public:
const OUString& GetText() const;
// TODO: remove GetTextNode
SwTextNode *GetTextNode()
{ return static_cast< SwTextNode* >( SwContentFrame::GetNode()); }
{ return static_cast<SwTextNode*>(SwFrame::GetDep()); }
const SwTextNode *GetTextNode() const
{ return static_cast< const SwTextNode* >( SwContentFrame::GetNode()); }
{ return static_cast<const SwTextNode*>(SwFrame::GetDep()); }
SwTextNode const* GetTextNodeForParaProps() const;
SwTextNode * GetTextNodeFirst()
{ return const_cast<SwTextNode*>(const_cast<SwTextFrame const*>(this)->GetTextNodeFirst()); };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment