To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=115741 Issue #|115741 Summary|Modify event fired before model modified when paragra |ph deleted Component|Word processor Version|OOo 3.3 RC6 Platform|PC URL| OS/Version|Windows, all Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|programming Assigned to|writerneedsconfirm Reported by|zbyszeks
------- Additional comments from zbysz...@openoffice.org Tue Nov 23 14:20:34 +0000 2010 ------- when paragraph is deleted from document modified(EventObject event) method from XModifyListener is executed before model is changed. Method to reproduce problem : 1)create document <start of document> 1 3 <end of document> (each line is a separate paragraph) 2) attach ModifyListener to document : public class DocumentEventListener extends WeakBase implements XModifyListener { /*** * @param model - model of document we want listen to */ public DocumentEventListener(XModel model) { super(); XModifiable xmod = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, model); xmod.addModifyListener(this); } @Override public void modified(EventObject event) { System.out.println("----modify-start----"); XTextDocument xtd = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, event.Source); System.out.println(xtd.getText().getString()); System.out.println("----modify-end------"); } public void disposing(EventObject event) { XModifiable xmod = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, event.Source); xmod.removeModifyListener(this); } } 3) remove empty paragraph ("backspace it") from the empty line (or line below, does not matter). output of listener will be : ----modification-start---- 1 3 ----modification-end------ while I believe it should be : ----modification-start---- 1 3 ----modification-end------ problem does not appear when deleting line from multi line paragraph. Not tested on other OS/platforms This also occurred on OO 3.2 and 3.2.1 (not tested on older versions) --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@sw.openoffice.org For additional commands, e-mail: issues-h...@sw.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org