merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / chart2 / XUndoManager.idl
blob2d0ca4bd497708ef161a411e501b5ec97db14f00
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef com_sun_star_chart2_XUndoManager_idl
28 #define com_sun_star_chart2_XUndoManager_idl
30 #include <com/sun/star/uno/XInterface.idl>
31 #include <com/sun/star/frame/XModel.idl>
32 #include <com/sun/star/beans/PropertyValue.idl>
34 module com
36 module sun
38 module star
40 module chart2
43 /** An interface for undo functionality based on passing frame::XModel
44 objects.
46 interface XUndoManager : ::com::sun::star::uno::XInterface
48 /** call this before you change the xCurrentModel
50 void preAction( [in] ::com::sun::star::frame::XModel xModelBeforeChange );
52 /** call this before you change the xCurrentModel. You can pass
53 parameters to refine the undo action.
55 void preActionWithArguments( [in] ::com::sun::star::frame::XModel xModelBeforeChange,
56 [in] sequence< ::com::sun::star::beans::PropertyValue > aArguments );
58 /** call this after you successfully did changes to your current model
60 void postAction( [in] string aUndoText );
61 /** call this if you aborted the current action.
63 void cancelAction();
65 /** same as cancelAction() but restores the given model to the
66 state set in preAction. This is useful for cancellation in
67 live-preview dialogs.
69 void cancelActionWithUndo( [inout] ::com::sun::star::frame::XModel xModelToRestore );
71 /** give the current model to be put into the redo-stack
73 void undo( [inout] ::com::sun::star::frame::XModel xCurrentModel );
75 /** give the current model to be put into the undo-stack
77 void redo( [inout] ::com::sun::star::frame::XModel xCurrentModel );
79 /** @return <TRUE/> if the undo stack is not empty, i.e. a call to undo() will succeed
81 boolean undoPossible();
83 /** @return <TRUE/> if the redo stack is not empty, i.e. a call to redo() will succeed
85 boolean redoPossible();
87 /** Retrieves the undo string for the most recent undo step
89 string getCurrentUndoString();
91 /** Retrieves the redo string for the most recent undo step
93 string getCurrentRedoString();
95 /** Retrieves the undo strings of all stored undo actions in
96 chronological order starting with the most recent.
98 sequence< string > getAllUndoStrings();
100 /** Retrieves the redo strings of all stored undo actions in
101 chronological order starting with the most recent.
103 sequence< string > getAllRedoStrings();
106 } ; // chart2
107 } ; // com
108 } ; // sun
109 } ; // star
111 #endif