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-06-07 15:13:06.000000000 +0800 @@ -2199,18 +2199,36 @@ if( pSttNd ) { SwNodeIndex aIdx( *pSttNd ); - const SwCntntNode* pCNd = pSttNd->GetNodes().GoNext( &aIdx ); - if( pCNd && pCNd->IsTxtNode() && - pSttNd->GetNodes()[ aIdx.GetIndex() + 1 ]->IsEndNode() ) + ULONG nIndexStt = aIdx.GetIndex(); + ULONG nIndexEnd = pSttNd->GetNodes()[ nIndexStt ]->EndOfSectionIndex(); + SwTxtNode *pTextNode = 0; + for ( ULONG n=nIndexStt + 1;nGetNodes()[n]->IsTableNode() /*return ULONG_MAX if the cell contains a table(in table)*/ ) + { + pTextNode = 0; + break; + } + if ( pSttNd->GetNodes()[n]->IsTxtNode()) + { + if(pTextNode /*return ULONG_MAX if the cell contains complex paragraphs*/) + { + pTextNode = 0; + nPos = ULONG_MAX; + break; + } + pTextNode = (SwTxtNode *)pSttNd->GetNodes()[n]; + nPos = n; + } + } + if (pTextNode) { if( bCheckAttr ) { - const SwpHints* pHts = ((SwTxtNode*)pCNd)->GetpSwpHints(); - const String& rTxt = ((SwTxtNode*)pCNd)->GetTxt(); -// if( rTxt.Len() ) + const SwpHints* pHts = pTextNode->GetpSwpHints(); + const String& rTxt = pTextNode->GetTxt(); + // if( rTxt.Len() ) { - nPos = aIdx.GetIndex(); - // dann teste doch mal, ob das wirklich nur Text im Node steht! // Flys/Felder/.. if( pHts ) @@ -2229,8 +2247,6 @@ } } } - else - nPos = aIdx.GetIndex(); } } return nPos;