From dee4645edca450c91139bb2a829bc995269de6ad Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 6 Oct 2015 14:57:03 +0200 Subject: loplugin:mergeclasses Change-Id: I9b926e59b2df62c22fb5ecfc7c16d8047b6da2a4 --- linguistic/source/iprcache.cxx | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'linguistic/source/iprcache.cxx') diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx index cb68a3bad86d..5c4b98a3f51e 100644 --- a/linguistic/source/iprcache.cxx +++ b/linguistic/source/iprcache.cxx @@ -99,17 +99,6 @@ static bool lcl_IsFlushProperty( sal_Int32 nHandle ) } -FlushListener::FlushListener( Flushable *pFO ) -{ - SetFlushObj( pFO ); -} - - -FlushListener::~FlushListener() -{ -} - - void FlushListener::SetDicList( Reference &rDL ) { MutexGuard aGuard( GetLinguMutex() ); @@ -176,9 +165,8 @@ void SAL_CALL FlushListener::processDictionaryListEvent( DictionaryListEventFlags::DEACTIVATE_POS_DIC; bool bFlush = 0 != (nEvt & nFlushFlags); - DBG_ASSERT( pFlushObj, "missing object (NULL pointer)" ); - if (bFlush && pFlushObj != NULL) - pFlushObj->Flush(); + if (bFlush) + mrSpellCache.Flush(); } } @@ -193,9 +181,8 @@ void SAL_CALL FlushListener::propertyChange( { bool bFlush = lcl_IsFlushProperty( rEvt.PropertyHandle ); - DBG_ASSERT( pFlushObj, "missing object (NULL pointer)" ); - if (bFlush && pFlushObj != NULL) - pFlushObj->Flush(); + if (bFlush) + mrSpellCache.Flush(); } } @@ -203,7 +190,7 @@ void SAL_CALL FlushListener::propertyChange( SpellCache::SpellCache() { - pFlushLstnr = new FlushListener( this ); + pFlushLstnr = new FlushListener( *this ); xFlushLstnr = pFlushLstnr; Reference aDictionaryList(GetDictionaryList()); pFlushLstnr->SetDicList( aDictionaryList ); //! after reference is established -- cgit