diff -uNr sw.old/inc/undobj.hxx sw.new/inc/undobj.hxx --- sw.old/inc/undobj.hxx 2006-11-01 19:10:40.000000000 +0800 +++ sw.new/inc/undobj.hxx 2007-05-28 14:07:14.000000000 +0800 @@ -964,6 +964,8 @@ { nFmtIdx = nNewFmtIdx; fNum = rNewNumber; } void SetBox( const SwTableBox& rBox ); OUT_UNDOBJ( TblNumFmt ) +private: + ULONG nNdPos; }; class _UndoTblCpyTbl_Entries; diff -uNr sw.old/source/core/doc/swtable.cxx sw.new/source/core/doc/swtable.cxx --- sw.old/source/core/doc/swtable.cxx 2006-11-01 19:10:52.000000000 +0800 +++ sw.new/source/core/doc/swtable.cxx 2007-05-28 12:58:36.000000000 +0800 @@ -1700,6 +1700,26 @@ BOOL bChgAlign ) { ULONG nNdPos = rBox.IsValidNumTxtNd( TRUE ); + if ( ULONG_MAX == nNdPos ) + { + const SwStartNode * pSttNode = rBox.GetSttNd(); + SwNodeIndex aIdx( *pSttNode ); + ULONG nIndexStt = aIdx.GetIndex(); + ++ nIndexStt; + for (nIndexStt;nIndexSttGetNodes()[ nIndexStt ]->EndOfSectionIndex();nIndexStt++) + { + if (pSttNode->GetNodes()[ nIndexStt ]->IsStartNode()) + { + nIndexStt = pSttNode->GetNodes()[ nIndexStt ]->EndOfSectionIndex(); + continue; + } + if (pSttNode->GetNodes()[ nIndexStt ]->IsTxtNode() && pSttNode->GetNodes()[ nIndexStt ]->IsCntntNode()) + { + nNdPos = nIndexStt; + break; + } + } + } if( ULONG_MAX != nNdPos ) { SwDoc* pDoc = rBox.GetFrmFmt()->GetDoc(); diff -uNr sw.old/source/core/undo/untbl.cxx sw.new/source/core/undo/untbl.cxx --- sw.old/source/core/undo/untbl.cxx 2006-11-01 19:11:04.000000000 +0800 +++ sw.new/source/core/undo/untbl.cxx 2007-05-28 14:03:20.000000000 +0800 @@ -2237,7 +2237,28 @@ bNewFmt = bNewFml = bNewValue = FALSE; nNode = rBox.GetSttIdx(); - ULONG nNdPos = rBox.IsValidNumTxtNd( 0 == pNewSet ); + nNdPos = rBox.IsValidNumTxtNd( 0 == pNewSet ); + + if ( ULONG_MAX == nNdPos ) + { + const SwStartNode * pSttNode = rBox.GetSttNd(); + SwNodeIndex aIdx( *pSttNode ); + ULONG nIndexStt = aIdx.GetIndex(); + ++ nIndexStt; + for (nIndexStt;nIndexSttGetNodes()[ nIndexStt ]->EndOfSectionIndex();nIndexStt++) + { + if (pSttNode->GetNodes()[ nIndexStt ]->IsStartNode()) + { + nIndexStt = pSttNode->GetNodes()[ nIndexStt ]->EndOfSectionIndex(); + continue; + } + if (pSttNode->GetNodes()[ nIndexStt ]->IsTxtNode() && pSttNode->GetNodes()[ nIndexStt ]->IsCntntNode()) + { + nNdPos = nIndexStt; + break; + } + } + } if( ULONG_MAX != nNdPos ) { @@ -2317,6 +2338,8 @@ pBox->ChgFrmFmt( pFmt ); SwTxtNode* pTxtNd = rDoc.GetNodes()[ nNode + 1 ]->GetTxtNode(); + if (!pTxtNd) + pTxtNd = rDoc.GetNodes()[ nNdPos ]->GetTxtNode(); // wenn mehr als ein Node geloescht wurde, dann wurden auch // alle "Node"-Attribute gespeichert if( pTxtNd->GetpSwAttrSet() )