[dev] Controlling undo/redo history and performing actions via the OpenOffice.org API?
Hello all, I have an idea for a very exciting new feature for OpenOffice.org, and I need help from someone with experience programming with the OpenOffice.org API or maybe even experience with the program's underlying design. The feature I have in mind would need the following - could anyone please tell me if it is possible to do this using the API, and if so, point me in the right direction (I have read a lot of the documentation but found it very difficult to understand)?: The ability to hook a callback to the following events: Whenever something is added to the undo history (with details of what the action was that was added, preferably by supplying the action as an object) OR whenever an action is performed which modifies the document (e.g. the Writer, Calc, etc. document) - again, with details of what the action was. Whenever the 'undo' function is called (with details of what will be or was undone). Whenever the 'redo' function is called (with details of what will be or was redone). The ability to save a full copy of the open document (Writer document, spreadsheet, etc.) to a given path (not the path of the document - i.e. saving a copy). The ability to load a copy of a document into the existing window without prompting the user (the previous copy would have been saved, so I guess OO.org would not prompt for this), OR closing the current window and opening a new one (this second option is not preferred). What I did find that seems promising are the following links: http://openoffice.2283327.n4.nabble.com/api-dev-Attempt-for-an-UNO-Undo-API-td2954095.html http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/XUndoManager.html http://openoffice.2283327.n4.nabble.com/api-dev-info-CWS-undoapi-new-UNDO-API-td3207049.html The second link looks particularly promising, but I am not clear on whether this does what I am asking for (for example, why is it part of the 'chart2' class - is that only to do with charts/graphics, or am I being mislead by the name?) The third link also looks very promising, but I cannot find the referenced 'css.document.XUndoManager' in any of the API documentation. Nor can I find even 'css' or 'cws' in the API index, so this makes me think that maybe the undo/redo API is defined but not created yet - anyone know this for sure? Regards, John Gillanders New Zealand-- - To unsubscribe send email to dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help
[dev] Re: Controlling undo/redo history and performing actions via the OpenOffice.org API?
Hi John, * The ability to hook a callback to the following events: o Whenever something is added to the undo history (with details of what the action was that was added, preferably by supplying the action as an object) OR whenever an action is performed which modifies the document (e.g. the Writer, Calc, etc. document) - again, with details of what the action was. o Whenever the 'undo' function is called (with details of what will be or was undone). o Whenever the 'redo' function is called (with details of what will be or was redone). API support for Undo/Redo has been added recently, and will be available in 3.4. There's also listener support for the Undo/Redo stack, however, you will only be notified that a change actually happened, you will not get all the fancy details of the change itself. The only concrete information about the action is its description, i.e. the string displayed at the UI. Since this is localized, and finally an implementation detail, it won't help you here. Besides that describing each change in detail in an Undo notification event would be expensive, it would also be a *very* complex data structure your listener would need to examine. If you're really interested in each and every change in a document, you should probably add dedicated (typed) listeners: I would assume (but am not sure at all) that every single modification to a document is notified by special listeners already. * The ability to save a full copy of the open document (Writer document, spreadsheet, etc.) to a given path (not the path of the document - i.e. saving a copy). OOo documents implement the XStorable interface: http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XStorable.html#storeToURL * The ability to load a copy of a document into the existing window without prompting the user (the previous copy would have been saved, so I guess OO.org http://OO.org would not prompt for this), OR closing the current window and opening a new one (this second option is not preferred). Frames (where documents are displayed) implement the XComponentLoader interface: http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XComponentLoader.html#loadComponentFromURL What I did find that seems promising are the following links: * http://openoffice.2283327.n4.nabble.com/api-dev-Attempt-for-an-UNO-Undo-API-td2954095.html that's a discussion preceding the actual implementation of an Undo API. * http://api.openoffice.org/docs/common/ref/com/sun/star/chart2/XUndoManager.html That's API-Undo support for chart only. In 3.4, it will be removed, and superseded by the new-by-then com.sun.star.document.XUndoManager interface. * http://openoffice.2283327.n4.nabble.com/api-dev-info-CWS-undoapi-new-UNDO-API-td3207049.html That's the announcement that the Undo API has finally been implemented. The third link also looks very promising, but I cannot find the referenced 'css.document.XUndoManager' in any of the API documentation. It is not online, yet, since the online version of the API documentation always follows the releases, and 3.4 is not released, yet. Nor can I find even 'css' or 'cws' in the API index, so this makes me think that maybe the undo/redo API is defined but not created yet - anyone know this for sure? css is a shortcut for com.sun.star, and CWS refers to a so-called child workspace, an entity where feature implementations happen before added to the main development trunk. Ciao Frank -- - To unsubscribe send email to dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help
[dev] Billy Noel wants to stay in touch on LinkedIn
LinkedIn I'd like to add you to my professional network on LinkedIn. - Billy Noel Billy Noel Co-Owner Developer at Confidential Greater Memphis Area Confirm that you know Billy Noel https://www.linkedin.com/e/7pi77r-gn8uo0yr-3c/isd/2803652987/TPBng9jS/ -- (c) 2011, LinkedIn Corporation-- - To unsubscribe send email to dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help
[dev] OT: What is the current modus of OOo and what is its outlook ?
Hi there, just very curious, short of clear statements on the OOo homepage (looking in the News area): what is the current modus vivendi for OpenOffice.org? Who is developing/releasing it, will it be developed further? Is there a concrete Oracle plan clarifying the future support/development/alignment with OOo (and perhaps LO)? Or is everything in flux at this point in time? (If so when can one expect clarifications?) And another related question: will there be an OOo-Con this year? (If so where - I read something like Hamburg a couple of weeks/monts ago - and when?) Any links that at least explain/clarify parts of these questions at this point in time? TIA, ---rony -- - To unsubscribe send email to dev-unsubscr...@openoffice.org For additional commands send email to sy...@openoffice.org with Subject: help