diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-06-27 20:34:39 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2012-06-28 11:08:49 +0200 |
commit | 0f11f30ea96fcec8d7c648089fc223a6fbed6aef (patch) | |
tree | 2e4d4023005b7c8ac5753bc5a4a35b37021c4a15 /framework | |
parent | 8122fdb0d391f07be4a35ca87ed641745a9e4dc9 (diff) |
Remove unused header files
Those are unused too.
Change-Id: I09c9dbcdbc68131c7c54bf0762a23f1280e6e22a
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/arguments.h | 167 | ||||
-rw-r--r-- | framework/inc/dispatch/basedispatcher.hxx | 383 | ||||
-rw-r--r-- | framework/inc/services/task.hxx | 491 |
3 files changed, 0 insertions, 1041 deletions
diff --git a/framework/inc/arguments.h b/framework/inc/arguments.h deleted file mode 100644 index 4b280d168cd6..000000000000 --- a/framework/inc/arguments.h +++ /dev/null @@ -1,167 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef __FRAMEWORK_ARGUMENTS_H_ -#define __FRAMEWORK_ARGUMENTS_H_ - -//_________________________________________________________________________________________________________________ -// includes -//_________________________________________________________________________________________________________________ - -#include <macros/generic.hxx> - -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ - -namespace framework{ - -/*-************************************************************************************************************//** - @short These arguments are included in given parameter lists - e.g. at dispatch calls at Sequence< PropertyValue >. - You can use class ArgumentAnalyzer to set/get it from a given list! -*//*-*************************************************************************************************************/ - -#define ARGUMENTNAME_ASTEMPLATE DECLARE_ASCII("AsTemplate" ) // bool -#define ARGUMENTNAME_CHARACTERSET DECLARE_ASCII("CharacterSet" ) // string -#define ARGUMENTNAME_DEEPDETECTION DECLARE_ASCII("DeepDetection" ) // bool -#define ARGUMENTNAME_DETECTSERVICE DECLARE_ASCII("DetectService" ) // string -#define ARGUMENTNAME_EXTENSION DECLARE_ASCII("Extension" ) // string -#define ARGUMENTNAME_FILTERNAME DECLARE_ASCII("FilterName" ) // string -#define ARGUMENTNAME_FILTEROPTIONS DECLARE_ASCII("FilterOptions" ) // string -#define ARGUMENTNAME_FORMAT DECLARE_ASCII("Format" ) // string -#define ARGUMENTNAME_FRAMENAME DECLARE_ASCII("FrameName" ) // string -#define ARGUMENTNAME_HIDDEN DECLARE_ASCII("Hidden" ) // bool -#define ARGUMENTNAME_INPUTSTREAM DECLARE_ASCII("InputStream" ) // Reference< XInputStream > -#define ARGUMENTNAME_INTERACTIONHANDLER DECLARE_ASCII("InteractionHandler" ) // Reference< XInteractionHandler > -#define ARGUMENTNAME_JUMPMARK DECLARE_ASCII("JumpMark" ) // string -#define ARGUMENTNAME_MACROEXECUTIONMODE DECLARE_ASCII("MacroExecutionMode" ) // int16 -#define ARGUMENTNAME_MEDIATYPE DECLARE_ASCII("MediaType" ) // string -#define ARGUMENTNAME_MINIMIZED DECLARE_ASCII("Minimized" ) // bool -#define ARGUMENTNAME_OPENNEWVIEW DECLARE_ASCII("OpenNewView" ) // bool -#define ARGUMENTNAME_OUTPUTSTREAM DECLARE_ASCII("OutputStream" ) // Reference< XOutputStream > -#define ARGUMENTNAME_PATTERN DECLARE_ASCII("Pattern" ) // string -#define ARGUMENTNAME_POSSIZE DECLARE_ASCII("PosSize" ) // rectangle -#define ARGUMENTNAME_POSTDATA DECLARE_ASCII("PostData" ) // Reference< XInputStream > -#define ARGUMENTNAME_POSTSTRING DECLARE_ASCII("PostString" ) // string -#define ARGUMENTNAME_PREVIEW DECLARE_ASCII("Preview" ) // bool -#define ARGUMENTNAME_READONLY DECLARE_ASCII("ReadOnly" ) // bool -#define ARGUMENTNAME_REFERRER DECLARE_ASCII("Referer" ) // string -#define ARGUMENTNAME_SILENT DECLARE_ASCII("Silent" ) // bool -#define ARGUMENTNAME_STATUSINDICATOR DECLARE_ASCII("StatusIndicator" ) // Reference< XStatusIndicator > -#define ARGUMENTNAME_TEMPLATENAME DECLARE_ASCII("TemplateName" ) // string -#define ARGUMENTNAME_TEMPLATEREGIONNAME DECLARE_ASCII("TemplateRegionName" ) // string -#define ARGUMENTNAME_TYPENAME DECLARE_ASCII("TypeName" ) // string -#define ARGUMENTNAME_UPDATEDOCMODE DECLARE_ASCII("UpdateDocMode" ) // int16 -#define ARGUMENTNAME_URL DECLARE_ASCII("URL" ) // string -#define ARGUMENTNAME_VERSION DECLARE_ASCII("Version" ) // int16 -#define ARGUMENTNAME_VIEWID DECLARE_ASCII("ViewId" ) // int16 -#define ARGUMENTNAME_REPAIRPACKAGE DECLARE_ASCII("RepairPackage" ) // bool -#define ARGUMENTNAME_DOCUMENTTITLE DECLARE_ASCII("DocumentTitle" ) // string - -/*-************************************************************************************************************//** - @short define our argument mask - @descr These mask could be used to define a subset for analyzing arguments or specify - one argument for set/get operations. - We use first byte [bit 0..7] of an int32 to define 8 layer, and follow 3 bytes [bit 8..31] - to address 24 properties per layer! Please use defines to build these mask!!! - With these values we build an special enum field for better using at our Argumentanalyzer-interface ... - Special define ANALYZE_ALL is our default for analyzing. Then we analyze complete argument list. -*//*-*************************************************************************************************************/ -#define ARGUMENTLAYER_1 0x00000001 -#define ARGUMENTLAYER_2 0x00000002 -#define ARGUMENTLAYER_3 0x00000004 -#define ARGUMENTLAYER_4 0x00000008 -#define ARGUMENTLAYER_5 0x00000010 -#define ARGUMENTLAYER_6 0x00000020 -#define ARGUMENTLAYER_7 0x00000040 -#define ARGUMENTLAYER_8 0x00000080 - -#define ARGUMENTFLAG_1 0x00000100 -#define ARGUMENTFLAG_2 0x00000200 -#define ARGUMENTFLAG_3 0x00000400 -#define ARGUMENTFLAG_4 0x00000800 -#define ARGUMENTFLAG_5 0x00001000 -#define ARGUMENTFLAG_6 0x00002000 -#define ARGUMENTFLAG_7 0x00004000 -#define ARGUMENTFLAG_8 0x00008000 -#define ARGUMENTFLAG_9 0x00010000 -#define ARGUMENTFLAG_10 0x00020000 -#define ARGUMENTFLAG_11 0x00040000 -#define ARGUMENTFLAG_12 0x00080000 -#define ARGUMENTFLAG_13 0x00100000 -#define ARGUMENTFLAG_14 0x00200000 -#define ARGUMENTFLAG_15 0x00400000 -#define ARGUMENTFLAG_16 0x00800000 -#define ARGUMENTFLAG_17 0x01000000 -#define ARGUMENTFLAG_18 0x02000000 -#define ARGUMENTFLAG_19 0x04000000 -#define ARGUMENTFLAG_20 0x08000000 -#define ARGUMENTFLAG_21 0x10000000 -#define ARGUMENTFLAG_22 0x20000000 -#define ARGUMENTFLAG_23 0x40000000 -#define ARGUMENTFLAG_24 0x80000000 - -#define ANALYZE_ALL_ARGUMENTS 0xFFFFFFFF - -enum EArgument -{ - E_ASTEMPLATE = ARGUMENTLAYER_1 | ARGUMENTFLAG_1 , - E_CHARACTERSET = ARGUMENTLAYER_1 | ARGUMENTFLAG_2 , - E_DEEPDETECTION = ARGUMENTLAYER_1 | ARGUMENTFLAG_3 , - E_DETECTSERVICE = ARGUMENTLAYER_1 | ARGUMENTFLAG_4 , - E_EXTENSION = ARGUMENTLAYER_1 | ARGUMENTFLAG_5 , - E_FILTERNAME = ARGUMENTLAYER_1 | ARGUMENTFLAG_6 , - E_FILTEROPTIONS = ARGUMENTLAYER_1 | ARGUMENTFLAG_7 , - E_FORMAT = ARGUMENTLAYER_1 | ARGUMENTFLAG_8 , - E_FRAMENAME = ARGUMENTLAYER_1 | ARGUMENTFLAG_9 , - E_HIDDEN = ARGUMENTLAYER_1 | ARGUMENTFLAG_10, - E_INPUTSTREAM = ARGUMENTLAYER_1 | ARGUMENTFLAG_11, - E_INTERACTIONHANDLER = ARGUMENTLAYER_1 | ARGUMENTFLAG_12, - E_JUMPMARK = ARGUMENTLAYER_1 | ARGUMENTFLAG_13, - E_MACROEXECUTIONMODE = ARGUMENTLAYER_1 | ARGUMENTFLAG_14, - E_MEDIATYPE = ARGUMENTLAYER_1 | ARGUMENTFLAG_15, - E_MINIMIZED = ARGUMENTLAYER_1 | ARGUMENTFLAG_16, - E_OPENNEWVIEW = ARGUMENTLAYER_1 | ARGUMENTFLAG_17, - E_OUTPUTSTREAM = ARGUMENTLAYER_1 | ARGUMENTFLAG_18, - E_PATTERN = ARGUMENTLAYER_1 | ARGUMENTFLAG_19, - E_POSSIZE = ARGUMENTLAYER_1 | ARGUMENTFLAG_20, - E_POSTDATA = ARGUMENTLAYER_1 | ARGUMENTFLAG_21, - E_POSTSTRING = ARGUMENTLAYER_1 | ARGUMENTFLAG_22, - E_PREVIEW = ARGUMENTLAYER_1 | ARGUMENTFLAG_23, - E_READONLY = ARGUMENTLAYER_1 | ARGUMENTFLAG_24, - - E_REFERRER = ARGUMENTLAYER_2 | ARGUMENTFLAG_1 , - E_SILENT = ARGUMENTLAYER_2 | ARGUMENTFLAG_2 , - E_STATUSINDICATOR = ARGUMENTLAYER_2 | ARGUMENTFLAG_3 , - E_TEMPLATENAME = ARGUMENTLAYER_2 | ARGUMENTFLAG_4 , - E_TEMPLATEREGIONNAME = ARGUMENTLAYER_2 | ARGUMENTFLAG_5 , - E_TYPENAME = ARGUMENTLAYER_2 | ARGUMENTFLAG_6 , - E_UPDATEDOCMODE = ARGUMENTLAYER_2 | ARGUMENTFLAG_7 , - E_URL = ARGUMENTLAYER_2 | ARGUMENTFLAG_8 , - E_VERSION = ARGUMENTLAYER_2 | ARGUMENTFLAG_9 , - E_VIEWID = ARGUMENTLAYER_2 | ARGUMENTFLAG_10, - E_REPAIRPACKAGE = ARGUMENTLAYER_2 | ARGUMENTFLAG_11, - E_DOCUMENTTITLE = ARGUMENTLAYER_2 | ARGUMENTFLAG_12 -}; - -} // namespace framework - -#endif // #ifndef __FRAMEWORK_ARGUMENTS_H_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/inc/dispatch/basedispatcher.hxx b/framework/inc/dispatch/basedispatcher.hxx deleted file mode 100644 index 482c09f5e38d..000000000000 --- a/framework/inc/dispatch/basedispatcher.hxx +++ /dev/null @@ -1,383 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef __FRAMEWORK_DISPATCH_BASEDISPATCHER_HXX_ -#define __FRAMEWORK_DISPATCH_BASEDISPATCHER_HXX_ - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - -#include <classes/taskcreator.hxx> -#include <threadhelp/resetableguard.hxx> -#include <threadhelp/threadhelpbase.hxx> - -#include <threadhelp/transactionbase.hxx> -#include <macros/xinterface.hxx> -#include <macros/xtypeprovider.hxx> -#include <macros/debug.hxx> -#include <macros/generic.hxx> -#include <stdtypes.h> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include <com/sun/star/lang/XTypeProvider.hpp> -#include <com/sun/star/frame/XNotifyingDispatch.hpp> -#include <com/sun/star/util/URL.hpp> -#include <com/sun/star/frame/DispatchDescriptor.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/frame/XDispatchResultListener.hpp> -#include <com/sun/star/frame/XFrameLoader.hpp> -#include <com/sun/star/frame/XLoadEventListener.hpp> -#include <com/sun/star/frame/XDesktop.hpp> -#include <com/sun/star/frame/FeatureStateEvent.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ -#include <cppuhelper/weak.hxx> -#include <cppuhelper/weakref.hxx> -#include <cppuhelper/interfacecontainer.h> -/*DRAFT -#include <unotools/historyoptions.hxx> -*/ - -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ - -namespace framework{ - -//_________________________________________________________________________________________________________________ -// exported const -//_________________________________________________________________________________________________________________ - -//_________________________________________________________________________________________________________________ -// exported definitions -//_________________________________________________________________________________________________________________ - -/*-************************************************************************************************************//** - @descr We must support loading of different URLs with different handler or loader into different tasks simultaniously. - They call us back to return state of operation. We need some informations to distinguish - between these different "loading threads". - This is the reason to implement this dynamicly list. - - @attention I maked class LoaderThreads threadsafe! Using will be easier in a multithreaded environment. - struct DispatchBinding doesn't need that! -*//*-*************************************************************************************************************/ -struct LoadBinding -{ - //------------------------------------------------------------------------------------------------------------- - public: - - //--------------------------------------------------------------------------------------------------------- - inline LoadBinding() - { - free(); - } - - //--------------------------------------------------------------------------------------------------------- - // use to initialize struct for asynchronous dispatching by using handler - inline LoadBinding( const css::util::URL& aNewURL , - const css::uno::Sequence< css::beans::PropertyValue > lNewDescriptor , - const css::uno::Reference< css::frame::XDispatch >& xNewHandler , - const css::uno::Any& aNewAsyncInfo ) - { - free(); - xHandler = xNewHandler ; - aURL = aNewURL ; - lDescriptor = lNewDescriptor; - aAsyncInfo = aNewAsyncInfo ; - } - - //--------------------------------------------------------------------------------------------------------- - // use to initialize struct for asynchronous loading by using frame loader - inline LoadBinding( const css::util::URL& aNewURL , - const css::uno::Sequence< css::beans::PropertyValue > lNewDescriptor , - const css::uno::Reference< css::frame::XFrame >& xNewFrame , - const css::uno::Reference< css::frame::XFrameLoader >& xNewLoader , - const css::uno::Any& aNewAsyncInfo ) - { - free(); - xLoader = xNewLoader ; - xFrame = xNewFrame ; - aURL = aNewURL ; - lDescriptor = lNewDescriptor; - aAsyncInfo = aNewAsyncInfo ; - } - - //--------------------------------------------------------------------------------------------------------- - // dont forget toe release used references - inline ~LoadBinding() - { - free(); - } - - //--------------------------------------------------------------------------------------------------------- - inline void free() - { - xHandler = css::uno::Reference< css::frame::XDispatch >() ; - xLoader = css::uno::Reference< css::frame::XFrameLoader >(); - xFrame = css::uno::Reference< css::frame::XFrame >() ; - aURL = css::util::URL() ; - lDescriptor = css::uno::Sequence< css::beans::PropertyValue >(); - aAsyncInfo = css::uno::Any() ; - } - - //------------------------------------------------------------------------------------------------------------- - public: - css::uno::Reference< css::frame::XDispatch > xHandler ; // if handler was used, this reference will be valid - css::uno::Reference< css::frame::XFrameLoader > xLoader ; // if loader was used, this reference will be valid - css::uno::Reference< css::frame::XFrame > xFrame ; // Target of loading - css::util::URL aURL ; // dispatched URL - neccessary to find listener for status event! - css::uno::Sequence< css::beans::PropertyValue > lDescriptor ; // dispatched arguments - neccessary for "reactForLoadingState()"! - css::uno::Any aAsyncInfo ; // superclasses could use them to save her own user specific data for these asynchron call-info - css::uno::Reference< css::frame::XDispatchResultListener > xListener; -}; - -//***************************************************************************************************************** -class LoaderThreads : private ::std::vector< LoadBinding > - , private ThreadHelpBase -{ - //------------------------------------------------------------------------------------------------------------- - public: - - //--------------------------------------------------------------------------------------------------------- - inline LoaderThreads() - : ThreadHelpBase() - { - } - - //--------------------------------------------------------------------------------------------------------- - inline void append( const LoadBinding& aBinding ) - { - ResetableGuard aGuard( m_aLock ); - push_back( aBinding ); - } - - //--------------------------------------------------------------------------------------------------------- - /// search for handler thread in list wich match given parameter and delete it - inline sal_Bool searchAndForget( const css::uno::Reference < css::frame::XDispatchResultListener >& rListener, LoadBinding& aBinding ) - { - ResetableGuard aGuard( m_aLock ); - sal_Bool bFound = sal_False; - for( iterator pItem=begin(); pItem!=end(); ++pItem ) - { - if( pItem->xListener == rListener ) - { - aBinding = *pItem; - erase( pItem ); - bFound = sal_True; - break; - } - } - return bFound; - } - - //--------------------------------------------------------------------------------------------------------- - /// search for loader thread in list wich match given parameter and delete it - inline sal_Bool searchAndForget( const css::uno::Reference< css::frame::XFrameLoader > xLoader, LoadBinding& aBinding ) - { - ResetableGuard aGuard( m_aLock ); - sal_Bool bFound = sal_False; - for( iterator pItem=begin(); pItem!=end(); ++pItem ) - { - if( pItem->xLoader == xLoader ) - { - aBinding = *pItem; - erase( pItem ); - bFound = sal_True; - break; - } - } - return bFound; - } - - //--------------------------------------------------------------------------------------------------------- - // free ALL memory ... I hope it - inline void free() - { - ResetableGuard aGuard( m_aLock ); - LoaderThreads().swap( *this ); - } -}; - -/*-************************************************************************************************************//** - @short base class for dispatcher implementations - @descr Most of our dispatch implementations do everytime the same. They try to handle or load - somethinmg into a target ... normaly a frame/task/pluginframe! - They must do it synchron or sometimes asynchron. They must wait for callbacks and - notify registered listener with right status events. - All these things are implemented by this baseclass. You should override some methods - to change something. - - "dispatch()" => should be you dispatch algorithm - "reactForLoadingState()" => do something depending from loading state ... - - @implements XInterface - XDispatch - XLoadEventListener - XEventListener - - @base ThreadHelpBase - TransactionBase - OWeakObject - - @devstatus ready to use - @threadsafe yes -*//*-*************************************************************************************************************/ -class BaseDispatcher : // interfaces - public css::lang::XTypeProvider , - public css::frame::XNotifyingDispatch , - public css::frame::XLoadEventListener , // => XEventListener too! - // baseclasses - // Order is neccessary for right initialization! - protected ThreadHelpBase , - protected TransactionBase , - public ::cppu::OWeakObject -{ - //------------------------------------------------------------------------------------------------------------- - // public methods - //------------------------------------------------------------------------------------------------------------- - public: - - // constructor / destructor - BaseDispatcher( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory , - const css::uno::Reference< css::frame::XFrame >& xOwnerFrame ); - - void dispatchFinished ( const css::frame::DispatchResultEvent& aEvent, const css::uno::Reference < css::frame::XDispatchResultListener >& rListener ); - - // XInterface - DECLARE_XINTERFACE - DECLARE_XTYPEPROVIDER - - // XNotifyingDispatch - virtual void SAL_CALL dispatchWithNotification ( const css::util::URL& aURL, - const css::uno::Sequence< css::beans::PropertyValue >& aArgs, - const css::uno::Reference< css::frame::XDispatchResultListener >& Listener ) throw ( css::uno::RuntimeException); - - // XDispatch - virtual void SAL_CALL dispatch ( const css::util::URL& aURL , - const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ) = 0; - virtual void SAL_CALL addStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xListener , - const css::util::URL& aURL ) throw( css::uno::RuntimeException ); - virtual void SAL_CALL removeStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xListener , - const css::util::URL& aURL ) throw( css::uno::RuntimeException ); - - // XLoadEventListener - virtual void SAL_CALL loadFinished ( const css::uno::Reference< css::frame::XFrameLoader >& xLoader ) throw( css::uno::RuntimeException ); - virtual void SAL_CALL loadCancelled ( const css::uno::Reference< css::frame::XFrameLoader >& xLoader ) throw( css::uno::RuntimeException ); - - // XEventListener - virtual void SAL_CALL disposing ( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); - - //------------------------------------------------------------------------------------------------------------- - // protected methods - //------------------------------------------------------------------------------------------------------------- - protected: - virtual ~BaseDispatcher(); - - /*-****************************************************************************************************//** - @short you should react for successfully or failed load/handle operations. - @descr These baseclass implement handling of dispatched URLs and synchronous/asynchronous loading - of it into a target frame. It implement the complete listener mechanism to get events from - used loader or handler and sending of status events to registered listener too! - But we couldn't react for this events in all cases. - May be - you wish to reactivate suspended controllers or wish to delete a new created - task if operation failed ...!? - By overwriting these pure virtual methods it's possible to do such things. - We call you with all available informations ... you should react for it. - BUT - don't send any status events to your listener! We will do it everytime. - (other listener could be informed as well!) - - You will called back in: a) "reactForLoadingState()" , if URL was loaded into a frame - b) "reactForHandlingState()", if URL was handled by a registered content handler - (without using a target frame!) - - @seealso method statusChanged() - @seealso method loadFinished() - @seealso method loadCancelled() - - @param "aURL" , original dispatched URL - @param "lDescriptor" , original dispatched arguments - @param "xTarget" , target of operation (could be NULL if URL was handled not loaded!) - @param "bState" , state of operation - @return - - - @onerror - - @threadsafe - - *//*-*****************************************************************************************************/ - virtual void SAL_CALL reactForLoadingState ( const css::util::URL& aURL , - const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor , - const css::uno::Reference< css::frame::XFrame >& xTarget , - sal_Bool bState , - const css::uno::Any& aAsyncInfo ) = 0; - - virtual void SAL_CALL reactForHandlingState( const css::util::URL& aURL , - const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor , - sal_Bool bState , - const css::uno::Any& aAsyncInfo ) = 0; - - //------------------------------------------------------------------------------------------------------------- - // protected methods - //------------------------------------------------------------------------------------------------------------- - protected: - ::rtl::OUString implts_detectType ( const css::util::URL& aURL , - css::uno::Sequence< css::beans::PropertyValue >& lDescriptor , - sal_Bool bDeep ); - sal_Bool implts_handleIt ( const css::util::URL& aURL , - css::uno::Sequence< css::beans::PropertyValue >& lDescriptor , - const ::rtl::OUString& sTypeName , - const css::uno::Any& aAsyncInfo = css::uno::Any() ); - sal_Bool implts_loadIt ( const css::util::URL& aURL , - css::uno::Sequence< css::beans::PropertyValue >& lDescriptor , - const ::rtl::OUString& sTypeName , - const css::uno::Reference< css::frame::XFrame >& xTarget , - const css::uno::Any& aAsyncInfo = css::uno::Any() ); - void implts_enableFrame ( const css::uno::Reference< css::frame::XFrame >& xFrame , - const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ); - void implts_disableFrame ( const css::uno::Reference< css::frame::XFrame >& xFrame ); - sal_Bool implts_deactivateController ( const css::uno::Reference< css::frame::XController >& xController ); - sal_Bool implts_reactivateController ( const css::uno::Reference< css::frame::XController >& xController ); - void implts_sendResultEvent ( const css::uno::Reference< css::frame::XFrame >& xEventSource , - const ::rtl::OUString& sURL , - sal_Bool bLoadState ); - - //------------------------------------------------------------------------------------------------------------- - // variables - // - should be private normaly ... - // - but some super classes need access to some of them => protected! - //------------------------------------------------------------------------------------------------------------- - protected: - css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// global uno service manager to create new services - css::uno::WeakReference< css::frame::XFrame > m_xOwner ; /// weakreference to owner (Don't use a hard reference. Owner can't delete us then!) - - private: - LoaderThreads m_aLoaderThreads ; /// list of bindings between handler/loader, tasks and loaded URLs - ListenerHash m_aListenerContainer ; /// hash table for listener at specified URLs - -}; // class BaseDispatcher - -} // namespace framework - -#endif // #ifndef __FRAMEWORK_DISPATCH_BASEDISPATCHER_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/inc/services/task.hxx b/framework/inc/services/task.hxx deleted file mode 100644 index c2b411b2042a..000000000000 --- a/framework/inc/services/task.hxx +++ /dev/null @@ -1,491 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __FRAMEWORK_SERVICES_TASK_HXX_ -#define __FRAMEWORK_SERVICES_TASK_HXX_ - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - -#include <services/frame.hxx> -#include <macros/generic.hxx> -#include <macros/debug.hxx> -#include <macros/xinterface.hxx> -#include <macros/xtypeprovider.hxx> -#include <macros/xserviceinfo.hxx> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include <com/sun/star/frame/XTask.hpp> -#include <com/sun/star/awt/Point.hpp> -#include <com/sun/star/awt/Size.hpp> - -//_________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________ -#include <cppuhelper/weak.hxx> -#include <cppuhelper/propshlp.hxx> - -#include <tools/link.hxx> -#include <vcl/evntpost.hxx> - -//_________________________________________________________________________________________________________________ -// namespace -//_________________________________________________________________________________________________________________ - -namespace framework{ - -//_________________________________________________________________________________________________________________ -// exported const -//_________________________________________________________________________________________________________________ - -//_________________________________________________________________________________________________________________ -// exported definitions -//_________________________________________________________________________________________________________________ - -/*-************************************************************************************************************//** - @short implements an special frame - a task frame - - @descr - - - @implements XTask - - @base Frame - OPropertySet -*//*-*************************************************************************************************************/ - -class Task : public css::frame::XTask , // => XFrame => XComponent - public Frame // Order of baseclasses is neccessary for right initialization! -{ - //------------------------------------------------------------------------------------------------------------- - // public methods - //------------------------------------------------------------------------------------------------------------- - - public: - - //--------------------------------------------------------------------------------------------------------- - // constructor / destructor - //--------------------------------------------------------------------------------------------------------- - - /*-****************************************************************************************************//** - @short standard constructor to create instance - - @descr This constructor initialize a new instance of this class, - and will be set valid values on his member and baseclasses. - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - Task( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); - - /*-****************************************************************************************************//** - @short standard destructor - - @descr This method destruct an instance of this class and clear some member. - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual ~Task(); - - //--------------------------------------------------------------------------------------------------------- - // XInterface, XTypeProvider, XServiceInfo - //--------------------------------------------------------------------------------------------------------- - - DECLARE_XINTERFACE - DECLARE_XTYPEPROVIDER - DECLARE_XSERVICEINFO - - //--------------------------------------------------------------------------------------------------------- - // XTask - //--------------------------------------------------------------------------------------------------------- - - /*-****************************************************************************************************//** - @short - - - @descr - - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual sal_Bool SAL_CALL close() throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - - @descr - - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL tileWindows() throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - - @descr - - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL arrangeWindowsVertical() throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - - @descr - - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL arrangeWindowsHorizontal() throw( css::uno::RuntimeException ); - - //--------------------------------------------------------------------------------------------------------- - // XComponent - //--------------------------------------------------------------------------------------------------------- - - /*-****************************************************************************************************//** - @short - - - @descr We must overwrite this method, because baseclass Frame implements XFrame and XComponent. - XTask is derived from these classes to! The compiler don't know, which base is the right one. - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL dispose() throw( css::uno::RuntimeException ) - { - Frame::dispose(); - } - - /*-*******************************************************************************************************/ - virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw( css::uno::RuntimeException ) - { - Frame::addEventListener( xListener ); - } - - /*-*******************************************************************************************************/ - virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw( css::uno::RuntimeException ) - { - Frame::removeEventListener( xListener ); - } - - //--------------------------------------------------------------------------------------------------------- - // XFrame - //--------------------------------------------------------------------------------------------------------- - - /*-****************************************************************************************************//** - @short - - - @descr We must overwrite this method, because baseclass Frame implements XFrame and XComponent. - XTask is derived from these classes to! The compiler don't know, which base is right. - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL initialize( const css::uno::Reference< css::awt::XWindow >& xWindow ) throw( css::uno::RuntimeException ) - { - Frame::initialize( xWindow ); - } - - virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getContainerWindow() throw( css::uno::RuntimeException ) - { - return Frame::getContainerWindow(); - } - - virtual void SAL_CALL setCreator( const css::uno::Reference< css::frame::XFramesSupplier >& xCreator ) throw( css::uno::RuntimeException ) - { - Frame::setCreator( xCreator ); - } - - virtual css::uno::Reference< css::frame::XFramesSupplier > SAL_CALL getCreator() throw( css::uno::RuntimeException ) - { - return Frame::getCreator(); - } - - virtual ::rtl::OUString SAL_CALL getName() throw( css::uno::RuntimeException ) - { - return Frame::getName(); - } - - virtual void SAL_CALL setName( const ::rtl::OUString& sName ) throw( css::uno::RuntimeException ) - { - Frame::setName( sName ); - } - - virtual sal_Bool SAL_CALL isTop() throw( css::uno::RuntimeException ) - { - return Frame::isTop(); - } - - virtual void SAL_CALL activate() throw( css::uno::RuntimeException ) - { - Frame::activate(); - } - - virtual void SAL_CALL deactivate() throw( css::uno::RuntimeException ) - { - Frame::deactivate(); - } - - virtual sal_Bool SAL_CALL isActive() throw( css::uno::RuntimeException ) - { - return Frame::isActive(); - } - - virtual sal_Bool SAL_CALL setComponent( const css::uno::Reference< css::awt::XWindow >& xComponentWindow , - const css::uno::Reference< css::frame::XController >& xController ) throw( css::uno::RuntimeException ) - { - return Frame::setComponent( xComponentWindow, xController ); - } - - virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getComponentWindow() throw( css::uno::RuntimeException ) - { - return Frame::getComponentWindow(); - } - - virtual css::uno::Reference< css::frame::XController > SAL_CALL getController() throw( css::uno::RuntimeException ) - { - return Frame::getController(); - } - - virtual void SAL_CALL contextChanged() throw( css::uno::RuntimeException ) - { - Frame::contextChanged(); - } - - virtual void SAL_CALL addFrameActionListener( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ) throw( css::uno::RuntimeException ) - { - Frame::addFrameActionListener( xListener ); - } - - virtual void SAL_CALL removeFrameActionListener( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ) throw( css::uno::RuntimeException ) - { - Frame::removeFrameActionListener( xListener ); - } - - virtual css::uno::Reference< css::frame::XFrame > SAL_CALL findFrame( const ::rtl::OUString& sTargetFrameName , - sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException ); - - //--------------------------------------------------------------------------------------------------------- - // XTopWindowListener - //--------------------------------------------------------------------------------------------------------- - - /*-****************************************************************************************************//** - @short - - - @descr - - - @seealso - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL windowClosing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - - @descr - - - @seealso - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL windowActivated( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); - - /*-****************************************************************************************************//** - @short - - - @descr - - - @seealso - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL windowDeactivated( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); - - //--------------------------------------------------------------------------------------------------------- - // XEventListener - //--------------------------------------------------------------------------------------------------------- - - /*-****************************************************************************************************//** - @short - - - @descr This object is forced to release all references to the interfaces given - by the parameter Source. - - @seealso - - - @param - - - @return - - - @onerror - - *//*-*****************************************************************************************************/ - - virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw( css::uno::RuntimeException ); - - //------------------------------------------------------------------------------------------------------------- - // protected methods - //------------------------------------------------------------------------------------------------------------- - - protected: - - - //------------------------------------------------------------------------------------------------------------- - // private methods - //------------------------------------------------------------------------------------------------------------- - - private: - - DECL_LINK( Close_Impl, void* ); - - - - //------------------------------------------------------------------------------------------------------------- - // debug methods - // (should be private everyway!) - //------------------------------------------------------------------------------------------------------------- - - /*-****************************************************************************************************//** - @short debug-method to check incoming parameter of some other mehods of this class - @descr The following methods are used to check parameters for other methods - of this class. The return value is used directly for an ASSERT(...). - - @seealso ASSERTs in implementation! - - @param references to checking variables - @return sal_False on invalid parameter<BR> - sal_True otherway - - @onerror - - *//*-*****************************************************************************************************/ - - #ifdef ENABLE_ASSERTIONS - - private: - - // Not used in the moment! - - #endif // #ifdef ENABLE_ASSERTIONS - - //------------------------------------------------------------------------------------------------------------- - // variables - // (should be private everyway!) - //------------------------------------------------------------------------------------------------------------- - - protected: - - // But some values are neede by derived classes! -// sal_Bool m_bIsPlugIn ; /// In objects of these class this member is set to sal_False. - /// But in derived class PlugInFrame it's overwrited with sal_True! - - private: - - // Properties - sal_Bool m_bIsAlwaysVisible ; - sal_Bool m_bIsFloating ; - css::awt::Point m_aPosition ; - css::awt::Size m_aSize ; - ::vcl::EventPoster m_aPoster ; - -}; // class Tasks - -} // namespace framework - -#endif // #ifndef __FRAMEWORK_SERVICES_TASKS_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |