diff options
Diffstat (limited to 'sw/source/core/layout/flycnt.cxx')
-rw-r--r-- | sw/source/core/layout/flycnt.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 32c6f89a9016..613e5e0418ee 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1391,13 +1391,13 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) { //Set the anchor attribute according to the new Cnt. SwFmtAnchor aAnch( pFmt->GetAnchor() ); - SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor(); + SwPosition pos = *aAnch.GetCntntAnchor(); if( IsAutoPos() && pCnt->IsTxtFrm() ) { SwCrsrMoveState eTmpState( MV_SETONLYTEXT ); Point aPt( rNew ); - if( pCnt->GetCrsrOfst( pPos, aPt, &eTmpState ) - && pPos->nNode == *pCnt->GetNode() ) + if( pCnt->GetCrsrOfst( &pos, aPt, &eTmpState ) + && pos.nNode == *pCnt->GetNode() ) { ResetLastCharRectHeight(); if( text::RelOrientation::CHAR == pFmt->GetVertOrient().GetRelationOrient() ) @@ -1407,15 +1407,16 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) } else { - pPos->nNode = *pCnt->GetNode(); - pPos->nContent.Assign( pCnt->GetNode(), 0 ); + pos.nNode = *pCnt->GetNode(); + pos.nContent.Assign( pCnt->GetNode(), 0 ); } } else { - pPos->nNode = *pCnt->GetNode(); - pPos->nContent.Assign( pCnt->GetNode(), 0 ); + pos.nNode = *pCnt->GetNode(); + pos.nContent.Assign( pCnt->GetNode(), 0 ); } + aAnch.SetAnchor( &pos ); // handle change of anchor node: // if count of the anchor frame also change, the fly frames have to be |