Update ooo320-m1
[ooovba.git] / framework / inc / dispatch / selfdispatcher.hxx
blob6310c08ee7191a50f786c4572c68520b01998a56
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: selfdispatcher.hxx,v $
10 * $Revision: 1.8 $
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_SELFDISPATCHER_HXX_
32 #define __FRAMEWORK_DISPATCH_SELFDISPATCHER_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 to dispatch into an existing owner frame
64 @descr You should use it as dispatcher for "_self", flag::SELF ... cases, to load a document into an
65 owner frame without creation of a new one.
66 Use this class as member only! Never use it as baseclass.
67 XInterface will be ambigous and we hold a weakreference to ouer OWNER - not to ouer SUPERCLASS!
69 @implements XInterface
70 XDispatch
71 XStatusListener
72 XLoadEventListener
73 XEventListener
75 @base BaseDispatcher
76 OWeakObject
78 @devstatus ready to use
79 @threadsafe yes
80 *//*-*************************************************************************************************************/
81 class SelfDispatcher : // -interfaces ... are supported by our BaseDispatcher!
82 // -baseclasses ... order is neccessary for right initialization!
83 public BaseDispatcher
85 //-------------------------------------------------------------------------------------------------------------
86 // public methods
87 //-------------------------------------------------------------------------------------------------------------
88 public:
89 // ctor
90 SelfDispatcher ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
91 const css::uno::Reference< css::frame::XFrame >& xTarget );
92 // XDispatch
93 virtual void SAL_CALL dispatch ( const css::util::URL& aURL ,
94 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException );
96 //-------------------------------------------------------------------------------------------------------------
97 // protected methods
98 //-------------------------------------------------------------------------------------------------------------
99 protected:
100 virtual void SAL_CALL reactForLoadingState ( const css::util::URL& aURL ,
101 const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ,
102 const css::uno::Reference< css::frame::XFrame >& xTarget ,
103 sal_Bool bState ,
104 const css::uno::Any& aAsyncInfo );
106 virtual void SAL_CALL reactForHandlingState( const css::util::URL& aURL ,
107 const css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ,
108 sal_Bool bState ,
109 const css::uno::Any& aAsyncInfo );
111 }; // class SelfDispatcher
113 } // namespace framework
115 #endif // #ifndef __FRAMEWORK_DISPATCH_SELFDISPATCHER_HXX_