summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/tblcpy.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/tblcpy.cxx')
-rw-r--r--sw/source/core/doc/tblcpy.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 2ef5bf28268e..07870e54aae3 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -591,14 +591,14 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
}
// stehen noch FlyFrames rum, loesche auch diese
- const SwPosition* pAPos;
for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
- SwFrmFmt* pFly = (*pDoc->GetSpzFrmFmts())[n];
- const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
- if( ( FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId() ) &&
- 0 != ( pAPos = pAnchor->GetCntntAnchor() ) &&
+ SwFrmFmt *const pFly = (*pDoc->GetSpzFrmFmts())[n];
+ SwFmtAnchor const*const pAnchor = &pFly->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aInsIdx <= pAPos->nNode && pAPos->nNode <= aEndNdIdx )
{
pDoc->DelLayoutFmt( pFly );