Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_DOCUMENT_XUNDOMANAGER_HDL
2 : #define INCLUDED_COM_SUN_STAR_DOCUMENT_XUNDOMANAGER_HDL
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/container/XChild.hdl"
7 : #include "com/sun/star/document/EmptyUndoStackException.hdl"
8 : #include "com/sun/star/document/UndoContextNotClosedException.hdl"
9 : #include "com/sun/star/document/UndoFailedException.hdl"
10 : namespace com { namespace sun { namespace star { namespace document { class XUndoAction; } } } }
11 : namespace com { namespace sun { namespace star { namespace document { class XUndoManagerListener; } } } }
12 : #include "com/sun/star/lang/IllegalArgumentException.hdl"
13 : #include "com/sun/star/uno/RuntimeException.hdl"
14 : #include "com/sun/star/util/InvalidStateException.hdl"
15 : #include "com/sun/star/util/XLockable.hdl"
16 : #include "com/sun/star/uno/Reference.h"
17 : #include "com/sun/star/uno/Sequence.h"
18 : #include "cppu/macros.hxx"
19 : #include "rtl/ustring.hxx"
20 : #include "sal/types.h"
21 :
22 : namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
23 :
24 : namespace com { namespace sun { namespace star { namespace document {
25 :
26 49 : class SAL_NO_VTABLE XUndoManager : public css::util::XLockable, public css::container::XChild
27 : {
28 : public:
29 :
30 : // Methods
31 : virtual void SAL_CALL enterUndoContext( const ::rtl::OUString& i_title ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
32 : virtual void SAL_CALL enterHiddenUndoContext() /* throw (css::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException) */ = 0;
33 : virtual void SAL_CALL leaveUndoContext() /* throw (css::util::InvalidStateException, ::com::sun::star::uno::RuntimeException) */ = 0;
34 : virtual void SAL_CALL addUndoAction( const ::com::sun::star::uno::Reference< css::document::XUndoAction >& i_action ) /* throw (css::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) */ = 0;
35 : virtual void SAL_CALL undo() /* throw (css::document::EmptyUndoStackException, css::document::UndoContextNotClosedException, css::document::UndoFailedException, ::com::sun::star::uno::RuntimeException) */ = 0;
36 : virtual void SAL_CALL redo() /* throw (css::document::EmptyUndoStackException, css::document::UndoContextNotClosedException, css::document::UndoFailedException, ::com::sun::star::uno::RuntimeException) */ = 0;
37 : virtual ::sal_Bool SAL_CALL isUndoPossible() /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
38 : virtual ::sal_Bool SAL_CALL isRedoPossible() /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
39 : virtual ::rtl::OUString SAL_CALL getCurrentUndoActionTitle() /* throw (css::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException) */ = 0;
40 : virtual ::rtl::OUString SAL_CALL getCurrentRedoActionTitle() /* throw (css::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException) */ = 0;
41 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllUndoActionTitles() /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
42 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllRedoActionTitles() /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
43 : virtual void SAL_CALL clear() /* throw (css::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException) */ = 0;
44 : virtual void SAL_CALL clearRedo() /* throw (css::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException) */ = 0;
45 : virtual void SAL_CALL reset() /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
46 : virtual void SAL_CALL addUndoManagerListener( const ::com::sun::star::uno::Reference< css::document::XUndoManagerListener >& i_listener ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
47 : virtual void SAL_CALL removeUndoManagerListener( const ::com::sun::star::uno::Reference< css::document::XUndoManagerListener >& i_listener ) /* throw (::com::sun::star::uno::RuntimeException) */ = 0;
48 :
49 : static inline ::com::sun::star::uno::Type const & SAL_CALL static_type(void * = 0);
50 :
51 : protected:
52 0 : ~XUndoManager() throw () {} // avoid warnings about virtual members and non-virtual dtor
53 : };
54 :
55 :
56 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::document::XUndoManager const *);
57 : } } } }
58 :
59 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(const ::com::sun::star::uno::Reference< css::document::XUndoManager > *) SAL_THROW(());
60 :
61 : #endif
|