Re: How to catch the following events: OnAlphaCharInput, OnInsertStart, OnInsertDone, OnNonAlphaCharInput
Ariel Constenla-Haile <[email protected]> Sat, 14 May 2011 21:34:15 -0300
| Newsgroups | gmane.comp.openoffice.devel.general |
|---|---|
| Message-ID | <[email protected]> |
Hello John, On Saturday 14 May 2011, 02:01, John Gillanders wrote: > Hello all, > > 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 most > frequently see 'OnLayoutFinished', but I do not think it is of use to me). > > 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 You won't get notified for those event adding an XDocumentEventListener, those events are not document-wide, but related to some kind of object. OnAlphaCharInput and OnNonAlphaCharInput are frame objects events (insert a frame, select Format - Frame/Object... , see the tab "Macro", there you'll see the "Input of non-alphanumeric char" and "Input of alphanumeric char" Frame events). OnInsertStart, OnInsertDone are events related to an AutoTextk entry. See http://svn.services.openoffice.org/opengrok/xref/DEV300_m106/sw/source/core/unocore/unoevent.cxx#119 http://svn.services.openoffice.org/opengrok/xref/DEV300_m106/sw/source/core/unocore/unoevent.cxx#126 and http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Text/Shape_Objects_in_Text#Base_Frames "The interface com.sun.star.document.XEventsSupplier is not a part of the BaseFrame service, but is available in text frames, graphic objects and embedded objects. This interface provides access to the event macros that may be attached to the object in the GUI." So, depending on what you are trying to do, you'll need to take a different approach. Note that these kind of questions belong to [email protected] Regards -- Ariel Constenla-Haile La Plata, Argentina
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABCAAGBQJNzx+NAAoJEMjP1bm45QNWlLEP/1XLNVuZfK2lUoSj4KrjBRR8 h0ESpVNcaSVQ6qTNiefzeDzsgLbmYOYcBO+W+kHEHGw/O1Fhniq+4jccfSCO3rTZ ALTWDoKW2E/TQkbsVGRxqKJSIYhKYW2uVk37tcA+qFRKaDrFMIdfzk6IWY2wboNs iVTMkpIW/7AI0xw0HwDNMLpoP77uaSEMz7FGEMgY8Ty5jcizVvAPeMS72t523zRJ NHL3rCahi5DbqYgv9pGGAcS0R068IPaFTJsboE/gx+HERBHYKBbWafW2NIWNcBl7 8r7ASkQYQ7qFUUdafgUkNsJzfUMtktQZmE8EXkKu3skZWu0aroGSXVv2ERe39faK iIf4SfxavKyjHeFN/2AvfxVL6SWcg8/q6lNnnEzJhr5juvGpqtTk+hTj6I0xD62M 1SbH1WJI+R+A8MhRYAuKzHUl4P3VaMYFsU+ZlAB5nr7PhodTH15ZP8yoFeAZQte8 7hkDGsOBZglmDl4y3hS0e4HekLMbwKj0Iq7a/JPQITKkUiIy0D0gFh3Hm2RvBz7C ZHe4fICZkBWQvC6Gpg/qjDMkNs07tesAEhvXV4WY4ZNe5HOEaq39y0uF5/primeI 7ubi9cJ8x0f0N7HQsMXALn7wYy/C0x5bWNq9487VyTxw1PrrBi37B43K9820lebQ kT2P+EO74BBbCsYXs+LI =NwQr -----END PGP SIGNATURE-----