diff options
author | Andreas Schlüns <as@openoffice.org> | 2002-05-23 11:54:59 +0000 |
---|---|---|
committer | Andreas Schlüns <as@openoffice.org> | 2002-05-23 11:54:59 +0000 |
commit | 62df05fdb1ff991447349c1cc38118d19c7efe2d (patch) | |
tree | 151ce5e4e894cd18050ac3002338fd91489b8a86 /framework/inc/services | |
parent | db80f11d26551393cfe8060857cb302956b2c6fa (diff) |
#91939# supports XClosable; remove deprecated task; ...
Diffstat (limited to 'framework/inc/services')
-rw-r--r-- | framework/inc/services/desktop.hxx | 9 | ||||
-rw-r--r-- | framework/inc/services/frame.hxx | 85 | ||||
-rw-r--r-- | framework/inc/services/pluginframe.hxx | 179 | ||||
-rw-r--r-- | framework/inc/services/task.hxx | 8 |
4 files changed, 61 insertions, 220 deletions
diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx index 4f4b78b64a6d..5c4d1b72767c 100644 --- a/framework/inc/services/desktop.hxx +++ b/framework/inc/services/desktop.hxx @@ -2,9 +2,9 @@ * * $RCSfile: desktop.hxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: cd $ $Date: 2002-04-22 07:05:16 $ + * last change: $Author: as $ $Date: 2002-05-23 12:50:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -110,10 +110,6 @@ #include <com/sun/star/frame/XDesktop.hpp> #endif -#ifndef _COM_SUN_STAR_FRAME_XDESKTOPTASK_HPP_ -#include <com/sun/star/frame/XDesktopTask.hpp> -#endif - #ifndef _COM_SUN_STAR_FRAME_WINDOWARRANGE_HPP_ #include <com/sun/star/frame/WindowArrange.hpp> #endif @@ -440,6 +436,7 @@ class Desktop : // interfaces css::uno::Any m_aInteractionRequest ; sal_Bool m_bSuspendQuickstartVeto ; /// don't ask quickstart for a veto SvtCommandOptions m_aCommandOptions ; /// ref counted class to support disabling commands defined by configuration file + ::rtl::OUString m_sName ; }; // class Desktop diff --git a/framework/inc/services/frame.hxx b/framework/inc/services/frame.hxx index f0402c0dcf0e..acf129d464cc 100644 --- a/framework/inc/services/frame.hxx +++ b/framework/inc/services/frame.hxx @@ -2,9 +2,9 @@ * * $RCSfile: frame.hxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: as $ $Date: 2002-04-22 13:50:53 $ + * last change: $Author: as $ $Date: 2002-05-23 12:50:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -206,10 +206,18 @@ #include <com/sun/star/document/XActionLockable.hpp> #endif +#ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_ +#include <com/sun/star/util/XCloseable.hpp> +#endif + //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ +#ifndef _VCL_EVNTPOST_HXX +#include <vcl/evntpost.hxx> +#endif + #ifndef INCLUDED_SVTOOLS_CMDOPTIONS_HXX #include <svtools/cmdoptions.hxx> #endif @@ -240,7 +248,7 @@ namespace framework{ // exported const //_________________________________________________________________________________________________________________ -// This enum can be used to set differnt active states of frames, tasks. +// This enum can be used to set differnt active states of frames enum EActiveState { E_INACTIVE , // I'am not a member of active path in tree and i don't have the focus. @@ -252,13 +260,10 @@ enum EActiveState // exported definitions //_________________________________________________________________________________________________________________ -//class FrameDataContainer; - /*-************************************************************************************************************//** @short implements a normal frame of hierarchy - @descr An instance of these class can be a normal node in frame tree only. The highest level to be allowed is 3! - On 1 stand the desktop himself as the only one, on 2 are all tasks present ... and then comes frames only. - A frame support influencing of his subtree, find of subframes, activate- and deactivate-mechanism as well as + @descr An instance of these class can be a normal node in frame tree. A frame support influencing of his + subtree, find of subframes, activate- and deactivate-mechanism as well as set/get of a frame window, component or controller. @attention This implementation supports three states: a)uninitialized, b)working, c)disposed @@ -270,36 +275,20 @@ enum EActiveState iv) dispose object by calling XComponent::dispose() After iv) all further requests are rejected by exceptions! (DisposedException) - @implements XInterface - XTypeProvider - XServiceInfo - XFramesSupplier - XFrame - XComponent - XStatusIndicatorFactory - XDispatchProvider - XDispatchInformationProvider - XDispatchProviderInterception - XMultiPropertySet - XFastPropertySet - XPropertySet - XWindowListener - XTopWindowListener - XFocusListener - XEventListener - XActionLockable - - @base MutexBase - ThreadHelpBase - TransactionBase - OBroadcastHelper + @base ThreadHelpBase + help to guarantee correct initialized lock member at startup + @base TransactionBase + help to implement unbreakable interface calls + @base OBroadcastHelper OPropertySetHelper - OWeakObject + implements the property set + @base OWeakObject + provides the refcount and XInterface, XWeak @devstatus ready to use @threadsafe yes + @modified 08.05.2002 09:38, as96863 *//*-*************************************************************************************************************/ - class Frame : // interfaces public css::lang::XTypeProvider , public css::lang::XServiceInfo , @@ -312,6 +301,7 @@ class Frame : // interfaces public css::awt::XTopWindowListener , public css::awt::XFocusListener , public css::document::XActionLockable , + public css::util::XCloseable , // => XCloseBroadcaster // base classes // Order is neccessary for right initialization of this class! public ThreadHelpBase , // helper for own threadsafe code @@ -414,12 +404,12 @@ class Frame : // interfaces //--------------------------------------------------------------------------------------------------------- // XTopWindowListener - // Attention: windowActivated() and windowDeactivated() are implement only! All other are empty! + // Attention: windowActivated(), windowDeactivated() and windowClosing() are implement only! All other are empty! //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL windowActivated ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); virtual void SAL_CALL windowDeactivated ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); virtual void SAL_CALL windowOpened ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) {}; - virtual void SAL_CALL windowClosing ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) {}; + virtual void SAL_CALL windowClosing ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); virtual void SAL_CALL windowClosed ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) {}; virtual void SAL_CALL windowMinimized ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) {}; virtual void SAL_CALL windowNormalized ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ) {}; @@ -446,6 +436,18 @@ class Frame : // interfaces virtual void SAL_CALL setActionLocks ( sal_Int16 nLock ) throw( css::uno::RuntimeException ); virtual sal_Int16 SAL_CALL resetActionLocks( ) throw( css::uno::RuntimeException ); + //--------------------------------------------------------------------------------------------------------- + // XCloseable + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL close( sal_Bool bDeliverOwnerShip ) throw( css::util::CloseVetoException, + css::uno::RuntimeException ); + + //--------------------------------------------------------------------------------------------------------- + // XCloseable + //--------------------------------------------------------------------------------------------------------- + virtual void SAL_CALL addCloseListener ( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException); + virtual void SAL_CALL removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException); + //------------------------------------------------------------------------------------------------------------- // protected methods //------------------------------------------------------------------------------------------------------------- @@ -480,10 +482,6 @@ class Frame : // interfaces *//*-*****************************************************************************************************/ // threadsafe -// void implts_setContainerWindow ( const css::uno::Reference< css::awt::XWindow >& xWindow ); - void implts_setComponentWindow ( const css::uno::Reference< css::awt::XWindow >& xWindow ); - sal_Bool implts_setComponent ( const css::uno::Reference< css::awt::XWindow >& xComponentWindow , - const css::uno::Reference< css::frame::XController >& xController ); void implts_sendFrameActionEvent ( const css::frame::FrameAction& aAction ); void implts_resizeComponentWindow ( ); void implts_setTitleOnWindow ( const ::rtl::OUString& sTitle ); @@ -491,6 +489,12 @@ class Frame : // interfaces void implts_setIconOnWindow ( ); void implts_startWindowListening ( ); void implts_stopWindowListening ( ); + void implts_saveWindowAttributes ( ); + void implts_checkSuicide ( ); + DECL_LINK( implts_windowClosing, void* ); + +sal_Bool impl_setComponent( const css::uno::Reference< css::awt::XWindow >& xComponentWindow , + const css::uno::Reference< css::frame::XController >& xController ) throw( css::uno::RuntimeException ); // non threadsafe void impl_disposeContainerWindow ( css::uno::Reference< css::awt::XWindow >& xWindow ); @@ -576,9 +580,12 @@ class Frame : // interfaces sal_Int16 m_nExternalLockCount ; css::uno::Reference< css::frame::XDispatchRecorderSupplier > m_xDispatchRecorderSupplier ; /// is used for dispatch recording and will be set/get from outside. Frame provide it only! SvtCommandOptions m_aCommandOptions ; /// ref counted class to support disabling commands defined by configuration file + sal_Bool m_bSelfClose ; /// in case of CloseVetoException on method close() wqs thrown by ourself - we must close ourself later if no internal processes are running + ::vcl::EventPoster m_aPoster ; protected: + sal_Bool m_bIsPlugIn ; /// In objects of these class this member is set to FALSE. But in derived class PlugInFrame it's overwritten with TRUE! FrameContainer m_aChildFrameContainer ; /// array of child frames inline css::uno::Reference< css::lang::XMultiServiceFactory > impl_getFactory() diff --git a/framework/inc/services/pluginframe.hxx b/framework/inc/services/pluginframe.hxx index 56565e19a2c3..4f8093baef6b 100644 --- a/framework/inc/services/pluginframe.hxx +++ b/framework/inc/services/pluginframe.hxx @@ -2,9 +2,9 @@ * * $RCSfile: pluginframe.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: cd $ $Date: 2002-05-16 13:28:34 $ + * last change: $Author: as $ $Date: 2002-05-23 12:50:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,8 +66,8 @@ // my own includes //_________________________________________________________________________________________________________________ -#ifndef __FRAMEWORK_SERVICES_TASK_HXX_ -#include <services/task.hxx> +#ifndef __FRAMEWORK_SERVICES_FRAME_HXX_ +#include <services/frame.hxx> #endif //_________________________________________________________________________________________________________________ @@ -144,13 +144,13 @@ namespace framework{ @implements XInitialization XPluginInstance XDispatchResultListener - @base Task + @base Frame *//*-*************************************************************************************************************/ -class PlugInFrame : public css::lang::XInitialization , - public css::mozilla::XPluginInstance, +class PlugInFrame : public css::lang::XInitialization , + public css::mozilla::XPluginInstance , public css::frame::XDispatchResultListener , // => XEVENTLISTENER - public Task // Order of baseclasses is neccessary for right initialization! + public Frame // Order of baseclasses is neccessary for right initialization! { //------------------------------------------------------------------------------------------------------------- // public methods @@ -203,18 +203,6 @@ class PlugInFrame : public css::lang::XInitialization , // XInitialization //--------------------------------------------------------------------------------------------------------- - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& seqArguments ) throw( css::uno::Exception , css::uno::RuntimeException ); @@ -222,80 +210,16 @@ class PlugInFrame : public css::lang::XInitialization , // XPluginInstance //--------------------------------------------------------------------------------------------------------- - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL start () throw( css::uno::RuntimeException ); void SAL_CALL implcb_start () throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL stop () throw( css::uno::RuntimeException ); void SAL_CALL implcb_stop () throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL destroy () throw( css::uno::RuntimeException ); void SAL_CALL implcb_destroy() throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL createWindow ( const css::uno::Any& aPlatformWindowHandle , sal_Bool bEmbedded ) throw( css::uno::RuntimeException ); void SAL_CALL implcb_createWindow ( const css::uno::Any& aPlatformWindowHandle , sal_Bool bEmbedded ) throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL newStream ( const ::rtl::OUString& sMIMEDescription, const ::rtl::OUString& sURL , const ::rtl::OUString& sFilter , @@ -307,19 +231,6 @@ class PlugInFrame : public css::lang::XInitialization , const ::rtl::OUString& sFilter , const css::uno::Reference< css::io::XInputStream >& xStream , const css::uno::Any& aSessionId ) throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL newURL ( const ::rtl::OUString& sMIMEDescription, const ::rtl::OUString& sURL , const ::rtl::OUString& sFilter , @@ -328,19 +239,6 @@ class PlugInFrame : public css::lang::XInitialization , const ::rtl::OUString& sURL , const ::rtl::OUString& sFilter , const css::uno::Any& aSessionId ) throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - virtual void SAL_CALL getHttpServerURL( ::rtl::OUString& sHost , sal_uInt16& nPort , ::rtl::OUString& sPrefix ) throw( css::uno::RuntimeException ); @@ -349,70 +247,21 @@ class PlugInFrame : public css::lang::XInitialization , // XDispatchProvider //--------------------------------------------------------------------------------------------------------- - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL , const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& seqDescripts ) throw( css::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- // XDispatchResultListener //--------------------------------------------------------------------------------------------------------- - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - virtual void SAL_CALL dispatchFinished ( const css::frame::DispatchResultEvent& aEvent ) throw( css::uno::RuntimeException ); //--------------------------------------------------------------------------------------------------------- // XEventListener //--------------------------------------------------------------------------------------------------------- - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); //------------------------------------------------------------------------------------------------------------- @@ -427,18 +276,6 @@ class PlugInFrame : public css::lang::XInitialization , private: - /*-****************************************************************************************************//** - @short - - @descr - - - @seealso - - - @param - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - void impl_tryToLoadDocument(); sal_Bool impl_registerRemoteFactories( const css::uno::Reference< css::lang::XMultiServiceFactory >& xRemoteServiceManager ); diff --git a/framework/inc/services/task.hxx b/framework/inc/services/task.hxx index fd833a7f8ba2..fe6519bb181e 100644 --- a/framework/inc/services/task.hxx +++ b/framework/inc/services/task.hxx @@ -2,9 +2,9 @@ * * $RCSfile: task.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: mba $ $Date: 2001-08-27 16:11:06 $ + * last change: $Author: as $ $Date: 2002-05-23 12:51:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -600,7 +600,7 @@ class Task : public css::frame::XTask , // => XFrame => XComponent DECL_LINK( Close_Impl, void* ); - void impl_SaveWindowAttributes(); +// void impl_SaveWindowAttributes(); /* sal_Bool impl_tryToChangeProperty( sal_Bool bProperty , const css::uno::Any& aValue , @@ -657,7 +657,7 @@ class Task : public css::frame::XTask , // => XFrame => XComponent protected: // But some values are neede by derived classes! - sal_Bool m_bIsPlugIn ; /// In objects of these class this member is set to FALSE. +// sal_Bool m_bIsPlugIn ; /// In objects of these class this member is set to FALSE. /// But in derived class PlugInFrame it's overwrited with TRUE! private: |