Kaydet (Commit) 0ec45892 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

inline SwDepends trivials

Change-Id: I6fb306aec5fee5f97a7ef33862f74f6030136fc0
üst e755c1d4
......@@ -24,6 +24,8 @@
#include "swdllapi.h"
#include <boost/noncopyable.hpp>
#include <ring.hxx>
#include <hintids.hxx>
#include <hints.hxx>
class SwModify;
class SwClientIter;
......@@ -199,15 +201,26 @@ class SW_DLLPUBLIC SwDepend: public SwClient
public:
SwDepend() : pToTell(0) {}
SwDepend(SwClient *pTellHim, SwModify *pDepend);
SwDepend(SwClient *pTellHim, SwModify *pDepend) : SwClient(pDepend), pToTell(pTellHim) {}
SwClient* GetToTell() { return pToTell; }
/** get Client information */
virtual bool GetInfo( SfxPoolItem & ) const SAL_OVERRIDE;
virtual bool GetInfo( SfxPoolItem& rInfo) const SAL_OVERRIDE
{ return pToTell ? pToTell->GetInfo( rInfo ) : true; }
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue ) SAL_OVERRIDE;
virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue ) SAL_OVERRIDE
{
if( pNewValue && pNewValue->Which() == RES_OBJECTDYING )
CheckRegistration(pOldValue,pNewValue);
else if( pToTell )
pToTell->ModifyNotification(pOldValue, pNewValue);
}
virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) SAL_OVERRIDE
{
if ( pToTell )
pToTell->SwClientNotifyCall( rModify, rHint );
}
};
class SwClientIter : public sw::Ring<SwClientIter>
......
......@@ -270,30 +270,5 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich )
}
}
SwDepend::SwDepend( SwClient* pTellHim, SwModify* pDepend )
: SwClient( pDepend )
{
pToTell = pTellHim;
}
void SwDepend::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
{
if( pNewValue && pNewValue->Which() == RES_OBJECTDYING )
CheckRegistration(pOldValue,pNewValue);
else if( pToTell )
pToTell->ModifyNotification(pOldValue, pNewValue);
}
void SwDepend::SwClientNotify( const SwModify& rMod, const SfxHint& rHint )
{
if ( pToTell )
pToTell->SwClientNotifyCall( rMod, rHint );
}
bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const
{
return pToTell ? pToTell->GetInfo( rInfo ) : true;
}
SwClientIter* SwClientIter::our_pClientIters = nullptr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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