diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-11-25 14:28:03 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-11-25 14:28:03 +0100 |
commit | 5cf47c0008eb4126cfc41c59fbeeb4d73c8e22b1 (patch) | |
tree | 60f31eb9322b9d31bb95ec4300ae587bf47ceffd /dbaccess/inc | |
parent | 4c4bdf1aaa3645bd15644f983c8f4f8a6307d444 (diff) |
undoapi: split OSingleDocumentController into DBSubComponentController (which the report design's controller will
be derived from) and the still-so-named OSingleDocumentController.
Module reportdesign does not compile with this change, this is yet to come.
Diffstat (limited to 'dbaccess/inc')
-rw-r--r-- | dbaccess/inc/dataview.hxx | 17 | ||||
-rw-r--r-- | dbaccess/inc/dbsubcomponentcontroller.hxx (renamed from dbaccess/inc/singledoccontroller.hxx) | 50 |
2 files changed, 20 insertions, 47 deletions
diff --git a/dbaccess/inc/dataview.hxx b/dbaccess/inc/dataview.hxx index ae93fa1d3284..fdb99014433a 100644 --- a/dbaccess/inc/dataview.hxx +++ b/dbaccess/inc/dataview.hxx @@ -27,17 +27,13 @@ #ifndef DBAUI_DATAVIEW_HXX #define DBAUI_DATAVIEW_HXX -#ifndef _SV_WINDOW_HXX -#include <vcl/window.hxx> -#endif -#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include "dbaccessdllapi.h" + #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif -#ifndef INCLUDED_SVTOOLS_ACCELERATOREXECUTE_HXX #include <svtools/acceleratorexecute.hxx> -#endif +#include <vcl/fixed.hxx> + #include <memory> -#include "dbaccessdllapi.h" class FixedLine; class SvtMiscOptions; @@ -50,7 +46,7 @@ namespace dbaui protected: IController& m_rController; // the controller in where we resides in - FixedLine* m_pSeparator; // our separator above the toolbox (may be NULL) + FixedLine m_aSeparator; ::std::auto_ptr< ::svt::AcceleratorExecute> m_pAccel; public: @@ -75,9 +71,6 @@ namespace dbaui */ virtual void resizeControls(const Size& /*_rDiff*/) { Resize(); } - void enableSeparator( const sal_Bool _bEnable = sal_True ); - sal_Bool isSeparatorEnabled() const { return NULL != m_pSeparator; } - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() { return m_xServiceFactory;} // the default implementation simply calls resizeAll( GetSizePixel() ) diff --git a/dbaccess/inc/singledoccontroller.hxx b/dbaccess/inc/dbsubcomponentcontroller.hxx index 8e11446ad8d9..cd93a29df321 100644 --- a/dbaccess/inc/singledoccontroller.hxx +++ b/dbaccess/inc/dbsubcomponentcontroller.hxx @@ -25,8 +25,8 @@ * ************************************************************************/ -#ifndef DBAUI_SINGLEDOCCONTROLLER_HXX -#define DBAUI_SINGLEDOCCONTROLLER_HXX +#ifndef DBAUI_SUBCOMPONENTCONTROLLER_HXX +#define DBAUI_SUBCOMPONENTCONTROLLER_HXX #include "genericcontroller.hxx" @@ -37,15 +37,13 @@ #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/implbase3.hxx> -#include <svl/undo.hxx> +#include <cppuhelper/implbase2.hxx> #include <memory> @@ -55,22 +53,20 @@ namespace dbaui //........................................................................ //==================================================================== - //= OSingleDocumentController + //= DBSubComponentController //==================================================================== - class OSingleDocumentController; + class DBSubComponentController; - typedef ::cppu::ImplInheritanceHelper3 < OGenericUnoController + typedef ::cppu::ImplInheritanceHelper2 < OGenericUnoController , ::com::sun::star::document::XScriptInvocationContext , ::com::sun::star::util::XModifiable - , ::com::sun::star::document::XUndoManagerSupplier - > OSingleDocumentController_Base; + > DBSubComponentController_Base; - struct OSingleDocumentControllerImpl; - class DBACCESS_DLLPUBLIC OSingleDocumentController - :public OSingleDocumentController_Base + struct DBSubComponentController_Impl; + class DBACCESS_DLLPUBLIC DBSubComponentController : public DBSubComponentController_Base { private: - ::std::auto_ptr<OSingleDocumentControllerImpl> m_pImpl; + ::std::auto_ptr<DBSubComponentController_Impl> m_pImpl; private: /** forces usage of a connection which we do not own @@ -82,9 +78,7 @@ namespace dbaui // OGenericUnoController - initialization virtual void impl_initialize(); - // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot. - virtual FeatureState GetState(sal_uInt16 nId) const; - // execute a feature + // OGenericUnoController virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const; @@ -98,14 +92,6 @@ namespace dbaui sal_Bool isEditable() const; void setEditable(sal_Bool _bEditable); - // need for undo's and redo's - SfxUndoManager& GetUndoManager() const; - - /** addUndoActionAndInvalidate adds an undo action to the undoManager, - additionally invalidates the UNDO and REDO slot - @param pAction the undo action to add - */ - void addUndoActionAndInvalidate(SfxUndoAction *pAction); // ---------------------------------------------------------------- // asking for connection-related stuff @@ -186,12 +172,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(); + DBSubComponentController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxORB); + virtual ~DBSubComponentController(); virtual void disconnect(); virtual void reconnect( sal_Bool _bUI ); @@ -202,9 +185,6 @@ namespace dbaui */ virtual void losingConnection( ); - // late construction - virtual sal_Bool Construct(Window* pParent); - protected: // XEventListener virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException ); @@ -222,12 +202,12 @@ namespace dbaui sal_Int32 getCurrentStartNumber() const; private: - OSingleDocumentController(); // never implemented + DBSubComponentController(); // never implemented }; //........................................................................ } // namespace dbaui //........................................................................ -#endif // DBAUI_SINGLEDOCCONTROLLER_HXX +#endif // DBAUI_SUBCOMPONENTCONTROLLER_HXX |