summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/document
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-10-21 12:12:16 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-10-21 12:12:16 +0200
commit55c84d659987dce9e75b5bffdba8dfd34912bbdc (patch)
tree845c5748ccf96b87c3b2c3839c1af3a27126e2e3 /offapi/com/sun/star/document
parenta3963e83ea99eb1c7ee7f6b7bcadadd17961eb7c (diff)
undoapi: specified (and implemented and tested) what should happen when you leave an Undo context which does not have any elements
Diffstat (limited to 'offapi/com/sun/star/document')
-rwxr-xr-xoffapi/com/sun/star/document/XUndoManager.idl5
-rwxr-xr-xoffapi/com/sun/star/document/XUndoManagerListener.idl12
2 files changed, 16 insertions, 1 deletions
diff --git a/offapi/com/sun/star/document/XUndoManager.idl b/offapi/com/sun/star/document/XUndoManager.idl
index 1885068bf92c..4abfbc891140 100755
--- a/offapi/com/sun/star/document/XUndoManager.idl
+++ b/offapi/com/sun/star/document/XUndoManager.idl
@@ -98,6 +98,11 @@ interface XUndoManager
/** leaves the undo context previously opened via <member>enterUndoContext</member> respectively
<member>enterHiddenUndoContext</member>.
+ <p>If no Undo action has been added since the context has been opened, the context is not only left,
+ but silently removed, and does not contribute to the Undo stack at all. In this case, possible
+ listeners will be notified via <member>XUndoManagerListener::cancelledUndoContext</member>,
+ instead of <member>XUndoManagerListener::leftUndoContext</member>.</p>
+
@throws ::com::sun::star::util::InvalidStateException
if no undo context is currently open.
diff --git a/offapi/com/sun/star/document/XUndoManagerListener.idl b/offapi/com/sun/star/document/XUndoManagerListener.idl
index 30373739c997..460fd3dcefd1 100755
--- a/offapi/com/sun/star/document/XUndoManagerListener.idl
+++ b/offapi/com/sun/star/document/XUndoManagerListener.idl
@@ -88,7 +88,7 @@ interface XUndoManagerListener : ::com::sun::star::lang::XEventListener
*/
void enteredHiddenUndoContext( [in] UndoManagerEvent i_event );
- /** is called when a new Undo context has been entered.
+ /** is called when an Undo context has been left.
<p><member>UndoManagerEvent::UndoActionTitle</member> carries the title of the Undo context, and
<member>UndoManagerEvent::UndoContextDepth</member> the number of open Undo contexts, exluding the
@@ -97,6 +97,16 @@ interface XUndoManagerListener : ::com::sun::star::lang::XEventListener
@see XUndoManager::leaveUndoContext
*/
void leftUndoContext( [in] UndoManagerEvent i_event );
+
+ /** is called when an Undo context has been left, but no actions have been added within this context.
+
+ <p>In such a case, the context which has just been left will not contribute to the Undo stack, but instead
+ be silently removed.</p>
+
+ @see XUndoManager::leaveUndoContext
+ @see leftUndoContext
+ */
+ void cancelledUndoContext( [in] UndoManagerEvent i_event );
};
//==================================================================================================================