Hi Malte, > Maybe the Undo needs some "valid" state, or also being able to dispose > itself when it needs to do, and the the UndoManager needs to listen for > that.
Hmm. This would mean silent removal of Undo actions from the undo action list - not ideal, from an UX POV. Also, the Undo manager has to care for undo actions which fail when invoked, anyway (think of a broken bridge to the UNO component providing the action, or something like this). So, for the moment I think it is safe to assume that Undo actions simply throw an DisposedException if they cannot provide the functionality anymore. Still, an interesting question would be how to react on this. It might not always be safe to assume that the action can be removed from the stack - subsequent actions might depend on the manipulations done by the now-failing action. The safest solution would be to clear to stack completely in such a case, but that might be too offensive. Not sure. > I am also not sure if we really need to create the "Eierlegende > Wollmilchsau" with a new Undo API, or if most people wouldn't already be > happy with some API at the document level where the can perform > StartUndoContext/EndUndoContext/Undo/Redo/Repeat/EnableUndo. > > Could be some "XUndo" API very similar to XUndoManager, but w/o > addUndo() and the hidden stuff. > > Then the "modifiable" UndoManager (addUndo and what ever else is needed) > and XUndoAction stuff could be an extra step / optional implementation. addUndo, in fact, is where my interest in the complete topic originates from, since we have components (the property browser for form controls, for instance) modifying a document per UNO API only. Currently, there is no way to make those actions UNDOable - which is an UX problem for years now. So, unless I am overruled, I will *not* implement an API which does not have "addUndo( XUndo )" :) Ciao Frank -- ORACLE Frank Schönheit | Software Engineer | frank.schoenh...@oracle.com Oracle Office Productivity: http://www.oracle.com/office --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org