View | Details | Raw Unified | Return to issue 121479
Collapse All | Expand All

(-)a/main/sw/source/core/docnode/nodes.cxx (+24 lines)
Lines 522-527 sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, Link Here
522
	sal_uInt16 nSectNdCnt = 0;
522
	sal_uInt16 nSectNdCnt = 0;
523
	sal_Bool bSaveNewFrms = bNewFrms;
523
	sal_Bool bSaveNewFrms = bNewFrms;
524
524
525
    // Check that the range of nodes to move is valid.
526
    // This is a very specific test that only checks that table nodes
527
    // are completely covered by the range.  Issue 121479 has a
528
    // document for which this test fails.    
529
    SwNodeIndex aNodeIndex (aRg.aEnd);
530
    while (aNodeIndex > aRg.aStart)
531
    {
532
        SwNode* pNode = rNodes[aNodeIndex.GetIndex()];
533
        if (pNode->GetNodeType() != ND_ENDNODE)
534
            break;
535
        SwStartNode* pStartNode = pNode->pStartOfSection;
536
        if (pStartNode==NULL)
537
            break;
538
        if ( ! pStartNode->IsTableNode())
539
            break;
540
        aNodeIndex = *pStartNode;
541
        if (aNodeIndex < aRg.aStart.GetIndex())
542
        {
543
            return sal_False;
544
        }
545
        --aNodeIndex;
546
    }
547
548
525
	// bis alles verschoben ist
549
	// bis alles verschoben ist
526
	while( aRg.aStart < aRg.aEnd )
550
	while( aRg.aStart < aRg.aEnd )
527
		switch( (pAktNode = &aRg.aEnd.GetNode())->GetNodeType() )
551
		switch( (pAktNode = &aRg.aEnd.GetNode())->GetNodeType() )

Return to issue 121479