summaryrefslogtreecommitdiff
path: root/sw/inc/node.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc/node.hxx')
-rw-r--r--sw/inc/node.hxx52
1 files changed, 26 insertions, 26 deletions
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 173f3d0d215f..f0ab99ff253d 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -82,7 +82,7 @@ class SW_DLLPUBLIC SwNode
{
friend class SwNodes;
- sal_uInt8 m_nNodeType;
+ SwNodeType m_nNodeType;
/// For text nodes: level of auto format. Was put here because we had still free bits.
sal_uInt8 m_nAFormatNumLvl : 3;
@@ -102,10 +102,10 @@ class SW_DLLPUBLIC SwNode
protected:
SwStartNode* m_pStartOfSection;
- SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeId );
+ SwNode( const SwNodeIndex &rWhere, const SwNodeType nNodeId );
/// for the initial StartNode
- SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNodeId );
+ SwNode( SwNodes& rNodes, sal_uLong nPos, const SwNodeType nNodeId );
public:
/** the = 0 forces the class to be an abstract base class, but the dtor can be still called
@@ -134,7 +134,7 @@ public:
inline bool IsIgnoreDontExpand() const { return m_bIgnoreDontExpand; }
inline void SetIgnoreDontExpand( bool bNew ) { m_bIgnoreDontExpand = bNew; }
- sal_uInt8 GetNodeType() const { return m_nNodeType; }
+ SwNodeType GetNodeType() const { return m_nNodeType; }
inline SwStartNode *GetStartNode();
inline const SwStartNode *GetStartNode() const;
@@ -311,7 +311,7 @@ class SwStartNode: public SwNode
protected:
SwStartNode( const SwNodeIndex &rWhere,
- const sal_uInt8 nNodeType = ND_STARTNODE,
+ const SwNodeType nNodeType = SwNodeType::Start,
SwStartNodeType = SwNormalStartNode );
public:
DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)
@@ -359,7 +359,7 @@ class SW_DLLPUBLIC SwContentNode: public SwModify, public SwNode, public SwIndex
mutable bool mbSetModifyAtAttr;
protected:
- SwContentNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeType,
+ SwContentNode( const SwNodeIndex &rWhere, const SwNodeType nNodeType,
SwFormatColl *pFormatColl );
/** the = 0 forces the class to be an abstract base class, but the dtor can be still called
from subclasses */
@@ -585,80 +585,80 @@ private:
inline SwEndNode *SwNode::GetEndNode()
{
- return ND_ENDNODE == m_nNodeType ? static_cast<SwEndNode*>(this) : nullptr;
+ return SwNodeType::End == m_nNodeType ? static_cast<SwEndNode*>(this) : nullptr;
}
inline const SwEndNode *SwNode::GetEndNode() const
{
- return ND_ENDNODE == m_nNodeType ? static_cast<const SwEndNode*>(this) : nullptr;
+ return SwNodeType::End == m_nNodeType ? static_cast<const SwEndNode*>(this) : nullptr;
}
inline SwStartNode *SwNode::GetStartNode()
{
- return ND_STARTNODE & m_nNodeType ? static_cast<SwStartNode*>(this) : nullptr;
+ return SwNodeType::Start & m_nNodeType ? static_cast<SwStartNode*>(this) : nullptr;
}
inline const SwStartNode *SwNode::GetStartNode() const
{
- return ND_STARTNODE & m_nNodeType ? static_cast<const SwStartNode*>(this) : nullptr;
+ return SwNodeType::Start & m_nNodeType ? static_cast<const SwStartNode*>(this) : nullptr;
}
inline SwTableNode *SwNode::GetTableNode()
{
- return ND_TABLENODE == m_nNodeType ? static_cast<SwTableNode*>(this) : nullptr;
+ return SwNodeType::Table == m_nNodeType ? static_cast<SwTableNode*>(this) : nullptr;
}
inline const SwTableNode *SwNode::GetTableNode() const
{
- return ND_TABLENODE == m_nNodeType ? static_cast<const SwTableNode*>(this) : nullptr;
+ return SwNodeType::Table == m_nNodeType ? static_cast<const SwTableNode*>(this) : nullptr;
}
inline SwSectionNode *SwNode::GetSectionNode()
{
- return ND_SECTIONNODE == m_nNodeType ? static_cast<SwSectionNode*>(this) : nullptr;
+ return SwNodeType::Section == m_nNodeType ? static_cast<SwSectionNode*>(this) : nullptr;
}
inline const SwSectionNode *SwNode::GetSectionNode() const
{
- return ND_SECTIONNODE == m_nNodeType ? static_cast<const SwSectionNode*>(this) : nullptr;
+ return SwNodeType::Section == m_nNodeType ? static_cast<const SwSectionNode*>(this) : nullptr;
}
inline SwContentNode *SwNode::GetContentNode()
{
- return ND_CONTENTNODE & m_nNodeType ? static_cast<SwContentNode*>(this) : nullptr;
+ return SwNodeType::ContentMask & m_nNodeType ? static_cast<SwContentNode*>(this) : nullptr;
}
inline const SwContentNode *SwNode::GetContentNode() const
{
- return ND_CONTENTNODE & m_nNodeType ? static_cast<const SwContentNode*>(this) : nullptr;
+ return SwNodeType::ContentMask & m_nNodeType ? static_cast<const SwContentNode*>(this) : nullptr;
}
inline bool SwNode::IsStartNode() const
{
- return (ND_STARTNODE & m_nNodeType) != 0;
+ return bool(SwNodeType::Start & m_nNodeType);
}
inline bool SwNode::IsContentNode() const
{
- return (ND_CONTENTNODE & m_nNodeType) != 0;
+ return bool(SwNodeType::ContentMask & m_nNodeType);
}
inline bool SwNode::IsEndNode() const
{
- return ND_ENDNODE == m_nNodeType;
+ return SwNodeType::End == m_nNodeType;
}
inline bool SwNode::IsTextNode() const
{
- return ND_TEXTNODE == m_nNodeType;
+ return SwNodeType::Text == m_nNodeType;
}
inline bool SwNode::IsTableNode() const
{
- return ND_TABLENODE == m_nNodeType;
+ return SwNodeType::Table == m_nNodeType;
}
inline bool SwNode::IsSectionNode() const
{
- return ND_SECTIONNODE == m_nNodeType;
+ return SwNodeType::Section == m_nNodeType;
}
inline bool SwNode::IsNoTextNode() const
{
- return (ND_NOTXTNODE & m_nNodeType) != 0;
+ return bool(SwNodeType::NoTextMask & m_nNodeType);
}
inline bool SwNode::IsOLENode() const
{
- return ND_OLENODE == m_nNodeType;
+ return SwNodeType::Ole == m_nNodeType;
}
inline bool SwNode::IsGrfNode() const
{
- return ND_GRFNODE == m_nNodeType;
+ return SwNodeType::Grf == m_nNodeType;
}
inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
@@ -737,7 +737,7 @@ inline const SfxPoolItem& SwContentNode::GetAttr( sal_uInt16 nWhich,
}
inline SwPlaceholderNode::SwPlaceholderNode(const SwNodeIndex &rWhere)
- : SwNode(rWhere, ND_PLACEHOLDER)
+ : SwNode(rWhere, SwNodeType::PlaceHolder)
{
}