SwNumberTree.cxx (09b53915) | SwNumberTree.cxx (ed2dba9c) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 27 unchanged lines hidden (view full) --- 36unsigned long SwNumberTreeNode::nInstances = 0; 37#endif 38 39SwNumberTreeNode::SwNumberTreeNode() 40 : mChildren(), 41 mpParent( 0 ), 42 mnNumber( 0 ), 43 // --> OD 2008-11-26 #158694# | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 27 unchanged lines hidden (view full) --- 36unsigned long SwNumberTreeNode::nInstances = 0; 37#endif 38 39SwNumberTreeNode::SwNumberTreeNode() 40 : mChildren(), 41 mpParent( 0 ), 42 mnNumber( 0 ), 43 // --> OD 2008-11-26 #158694# |
44 mbContinueingPreviousSubTree( false ), | 44 mbContinuingPreviousSubTree( false ), |
45 // <-- 46 mbPhantom( false ), 47 mItLastValid() 48{ 49 mItLastValid = mChildren.end(); 50 51#ifdef DBG_UTIL 52 mnSerial = nInstances; --- 133 unchanged lines hidden (view full) --- 186// } 187 SwNumberTree::tSwNumTreeNumber nTmpNumber( 0 ); 188 if (aIt != mChildren.end()) 189 nTmpNumber = (*aIt)->mnNumber; 190 else 191 { 192 aIt = mChildren.begin(); 193 // --> OD 2008-11-26 #158694# | 45 // <-- 46 mbPhantom( false ), 47 mItLastValid() 48{ 49 mItLastValid = mChildren.end(); 50 51#ifdef DBG_UTIL 52 mnSerial = nInstances; --- 133 unchanged lines hidden (view full) --- 186// } 187 SwNumberTree::tSwNumTreeNumber nTmpNumber( 0 ); 188 if (aIt != mChildren.end()) 189 nTmpNumber = (*aIt)->mnNumber; 190 else 191 { 192 aIt = mChildren.begin(); 193 // --> OD 2008-11-26 #158694# |
194 (*aIt)->mbContinueingPreviousSubTree = false; | 194 (*aIt)->mbContinuingPreviousSubTree = false; |
195 // <-- 196 197 // determine default start value 198 // consider the case that the first child isn't counted. 199 nTmpNumber = (*aIt)->GetStartValue(); 200 if ( !(*aIt)->IsCounted() && 201 ( !(*aIt)->HasCountedChildren() || (*aIt)->IsPhantom() ) ) 202 { --- 15 unchanged lines hidden (view full) --- 218 GetParent()->GetIterator( this ); 219 while ( aParentChildIt != GetParent()->mChildren.begin() ) 220 { 221 --aParentChildIt; 222 SwNumberTreeNode* pPrevNode( *aParentChildIt ); 223 if ( pPrevNode->GetChildCount() > 0 ) 224 { 225 // --> OD 2008-11-26 #158694# | 195 // <-- 196 197 // determine default start value 198 // consider the case that the first child isn't counted. 199 nTmpNumber = (*aIt)->GetStartValue(); 200 if ( !(*aIt)->IsCounted() && 201 ( !(*aIt)->HasCountedChildren() || (*aIt)->IsPhantom() ) ) 202 { --- 15 unchanged lines hidden (view full) --- 218 GetParent()->GetIterator( this ); 219 while ( aParentChildIt != GetParent()->mChildren.begin() ) 220 { 221 --aParentChildIt; 222 SwNumberTreeNode* pPrevNode( *aParentChildIt ); 223 if ( pPrevNode->GetChildCount() > 0 ) 224 { 225 // --> OD 2008-11-26 #158694# |
226 (*aIt)->mbContinueingPreviousSubTree = true; | 226 (*aIt)->mbContinuingPreviousSubTree = true; |
227 // <-- 228 nTmpNumber = (*(pPrevNode->mChildren.rbegin()))->GetNumber(); 229 // --> OD 2005-10-27 #126009# 230 if ( (*aIt)->IsCounted() && 231 ( !(*aIt)->IsPhantom() || 232 (*aIt)->HasPhantomCountedParent() ) ) 233 // <-- 234 { --- 15 unchanged lines hidden (view full) --- 250 251 (*aIt)->mnNumber = nTmpNumber; 252 } 253 254 while (aIt != aValidateIt) 255 { 256 ++aIt; 257 // --> OD 2008-11-26 #158694# | 227 // <-- 228 nTmpNumber = (*(pPrevNode->mChildren.rbegin()))->GetNumber(); 229 // --> OD 2005-10-27 #126009# 230 if ( (*aIt)->IsCounted() && 231 ( !(*aIt)->IsPhantom() || 232 (*aIt)->HasPhantomCountedParent() ) ) 233 // <-- 234 { --- 15 unchanged lines hidden (view full) --- 250 251 (*aIt)->mnNumber = nTmpNumber; 252 } 253 254 while (aIt != aValidateIt) 255 { 256 ++aIt; 257 // --> OD 2008-11-26 #158694# |
258 (*aIt)->mbContinueingPreviousSubTree = false; | 258 (*aIt)->mbContinuingPreviousSubTree = false; |
259 // <-- 260 261 // --> OD 2005-10-19 #126009# - only for counted nodes the number 262 // has to be adjusted, compared to the previous node. 263 // this condition is hold also for nodes, which restart the numbering. 264 if ( (*aIt)->IsCounted() ) 265 { 266 if ((*aIt)->IsRestart()) --- 514 unchanged lines hidden (view full) --- 781 mpParent->Validate(this); 782 783 return mnNumber; 784} 785 786// --> OD 2008-11-26 #158694# 787bool SwNumberTreeNode::IsContinuingPreviousSubTree() const 788{ | 259 // <-- 260 261 // --> OD 2005-10-19 #126009# - only for counted nodes the number 262 // has to be adjusted, compared to the previous node. 263 // this condition is hold also for nodes, which restart the numbering. 264 if ( (*aIt)->IsCounted() ) 265 { 266 if ((*aIt)->IsRestart()) --- 514 unchanged lines hidden (view full) --- 781 mpParent->Validate(this); 782 783 return mnNumber; 784} 785 786// --> OD 2008-11-26 #158694# 787bool SwNumberTreeNode::IsContinuingPreviousSubTree() const 788{ |
789 return mbContinueingPreviousSubTree; | 789 return mbContinuingPreviousSubTree; |
790} 791// <-- 792 793 794vector<SwNumberTree::tSwNumTreeNumber> SwNumberTreeNode::GetNumberVector() const 795{ 796 vector<SwNumberTree::tSwNumTreeNumber> aResult; 797 --- 608 unchanged lines hidden --- | 790} 791// <-- 792 793 794vector<SwNumberTree::tSwNumTreeNumber> SwNumberTreeNode::GetNumberVector() const 795{ 796 vector<SwNumberTree::tSwNumTreeNumber> aResult; 797 --- 608 unchanged lines hidden --- |