summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/node.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-25 11:24:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-25 12:33:51 +0200
commit6cfa03bbfb7397c34fe2ea605a4ef573ae92e4ea (patch)
tree187e560e145397fbab659fd8283b74ac65791b78 /sw/source/core/docnode/node.cxx
parentab12ae777b8213f2a3a8ed9a744adb82a1f75e32 (diff)
SwIndex/SwIndexReg is only used to deal with SwContentNodes
so make that apparent in the type system and naming, instead of implicit. Which requires adding a small helper class for the one place we were instantiating an SwIndexReg by itselg Change-Id: I74db37239aed0005e5a2a01916635fa93de638f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/docnode/node.cxx')
-rw-r--r--sw/source/core/docnode/node.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 444e6dda6613..589fd75f456f 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -285,6 +285,18 @@ sal_uInt16 SwNode::GetSectionLevel() const
tools::Long SwNode::s_nSerial = 0;
#endif
+/// only used by SwContentNodeTmp in SwTextNode::Update
+SwNode::SwNode()
+ : m_nNodeType( SwNodeType::Start )
+ , m_nAFormatNumLvl( 0 )
+ , m_bIgnoreDontExpand( false)
+ , m_eMerge(Merge::None)
+#ifdef DBG_UTIL
+ , m_nSerial( s_nSerial++)
+#endif
+ , m_pStartOfSection( nullptr )
+{}
+
SwNode::SwNode( const SwNodeIndex &rWhere, const SwNodeType nNdType )
: m_nNodeType( nNdType )
, m_nAFormatNumLvl( 0 )
@@ -1060,6 +1072,14 @@ SwEndNode::SwEndNode( SwNodes& rNds, SwNodeOffset nPos, SwStartNode& rSttNd )
m_pStartOfSection->m_pEndOfSection = this;
}
+/// only used by SwContentNodeTmp in SwTextNode::Update
+SwContentNode::SwContentNode()
+ : SwNode()
+ , m_aCondCollListener( *this )
+ , m_pCondColl( nullptr )
+ , mbSetModifyAtAttr( false )
+{}
+
SwContentNode::SwContentNode( const SwNodeIndex &rWhere, const SwNodeType nNdType,
SwFormatColl *pColl )
: SwNode( rWhere, nNdType )