diff options
Diffstat (limited to 'sfx2/inc/sfx2/sfxbasemodel.hxx')
-rw-r--r-- | sfx2/inc/sfx2/sfxbasemodel.hxx | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx index 52fe2c14bf..5a8e377b7a 100644 --- a/sfx2/inc/sfx2/sfxbasemodel.hxx +++ b/sfx2/inc/sfx2/sfxbasemodel.hxx @@ -39,7 +39,7 @@ #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XNameReplace.hpp> -#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/frame/XController2.hpp> #include <com/sun/star/document/XDocumentInfo.hpp> #include <com/sun/star/document/XDocumentInfoSupplier.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> @@ -48,6 +48,7 @@ #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> +#include <com/sun/star/document/XDocumentEventBroadcaster.hpp> #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/document/XEventsSupplier.hpp> #include <com/sun/star/document/XEmbeddedScripts.hpp> @@ -96,9 +97,9 @@ #include <com/sun/star/task/XInteractionHandler.hpp> //________________________________________________________________________________________________________ -#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30) -#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_30 -#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 30 +#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_31) +#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_31 +#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 31 #include <comphelper/implbase_var.hxx> #endif @@ -143,6 +144,7 @@ #define XDOCUMENTINFO ::com::sun::star::document::XDocumentInfo #define XDOCUMENTINFOSUPPLIER ::com::sun::star::document::XDocumentInfoSupplier #define XEVENTBROADCASTER ::com::sun::star::document::XEventBroadcaster +#define XDOCUMENTEVENTBROADCASTER ::com::sun::star::document::XDocumentEventBroadcaster #define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier #define XEMBEDDEDSCRIPTS ::com::sun::star::document::XEmbeddedScripts #define XSCRIPTINVOCATIONCONTEXT ::com::sun::star::document::XScriptInvocationContext @@ -237,12 +239,13 @@ namespace sfx { namespace intern { SfxListener */ -typedef ::comphelper::WeakImplHelper30 < XCHILD +typedef ::comphelper::WeakImplHelper31 < XCHILD , XDOCUMENTINFOSUPPLIER , ::com::sun::star::document::XDocumentPropertiesSupplier , ::com::sun::star::rdf::XDocumentMetadataAccess , ::com::sun::star::document::XDocumentRecovery , XEVENTBROADCASTER + , XDOCUMENTEVENTBROADCASTER , XEVENTLISTENER , XEVENTSSUPPLIER , XEMBEDDEDSCRIPTS @@ -1249,6 +1252,18 @@ public: virtual void SAL_CALL removeEventListener( const REFERENCE< XDOCEVENTLISTENER >& xListener ) throw( RUNTIMEEXCEPTION ); + //____________________________________________________________________________________________________ + // XDocumentEventBroadcaster + //____________________________________________________________________________________________________ + + virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + + //____________________________________________________________________________________________________ + // XUnoTunnel + //____________________________________________________________________________________________________ + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); // css.frame.XModule @@ -1484,8 +1499,8 @@ public: */ SAL_DLLPRIVATE sal_Bool impl_isDisposed() const ; - sal_Bool IsDisposed() const ; sal_Bool IsInitialized() const; + void MethodEntryCheck( const bool i_mustBeInitialized ) const; ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException); void SAL_CALL setViewData( const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexAccess >& aData ) throw (::com::sun::star::uno::RuntimeException); @@ -1531,7 +1546,9 @@ private: SAL_DLLPRIVATE void impl_store( const OUSTRING& sURL , const SEQUENCE< PROPERTYVALUE >& seqArguments , sal_Bool bSaveTo ) ; - SAL_DLLPRIVATE void postEvent_Impl( ::rtl::OUString ); + + SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() ); + SAL_DLLPRIVATE String getEventName_Impl( long nID ); SAL_DLLPRIVATE void NotifyStorageListeners_Impl(); SAL_DLLPRIVATE bool QuerySaveSizeExceededModules( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler ); @@ -1573,10 +1590,7 @@ public: SfxModelGuard( SfxBaseModel& i_rModel, const AllowedModelState i_eState = E_FULLY_ALIVE ) :m_aGuard( Application::GetSolarMutex() ) { - if ( i_rModel.IsDisposed() ) - throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), *&i_rModel ); - if ( ( i_eState != E_INITIALIZING ) && !i_rModel.IsInitialized() ) - throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *&i_rModel ); + i_rModel.MethodEntryCheck( i_eState != E_INITIALIZING ); } ~SfxModelGuard() { |