diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-04-30 12:59:15 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-01 18:02:57 +0200 |
commit | befe83a707e8faf37094523550dfa5bcf87be279 (patch) | |
tree | 9a835df4ef970f0cbb27ead21ad4a176c343336a /sw/inc | |
parent | 1475ee32d24eb1023d5b9b10fcccc61f2a36ec1b (diff) |
sw: Decouple ND_SECTIONDUMMY from ND_SECTIONNODE, and rename it.
Change-Id: Ic88a133d20336ce0548154847edd9900cb5b7691
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/ndtyp.hxx | 7 | ||||
-rw-r--r-- | sw/inc/node.hxx | 17 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx index c62f706dc663..cbf71abfe00e 100644 --- a/sw/inc/ndtyp.hxx +++ b/sw/inc/ndtyp.hxx @@ -26,13 +26,12 @@ // in base class. const sal_uInt8 ND_ENDNODE = 0x01; const sal_uInt8 ND_STARTNODE = 0x02; -const sal_uInt8 ND_TABLENODE = 0x04 | ND_STARTNODE; // SwTableNode is derived from SwStartNode +const sal_uInt8 ND_TABLENODE = 0x04 | ND_STARTNODE; ///< SwTableNode is derived from SwStartNode. const sal_uInt8 ND_TEXTNODE = 0x08; const sal_uInt8 ND_GRFNODE = 0x10; const sal_uInt8 ND_OLENODE = 0x20; -const sal_uInt8 ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE); - -const sal_uInt8 ND_SECTIONNODE = ND_SECTIONDUMMY | ND_STARTNODE; +const sal_uInt8 ND_SECTIONNODE = 0x40 | ND_STARTNODE; ///< SwSectionNode is derived from SwStartNode. +const sal_uInt8 ND_PLACEHOLDER = 0x80; // NoTxtNode (if any of the 2 bits are set). const sal_uInt8 ND_NOTXTNODE = ND_GRFNODE | ND_OLENODE; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 51bfb2e3edf7..d7621be69b26 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -567,15 +567,16 @@ public: }; -/** This class is internal. And quite frankly I don't know what ND_SECTIONDUMMY is for, - the class has been merely created to replace "SwNode( ND_SECTIONDUMMY )", the only case - of instantiating SwNode directly. Now SwNode can be an abstract base class. */ -class SwDummySectionNode - : private SwNode +/** This class is internal, used only during DocumentContentOperationsManager::CopyWithFlyInFly(), and for undo. + +Some of the nodes are then replaced with SwPlaceholderNode, and at the end of the operation, removed again. +FIXME find out if this is really necessary, and if we can avoid creation of the SwPlaceholderNodes in the first place. +*/ +class SwPlaceholderNode : private SwNode { private: friend class SwNodes; - SwDummySectionNode( const SwNodeIndex &rWhere ); + SwPlaceholderNode(const SwNodeIndex &rWhere); }; inline SwEndNode *SwNode::GetEndNode() @@ -731,8 +732,8 @@ inline const SfxPoolItem& SwCntntNode::GetAttr( sal_uInt16 nWhich, return GetSwAttrSet().Get( nWhich, bInParents ); } -inline SwDummySectionNode::SwDummySectionNode( const SwNodeIndex &rWhere ) - : SwNode( rWhere, ND_SECTIONDUMMY ) +inline SwPlaceholderNode::SwPlaceholderNode(const SwNodeIndex &rWhere) + : SwNode(rWhere, ND_PLACEHOLDER) { } |