Kaydet (Commit) eed04643 authored tarafından Michael Stahl's avatar Michael Stahl

tdf#112574 sw: assert if a frame style contains a RES_ANCHOR

... in SwFrameFormat::Modify().

Change-Id: I3b7ea1493277d8d705bdf77c50fdff49872bac05
üst 17fe1e19
......@@ -2614,7 +2614,10 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
const SfxPoolItem* tmp = nullptr;
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();
}
}
if( pNew && pNew->Which() == RES_ANCHOR )
newAnchorPosition = static_cast< const SwFormatAnchor* >( pNew )->GetContentAnchor();
......@@ -2623,7 +2626,10 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
const SfxPoolItem* tmp = nullptr;
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();
}
}
if( pOld && pOld->Which() == RES_ANCHOR )
oldAnchorPosition = static_cast< const SwFormatAnchor* >( pOld )->GetContentAnchor();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment