Is there a way to detect when a document changes?
I a working on a context manager that basically caches the current document ( XComponent ) When the document changes I want to invalidate the cache. The manager also does a few other things so its not just about cache.
I am getting the desktop from the the LO Service Manager.
self.desktop = self._mc_factory.DefaultContext.getByName("/singletons/com.sun.star.frame.theDesktop")
Then I am adding a listener to the deskop
self.desktop.addFrameActionListener(mylistener)
Next I open a LibreOffice Writer and run the APSO console. From there I load my context manager, Which is a static class. Loading creates the deskop and adds the listener.
Next I open Calc from the Writer File Menu. This creates a Calc document that is open at the same time as the Write Document.
I expect my Context Manager to get notification when I switch from Write to Calc and back again.
The frame action event is not firing. Am I missing something?