[Libreoffice] How to catch the following events: OnAlphaCharInput, OnInsertStart, OnInsertDone, OnNonAlphaCharInput

John Gillanders johngillanders at gmail.com
Sun May 15 17:05:58 PDT 2011


Hello all,

I found out that the OnAlphaCharInput and OnNonAlphaCharInput events are only relevant to Frame objects, so do not do what I was hoping for, and OnInsertStart and OnInsertDone are related to AutoText objects, so these also do not do what I was hoping for.

What I am actually trying to achieve is a way to hook into events in OpenOffice so that I am able to catch all edits that a user does to a Writer document and do something with the related information (I need to receive the full information of what changed). I know there is a new undo/redo API in the 3.4 version of OpenOffice, but Frank Schönheit advised that this API will only provide the localised name of the action that has just happened, whereas I really need access to the full details of the action. Frank suggested that there might be events for all different kinds of edits that I can catch, which is what led me to where I am now.

Do anyone know of anything that may help me with this (catching all edits to a document and inspecting details of each edit)?

Regards,
John Gillanders

On 15/05/2011, at 11:17 AM, John Gillanders wrote:

> Hello all,
> 
> I am working on a feasibility study for an exciting new feature for LibreOffice/OpenOffice but I am stuck and would appreciate any assistance anyone can give me.
> 
> After quite some reading and experimenting, I have figured out how to catch events on an OpenOffice Writer document using an XDocumentEventBroadcaster/XDocumentEventListener pair (I am using Java/NetBeans on Windows with the OpenOffice.org Dev 3.4 version), but the events I am notified of are not the ones I am interested in (I do receive notification of events, e.g. 'OnLayoutFinished', just not the ones I want).
> 
> I see in the API documentation several events that I want to catch, but I cannot figure out how. I think I need to find some sub-object within the document and add an event listener to it - but cannot figure out how to do this (or maybe I am on the wrong track).
> 
> Can someone please help point me to how to catch the following events?: OnAlphaCharInput, OnInsertStart, OnInsertDone, OnNonAlphaCharInput
> 
> Regards,
> John Gillanders



More information about the LibreOffice mailing list