Kaydet (Commit) 99eaa798 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

tdf#93353: fix copy fluy in fly

- prevents flys in inlcuded docs in a master doc from disappearing
- fixes a regression from 3fcb0c3a

Change-Id: If211d8dbf423e2a33a258b43ab7092e1a010206f
üst 2de6bd04
......@@ -3201,7 +3201,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
const SwNodeRange& rRg,
const sal_Int32 nEndContentIndex,
const SwNodeIndex& rStartIdx,
bool bCopyFlyAtFly,
const bool bCopyFlyAtFly,
const bool bMergedFirstNode ) const
{
// First collect all Flys, sort them according to their ordering number,
......@@ -3223,22 +3223,25 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
bool bAtContent = (pAnchor->GetAnchorId() == FLY_AT_PARA);
if ( !pAPos )
continue;
sal_uLong nSkipAfter = pAPos->nNode.GetIndex();
sal_uLong nStart = rRg.aStart.GetIndex();
switch ( pAnchor->GetAnchorId() )
{
case FLY_AT_FLY:
if( bCopyFlyAtFly && rRg.aStart > pAPos->nNode.GetIndex() + 1 )
continue;
if(bCopyFlyAtFly)
++nSkipAfter;
else if(m_rDoc.getIDocumentRedlineAccess().IsRedlineMove())
++nStart;
break;
case FLY_AT_CHAR:
case FLY_AT_PARA:
bCopyFlyAtFly = false;
if(m_rDoc.getIDocumentRedlineAccess().IsRedlineMove())
++nStart;
break;
default:
continue;
}
if ( !bCopyFlyAtFly && ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove()
? rRg.aStart >= pAPos->nNode
: rRg.aStart > pAPos->nNode ))
if ( nStart > nSkipAfter )
continue;
if ( pAPos->nNode > rRg.aEnd )
continue;
......
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