summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/atrfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/atrfrm.cxx')
-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 207cb77d1954..2b15de1ffcd3 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2615,8 +2615,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 )
@@ -2627,8 +2628,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 )