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 | |
parent | db80f11d26551393cfe8060857cb302956b2c6fa (diff) |
#91939# supports XClosable; remove deprecated task; ...
Diffstat (limited to 'framework/inc')
-rw-r--r-- | framework/inc/classes/framecontainer.hxx | 9 | ||||
-rw-r--r-- | framework/inc/classes/targetfinder.hxx | 6 | ||||
-rw-r--r-- | framework/inc/classes/taskcreator.hxx | 145 | ||||
-rw-r--r-- | framework/inc/dispatch/dispatchprovider.hxx | 156 | ||||
-rw-r--r-- | framework/inc/dispatch/menudispatcher.hxx | 8 | ||||
-rw-r--r-- | framework/inc/helper/ocomponentenumeration.hxx | 8 | ||||
-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 |
10 files changed, 190 insertions, 423 deletions
diff --git a/framework/inc/classes/framecontainer.hxx b/framework/inc/classes/framecontainer.hxx index 13e2d1660fc7..696843218cb3 100644 --- a/framework/inc/classes/framecontainer.hxx +++ b/framework/inc/classes/framecontainer.hxx @@ -2,9 +2,9 @@ * * $RCSfile: framecontainer.hxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: as $ $Date: 2001-06-11 10:13:31 $ + * last change: $Author: as $ $Date: 2002-05-23 12:49:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -386,9 +386,8 @@ class FrameContainer : private ThreadHelpBase @onerror A null reference is returned. *//*-*****************************************************************************************************/ - css::uno::Reference< css::frame::XFrame > searchDeepDown ( const ::rtl::OUString& sName ) const; - css::uno::Reference< css::frame::XFrame > searchFlatDown ( const ::rtl::OUString& sName ) const; - css::uno::Reference< css::frame::XFrame > searchDirectChildren ( const ::rtl::OUString& sName ) const; + css::uno::Reference< css::frame::XFrame > searchOnAllChildrens ( const ::rtl::OUString& sName ) const; + css::uno::Reference< css::frame::XFrame > searchOnDirectChildrens( const ::rtl::OUString& sName ) const; //------------------------------------------------------------------------------------------------------------- // protected methods diff --git a/framework/inc/classes/targetfinder.hxx b/framework/inc/classes/targetfinder.hxx index cbd26a2354d6..2368554256d2 100644 --- a/framework/inc/classes/targetfinder.hxx +++ b/framework/inc/classes/targetfinder.hxx @@ -2,9 +2,9 @@ * * $RCSfile: targetfinder.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: mba $ $Date: 2001-11-28 11:03:50 $ + * last change: $Author: as $ $Date: 2002-05-23 12:49:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -185,7 +185,7 @@ struct TargetInfo const ::rtl::OUString& sFrame , const ::rtl::OUString& sParent ); - EFrameType getFrameType( const css::uno::Reference< css::frame::XFrame >& xFrame ); + static EFrameType getFrameType( const css::uno::Reference< css::frame::XFrame >& xFrame ); //------------------------------------------------------------------------------------------------------------- // private methods diff --git a/framework/inc/classes/taskcreator.hxx b/framework/inc/classes/taskcreator.hxx index 70790752e567..399905c2d11b 100644 --- a/framework/inc/classes/taskcreator.hxx +++ b/framework/inc/classes/taskcreator.hxx @@ -2,9 +2,9 @@ * * $RCSfile: taskcreator.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: as $ $Date: 2001-08-10 11:54:21 $ + * last change: $Author: as $ $Date: 2002-05-23 12:49:56 $ * * 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_CLASSES_TARGETFINDER_HXX_ -#include <classes/targetfinder.hxx> +#ifndef __FRAMEWORK_THREADHELP_THREADHELPBASE_HXX_ +#include <threadhelp/threadhelpbase.hxx> #endif #ifndef __FRAMEWORK_MACROS_GENERIC_HXX_ @@ -86,14 +86,18 @@ // interface includes //_________________________________________________________________________________________________________________ -#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_ -#include <com/sun/star/frame/XFrame.hpp> +#ifndef _COM_SUN_STAR_FRAME_XFRAMESSUPPLIER_HPP_ +#include <com/sun/star/frame/XFramesSupplier.hpp> #endif #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #endif +#ifndef _COM_SUN_STAR_MOZILLA_XPLUGININSTANCE_HPP_ +#include <com/sun/star/mozilla/XPluginInstance.hpp> +#endif + //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ @@ -120,120 +124,49 @@ namespace framework{ // exported definitions //_________________________________________________________________________________________________________________ -struct TaskInfo -{ - //------------------------------------------------------------------------------------------------------------- - public: - //--------------------------------------------------------------------------------------------------------- - // Create new info structure and fill it with valid values. - inline TaskInfo( const css::uno::Reference< css::lang::XMultiServiceFactory >& xNewFactory , - const css::uno::Reference< css::frame::XFrame >& xNewParent , - const ::rtl::OUString& sNewName , - sal_Bool bNewVisible ) - { - xFactory = xNewFactory ; - xParent = css::uno::Reference< css::frame::XFramesSupplier >( xNewParent, css::uno::UNO_QUERY ); - sTaskName = impl_filterNames( sNewName ) ; - bVisible = bNewVisible ; - } - - //--------------------------------------------------------------------------------------------------------- - // Don't forget to release references and memory! - inline ~TaskInfo() - { - xFactory = css::uno::Reference< css::lang::XMultiServiceFactory >(); - xParent = css::uno::Reference< css::frame::XFramesSupplier >() ; - sTaskName = ::rtl::OUString() ; - bVisible = sal_False ; - } - - private: - //--------------------------------------------------------------------------------------------------------- - // Filter special names which can't be a valid frame name! - // Attention: "_beamer" is a valid name - because: - // It exist one beamer for one task tree only. - // If he exist, we can find it - otherwhise he will be created by our task-frame! - inline ::rtl::OUString impl_filterNames( const ::rtl::OUString& sName ) - { - ::rtl::OUString sFiltered( sName ); - if( - ( sName == SPECIALTARGET_BLANK ) || - ( sName == SPECIALTARGET_SELF ) || - ( sName == SPECIALTARGET_PARENT ) || - ( sName == SPECIALTARGET_TOP ) || - ( sName == SPECIALTARGET_MENUBAR ) || - ( sName == SPECIALTARGET_HELPAGENT ) - ) - { - sFiltered = ::rtl::OUString(); - } - return sFiltered; - } - - //------------------------------------------------------------------------------------------------------------- - public: - css::uno::Reference< css::lang::XMultiServiceFactory > xFactory ; - css::uno::Reference< css::frame::XFramesSupplier > xParent ; - ::rtl::OUString sTaskName ; - sal_Bool bVisible ; -}; - /*-************************************************************************************************************//** - @short a helper to create new tasks or plugin frames for "_blank" or FrameSearchFlag::CREATE at desktop + @short a helper to create new tasks, sub or plugin frames for "_blank" or FrameSearchFlag::CREATE @descr There are different places to create new tasks/plugin frames. Its not easy to service this code! Thats the reason for this helper. He capsulate asynchronous/synchronous creation by calling a simple interface. - @implements - - @base - - @devstatus ready to use - @threadsafe no + @threadsafe yes + @modified 16.05.2002 09:09, as96863 *//*-*************************************************************************************************************/ -class TaskCreator +class TaskCreator : private ThreadHelpBase { - //------------------------------------------------------------------------------------------------------------- - // public methods - //------------------------------------------------------------------------------------------------------------- - public: + //_______________________ + // member + private: - //--------------------------------------------------------------------------------------------------------- - // constructor / destructor - //--------------------------------------------------------------------------------------------------------- - TaskCreator() {}; - virtual ~TaskCreator() {}; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; - static css::uno::Reference< css::frame::XFrame > createSystemTask ( const TaskInfo& aInfo ); - static css::uno::Reference< css::frame::XFrame > createBrowserTask( const TaskInfo& aInfo ); + //_______________________ + // interface + public: - //------------------------------------------------------------------------------------------------------------- - // protected methods - //------------------------------------------------------------------------------------------------------------- - protected: + TaskCreator( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ); + virtual ~TaskCreator( ); - //------------------------------------------------------------------------------------------------------------- - // private methods - //------------------------------------------------------------------------------------------------------------- - private: + css::uno::Reference< css::frame::XFrame > createTask( const ::rtl::OUString& sName , + sal_Bool bVisible ); - //------------------------------------------------------------------------------------------------------------- - // debug methods - // (should be private everyway!) - //------------------------------------------------------------------------------------------------------------- - #ifdef ENABLE_ASSERTIONS - private: - static sal_Bool implcp_createSystemTask ( const TaskInfo& aInfo ); - static sal_Bool implcp_createBrowserTask( const TaskInfo& aInfo ); - #endif // #ifdef ENABLE_ASSERTIONS - - //------------------------------------------------------------------------------------------------------------- - // private variables - // (should be private everyway!) - //------------------------------------------------------------------------------------------------------------- + //_______________________ + // helper private: -}; // class TaskCreator + css::uno::Reference< css::frame::XFrame > implts_createSystemTask ( const css::uno::Reference< css::frame::XFramesSupplier >& xDesktop , + const ::rtl::OUString& sName , + sal_Bool bVisible ); + css::uno::Reference< css::frame::XFrame > implts_createBrowserTask( const css::uno::Reference< css::frame::XFramesSupplier >& xDesktop , + const css::uno::Reference< css::mozilla::XPluginInstance >& xPlugin , + const ::rtl::OUString& sName , + sal_Bool bVisible ); + static ::rtl::OUString impl_filterNames ( const ::rtl::OUString& sName ); + +}; // class TaskCreator -} // namespace framework +} // namespace framework -#endif // #ifndef __FRAMEWORK_CLASSES_TASKCREATOR_HXX_ +#endif // #ifndef __FRAMEWORK_CLASSES_TASKCREATOR_HXX_ diff --git a/framework/inc/dispatch/dispatchprovider.hxx b/framework/inc/dispatch/dispatchprovider.hxx index c829990370d4..a05e808f8769 100644 --- a/framework/inc/dispatch/dispatchprovider.hxx +++ b/framework/inc/dispatch/dispatchprovider.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dispatchprovider.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: as $ $Date: 2002-05-03 07:58:43 $ + * last change: $Author: as $ $Date: 2002-05-23 12:50:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -124,6 +124,10 @@ #include <com/sun/star/beans/PropertyValue.hpp> #endif +#ifndef _COM_SUN_STAR_MOZILLA_XPLUGININSTANCE_HPP_ +#include <com/sun/star/mozilla/XPluginInstance.hpp> +#endif + //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ @@ -143,9 +147,14 @@ namespace framework{ //_________________________________________________________________________________________________________________ -// exported const -//_________________________________________________________________________________________________________________ +/** + @descr We know some special dispatch objects with diffrent functionality. + The can be created internaly by the following DispatchProvider. + Here we define some identifier to force creation of the right one. + + @modified 17.05.2002 07:56, as96863 +*/ enum EDispatchHelper { E_DEFAULTDISPATCHER , @@ -158,103 +167,96 @@ enum EDispatchHelper }; //_________________________________________________________________________________________________________________ -// exported definitions -//_________________________________________________________________________________________________________________ -/*-************************************************************************************************************//** +/** @short implement a helper for XDispatchProvider interface - @descr Use this class as member only! Never use it as baseclass. + @descr The result of a queryDispatch() call depends from the owner, which use an instance of this class. + (frame, task, plugin, desktop) All of them must provides different functionality. + E.g: - task can be created by the desktop only + - a plugin intercept some calls to forward it to the browser + - a task can have a beamer as direct child + - a normal frame never can create a new one by himself + + @attention Use this class as member only! Never use it as baseclass. XInterface will be ambigous and we hold a weakreference to ouer OWNER - not to ouer SUPERCLASS! - @implements XInterface - XDispatchProvider - XEventListener - @base ThreadHelpBase - TransactionBase - OWeakObject + supports threadsafe mechanism + @base OWeakObject + provides ref count and weak mechanism @devstatus ready to use @threadsafe yes -*//*-*************************************************************************************************************/ + @modified 17.05.2002 07:56, as96863 +*/ class DispatchProvider : // interfaces public css::lang::XTypeProvider , public css::frame::XDispatchProvider , - public css::lang::XEventListener , // baseclasses // Order is neccessary for right initialization! private ThreadHelpBase , private TransactionBase , public ::cppu::OWeakObject { - //------------------------------------------------------------------------------------------------------------- - // public methods - //------------------------------------------------------------------------------------------------------------- + /* member */ + private: + /// reference to global service manager to create new services + css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory; + /// weakreference to owner frame (Don't use a hard reference. Owner can't delete us then!) + css::uno::WeakReference< css::frame::XFrame > m_xFrame; + /// different dispatcher to handle special dispatch calls, protocols or URLs (they will be created on demand.) + css::uno::Reference< css::frame::XDispatch > m_xMenuDispatcher ; + css::uno::Reference< css::frame::XDispatch > m_xHelpAgentDispatcher; +/* css::uno::Reference< css::frame::XDispatch > m_xBlankDispatcher ; + css::uno::Reference< css::frame::XDispatch > m_xSelfDispatcher ; + css::uno::Reference< css::frame::XDispatch > m_xPlugInDispatcher ; + css::uno::Reference< css::frame::XDispatch > m_xDefaultDispatcher ;*/ + /// cache of some other dispatch provider which are registered inside configuration to handle special URL protocols + HandlerCache m_aProtocolHandlerCache; + // if we are running plugged inside a browser we must intercept some queryDispatch() calls and forward it to the browser + static css::uno::WeakReference< css::mozilla::XPluginInstance > m_xPluginInterceptor; + + /* interface */ public: - // constructor / destructor - DispatchProvider( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory , - const css::uno::Reference< css::frame::XFrame >& xFrame ); - - // XInterface DECLARE_XINTERFACE DECLARE_XTYPEPROVIDER - // XDispatchProvider - 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 ); - virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches ( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions ) throw( css::uno::RuntimeException ); + DispatchProvider( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory , + const css::uno::Reference< css::frame::XFrame >& xFrame ); - // XEventListener - virtual void SAL_CALL disposing ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); + 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 ); + virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions ) throw( css::uno::RuntimeException ); - //------------------------------------------------------------------------------------------------------------- - // protected methods - //------------------------------------------------------------------------------------------------------------- + static void setPluginInterceptor( const css::uno::Reference< css::mozilla::XPluginInstance >& xPlugin ); + + /* helper */ protected: - // Let him protected! + // Let him protected! So nobody can use us as base ... virtual ~DispatchProvider(); - //------------------------------------------------------------------------------------------------------------- - // private methods - //------------------------------------------------------------------------------------------------------------- - private: - css::uno::Reference< css::frame::XDispatch > implts_getOrCreateDispatchHelper ( EDispatchHelper eHelper , - const css::uno::Any& aParameters = css::uno::Any() ); - sal_Bool implts_isLoadableContent ( const css::util::URL& aURL ); - - //------------------------------------------------------------------------------------------------------------- - // debug methods - // (should be private everyway!) - //------------------------------------------------------------------------------------------------------------- - #ifdef ENABLE_ASSERTIONS private: - static sal_Bool implcp_ctor ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory , - const css::uno::Reference< css::frame::XFrame >& xFrame ); - static sal_Bool implcp_queryDispatch ( const css::util::URL& aURL , - const ::rtl::OUString& sTargetFrameName, - sal_Int32 nSearchFlags ); - static sal_Bool implcp_queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions ); - static sal_Bool implcp_disposing ( const css::lang::EventObject& aEvent ); - #endif // #ifdef ENABLE_ASSERTIONS - - //------------------------------------------------------------------------------------------------------------- - // variables - // (should be private everyway!) - //------------------------------------------------------------------------------------------------------------- - private: - css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// reference to global service manager to create new services - css::uno::WeakReference< css::frame::XFrame > m_xFrame ; /// weakreference to owner frame (Don't use a hard reference. Owner can't delete us then!) - css::uno::Reference< css::frame::XDispatch > m_xMenuDispatcher ; /// different dispatcher to handle special dispatch calls, protocols or URLs - css::uno::Reference< css::frame::XDispatch > m_xHelpAgentDispatcher ; - css::uno::Reference< css::frame::XDispatch > m_xBlankDispatcher ; - css::uno::Reference< css::frame::XDispatch > m_xSelfDispatcher ; - css::uno::Reference< css::frame::XDispatch > m_xPlugInDispatcher ; - css::uno::Reference< css::frame::XDispatch > m_xDefaultDispatcher ; - HandlerCache m_aProtocolHandlerCache ; - -}; // class DispatchProvider - -} // namespace framework - -#endif // #ifndef __FRAMEWORK_DISPATCH_DISPATCHPROVIDER_HXX_ + css::uno::Reference< css::frame::XDispatch > implts_getOrCreateDispatchHelper ( EDispatchHelper eHelper , + const css::uno::Reference< css::frame::XFrame >& xOwner , + const css::uno::Any& aParameters = css::uno::Any() ); + sal_Bool implts_isLoadableContent ( const css::util::URL& aURL ); + css::uno::Reference< css::frame::XDispatch > implts_queryDesktopDispatch ( const css::uno::Reference< css::frame::XFrame > xDesktop , + const css::util::URL& aURL , + const ::rtl::OUString& sTargetFrameName , + sal_Int32 nSearchFlags ); + css::uno::Reference< css::frame::XDispatch > implts_queryFrameDispatch ( const css::uno::Reference< css::frame::XFrame > xFrame , + const css::util::URL& aURL , + const ::rtl::OUString& sTargetFrameName , + sal_Int32 nSearchFlags ); + css::uno::Reference< css::frame::XDispatch > implts_queryPluginDispatch ( const css::uno::Reference< css::frame::XFrame > xPlugin , + const css::util::URL& aURL , + const ::rtl::OUString& sTargetFrameName , + sal_Int32 nSearchFlags ); + css::uno::Reference< css::frame::XDispatch > implts_searchProtocolHandler ( const css::util::URL& aURL ); + +}; // class DispatchProvider + +} // namespace framework + +#endif // #ifndef __FRAMEWORK_DISPATCH_DISPATCHPROVIDER_HXX_ diff --git a/framework/inc/dispatch/menudispatcher.hxx b/framework/inc/dispatch/menudispatcher.hxx index 01253c6703a9..156b1a23e2d5 100644 --- a/framework/inc/dispatch/menudispatcher.hxx +++ b/framework/inc/dispatch/menudispatcher.hxx @@ -2,9 +2,9 @@ * * $RCSfile: menudispatcher.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: as $ $Date: 2001-07-02 13:22:14 $ + * last change: $Author: as $ $Date: 2002-05-23 12:50:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -146,10 +146,6 @@ #include <com/sun/star/frame/XDesktop.hpp> #endif -#ifndef _COM_SUN_STAR_FRAME_XTASK_HPP_ -#include <com/sun/star/frame/XTask.hpp> -#endif - #ifndef _COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HPP_ #include <com/sun/star/frame/FeatureStateEvent.hpp> #endif diff --git a/framework/inc/helper/ocomponentenumeration.hxx b/framework/inc/helper/ocomponentenumeration.hxx index 628632355049..87601b3f4e8c 100644 --- a/framework/inc/helper/ocomponentenumeration.hxx +++ b/framework/inc/helper/ocomponentenumeration.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ocomponentenumeration.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: as $ $Date: 2001-06-11 10:15:04 $ + * last change: $Author: as $ $Date: 2002-05-23 12:50:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -102,10 +102,6 @@ #include <com/sun/star/container/XEnumeration.hpp> #endif -#ifndef _COM_SUN_STAR_FRAME_XTASK_HPP_ -#include <com/sun/star/frame/XTask.hpp> -#endif - #ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ #include <com/sun/star/lang/XComponent.hpp> #endif 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: |