diff -uNr sw.old/source/core/doc/swtable.cxx sw.new/source/core/doc/swtable.cxx --- sw.old/source/core/doc/swtable.cxx 2007-01-23 10:16:38.000000000 +0800 +++ sw.new/source/core/doc/swtable.cxx 2008-01-10 09:49:06.000000000 +0800 @@ -825,27 +825,29 @@ long nDiff = nLeftDiff + nRightDiff; //Box und alle uebergeordneten um den Differenzbetrag anpassen. - BOOL bUp = FALSE; while ( pBox ) { - if ( !bUp || (bUp && !::BoxInArr( rParm.aBoxArr, pBox )) ) + SwFmtFrmSize aFmtFrmSize( pBox->GetFrmFmt()->GetFrmSize() ); + aFmtFrmSize.SetWidth( aFmtFrmSize.GetWidth() + nDiff ); + if ( aFmtFrmSize.GetWidth() < 0 ) + aFmtFrmSize.SetWidth( -aFmtFrmSize.GetWidth() ); + rParm.aShareFmts.SetSize( *pBox, aFmtFrmSize ); + + if ( pBox->GetUpper()->GetUpper() && + pBox->GetUpper() != pBox->GetUpper()->GetUpper()->GetTabLines() + [pBox->GetUpper()->GetUpper()->GetTabLines().Count()-1]) + pBox = 0; + else { - SwFmtFrmSize aFmtFrmSize( pBox->GetFrmFmt()->GetFrmSize() ); - aFmtFrmSize.SetWidth( aFmtFrmSize.GetWidth() + nDiff ); - if ( aFmtFrmSize.GetWidth() < 0 ) - aFmtFrmSize.SetWidth( -aFmtFrmSize.GetWidth() ); - rParm.aShareFmts.SetSize( *pBox, aFmtFrmSize ); - bUp = TRUE; - } - - //Wenn es links noch Boxen gibt, die LeftDiff nicht auf den Upper - if ( pBox != pBox->GetUpper()->GetTabBoxes()[0] ) - nDiff = nRightDiff; - //Wenn es rechts noch Boxen gibt, den RightDiff nicht auf den Upper - if ( pBox != pBox->GetUpper()->GetTabBoxes() + //Wenn es links noch Boxen gibt, die LeftDiff nicht auf den Upper + if ( pBox != pBox->GetUpper()->GetTabBoxes()[0] ) + nDiff = nRightDiff; + //Wenn es rechts noch Boxen gibt, den RightDiff nicht auf den Upper + if ( pBox != pBox->GetUpper()->GetTabBoxes() [pBox->GetUpper()->GetTabBoxes().Count()-1] ) - nDiff -= nRightDiff; - pBox = nDiff ? pBox->GetUpper()->GetUpper() : 0; + nDiff -= nRightDiff; + pBox = nDiff ? pBox->GetUpper()->GetUpper() : 0; + } } } }