From 8d45b4a32eaee1c0649809fac2be6520d74a1806 Mon Sep 17 00:00:00 2001 From: Andreas Bille Date: Wed, 26 Mar 2003 10:13:34 +0000 Subject: #i2822# part of impl of IOleObject --- embedserv/source/inc/docholder.hxx | 44 ++++++++++++++++++++++++++++++++------ embedserv/source/inc/embeddoc.hxx | 9 ++++++-- 2 files changed, 44 insertions(+), 9 deletions(-) (limited to 'embedserv/source/inc') diff --git a/embedserv/source/inc/docholder.hxx b/embedserv/source/inc/docholder.hxx index a24f1c7145fb..da3b52561e6b 100644 --- a/embedserv/source/inc/docholder.hxx +++ b/embedserv/source/inc/docholder.hxx @@ -2,9 +2,9 @@ * * $RCSfile: docholder.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mav $ $Date: 2003-03-19 08:35:38 $ + * last change: $Author: abi $ $Date: 2003-03-26 11:13:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,25 +70,53 @@ #ifndef _COM_SUN_STAR_FRAME_XTERMINATELISTENER_HPP_ #include #endif +#ifndef _COM_SUN_STAR_UTIL_XMODIFYLISTENER_HPP_ +#include +#endif +#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_ +#include +#endif #ifndef _CPPUHELPER_IMPLBASE1_HXX_ -#include +#include #endif -class DocumentHolder : public ::cppu::WeakImplHelper2< ::com::sun::star::util::XCloseListener, - ::com::sun::star::frame::XTerminateListener > +class EmbedDocument_Impl; + +class DocumentHolder : + public ::cppu::WeakImplHelper3< + ::com::sun::star::util::XCloseListener, + ::com::sun::star::frame::XTerminateListener, + ::com::sun::star::util::XModifyListener > { +private: + + EmbedDocument_Impl* m_pOLEInterface; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument; + DWORD m_nStreamMode; + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; + + sal_Bool IsReadOnly() const; + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > DocumentFrame(); public: - DocumentHolder( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); + DocumentHolder( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,EmbedDocument_Impl *pOLEInterface); ~DocumentHolder(); - void SetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xDoc ); + void SetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xDoc,DWORD nStreamMode ); + void CloseDocument(); void FreeOffice(); + void show(); + + void hide(); + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetDocument() { return m_xDocument; } // XEventListener @@ -106,6 +134,8 @@ public: virtual void SAL_CALL notifyTermination( const com::sun::star::lang::EventObject& aSource ); +// XModifyListener + virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); }; #endif diff --git a/embedserv/source/inc/embeddoc.hxx b/embedserv/source/inc/embeddoc.hxx index 671010447c50..4b3443a62ccd 100755 --- a/embedserv/source/inc/embeddoc.hxx +++ b/embedserv/source/inc/embeddoc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: embeddoc.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: mav $ $Date: 2003-03-25 08:25:26 $ + * last change: $Author: abi $ $Date: 2003-03-26 11:13:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -159,6 +159,11 @@ public: STDMETHOD(SaveCompleted) ( LPCOLESTR pszFileName ); STDMETHOD(GetCurFile) ( LPOLESTR *ppszFileName ); + + // c++ - methods + + void notify(); + protected: oslInterlockedCount m_refCount; -- cgit v1.2.3