ashok _ wrote: > On Mon, Apr 7, 2008 at 9:55 AM, Mathias Bauer <[EMAIL PROTECTED]> wrote: >> >> > What I would really like to see ... but it doesnt seem to be possible >> > ... is for an XSelectionChangeListener to directly let me know if >> > text was selected or not without doing this textrange comparison >> > stuff.... (currently xselectionchange listener is invoked for >> > everything...even mere movement of the cursor....). >> >> There is already a SelectionChangeListener support - but not at the >> model, but at the Controller(s). And IMHO this is the right place. >> Having a "getCurrentSelection" at the model is wrong IMHO and just made >> for the convenience of lazy developers. ;-) > > Yes, the XSelectionChangeListener at the controller level is what I > tried to use. > Unfortunately even moving the cursor in the document invokes a selectionChange > event (i.e. there is no text selected at all ) . > Is this is a bug , or is this the way it is ?
The cursor also is a selection (a collapsed one). So if it is moved, the selection changes. That's the way it is. Ciao, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to "[EMAIL PROTECTED]". I use it for the OOo lists and only rarely read other mails sent to it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
