diff options
Diffstat (limited to 'sw/source/core/txtnode/atrfld.cxx')
-rw-r--r-- | sw/source/core/txtnode/atrfld.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index ce1dd11493..b5fe2a2e8d 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -157,14 +157,16 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) if( !pTxtAttr ) return; + // don't do anything, especially not expand! + if( pNew && pNew->Which() == RES_OBJECTDYING ) + return; + SwTxtNode* pTxtNd = (SwTxtNode*)&pTxtAttr->GetTxtNode(); ASSERT( pTxtNd, "wo ist denn mein Node?" ); if( pNew ) { switch( pNew->Which() ) { - case RES_OBJECTDYING: - return; // don't do anything, especially not expand! case RES_TXTATR_FLDCHG: // "Farbe hat sich geaendert !" // this, this fuer "nur Painten" @@ -189,6 +191,8 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) case RES_FMT_CHG: pTxtNd->Modify( pOld, pNew ); return; + default: + break; } } @@ -265,6 +269,11 @@ SwTxtFld::SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStartPos ) SwTxtFld::~SwTxtFld( ) { + SwFmtFld & rFmtFld( static_cast<SwFmtFld &>(GetAttr()) ); + if (this == rFmtFld.pTxtAttr) + { + rFmtFld.pTxtAttr = 0; // #i110140# invalidate! + } } /************************************************************************* |