Kaydet (Commit) bae98ddd authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS sw2104_SRC680 (1.22.60.1.6); FILE MERGED

2006/11/14 10:11:48 od 1.22.60.1.6.1: #b6492987# method <SwNodes::ChgNode(..)>
	   - presave and restore numbering attributes of moved text node
üst 43c98e48
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: nodes.cxx,v $ * $RCSfile: nodes.cxx,v $
* *
* $Revision: 1.23 $ * $Revision: 1.24 $
* *
* last change: $Author: vg $ $Date: 2006-11-01 15:11:33 $ * last change: $Author: vg $ $Date: 2006-11-22 11:46:33 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -83,6 +83,9 @@ ...@@ -83,6 +83,9 @@
#ifndef _FRAME_HXX #ifndef _FRAME_HXX
#include <frame.hxx> #include <frame.hxx>
#endif #endif
// --> OD 2006-11-14 #b6492987#
#include <txtnodenumattr.hxx>
// <--
extern FASTBOOL CheckNodesRange( const SwNodeIndex& rStt, extern FASTBOOL CheckNodesRange( const SwNodeIndex& rStt,
const SwNodeIndex& rEnd, FASTBOOL bChkSection ); const SwNodeIndex& rEnd, FASTBOOL bChkSection );
...@@ -208,7 +211,11 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize, ...@@ -208,7 +211,11 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
SwNodeIndex aDelIdx( *this, n ); SwNodeIndex aDelIdx( *this, n );
SwNode& rNd = aDelIdx.GetNode(); SwNode& rNd = aDelIdx.GetNode();
unsigned nTxtNodeLevel = 0; // --> OD 2006-11-14 #b6492987#
// presave and restore all numbering attributes for a text node.
// unsigned nTxtNodeLevel = 0;
SwTxtNodeNumAttrs* pTxtNodeNumAttrs( 0L );
// <--
// --> OD 2005-11-16 #i57920# // --> OD 2005-11-16 #i57920#
// correction of refactoring done by cws swnumtree: // correction of refactoring done by cws swnumtree:
...@@ -218,7 +225,12 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize, ...@@ -218,7 +225,12 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
if ( rNd.IsTxtNode() ) if ( rNd.IsTxtNode() )
{ {
SwTxtNode* pTxtNode = rNd.GetTxtNode(); SwTxtNode* pTxtNode = rNd.GetTxtNode();
nTxtNodeLevel = pTxtNode->GetLevel(); // --> OD 2006-11-14 #b6492987#
// presave numbering attributes of text node in instance of
// helper class <SwTxtNodeNumAttrs>.
// nTxtNodeLevel = pTxtNode->GetLevel();
pTxtNodeNumAttrs = new SwTxtNodeNumAttrs( *pTxtNode );
// <--
pTxtNode->UnregisterNumber(); pTxtNode->UnregisterNumber();
if ( pTxtNode->GetTxtColl()->GetOutlineLevel() != NO_NUMBERING ) if ( pTxtNode->GetTxtColl()->GetOutlineLevel() != NO_NUMBERING )
...@@ -236,8 +248,16 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize, ...@@ -236,8 +248,16 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
SwTxtNode& rTxtNd = (SwTxtNode&)rNd; SwTxtNode& rTxtNd = (SwTxtNode&)rNd;
rTxtNd.SyncNumberAndNumRule(); rTxtNd.SyncNumberAndNumRule();
if (rTxtNd.GetNumRule()) // --> OD 2006-11-14 #b6492987#
rTxtNd.SetLevel(nTxtNodeLevel); // restore numbering attributes
ASSERT( pTxtNodeNumAttrs,
"<SwNodes::ChgNode(..)> - missing instance of <SwTxtNumAttrs>. This is a serious defect, please inform OD" );
if ( rTxtNd.GetNumRule() && pTxtNodeNumAttrs )
{
// rTxtNd.SetLevel(nTxtNodeLevel);
pTxtNodeNumAttrs->ApplyPresavedNumAttrsAtTxtNode( rTxtNd );
}
// <--
if( bInsOutlineIdx && if( bInsOutlineIdx &&
NO_NUMBERING != rTxtNd.GetTxtColl()->GetOutlineLevel() ) NO_NUMBERING != rTxtNd.GetTxtColl()->GetOutlineLevel() )
...@@ -254,6 +274,10 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize, ...@@ -254,6 +274,10 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
} }
else if( rNd.IsCntntNode() ) else if( rNd.IsCntntNode() )
((SwCntntNode&)rNd).InvalidateNumRule(); ((SwCntntNode&)rNd).InvalidateNumRule();
// --> OD 2006-11-14 #b6492987#
delete pTxtNodeNumAttrs;
// <--
} }
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment