diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-02-07 13:06:08 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-02-07 13:06:08 +0100 |
commit | 84a2bad767682ba670a1bd4a8bf7e43dd21eb9b6 (patch) | |
tree | c54f93749b887848637a16ca08fa10f8c932a121 /reportdesign/inc | |
parent | removetooltypes01: Rebase to DEV300m98 (diff) | |
parent | CWS-TOOLING: integrate CWS dba34b (diff) | |
download | core-84a2bad767682ba670a1bd4a8bf7e43dd21eb9b6.tar.gz core-84a2bad767682ba670a1bd4a8bf7e43dd21eb9b6.zip |
removetooltypes01: Rebase to DEV300m99
Diffstat (limited to 'reportdesign/inc')
-rwxr-xr-x[-rw-r--r--] | reportdesign/inc/ReportDefinition.hxx | 77 | ||||
-rw-r--r-- | reportdesign/inc/RptModel.hxx | 8 | ||||
-rw-r--r-- | reportdesign/inc/UndoActions.hxx | 52 |
3 files changed, 94 insertions, 43 deletions
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx index d932110bc5f3..68a16e609b77 100644..100755 --- a/reportdesign/inc/ReportDefinition.hxx +++ b/reportdesign/inc/ReportDefinition.hxx @@ -29,25 +29,36 @@ #define REPORTDESIGN_API_REPORTDEFINITION_HXX #include "dllapi.h" -#include <com/sun/star/report/XReportDefinition.hpp> -#include <cppuhelper/compbase12.hxx> -#include <cppuhelper/basemutex.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XTypeProvider.hpp> + +#include "ReportHelperDefines.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/datatransfer/XTransferable.hpp> +#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> +#include <com/sun/star/document/XUndoManagerSupplier.hpp> +#include <com/sun/star/frame/XModule.hpp> #include <com/sun/star/frame/XTitle.hpp> #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp> #include <com/sun/star/frame/XUntitledNumbers.hpp> -#include <com/sun/star/frame/XModule.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/report/XReportDefinition.hpp> #include <com/sun/star/util/XNumberFormatsSupplier.hpp> -#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> -#include <com/sun/star/datatransfer/XTransferable.hpp> -#include <cppuhelper/propertysetmixin.hxx> -#include <comphelper/uno3.hxx> +/** === end UNO includes === **/ + #include <comphelper/embeddedobjectcontainer.hxx> +#include <comphelper/uno3.hxx> +#include <cppuhelper/basemutex.hxx> +#include <cppuhelper/propertysetmixin.hxx> #include <svx/unomod.hxx> -#include "ReportHelperDefines.hxx" +#if !defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13) +#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13 +#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 13 +#include <comphelper/implbase_var.hxx> +#endif + #include <boost/shared_ptr.hpp> @@ -62,32 +73,37 @@ namespace comphelper namespace reportdesign { class OReportComponentProperties; - typedef ::cppu::WeakComponentImplHelper12< com::sun::star::report::XReportDefinition - ,com::sun::star::document::XEventBroadcaster - ,com::sun::star::lang::XServiceInfo - ,com::sun::star::frame::XModule - ,com::sun::star::lang::XUnoTunnel - ,com::sun::star::util::XNumberFormatsSupplier - ,::com::sun::star::frame::XTitle - ,::com::sun::star::frame::XTitleChangeBroadcaster - ,::com::sun::star::frame::XUntitledNumbers - ,::com::sun::star::document::XDocumentPropertiesSupplier - ,::com::sun::star::datatransfer::XTransferable - ,SvxUnoDrawMSFactory> ReportDefinitionBase; - typedef ::cppu::PropertySetMixin<com::sun::star::report::XReportDefinition> ReportDefinitionPropertySet; + typedef ::comphelper::WeakComponentImplHelper13 < ::com::sun::star::report::XReportDefinition + , ::com::sun::star::document::XEventBroadcaster + , ::com::sun::star::lang::XServiceInfo + , ::com::sun::star::frame::XModule + , ::com::sun::star::lang::XUnoTunnel + , ::com::sun::star::util::XNumberFormatsSupplier + , ::com::sun::star::frame::XTitle + , ::com::sun::star::frame::XTitleChangeBroadcaster + , ::com::sun::star::frame::XUntitledNumbers + , ::com::sun::star::document::XDocumentPropertiesSupplier + , ::com::sun::star::datatransfer::XTransferable + , ::com::sun::star::document::XUndoManagerSupplier + , SvxUnoDrawMSFactory + > ReportDefinitionBase; + + typedef ::cppu::PropertySetMixin< ::com::sun::star::report::XReportDefinition > ReportDefinitionPropertySet; struct OReportDefinitionImpl; /** \class OReportDefinition Defines the implementation of a \interface com:::sun::star::report::XReportDefinition * \ingroup reportdesign_api * */ - class REPORTDESIGN_DLLPUBLIC OReportDefinition : public ::cppu::BaseMutex, - public ReportDefinitionBase, - public ReportDefinitionPropertySet, - public ::comphelper::IEmbeddedHelper + class REPORTDESIGN_DLLPUBLIC OReportDefinition :public ::cppu::BaseMutex + ,public ReportDefinitionBase + ,public ReportDefinitionPropertySet + ,public ::comphelper::IEmbeddedHelper { + private: ::boost::shared_ptr<OReportComponentProperties> m_aProps; ::boost::shared_ptr<OReportDefinitionImpl> m_pImpl; + private: OReportDefinition(const OReportDefinition&); OReportDefinition& operator=(const OReportDefinition&); @@ -380,6 +396,9 @@ namespace reportdesign virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) 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); + // comphelper::IEmbeddedHelper virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const; virtual ::comphelper::EmbeddedObjectContainer& getEmbeddedObjectContainer() const; diff --git a/reportdesign/inc/RptModel.hxx b/reportdesign/inc/RptModel.hxx index c4fcbdc2da34..a9f400d92c4b 100644 --- a/reportdesign/inc/RptModel.hxx +++ b/reportdesign/inc/RptModel.hxx @@ -35,7 +35,7 @@ class Window; namespace dbaui { - class OSingleDocumentController; + class DBSubComponentController; } namespace reportdesign { @@ -56,7 +56,7 @@ class REPORTDESIGN_DLLPUBLIC OReportModel : public SdrModel private: OXUndoEnvironment* m_pUndoEnv; - ::dbaui::OSingleDocumentController* m_pController; + ::dbaui::DBSubComponentController* m_pController; ::reportdesign::OReportDefinition* m_pReportDefinition; virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel(); @@ -79,8 +79,8 @@ public: OXUndoEnvironment& GetUndoEnv(); void SetModified(sal_Bool _bModified); - inline dbaui::OSingleDocumentController* getController() const { return m_pController; } - inline void attachController( dbaui::OSingleDocumentController& _rController ) { m_pController = &_rController; } + inline dbaui::DBSubComponentController* getController() const { return m_pController; } + inline void attachController( dbaui::DBSubComponentController& _rController ) { m_pController = &_rController; } void detachController(); OReportPage* createNewPage(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection); diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx index b7b09292cfbe..2a7df2d6c9cb 100644 --- a/reportdesign/inc/UndoActions.hxx +++ b/reportdesign/inc/UndoActions.hxx @@ -28,8 +28,9 @@ #define RPTUI_UNDOACTIONS_HXX #include "dllapi.h" -#include <svx/svdundo.hxx> -#include <tools/string.hxx> + +#include "RptModel.hxx" + /** === begin UNO includes === **/ #include <com/sun/star/util/XModifyListener.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -43,13 +44,16 @@ #include <com/sun/star/report/XReportComponent.hpp> #include <com/sun/star/report/XReportDefinition.hpp> #include <com/sun/star/report/XGroup.hpp> +#include <com/sun/star/document/XUndoManager.hpp> /** === end UNO includes === **/ + #include <cppuhelper/implbase3.hxx> #include <comphelper/uno3.hxx> #include <comphelper/sequence.hxx> #include <svl/lstner.hxx> #include <svx/svdouno.hxx> -#include "RptModel.hxx" +#include <svx/svdundo.hxx> +#include <tools/string.hxx> #include <functional> #include <memory> @@ -119,23 +123,51 @@ namespace rptui static ::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> getMemberFunction(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection); }; - class REPORTDESIGN_DLLPUBLIC UndoManagerListAction + //================================================================================================================== + //= UndoContext + //================================================================================================================== + class UndoContext { + public: + UndoContext( SfxUndoManager& i_undoManager, const ::rtl::OUString& i_undoTitle ) + :m_rUndoManager( i_undoManager ) + { + m_rUndoManager.EnterListAction( i_undoTitle, String() ); + } + + ~UndoContext() + { + m_rUndoManager.LeaveListAction(); + } + private: - SfxUndoManager& m_rManager; + SfxUndoManager& m_rUndoManager; + }; + //================================================================================================================== + //= UndoSuppressor + //================================================================================================================== + class UndoSuppressor + { public: - UndoManagerListAction( SfxUndoManager& _rManager, const String& _rListActionComment ) - :m_rManager( _rManager ) + UndoSuppressor( SfxUndoManager& i_undoManager ) + :m_rUndoManager( i_undoManager ) { - m_rManager.EnterListAction( _rListActionComment, String() ); + m_rUndoManager.EnableUndo( false ); } - ~UndoManagerListAction() + + ~UndoSuppressor() { - m_rManager.LeaveListAction(); + m_rUndoManager.EnableUndo( true ); } + + private: + SfxUndoManager& m_rUndoManager; }; + //================================================================================================================== + //= OCommentUndoAction + //================================================================================================================== class REPORTDESIGN_DLLPUBLIC OCommentUndoAction : public SdrUndoAction { protected: |