diff options
author | Thomas Lange <tl@openoffice.org> | 2001-02-27 13:28:12 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2001-02-27 13:28:12 +0000 |
commit | a935be6cd24165a9dd9cdce02f7444ec4f53b76c (patch) | |
tree | 5045ff6d532f7c8e2f80c006b22456cb841fccb4 /linguistic/source/dlistimp.cxx | |
parent | 1f00aaa62e1e0dbf202a7a494d730730326c5f7f (diff) |
#70880#, #72626#: Flushing of events fixed (no empty events)
Diffstat (limited to 'linguistic/source/dlistimp.cxx')
-rw-r--r-- | linguistic/source/dlistimp.cxx | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index c90006b6f8a5..c297f1e27888 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dlistimp.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: tl $ $Date: 2001-02-02 15:40:07 $ + * last change: $Author: tl $ $Date: 2001-02-27 14:28:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -328,24 +328,27 @@ INT16 DicEvtListenerHelper::EndCollectEvents() INT16 DicEvtListenerHelper::FlushEvents() { - // build DictionaryListEvent to pass on to listeners - uno::Sequence< DictionaryEvent > aDicEvents; - if (nNumVerboseListeners > 0) - aDicEvents = aCollectDicEvt; - DictionaryListEvent aEvent( xMyDicList, nCondensedEvt, aDicEvents ); - - // pass on event - cppu::OInterfaceIteratorHelper aIt( aDicListEvtListeners ); - while (aIt.hasMoreElements()) + if (0 != nCondensedEvt) { - Reference< XDictionaryListEventListener > xRef( aIt.next(), UNO_QUERY ); - if (xRef.is()) - xRef->processDictionaryListEvent( aEvent ); - } + // build DictionaryListEvent to pass on to listeners + uno::Sequence< DictionaryEvent > aDicEvents; + if (nNumVerboseListeners > 0) + aDicEvents = aCollectDicEvt; + DictionaryListEvent aEvent( xMyDicList, nCondensedEvt, aDicEvents ); + + // pass on event + cppu::OInterfaceIteratorHelper aIt( aDicListEvtListeners ); + while (aIt.hasMoreElements()) + { + Reference< XDictionaryListEventListener > xRef( aIt.next(), UNO_QUERY ); + if (xRef.is()) + xRef->processDictionaryListEvent( aEvent ); + } - // clear "list" of events - nCondensedEvt = 0; - aCollectDicEvt.realloc( 0 ); + // clear "list" of events + nCondensedEvt = 0; + aCollectDicEvt.realloc( 0 ); + } return nNumCollectEvtListeners; } |