diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-12-07 22:16:05 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-07 22:45:08 +0100 |
commit | c9fc16f8a9b2f267fdea680a67938e3292660e8e (patch) | |
tree | e51a12de9f9d518d30e0b9d9218240aec402a133 /sw | |
parent | ab96779a30de5ce8373253bc00ff3046df64282e (diff) |
sw: simplify SwContact::MoveObjToVisibleLayer()
Change-Id: I8ebaf42ce9af6a4d28fceab2a1f68b4c8ab00b96
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 9baab81946c7..88015f5ab556 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -195,21 +195,17 @@ void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj ) if ( bNotify ) { SwAnchoredObject* pAnchoredObj = GetAnchoredObj( _pDrawObj ); - OSL_ENSURE( pAnchoredObj, - "<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" ); - if ( pAnchoredObj ) + assert(pAnchoredObj); + ::setContextWritingMode( _pDrawObj, pAnchoredObj->GetAnchorFrameContainingAnchPos() ); + // Note: as-character anchored objects aren't registered at a page frame and + // a notification of its background isn't needed. + if ( pAnchoredObj->GetPageFrame() ) { - ::setContextWritingMode( _pDrawObj, pAnchoredObj->GetAnchorFrameContainingAnchPos() ); - // Note: as-character anchored objects aren't registered at a page frame and - // a notification of its background isn't needed. - if ( pAnchoredObj->GetPageFrame() ) - { - ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrame(), - pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, true ); - } - - pAnchoredObj->InvalidateObjPos(); + ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrame(), + pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, true ); } + + pAnchoredObj->InvalidateObjPos(); } } @@ -225,11 +221,10 @@ void SwContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj ) if ( bNotify ) { SwAnchoredObject* pAnchoredObj = GetAnchoredObj( _pDrawObj ); - OSL_ENSURE( pAnchoredObj, - "<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" ); + assert(pAnchoredObj); // Note: as-character anchored objects aren't registered at a page frame and // a notification of its background isn't needed. - if ( pAnchoredObj && pAnchoredObj->GetPageFrame() ) + if (pAnchoredObj->GetPageFrame()) { ::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrame(), pAnchoredObj->GetObjRect(), PREP_FLY_LEAVE, true ); |