summaryrefslogtreecommitdiff
path: root/linguistic/inc/iprcache.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-06 14:57:03 +0200
committerNoel Grandin <noel@peralex.com>2015-10-07 08:27:26 +0200
commitdee4645edca450c91139bb2a829bc995269de6ad (patch)
tree9baeb5cb0eb338490c0ce150192e5ac7551d0eea /linguistic/inc/iprcache.hxx
parentdff288c6ee45e027375ad3d7f3ea392df26f3aa0 (diff)
loplugin:mergeclasses
Change-Id: I9b926e59b2df62c22fb5ecfc7c16d8047b6da2a4
Diffstat (limited to 'linguistic/inc/iprcache.hxx')
-rw-r--r--linguistic/inc/iprcache.hxx32
1 files changed, 9 insertions, 23 deletions
diff --git a/linguistic/inc/iprcache.hxx b/linguistic/inc/iprcache.hxx
index 5e56a13db643..095055479cd4 100644
--- a/linguistic/inc/iprcache.hxx
+++ b/linguistic/inc/iprcache.hxx
@@ -39,16 +39,7 @@
namespace linguistic
{
-
-class Flushable
-{
-public:
- virtual void Flush() = 0;
-
-protected:
- ~Flushable() {}
-};
-
+class SpellCache;
class FlushListener :
public cppu::WeakImplHelper
@@ -57,20 +48,16 @@ class FlushListener :
::com::sun::star::beans::XPropertyChangeListener
>
{
- ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XLinguProperties > xPropSet;
- Flushable *pFlushObj;
+ css::uno::Reference< css::linguistic2::XSearchableDictionaryList > xDicList;
+ css::uno::Reference< css::linguistic2::XLinguProperties > xPropSet;
+ SpellCache& mrSpellCache;
FlushListener(const FlushListener &) SAL_DELETED_FUNCTION;
FlushListener & operator = (const FlushListener &) SAL_DELETED_FUNCTION;
public:
- FlushListener( Flushable *pFO );
- virtual ~FlushListener();
-
- inline void SetFlushObj( Flushable *pFO) { pFlushObj = pFO; }
+ FlushListener( SpellCache& rFO ) : mrSpellCache(rFO) {}
+ virtual ~FlushListener() {}
void SetDicList( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > &rDL );
void SetPropSet( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguProperties > &rPS );
@@ -86,8 +73,7 @@ public:
};
-class SpellCache :
- public Flushable
+class SpellCache
{
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionaryListEventListener >
@@ -105,8 +91,8 @@ public:
SpellCache();
virtual ~SpellCache();
- // Flushable
- virtual void Flush() SAL_OVERRIDE;
+ // called from FlushListener
+ void Flush();
void AddWord( const OUString& rWord, LanguageType nLang );
bool CheckWord( const OUString& rWord, LanguageType nLang );