1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: selfdispatcher.hxx,v $
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 //_________________________________________________________________________________________________________________
36 //_________________________________________________________________________________________________________________
38 #include <dispatch/basedispatcher.hxx>
40 //_________________________________________________________________________________________________________________
42 //_________________________________________________________________________________________________________________
44 //_________________________________________________________________________________________________________________
46 //_________________________________________________________________________________________________________________
48 //_________________________________________________________________________________________________________________
50 //_________________________________________________________________________________________________________________
54 //_________________________________________________________________________________________________________________
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
78 @devstatus ready to use
80 *//*-*************************************************************************************************************/
81 class SelfDispatcher
: // -interfaces ... are supported by our BaseDispatcher!
82 // -baseclasses ... order is neccessary for right initialization!
85 //-------------------------------------------------------------------------------------------------------------
87 //-------------------------------------------------------------------------------------------------------------
90 SelfDispatcher ( const css::uno::Reference
< css::lang::XMultiServiceFactory
>& xFactory
,
91 const css::uno::Reference
< css::frame::XFrame
>& xTarget
);
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 //-------------------------------------------------------------------------------------------------------------
98 //-------------------------------------------------------------------------------------------------------------
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
,
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
,
109 const css::uno::Any
& aAsyncInfo
);
111 }; // class SelfDispatcher
113 } // namespace framework
115 #endif // #ifndef __FRAMEWORK_DISPATCH_SELFDISPATCHER_HXX_