diff options
author | Mikhail Voitenko <mav@openoffice.org> | 2003-03-19 07:35:38 +0000 |
---|---|---|
committer | Mikhail Voitenko <mav@openoffice.org> | 2003-03-19 07:35:38 +0000 |
commit | b9dc9f9a522ffa816fc3dcef9a0b4f24fa2c8c76 (patch) | |
tree | cd33a13f69ea0db4d7ef597b55c3c8bd8448758b /embedserv/source/inc | |
parent | 0744f579c54cf02c7e581eab49ded1e184919140 (diff) |
#i2822# office termination
Diffstat (limited to 'embedserv/source/inc')
-rw-r--r-- | embedserv/source/inc/docholder.hxx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/embedserv/source/inc/docholder.hxx b/embedserv/source/inc/docholder.hxx index c1efb278a093..a24f1c7145fb 100644 --- a/embedserv/source/inc/docholder.hxx +++ b/embedserv/source/inc/docholder.hxx @@ -2,9 +2,9 @@ * * $RCSfile: docholder.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: mav $ $Date: 2003-03-12 15:37:59 $ + * last change: $Author: mav $ $Date: 2003-03-19 08:35:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,21 +67,27 @@ #ifndef _COM_SUN_STAR_UTIL_XCLOSELISTENER_HPP_ #include <com/sun/star/util/XCloseListener.hpp> #endif +#ifndef _COM_SUN_STAR_FRAME_XTERMINATELISTENER_HPP_ +#include <com/sun/star/frame/XTerminateListener.hpp> +#endif #ifndef _CPPUHELPER_IMPLBASE1_HXX_ -#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase2.hxx> #endif -class DocumentHolder : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XCloseListener > +class DocumentHolder : public ::cppu::WeakImplHelper2< ::com::sun::star::util::XCloseListener, + ::com::sun::star::frame::XTerminateListener > { + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument; public: - DocumentHolder(); + DocumentHolder( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); ~DocumentHolder(); void SetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xDoc ); void CloseDocument(); + void FreeOffice(); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetDocument() { return m_xDocument; } @@ -94,6 +100,12 @@ public: virtual void SAL_CALL notifyClosing( const com::sun::star::lang::EventObject& aSource ); +// XTerminateListener + virtual void SAL_CALL queryTermination( const com::sun::star::lang::EventObject& aSource ) + throw( ::com::sun::star::frame::TerminationVetoException ); + + virtual void SAL_CALL notifyTermination( const com::sun::star::lang::EventObject& aSource ); + }; #endif |