summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/layout/atrfrm.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 37a3b2bd44ae..118f551cbf4c 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2623,8 +2623,9 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
static_cast< const SwAttrSetChg* >(pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false, &tmp );
if( tmp )
{
- assert(static_cast<SwAttrSetChg const*>(pNew)->GetTheChgdSet() == &m_aSet); // must not be style's set!
newAnchorPosition = static_cast< const SwFormatAnchor* >( tmp )->GetContentAnchor();
+ assert(newAnchorPosition == nullptr || // style's set must not contain position!
+ static_cast<SwAttrSetChg const*>(pNew)->GetTheChgdSet() == &m_aSet);
}
}
if( pNew && pNew->Which() == RES_ANCHOR )
@@ -2635,8 +2636,9 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
static_cast< const SwAttrSetChg* >(pOld)->GetChgSet()->GetItemState( RES_ANCHOR, false, &tmp );
if( tmp )
{
- assert(static_cast<SwAttrSetChg const*>(pOld)->GetTheChgdSet() == &m_aSet); // must not be style's set!
oldAnchorPosition = static_cast< const SwFormatAnchor* >( tmp )->GetContentAnchor();
+ assert(oldAnchorPosition == nullptr || // style's set must not contain position!
+ static_cast<SwAttrSetChg const*>(pOld)->GetTheChgdSet() == &m_aSet);
}
}
if( pOld && pOld->Which() == RES_ANCHOR )