summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorThomas Lange <tl@openoffice.org>2001-02-27 13:28:12 +0000
committerThomas Lange <tl@openoffice.org>2001-02-27 13:28:12 +0000
commita935be6cd24165a9dd9cdce02f7444ec4f53b76c (patch)
tree5045ff6d532f7c8e2f80c006b22456cb841fccb4 /linguistic
parent1f00aaa62e1e0dbf202a7a494d730730326c5f7f (diff)
#70880#, #72626#: Flushing of events fixed (no empty events)
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/dlistimp.cxx39
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;
}