LibreOffice
LibreOffice 4.2 SDK API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
XUndoManager.idl
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef __com_sun_star_document_XUndoManager_idl__
21 #define __com_sun_star_document_XUndoManager_idl__
22 
31 
32 
33 module com { module sun { module star { module document {
34 
35 interface XUndoAction;
36 interface XUndoManagerListener;
37 
38 
70 interface XUndoManager
71 {
74  interface ::com::sun::star::util::XLockable;
75 
81  interface ::com::sun::star::container::XChild;
82 
98  void enterUndoContext(
99  [in] string iTitle
100  );
101 
131  void enterHiddenUndoContext()
132  raises( EmptyUndoStackException );
133 
151  void leaveUndoContext()
152  raises( ::com::sun::star::util::InvalidStateException );
153 
169  void addUndoAction(
170  [in] XUndoAction iAction
171  )
172  raises( ::com::sun::star::lang::IllegalArgumentException );
173 
194  void undo()
195  raises( ::com::sun::star::document::EmptyUndoStackException,
196  ::com::sun::star::document::UndoContextNotClosedException,
197  ::com::sun::star::document::UndoFailedException );
198 
218  void redo()
219  raises( ::com::sun::star::document::EmptyUndoStackException,
220  ::com::sun::star::document::UndoContextNotClosedException,
221  ::com::sun::star::document::UndoFailedException );
222 
229  boolean isUndoPossible();
230 
237  boolean isRedoPossible();
238 
246  string getCurrentUndoActionTitle()
247  raises( ::com::sun::star::document::EmptyUndoStackException );
248 
255  string getCurrentRedoActionTitle()
256  raises( ::com::sun::star::document::EmptyUndoStackException );
257 
261  sequence< string >
262  getAllUndoActionTitles();
263 
268  sequence< string >
269  getAllRedoActionTitles();
270 
279  void clear()
280  raises( ::com::sun::star::document::UndoContextNotClosedException );
281 
290  void clearRedo()
291  raises( ::com::sun::star::document::UndoContextNotClosedException );
292 
307  void reset();
308 
311  void addUndoManagerListener(
312  [in] XUndoManagerListener iListener
313  );
314 
317  void removeUndoManagerListener(
318  [in] XUndoManagerListener iListener
319  );
320 };
321 
322 
323 }; }; }; };
324 
325 
326 #endif
327 
328 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
represents a single (undoable) action on a document
Definition: XUndoAction.idl:32
provides access to the undo/redo stacks of a document
Definition: XUndoManager.idl:70
thrown when reverting to re-applying an undoable action fails.
Definition: UndoFailedException.idl:34
is thrown when an operation is attempted at an XUndoManager which requires all undo contexts to be cl...
Definition: UndoContextNotClosedException.idl:32
implemented by components which want to be notified of changes in the Undo/Redo stacks of an Undo man...
Definition: XUndoManagerListener.idl:34
is raised when an operation is attemption at an XUndoManager which requires a non-empty stack of undo...
Definition: EmptyUndoStackException.idl:32