summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-10 16:04:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-05-20 15:23:07 +0100
commitbb2f9df7277ac925a973650a40fffd20d976ece7 (patch)
treeac6bfa8ba48e6535c474e3b5c436e9ea5499f861 /linguistic
parent5fc588dc56beb4e3c5622e9b2929adaf4ca48ef9 (diff)
config leak: break cyclic dependency
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngsvcmgr.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 52bc9de5dd34..14216f8f8174 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -285,7 +285,6 @@ class LngSvcMgrListenerHelper :
::cppu::OInterfaceContainerHelper aLngSvcMgrListeners;
::cppu::OInterfaceContainerHelper aLngSvcEvtBroadcasters;
uno::Reference< linguistic2::XDictionaryList > xDicList;
- uno::Reference< uno::XInterface > xMyEvtObj;
sal_Int16 nCombinedLngSvcEvt;
@@ -299,8 +298,7 @@ class LngSvcMgrListenerHelper :
public:
LngSvcMgrListenerHelper( LngSvcMgr &rLngSvcMgr,
- const uno::Reference< uno::XInterface > &rxSource,
- const uno::Reference< linguistic2::XDictionaryList > &rxDicList );
+ const uno::Reference< linguistic2::XDictionaryList > &rxDicList );
// lang::XEventListener
virtual void SAL_CALL
@@ -334,13 +332,11 @@ public:
LngSvcMgrListenerHelper::LngSvcMgrListenerHelper(
LngSvcMgr &rLngSvcMgr,
- const uno::Reference< uno::XInterface > &rxSource,
const uno::Reference< linguistic2::XDictionaryList > &rxDicList ) :
rMyManager ( rLngSvcMgr ),
aLngSvcMgrListeners ( GetLinguMutex() ),
aLngSvcEvtBroadcasters ( GetLinguMutex() ),
- xDicList ( rxDicList ),
- xMyEvtObj ( rxSource )
+ xDicList ( rxDicList )
{
if (xDicList.is())
{
@@ -377,7 +373,8 @@ long LngSvcMgrListenerHelper::Timeout()
// change event source to LinguServiceManager since the listeners
// probably do not know (and need not to know) about the specific
// SpellChecker's or Hyphenator's.
- linguistic2::LinguServiceEvent aEvtObj( xMyEvtObj, nCombinedLngSvcEvt );
+ linguistic2::LinguServiceEvent aEvtObj(
+ static_cast<com::sun::star::linguistic2::XLinguServiceManager*>(&rMyManager), nCombinedLngSvcEvt );
nCombinedLngSvcEvt = 0;
if (rMyManager.pSpellDsp)
@@ -470,7 +467,8 @@ void SAL_CALL
void LngSvcMgrListenerHelper::LaunchEvent( sal_Int16 nLngSvcEvtFlags )
{
- linguistic2::LinguServiceEvent aEvt( xMyEvtObj, nLngSvcEvtFlags );
+ linguistic2::LinguServiceEvent aEvt(
+ static_cast<com::sun::star::linguistic2::XLinguServiceManager*>(&rMyManager), nLngSvcEvtFlags );
// pass event on to linguistic2::XLinguServiceEventListener's
cppu::OInterfaceIteratorHelper aIt( aLngSvcMgrListeners );
@@ -747,8 +745,7 @@ void LngSvcMgr::GetListenerHelper_Impl()
{
if (!pListenerHelper)
{
- pListenerHelper = new LngSvcMgrListenerHelper( *this,
- (XLinguServiceManager *) this, linguistic::GetDictionaryList() );
+ pListenerHelper = new LngSvcMgrListenerHelper( *this, linguistic::GetDictionaryList() );
xListenerHelper = (linguistic2::XLinguServiceEventListener *) pListenerHelper;
}
}
@@ -1811,7 +1808,7 @@ void SAL_CALL
bDisposing = sal_True;
// require listeners to release this object
- lang::EventObject aEvtObj( (XLinguServiceManager *) this );
+ lang::EventObject aEvtObj( static_cast<XLinguServiceManager*>(this) );
aEvtListeners.disposeAndClear( aEvtObj );
if (pListenerHelper)