Apache OpenOffice (AOO) Bugzilla – Issue 68878
XSelectionChangeListener doesn't receive all selection change events
Last modified: 2017-05-20 10:44:47 UTC
First: I found this bug then using StarOffice8. I have no possibility to test it against OpenOffice.org, for reason which doesn't belong in this bug report. I submit it here because I think, this bug certainly also exist in OpenOffice.org. I want to receive events every time a user moves the XTextViewCursor. The matter is: "selectionChanged()" isn't called then the user moves the XTextViewCursor left and right with the arrow keys or then he enters new text inside the text document. Steps to reproduce my observation: 1) implements a XSelectionChangeListener and register it against the XTextViewCursorSupplier 2) start StarOffice writer. Use the key "left arrow" and "right arrow" to navigate inside the Text, or enter new text in the StarOffice Writer. The method “selectionChanged()” doesn't get called. As a side remark, "selectionChanged()" gets called then a user either clicks somewhere in the document with his mouse or then he moves the XTextViewCursor up and down with the arrow keys. (so in this case, it works well). Code: OOoBean bean = new OOoBean(); OfficeDocument doc = bean.getDocument(); XController currentDesktopController = doc.getCurrentController(); XTextViewCursorSupplier xTextViewCursorSupplier = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class,currentDesktopController); XSelectionSupplier xSelectionSupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class,xTextViewCursorSupplier); xSelectionSupplier.addSelectionChangeListener(new SelectionChangeListener());
Reassigned to API component.
I can reproduce this problem under OOo 2.0.2 under Linux.
jsc -> os: as discussed offline, this would be an enhancement and of course a changed implementation because we will get more notifications as today. Please check.
I don't really agree with the argument that this should be an enhancement, since in the idl documentation is written: selectionChanged: is called when the selection changes Obviously, then I use the left key and the right keys to navigate in the text, the selection changes since the position of the XViewCursor changes. The same arguments holds then I enter normal text in OpenOffice Writer. Every time the XViewCursor changes its position, selectionChanged() should be called according to the documentation. This is not the right behavior according to the idl behavior - so either the documentation should be changed into "XSelectionChanged receives events every time a user navigates the text using up and down arrow button or clicks somewhere with the mouse" or the implementation of that event listener should be changed.
you are right, my comment was to fast, it's no enhancement it's a bug
Component changed to Word processor, OS changed to All
What is the status of this bug? Does someone work on it? If not, it would perhaps make sense to change the status of it to "new".
->danielbeck: The target is 2.x so nobody is currently working on it. The status cannot be changed to New without reassigning. Started means that I've accepted that this issue is valid and that I'm the correct owner right now. It's weird but it's the way the issue tracker works.
target 3.0
->fme: The notification is sent after the SwCrsrShell called the aChgLnk. This is not called if no attribute change happens. Any chance to get a notificatin also if the cursor is only moved?
Due to restricted resources, I have to change the target to 3.x.
please take over from fme
I just ran into this problem on OpenOffice 4.0.1 using Windows. This is a serious problem for my project and it seems to have been unaddressed for nearly 10 years!
Reset the assignee to the default "issues@openoffice.apache.org".