merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / chart2 / XUndoManager.idl
blob49041df4125ee7bf17beb1d1c964c13a02f5ffd4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XUndoManager.idl,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef com_sun_star_chart2_XUndoManager_idl
31 #define com_sun_star_chart2_XUndoManager_idl
33 #include <com/sun/star/uno/XInterface.idl>
34 #include <com/sun/star/frame/XModel.idl>
35 #include <com/sun/star/beans/PropertyValue.idl>
37 module com
39 module sun
41 module star
43 module chart2
46 /** An interface for undo functionality based on passing frame::XModel
47 objects.
49 interface XUndoManager : ::com::sun::star::uno::XInterface
51 /** call this before you change the xCurrentModel
53 void preAction( [in] ::com::sun::star::frame::XModel xModelBeforeChange );
55 /** call this before you change the xCurrentModel. You can pass
56 parameters to refine the undo action.
58 void preActionWithArguments( [in] ::com::sun::star::frame::XModel xModelBeforeChange,
59 [in] sequence< ::com::sun::star::beans::PropertyValue > aArguments );
61 /** call this after you successfully did changes to your current model
63 void postAction( [in] string aUndoText );
64 /** call this if you aborted the current action.
66 void cancelAction();
68 /** same as cancelAction() but restores the given model to the
69 state set in preAction. This is useful for cancellation in
70 live-preview dialogs.
72 void cancelActionWithUndo( [inout] ::com::sun::star::frame::XModel xModelToRestore );
74 /** give the current model to be put into the redo-stack
76 void undo( [inout] ::com::sun::star::frame::XModel xCurrentModel );
78 /** give the current model to be put into the undo-stack
80 void redo( [inout] ::com::sun::star::frame::XModel xCurrentModel );
82 /** @return <TRUE/> if the undo stack is not empty, i.e. a call to undo() will succeed
84 boolean undoPossible();
86 /** @return <TRUE/> if the redo stack is not empty, i.e. a call to redo() will succeed
88 boolean redoPossible();
90 /** Retrieves the undo string for the most recent undo step
92 string getCurrentUndoString();
94 /** Retrieves the redo string for the most recent undo step
96 string getCurrentRedoString();
98 /** Retrieves the undo strings of all stored undo actions in
99 chronological order starting with the most recent.
101 sequence< string > getAllUndoStrings();
103 /** Retrieves the redo strings of all stored undo actions in
104 chronological order starting with the most recent.
106 sequence< string > getAllRedoStrings();
109 } ; // chart2
110 } ; // com
111 } ; // sun
112 } ; // star
114 #endif