merge the formfield patch from ooo-build
[ooovba.git] / framework / inc / dispatch / blankdispatcher.hxx
blobe0dc9e23ab9ecf8adaf372d9e92494ec77935b72
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: blankdispatcher.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __FRAMEWORK_DISPATCH_BLANKDISPATCHER_HXX_
32 #define __FRAMEWORK_DISPATCH_BLANKDISPATCHER_HXX_
34 //_________________________________________________________________________________________________________________
35 // my own includes
36 //_________________________________________________________________________________________________________________
38 #include <dispatch/basedispatcher.hxx>
40 //_________________________________________________________________________________________________________________
41 // interface includes
42 //_________________________________________________________________________________________________________________
44 //_________________________________________________________________________________________________________________
45 // other includes
46 //_________________________________________________________________________________________________________________
48 //_________________________________________________________________________________________________________________
49 // namespace
50 //_________________________________________________________________________________________________________________
52 namespace framework{
54 //_________________________________________________________________________________________________________________
55 // exported const
56 //_________________________________________________________________________________________________________________
58 //_________________________________________________________________________________________________________________
59 // exported definitions
60 //_________________________________________________________________________________________________________________
62 /*-************************************************************************************************************//**
63 @short helper for desktop only(!) to create new tasks on demand for dispatches
64 @descr Use this class as member only! Never use it as baseclass.
65 XInterface will be ambigous and we hold a weakreference to ouer OWNER - not to ouer SUPERCLASS!
67 @implements XInterface
68 XDispatch
69 XStatusListener
70 XLoadEventListener
71 XEventListener
73 @base BaseDispatcher
74 OWeakObject
76 @devstatus ready to use
77 @threadsafe yes
78 *//*-*************************************************************************************************************/
79 class BlankDispatcher : // -interfaces ... are supported by our BaseDispatcher!
80 // -baseclasses ... order is neccessary for right initialization!
81 public BaseDispatcher
83 //-------------------------------------------------------------------------------------------------------------
84 // public methods
85 //-------------------------------------------------------------------------------------------------------------
86 public:
87 // ctor
88 BlankDispatcher ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
89 const css::uno::Reference< css::frame::XFrame >& xDesktop,
90 sal_Bool bIsDefaultDispatcher );
91 // XDispatch
92 virtual void SAL_CALL dispatch ( const css::util::URL& aURL ,
93 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException );
95 //-------------------------------------------------------------------------------------------------------------
96 // protected methods
97 //-------------------------------------------------------------------------------------------------------------
98 protected:
99 virtual void SAL_CALL reactForLoadingState ( const css::util::URL& aURL ,
100 const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ,
101 const css::uno::Reference< css::frame::XFrame >& xTarget ,
102 sal_Bool bState ,
103 const css::uno::Any& aAsyncInfo );
105 virtual void SAL_CALL reactForHandlingState( const css::util::URL& aURL ,
106 const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ,
107 sal_Bool bState ,
108 const css::uno::Any& aAsyncInfo );
110 //-------------------------------------------------------------------------------------------------------------
111 // protected methods
112 //-------------------------------------------------------------------------------------------------------------
113 private:
114 sal_Bool implts_findAndActivateAlreadyLoadedTask( const css::util::URL& aURL ,
115 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ,
116 const css::uno::Reference< css::frame::XFrame > xDesktop );
118 css::uno::Reference< css::frame::XFrame > implts_findAndLockRecycleTask( const css::util::URL& aURL ,
119 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ,
120 const css::uno::Reference< css::frame::XFrame > xDesktop );
122 //-------------------------------------------------------------------------------------------------------------
123 // variables
124 // (should be private everyway!)
125 //-------------------------------------------------------------------------------------------------------------
126 private:
127 sal_Bool m_bIsDefaultDispatcher;
128 }; // class BlankDispatcher
130 } // namespace framework
132 #endif // #ifndef __FRAMEWORK_DISPATCH_BLANKDISPATCHER_HXX_