openoffice-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amenel VOGLOZIN <waav_zoungla-o...@yahoo.fr>
Subject Re: [EXT]How to declare a unique-instance and all-contexts component
Date Thu, 10 Jul 2014 13:56:30 GMT
Yes, I was indeed using the same class for everything, with the intention of creating dedicated
classes for each responsibility (component, event handlers, listeners, etc.).

As to tracking recent documents. For now, I'm installing a document event listener in the
initialize (com.sun.star.lang.XInitialization interface) method... Yes, it's wrong: each event
is notified several times depending on whether several documents are opened or whether a menu
item of the extension was clicked. I'm "intercepting" OnLoad, OnSaveDone and OnSaveAsDone
events. My list of files will be stored in a text format (JSON or INI or else, haven't chosen
yet) in (I guess) the user's application data folder. This means I do not replace the standard
MRU files list; I just complement it with a richer set of features (pinning, grouping, tagging,
hiding, "forgetting about", etc.). The text file is loaded in the initialize method and saved
on the OnCloseApp event.

It's coming along nicely but definitely not beautifully :)

Thanks for your reply.




How are you tracking the recent documents? The ProtocolHandler is not
the place to do that ;)
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message