DocumentEventListener problem
Piet van Oostrum
piet at vanoostrum.org
Wed Apr 15 09:16:42 PDT 2015
Stephan Bergmann wrote:
> On 04/15/2015 02:18 PM, Piet van Oostrum wrote:
> > Anyway, this makes it almost impossible to use listeners across the UNO bridge. When I run my code as a macro inside LO there is no problem.
>
> Why do you need to remove and then re-add the MyEventListener during the
> dumentEventOccured call anyway?
My first suspicion was that during the actions in the listener a new event would possibly be triggered, causing a recursion in the listener.Just to prevent that kind of situation I removed/added the event listener around the body. As it appears not to be the case, I have now removed them, but that doesn't solve the problem. It is the release() calls that cause the problem because they lock the mutex. I have looked in the code and I guess there are some destructors that use the lock, probably indirectly. I had the impression that OInterfaceContainerhelper had something to do with it.
The documentation somewhere warns about oneway calls because they are asynchronous and ru in different threads than synchronous calls. Well, release() is oneway. But there's not much you can do about that.
--
Piet van Oostrum <piet at vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
More information about the LibreOffice
mailing list