Hi! Mathias Bauer wrote:
> The "startUndoContext" and "endUndoContext" commands are marks on the > internal Undo stack (the stack the SfxUndoManager maintains), and the > GUI allows to jump between two marks, collecting several "internal" > steps into one. Yes, I was thinking of a solution like this too (for "wish a)"). > To me that sounds like what you wanted to achieve with your wish d). Not exactly. My wish d) would allow for the extension or macro writer to provide a custom undo method. This would allow some custom code to run when the user chooses to undo the action. For example if an extension allows you to press a button to submit an article to a blog (maybe you have seen something like this :)), the undo action for this would revoke the article from the blog. There is no way, OpenOffice.org could handle this, and so the ability to execute custom undo actions is needed. Of course it is possible to solve such issues by other means (such as providing a "Retract article from blog" button), so this is not a high priority wish. But it may have use cases where it would greatly improve usability. > I'm still wondering what the use case for wish b) might be. Do you think > you need to be able to hide an arbitrary action? Can you explain? Or can > you imagine yourself how that could fit into my "undo context" model? Wish b) is for unimportant changes, "side effects" if you will. Consider my previous example, where an extension listens to changes in part A of the document and changes part B accordingly. If the extension can avoid the change to part B appearing on the undo stack, everything will work as expected: If the user presses Ctrl-Z, the change to part A will be undone, and because the extension listens to such changes, it can once again update part B. Another use case could be when an extension is augmenting base functionality. E.g. consider an extension that recognizes source code when it is pasted (by intercepting .uno:Paste dispatches), and performs syntax highlighting. If the user presses Ctrl-Z, they want to undo the pasting, not the syntax highlighting. (Of course, this can also be solved by using the undo grouping contexts, but it would be simpler to just hide the highlighting altogether.) > In case you wanted to work on that feature by yourself we would be glad > to support you. I will only be able to start working on it around the end of the month. But I will be sure to ask on this mailing list if I get stuck with something! > There are some "formalities" we have to clarify before. > Do you know > > http://contributing.openoffice.org/programming.html > > and especially the part "How to submit code to OpenOffice.org"? Yes, we have already signed the JCA (and submitted a few patches). Thank you for the advice and discussion! Best regards, Daniel Darabos --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]