diff options
Diffstat (limited to 'sw/source/core/docnode/nodes.cxx')
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 518de823fd08..ab1243093d23 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -175,3 +175,3 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, - if ( pTxtNode->GetAttrOutlineLevel() != 0 )//<-end,zhaojianwei + if (pTxtNode->IsOutline()) { @@ -190,4 +190,3 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, - if( bInsOutlineIdx && - 0 != rTxtNd.GetAttrOutlineLevel() )//<-end,zhaojianwei + if (bInsOutlineIdx && rTxtNd.IsOutline()) { @@ -234,5 +233,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, - // loesche die Gliederungs-Indizies aus dem alten Nodes-Array - if( 0 != pTxtNd->GetAttrOutlineLevel() )//<-end,zhaojianwei + // remove outline index from old nodes array + if (pTxtNd->IsOutline()) + { pOutlineNds->Remove( pNd ); + } @@ -271,4 +272,3 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, // OultineNodes set the new nodes in the array - if( bInsOutlineIdx && - 0 != pTxtNd->GetAttrOutlineLevel() ) //#outline level,added by zhaojianwei + if (bInsOutlineIdx && pTxtNd->IsOutline()) { @@ -539,8 +539,8 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, - // setze bei Start/EndNodes die richtigen Indizies - // loesche die Gliederungs-Indizies aus - // dem alten Nodes-Array - if( pCNd->IsTxtNode() && 0 != - ((SwTxtNode*)pCNd)->GetAttrOutlineLevel() )//<-end,by zhaojianwei + // remove outline index from old nodes array + if (pCNd->IsTxtNode() && + static_cast<SwTxtNode*>(pCNd)->IsOutline()) + { pOutlineNds->Remove( pCNd ); + } else @@ -574,3 +574,3 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, const bool bOutlNd = pNd->IsTxtNode() && - 0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//<-end,zhaojianwei + static_cast<SwTxtNode*>(pNd)->IsOutline(); // loesche die Gliederungs-Indizies aus @@ -1223,3 +1223,4 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) { - if( 0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() &&//<-end,zhaojianwei + SwTxtNode *const pTxtNode(static_cast<SwTxtNode*>(pNd)); + if (pTxtNode->IsOutline() && pOutlineNds->Seek_Entry( pNd, &nIdxPos )) @@ -1230,3 +1231,3 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) } - ((SwTxtNode*)pNd)->InvalidateNumRule(); + pTxtNode->InvalidateNumRule(); } @@ -1524,4 +1525,3 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt ) - if( pNd->IsTxtNode() && - 0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() ) //<-end,zhaojianwei + if (pNd->IsTxtNode() && static_cast<SwTxtNode*>(pNd)->IsOutline()) { // loesche die Gliederungs-Indizies. |