diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-11-17 10:44:38 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-11-17 10:44:38 +0100 |
commit | 39a689148061da7eeb5348abba6c064b6111f1a8 (patch) | |
tree | 71f542898cc77cdd0e073ddda933e427aba8afbb /dbaccess/inc | |
parent | 846cc7894b5a48d2aa3efa2472fb095e771fa05b (diff) |
undoapi: implement XUndoManager/Supplier for Base sub components
Diffstat (limited to 'dbaccess/inc')
-rw-r--r-- | dbaccess/inc/singledoccontroller.hxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dbaccess/inc/singledoccontroller.hxx b/dbaccess/inc/singledoccontroller.hxx index fadca973d685..255a34500e97 100644 --- a/dbaccess/inc/singledoccontroller.hxx +++ b/dbaccess/inc/singledoccontroller.hxx @@ -38,13 +38,14 @@ #include <com/sun/star/sdbc/XDataSource.hpp> #include <com/sun/star/util/XNumberFormatter.hpp> #include <com/sun/star/util/XModifiable.hpp> +#include <com/sun/star/document/XUndoManagerSupplier.hpp> /** === end UNO includes === **/ #include <comphelper/broadcasthelper.hxx> #include <comphelper/proparrhlp.hxx> #include <comphelper/propertycontainer.hxx> #include <connectivity/dbmetadata.hxx> -#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/implbase3.hxx> #include <svl/undo.hxx> #include <memory> @@ -59,9 +60,10 @@ namespace dbaui //==================================================================== class OSingleDocumentController; - typedef ::cppu::ImplInheritanceHelper2 < OGenericUnoController + typedef ::cppu::ImplInheritanceHelper3 < OGenericUnoController , ::com::sun::star::document::XScriptInvocationContext , ::com::sun::star::util::XModifiable + , ::com::sun::star::document::XUndoManagerSupplier > OSingleDocumentController_Base; struct OSingleDocumentControllerImpl; @@ -72,9 +74,6 @@ namespace dbaui private: ::std::auto_ptr<OSingleDocumentControllerImpl> m_pImpl; - protected: - SfxUndoManager m_aUndoManager; - private: /** forces usage of a connection which we do not own <p>To be used from within XInitialization::initialize, resp. impl_initialize, only.</p> @@ -102,7 +101,7 @@ namespace dbaui void setEditable(sal_Bool _bEditable); // need for undo's and redo's - SfxUndoManager& GetUndoManager(); + SfxUndoManager& GetUndoManager() const; /** addUndoActionAndInvalidate adds an undo action to the undoManager, additionally invalidates the UNDO and REDO slot @@ -190,6 +189,9 @@ namespace dbaui // XTitle virtual ::rtl::OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException); + // XUndoManagerSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager( ) throw (::com::sun::star::uno::RuntimeException); + protected: OSingleDocumentController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxORB); virtual ~OSingleDocumentController(); |