LibreOffice Module sw (master) 1
|
#include <SwNodeNum.hxx>
Public Member Functions | |
SwNodeNum (SwTextNode *pTextNode, bool isHiddenRedlines) | |
SwNodeNum (SwNumRule *pNumRule) | |
virtual | ~SwNodeNum () override |
SwNumRule * | GetNumRule () const |
void | ChangeNumRule (SwNumRule &rNumRule) |
SwTextNode * | GetTextNode () const |
virtual bool | IsNotificationEnabled (const SwDoc &rDoc) const override |
Return if the notification is not disabled on global conditions. More... | |
virtual bool | IsContinuous () const override |
Return if this node is counted continuous. More... | |
virtual bool | IsCounted () const override |
Return if this node is counted. More... | |
virtual bool | LessThan (const SwNumberTreeNode &rNode) const override |
Returns if this node is less than another node. More... | |
virtual bool | IsRestart () const override |
Return if numbering is restarted at this node. More... | |
virtual SwNumberTree::tSwNumTreeNumber | GetStartValue () const override |
Return start value. More... | |
SwPosition | GetPosition () const |
const SwNodeNum * | GetPrecedingNodeNumOf (const SwTextNode &rTextNode) const |
determines the <SwNodeNum> instance, which is preceding the given text node More... | |
Public Member Functions inherited from SwNumberTreeNode | |
SwNumberTreeNode () | |
virtual | ~SwNumberTreeNode () |
void | AddChild (SwNumberTreeNode *pChild, const int nDepth, const SwDoc &rDoc) |
Add a child. More... | |
void | RemoveChild (SwNumberTreeNode *pChild, const SwDoc &rDoc) |
Remove a child. More... | |
void | RemoveMe (const SwDoc &rDoc) |
Remove this child from the tree. More... | |
SwNumberTreeNode * | GetParent () const |
Returns the parent of this node. More... | |
SwNumberTree::tSwNumTreeNumber | GetNumber (bool bValidate=true) const |
Returns number of this node. More... | |
bool | IsContinueingPreviousSubTree () const |
SwNumberTree::tNumberVector | GetNumberVector () const |
Returns level numbers of this node. More... | |
virtual bool | IsRestart () const =0 |
Return if numbering is restarted at this node. More... | |
virtual SwNumberTree::tSwNumTreeNumber | GetStartValue () const =0 |
Return start value. More... | |
virtual bool | IsCounted () const |
Return if this node is counted. More... | |
virtual bool | IsContinuous () const =0 |
Return if this node is counted continuous. More... | |
bool | IsFirst (const SwNumberTreeNode *pNode) const |
Return if a node is first non-phantom child of this node. More... | |
bool | IsFirst () const |
Return if this node if the first non-phantom node in the tree. More... | |
bool | IsPhantom () const |
Return if this node is a phantom. More... | |
void | SetLevelInListTree (const int nLevel, const SwDoc &rDoc) |
set level of this node More... | |
int | GetLevelInListTree () const |
Return level of this node. More... | |
virtual bool | LessThan (const SwNumberTreeNode &rTreeNode) const |
Returns if this node is less than another node. More... | |
void | InvalidateTree () const |
Invalidate this node and all its descendants. More... | |
void | NotifyInvalidChildren (const SwDoc &rDoc) |
Notifies all invalid children of this node. More... | |
void | InvalidateMe () |
Notifies the node. More... | |
void | ValidateMe () |
Validates this node. More... | |
void | NotifyInvalidSiblings (const SwDoc &rDoc) |
Notifies all invalid siblings of this node. More... | |
void | NotifyNodesOnListLevel (const int nListLevel) |
notification of all nodes in the list tree on certain list level More... | |
void | InvalidateAndNotifyTree (const SwDoc &rDoc) |
Invalidation and notification of complete numbering tree. More... | |
SwNumberTreeNode * | GetPred (bool bSibling=false) const |
Returns the greatest descendant of the root that is smaller than this node, aka the predecessor of this node. More... | |
const SwNumberTreeNode * | GetPrecedingNodeOf (const SwNumberTreeNode &rNode) const |
determines the node, which is preceding the node More... | |
void | IsSane (bool bRecursive) const |
Sanity check. More... | |
tSwNumberTreeChildren::size_type | GetChildCount () const |
Returns how many children this node has got. More... | |
Static Public Member Functions | |
static void | HandleNumberTreeRootNodeDelete (SwNodeNum &rNodeNum) |
Private Member Functions | |
virtual SwNumberTreeNode * | Create () const override |
Creates a new node of the same class. More... | |
virtual bool | HasCountedChildren () const override |
virtual bool | IsCountedForNumbering () const override |
virtual void | PreAdd () override |
virtual void | PostRemove () override |
SwNodeNum (const SwNodeNum &)=delete | |
SwNodeNum & | operator= (const SwNodeNum &)=delete |
virtual bool | IsCountPhantoms () const override |
Return if phantoms are counted. More... | |
virtual bool | IsNotifiable (const SwDoc &rDoc) const override |
Return if this node is notifiable. More... | |
virtual void | NotifyNode () override |
Notifies the node. More... | |
Static Private Member Functions | |
static void | UnregisterMeAndChildrenDueToRootDelete (SwNodeNum &rNodeNum) |
Private Attributes | |
SwTextNode *const | mpTextNode |
SwNumRule * | mpNumRule |
bool | m_isHiddenRedlines |
Additional Inherited Members | |
Protected Types inherited from SwNumberTreeNode | |
typedef std::set< SwNumberTreeNode *, compSwNumberTreeNodeLessThan > | tSwNumberTreeChildren |
Protected Member Functions inherited from SwNumberTreeNode | |
SwNumberTreeNode * | GetRoot () const |
Returns the root node of the tree this node is part of. More... | |
virtual bool | IsNotificationEnabled (const SwDoc &rDoc) const =0 |
Return if the notification is not disabled on global conditions. More... | |
virtual bool | HasCountedChildren () const =0 |
virtual bool | IsCountedForNumbering () const =0 |
virtual void | PreAdd ()=0 |
virtual void | PostRemove ()=0 |
void | IsSane (bool bRecursive, std::vector< const SwNumberTreeNode * > rParents) const |
Sanity check with loop detection. More... | |
SwNumberTreeNode (const SwNumberTreeNode &) | |
SwNumberTreeNode & | operator= (const SwNumberTreeNode &) |
void | GetNumberVector_ (SwNumberTree::tNumberVector &rVector, bool bValidate=true) const |
Calls GetNumberVector_ on parent and adds number of this node at the end. More... | |
void | Invalidate (SwNumberTreeNode const *pChild) |
Invalidates a child. More... | |
void | InvalidateChildren () |
Invalidation of all children. More... | |
void | SetLastValid (const tSwNumberTreeChildren::const_iterator &aItLastValid, bool bValidating=false) const |
Set the last valid child of this node. More... | |
virtual bool | IsNotifiable (const SwDoc &rDoc) const =0 |
Return if this node is notifiable. More... | |
virtual void | NotifyNode ()=0 |
Notifies the node. More... | |
void | Notify (const SwDoc &rDoc) |
Notifies this node (NotifyNode) and all descendants. More... | |
void | NotifyChildrenOnDepth (const int nDepth) |
notification of children nodes on certain depth More... | |
bool | IsValid (const SwNumberTreeNode *pChild) const |
Returns if a child A this node is valid. More... | |
bool | IsValid () const |
Returns if this node is valid. More... | |
void | Validate (const SwNumberTreeNode *pNode) const |
Validates a child. More... | |
void | ValidateHierarchical (const SwNumberTreeNode *pNode) const |
Validates a child using hierarchical numbering. More... | |
void | ValidateContinuous (const SwNumberTreeNode *pNode) const |
Validates a child using continuous numbering. More... | |
virtual SwNumberTreeNode * | Create () const =0 |
Creates a new node of the same class. More... | |
SwNumberTreeNode * | CreatePhantom () |
Creates a phantom. More... | |
virtual bool | IsCountPhantoms () const =0 |
Return if phantoms are counted. More... | |
bool | HasOnlyPhantoms () const |
Return if all descendants of this node are phantoms. More... | |
bool | HasPhantomCountedParent () const |
SwNumberTreeNode * | GetFirstNonPhantomChild () |
HB, OD : return node, if it isn't a phantom, otherwise return first non-phantom descendant. More... | |
void | ClearObsoletePhantoms () |
Removes recursively phantoms that have no children. More... | |
tSwNumberTreeChildren::const_iterator | GetIterator (const SwNumberTreeNode *pChild) const |
void | MoveChildren (SwNumberTreeNode *pDest) |
Moves all children to a given destination node. More... | |
void | MoveGreaterChildren (SwNumberTreeNode &_rCompareNode, SwNumberTreeNode &_rDestNode) |
Moves all children of this node that are greater than a given node to the destination node. More... | |
SwNumberTreeNode * | GetLastDescendant () const |
Returns the last descendant of a node, if it has children. More... | |
Protected Attributes inherited from SwNumberTreeNode | |
tSwNumberTreeChildren | mChildren |
the children More... | |
SwNumberTreeNode * | mpParent |
he parent node More... | |
SwNumberTree::tSwNumTreeNumber | mnNumber |
the number of the node More... | |
bool | mbContinueingPreviousSubTree |
bool | mbPhantom |
true this node is a phantom false this node is NOT a phantom More... | |
tSwNumberTreeChildren::const_iterator | mItLastValid |
Iterator to the last valid element. More... | |
Definition at line 29 of file SwNodeNum.hxx.
|
explicit |
Definition at line 28 of file SwNodeNum.cxx.
Referenced by Create().
|
explicit |
Definition at line 35 of file SwNodeNum.cxx.
|
overridevirtual |
Definition at line 42 of file SwNodeNum.cxx.
|
privatedelete |
void SwNodeNum::ChangeNumRule | ( | SwNumRule & | rNumRule | ) |
Definition at line 47 of file SwNodeNum.cxx.
References SwNumRule::AddTextNode(), GetNumRule(), GetTextNode(), mpNumRule, and SwNumRule::RemoveTextNode().
|
overrideprivatevirtual |
Creates a new node of the same class.
Implements SwNumberTreeNode.
Definition at line 71 of file SwNodeNum.cxx.
References GetNumRule(), and SwNodeNum().
|
inline |
Definition at line 38 of file SwNodeNum.hxx.
Referenced by ChangeNumRule(), Create(), SwTextNode::GetAdditionalIndentForStartingNewList(), SwTextNode::GetFirstLineOfsWithNum(), SwTextNode::GetLabelFollowedBy(), SwTextNode::GetLeftMarginForTabCalculation(), SwTextNode::GetLeftMarginWithNum(), SwTextNode::GetListTabStopPosition(), SwTextNode::GetNumString(), GetStartValue(), SwTextNode::HasBullet(), SwTextNode::HasNumber(), sw::HasNumberingWhichNeedsLayoutUpdate(), SwTextNode::HasVisibleNumberingOrBullet(), IsContinuous(), SwTextNode::IsFirstOfNumRule(), SwTextNode::IsNumbered(), PostRemove(), and PreAdd().
SwPosition SwNodeNum::GetPosition | ( | ) | const |
Definition at line 64 of file SwNodeNum.cxx.
References GetTextNode(), and mpTextNode.
Referenced by SwList::InsertListItem().
const SwNodeNum * SwNodeNum::GetPrecedingNodeNumOf | ( | const SwTextNode & | rTextNode | ) | const |
determines the <SwNodeNum> instance, which is preceding the given text node
#i81002#
Definition at line 354 of file SwNodeNum.cxx.
References SwNumberTreeNode::GetPrecedingNodeOf(), and SwNumberTreeNode::GetRoot().
Referenced by MakeRefNumStr().
|
overridevirtual |
Return start value.
Implements SwNumberTreeNode.
Definition at line 262 of file SwNodeNum.cxx.
References SwTextNode::GetActualListStartValue(), SwNumberTreeNode::GetLevelInListTree(), SwNumRule::GetNumFormat(), GetNumRule(), SwNumberTreeNode::GetParent(), SvxNumberFormat::GetStart(), GetTextNode(), IsRestart(), and MAXLEVEL.
|
inline |
Definition at line 40 of file SwNodeNum.hxx.
Referenced by ChangeNumRule(), sw::DocumentListItemsManager::getListItemText(), GetPosition(), GetStartValue(), IsCounted(), IsCountedForNumbering(), IsNotifiable(), IsNotificationEnabled(), sw::DocumentListItemsManager::isNumberedInLayout(), IsRestart(), SwNumRule::MakeRefNumString(), PostRemove(), PreAdd(), and UnregisterMeAndChildrenDueToRootDelete().
|
static |
Definition at line 291 of file SwNodeNum.cxx.
References SwNumberTreeNode::GetParent(), SwNumberTreeNode::GetRoot(), and UnregisterMeAndChildrenDueToRootDelete().
Referenced by SwList::~SwList().
|
overrideprivatevirtual |
Implements SwNumberTreeNode.
Definition at line 187 of file SwNodeNum.cxx.
References SwNumberTreeNode::mChildren.
|
overridevirtual |
Return if this node is counted continuous.
true | This node is counted continuous. |
false | else |
Implements SwNumberTreeNode.
Definition at line 149 of file SwNodeNum.cxx.
References GetNumRule(), SwNumberTreeNode::GetParent(), SwNumberTreeNode::IsContinuous(), SwNumRule::IsContinusNum(), and mpNumRule.
|
overridevirtual |
Return if this node is counted.
true | this node is counted |
false | this node is NOT counted |
Reimplemented from SwNumberTreeNode.
Definition at line 170 of file SwNodeNum.cxx.
References GetTextNode(), SwNumberTreeNode::IsCounted(), and SwTextNode::IsCountedInList().
Referenced by IsCountedForNumbering(), and SwNumRule::MakeNumString().
|
overrideprivatevirtual |
Implements SwNumberTreeNode.
Definition at line 197 of file SwNodeNum.cxx.
References GetTextNode(), SwTextNode::HasBullet(), SwTextNode::HasNumber(), IsCounted(), and SwNumberTreeNode::IsPhantom().
|
overrideprivatevirtual |
Return if phantoms are counted.
Implements SwNumberTreeNode.
Definition at line 245 of file SwNodeNum.cxx.
References SwNumRule::IsContinusNum(), SwNumRule::IsCountPhantoms(), and mpNumRule.
|
overrideprivatevirtual |
Return if this node is notifiable.
true | This node is notifiable. |
false | else |
Implements SwNumberTreeNode.
Definition at line 125 of file SwNodeNum.cxx.
References GetTextNode(), and IsNotificationEnabled().
|
overridevirtual |
Return if the notification is not disabled on global conditions.
true | Notification enabled in general. |
false | else |
Implements SwNumberTreeNode.
Definition at line 137 of file SwNodeNum.cxx.
References GetTextNode(), SwDoc::IsInDtor(), and SwDoc::IsInReading().
Referenced by IsNotifiable().
|
overridevirtual |
Return if numbering is restarted at this node.
Implements SwNumberTreeNode.
Definition at line 233 of file SwNodeNum.cxx.
References GetTextNode(), and SwTextNode::IsListRestart().
Referenced by GetStartValue().
|
overridevirtual |
Returns if this node is less than another node.
rTreeNode | node to compare with |
true | this node is less than rTreeNode |
false | else |
Reimplemented from SwNumberTreeNode.
Definition at line 216 of file SwNodeNum.cxx.
References SwNode::GetIndex(), and mpTextNode.
Referenced by sw::DocumentListItemsManager::lessThanNodeNum::operator()().
|
overrideprivatevirtual |
Notifies the node.
Called when the number of the node got invalid.
Implements SwNumberTreeNode.
Definition at line 206 of file SwNodeNum.cxx.
References mpTextNode, SwTextNode::NumRuleChgd(), and SwNumberTreeNode::ValidateMe().
|
overrideprivatevirtual |
Implements SwNumberTreeNode.
Definition at line 103 of file SwNodeNum.cxx.
References SwNode::getIDocumentListItems(), GetNumRule(), GetTextNode(), m_isHiddenRedlines, mpNumRule, IDocumentListItems::removeListItem(), and SwNumRule::RemoveTextNode().
|
overrideprivatevirtual |
Implements SwNumberTreeNode.
Definition at line 78 of file SwNodeNum.cxx.
References IDocumentListItems::addListItem(), SwNumRule::AddTextNode(), SwNode::getIDocumentListItems(), GetNumRule(), SwTextNode::GetNumRule(), GetTextNode(), m_isHiddenRedlines, and mpNumRule.
|
staticprivate |
Definition at line 307 of file SwNodeNum.cxx.
References SwNumberTreeNode::GetChildCount(), SwNode::GetDoc(), GetTextNode(), SwNumberTreeNode::IsPhantom(), SwNumberTreeNode::mChildren, SwTextNode::RemoveFromList(), RES_PARATR_LIST_ID(), RES_PARATR_LIST_ISCOUNTED(), RES_PARATR_LIST_ISRESTART(), RES_PARATR_LIST_LEVEL(), RES_PARATR_LIST_RESTARTVALUE(), RES_PARATR_NUMRULE(), SwDoc::ResetAttrs(), and UnregisterMeAndChildrenDueToRootDelete().
Referenced by HandleNumberTreeRootNodeDelete(), and UnregisterMeAndChildrenDueToRootDelete().
|
private |
Definition at line 85 of file SwNodeNum.hxx.
Referenced by PostRemove(), and PreAdd().
|
private |
Definition at line 84 of file SwNodeNum.hxx.
Referenced by ChangeNumRule(), IsContinuous(), IsCountPhantoms(), PostRemove(), and PreAdd().
|
private |
Definition at line 83 of file SwNodeNum.hxx.
Referenced by GetPosition(), LessThan(), and NotifyNode().