diff options
-rw-r--r-- | sw/inc/calbck.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unotextmarkup.cxx | 4 |
3 files changed, 2 insertions, 14 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 3f6ca203f2c5..68fa315b4061 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -67,11 +67,6 @@ class SW_DLLPUBLIC SwClient : ::boost::noncopyable SwClient *pLeft, *pRight; ///< double-linked list of other clients SwModify *pRegisteredIn; ///< event source - // in general clients should not be removed when their SwModify sends out Modify() - // notifications; in some rare cases this is necessary, but only the concrete SwClient - // sub class will know that; this flag allows to make that known - bool mbIsAllowedToBeRemovedInModifyCall; - // callbacks received from SwModify (friend class - so these methods can be private) // should be called only from SwModify the client is registered in // mba: IMHO these methods should be pure virtual @@ -84,7 +79,6 @@ protected: // write access to pRegisteredIn shall be granted only to the object itself (protected access) SwModify* GetRegisteredInNonConst() const { return pRegisteredIn; } - void SetIsAllowedToBeRemovedInModifyCall( bool bSet ) { mbIsAllowedToBeRemovedInModifyCall = bSet; } public: @@ -112,7 +106,7 @@ public: }; inline SwClient::SwClient() : - pLeft(0), pRight(0), pRegisteredIn(0), mbIsAllowedToBeRemovedInModifyCall(false) + pLeft(0), pRight(0), pRegisteredIn(0) {} // SwModify diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 548c27cce464..a1193f74a7d0 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -28,7 +28,7 @@ static SwClientIter* pClientIters = 0; TYPEINIT0( SwClient ); SwClient::SwClient( SwModify* pToRegisterIn ) - : pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 ), mbIsAllowedToBeRemovedInModifyCall( false ) + : pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 ) { if(pToRegisterIn) // connect to SwModify @@ -248,8 +248,6 @@ SwClient* SwModify::Remove( SwClient* pDepend ) if ( bInDocDTOR ) return 0; - OSL_ENSURE( !bLockClientList || pDepend->mbIsAllowedToBeRemovedInModifyCall, "SwClient shall be removed in Modify call!" ); - if( pDepend->pRegisteredIn == this ) { // SwClient is my listener diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx index 860415dc1cb6..bc1cceb410fe 100644 --- a/sw/source/core/unocore/unotextmarkup.cxx +++ b/sw/source/core/unocore/unotextmarkup.cxx @@ -45,8 +45,6 @@ SwXTextMarkup::SwXTextMarkup( : mpTxtNode(pTxtNode) , maConversionMap(rMap) { - // FME 2007-07-16 #i79641# SwXTextMarkup is allowed to be removed ... - SetIsAllowedToBeRemovedInModifyCall(true); mpTxtNode->Add(this); } @@ -451,8 +449,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) void SwXTextMarkup::Modify( const SfxPoolItem* /*pOld*/, const SfxPoolItem* /*pNew*/ ) { - // FME 2007-07-16 #i79641# In my opinion this is perfectly legal, - // therefore I remove the assertion in SwModify::_Remove() if ( GetRegisteredIn() ) GetRegisteredInNonConst()->Remove( this ); |