@@ -184,15 +184,15 @@ public:
184
184
inline SwSectionNode *GetSectionNode ();
185
185
inline const SwSectionNode *GetSectionNode () const ;
186
186
187
- inline bool IsStartNode () const ;
188
- inline bool IsContentNode () const ;
189
- inline bool IsEndNode () const ;
190
- inline bool IsTextNode () const ;
191
- inline bool IsTableNode () const ;
192
- inline bool IsSectionNode () const ;
193
- inline bool IsOLENode () const ;
194
- inline bool IsNoTextNode () const ;
195
- inline bool IsGrfNode () const ;
187
+ bool IsStartNode () const { return bool (SwNodeType::Start & m_nNodeType); }
188
+ bool IsContentNode () const { return bool (SwNodeType::ContentMask & m_nNodeType); }
189
+ bool IsEndNode () const { return SwNodeType::End == m_nNodeType; }
190
+ bool IsTextNode () const { return SwNodeType::Text == m_nNodeType; }
191
+ bool IsTableNode () const { return SwNodeType::Table == m_nNodeType; }
192
+ bool IsSectionNode () const { return SwNodeType::Section == m_nNodeType; }
193
+ bool IsOLENode () const { return SwNodeType::Ole == m_nNodeType; }
194
+ bool IsNoTextNode () const { return bool (SwNodeType::NoTextMask & m_nNodeType); }
195
+ bool IsGrfNode () const { return SwNodeType::Grf == m_nNodeType; }
196
196
197
197
/* *
198
198
Checks if this node is in redlines.
@@ -633,80 +633,43 @@ private:
633
633
634
634
inline SwEndNode *SwNode::GetEndNode ()
635
635
{
636
- return SwNodeType::End == m_nNodeType ? static_cast <SwEndNode*>(this ) : nullptr ;
636
+ return IsEndNode () ? static_cast <SwEndNode*>(this ) : nullptr ;
637
637
}
638
638
inline const SwEndNode *SwNode::GetEndNode () const
639
639
{
640
- return SwNodeType::End == m_nNodeType ? static_cast <const SwEndNode*>(this ) : nullptr ;
640
+ return IsEndNode () ? static_cast <const SwEndNode*>(this ) : nullptr ;
641
641
}
642
642
inline SwStartNode *SwNode::GetStartNode ()
643
643
{
644
- return SwNodeType::Start & m_nNodeType ? static_cast <SwStartNode*>(this ) : nullptr ;
644
+ return IsStartNode () ? static_cast <SwStartNode*>(this ) : nullptr ;
645
645
}
646
646
inline const SwStartNode *SwNode::GetStartNode () const
647
647
{
648
- return SwNodeType::Start & m_nNodeType ? static_cast <const SwStartNode*>(this ) : nullptr ;
648
+ return IsStartNode () ? static_cast <const SwStartNode*>(this ) : nullptr ;
649
649
}
650
650
inline SwTableNode *SwNode::GetTableNode ()
651
651
{
652
- return SwNodeType::Table == m_nNodeType ? static_cast <SwTableNode*>(this ) : nullptr ;
652
+ return IsTableNode () ? static_cast <SwTableNode*>(this ) : nullptr ;
653
653
}
654
654
inline const SwTableNode *SwNode::GetTableNode () const
655
655
{
656
- return SwNodeType::Table == m_nNodeType ? static_cast <const SwTableNode*>(this ) : nullptr ;
656
+ return IsTableNode () ? static_cast <const SwTableNode*>(this ) : nullptr ;
657
657
}
658
658
inline SwSectionNode *SwNode::GetSectionNode ()
659
659
{
660
- return SwNodeType::Section == m_nNodeType ? static_cast <SwSectionNode*>(this ) : nullptr ;
660
+ return IsSectionNode () ? static_cast <SwSectionNode*>(this ) : nullptr ;
661
661
}
662
662
inline const SwSectionNode *SwNode::GetSectionNode () const
663
663
{
664
- return SwNodeType::Section == m_nNodeType ? static_cast <const SwSectionNode*>(this ) : nullptr ;
664
+ return IsSectionNode () ? static_cast <const SwSectionNode*>(this ) : nullptr ;
665
665
}
666
666
inline SwContentNode *SwNode::GetContentNode ()
667
667
{
668
- return SwNodeType::ContentMask & m_nNodeType ? static_cast <SwContentNode*>(this ) : nullptr ;
668
+ return IsContentNode () ? static_cast <SwContentNode*>(this ) : nullptr ;
669
669
}
670
670
inline const SwContentNode *SwNode::GetContentNode () const
671
671
{
672
- return SwNodeType::ContentMask & m_nNodeType ? static_cast <const SwContentNode*>(this ) : nullptr ;
673
- }
674
-
675
- inline bool SwNode::IsStartNode () const
676
- {
677
- return bool (SwNodeType::Start & m_nNodeType);
678
- }
679
- inline bool SwNode::IsContentNode () const
680
- {
681
- return bool (SwNodeType::ContentMask & m_nNodeType);
682
- }
683
- inline bool SwNode::IsEndNode () const
684
- {
685
- return SwNodeType::End == m_nNodeType;
686
- }
687
- inline bool SwNode::IsTextNode () const
688
- {
689
- return SwNodeType::Text == m_nNodeType;
690
- }
691
- inline bool SwNode::IsTableNode () const
692
- {
693
- return SwNodeType::Table == m_nNodeType;
694
- }
695
- inline bool SwNode::IsSectionNode () const
696
- {
697
- return SwNodeType::Section == m_nNodeType;
698
- }
699
- inline bool SwNode::IsNoTextNode () const
700
- {
701
- return bool (SwNodeType::NoTextMask & m_nNodeType);
702
- }
703
- inline bool SwNode::IsOLENode () const
704
- {
705
- return SwNodeType::Ole == m_nNodeType;
706
- }
707
- inline bool SwNode::IsGrfNode () const
708
- {
709
- return SwNodeType::Grf == m_nNodeType;
672
+ return IsContentNode () ? static_cast <const SwContentNode*>(this ) : nullptr ;
710
673
}
711
674
712
675
inline const SwStartNode* SwNode::FindSttNodeByType ( SwStartNodeType eTyp ) const
@@ -727,8 +690,7 @@ inline SwNodeOffset SwNode::StartOfSectionIndex() const
727
690
}
728
691
inline SwNodeOffset SwNode::EndOfSectionIndex () const
729
692
{
730
- const SwStartNode* pStNd = IsStartNode () ? static_cast <const SwStartNode*>(this ) : m_pStartOfSection;
731
- return pStNd->m_pEndOfSection ->GetIndex ();
693
+ return EndOfSectionNode ()->GetIndex ();
732
694
}
733
695
inline const SwEndNode* SwNode::EndOfSectionNode () const
734
696
{
0 commit comments