fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / source / inc / dispatch / loaddispatcher.hxx
blob9be0adabc30df9a3aa2b4c016302157899bab6ab
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_FRAMEWORK_SOURCE_INC_DISPATCH_LOADDISPATCHER_HXX
21 #define INCLUDED_FRAMEWORK_SOURCE_INC_DISPATCH_LOADDISPATCHER_HXX
23 #include <loadenv/loadenv.hxx>
25 #include <com/sun/star/frame/XNotifyingDispatch.hpp>
26 #include <com/sun/star/frame/XSynchronousDispatch.hpp>
28 #include <cppuhelper/implbase2.hxx>
30 namespace framework{
32 /** @short implements a dispatch object which can be used to load
33 non-visible components (by using the mechanism of ContentHandler)
34 or visible-components (by using the mechanism of FrameLoader).
36 @author as96863
38 class LoadDispatcher : public ::cppu::WeakImplHelper2< css::frame::XNotifyingDispatch, // => XDispatch => XInterface
39 css::frame::XSynchronousDispatch >
42 // member
44 private:
45 osl::Mutex m_mutex;
47 /** @short can be used to create own needed services on demand. */
48 css::uno::Reference< css::uno::XComponentContext > m_xContext;
50 /** @short TODO document me */
51 css::uno::WeakReference< css::frame::XFrame > m_xOwnerFrame;
53 /** @short TODO document me */
54 OUString m_sTarget;
56 /** @short TODO document me */
57 sal_Int32 m_nSearchFlags;
59 /** @short TODO document me */
60 LoadEnv m_aLoader;
62 // native interface
64 public:
66 /** @short creates a new instance and initialize it with all necessary parameters.
68 @descr Every instance of such LoadDispatcher can be used for the specified context only.
69 That means: It can be used to load any further requested content into tzhe here(!)
70 specified target frame.
72 @param xContext
73 will be used to create own needed services on demand.
75 @param xOwnerFrame
76 used as startpoit to locate the right target frame.
78 @param sTargetName
79 the name or the target frame for loading or a special qualifier
80 which define such target.
82 @param nSearchFlags
83 used in case sTargetFrame isn't a special one.
85 LoadDispatcher(const css::uno::Reference< css::uno::XComponentContext >& xContext,
86 const css::uno::Reference< css::frame::XFrame >& xOwnerFrame ,
87 const OUString& sTargetName ,
88 sal_Int32 nSearchFlags);
90 /** @short used to free internal resources.
92 virtual ~LoadDispatcher();
94 // uno interface
96 public:
98 // XNotifyingDispatch
99 virtual void SAL_CALL dispatchWithNotification(const css::util::URL& aURL ,
100 const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
101 const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
102 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 // XDispatch
105 virtual void SAL_CALL dispatch(const css::util::URL& aURL ,
106 const css::uno::Sequence< css::beans::PropertyValue >& lArguments)
107 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
109 virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener >& xListener,
110 const css::util::URL& aURL )
111 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
113 virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener >& xListener,
114 const css::util::URL& aURL )
115 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
117 // XSynchronousDispatch
118 virtual css::uno::Any SAL_CALL dispatchWithReturnValue( const css::util::URL& aURL ,
119 const css::uno::Sequence< css::beans::PropertyValue >& lArguments )
120 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
122 private:
123 css::uno::Any impl_dispatch( const css::util::URL& rURL,
124 const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
125 const css::uno::Reference< css::frame::XDispatchResultListener >& xListener );
126 }; // class LoadDispatcher
128 } // namespace framework
130 #endif // INCLUDED_FRAMEWORK_SOURCE_INC_DISPATCH_LOADDISPATCHER_HXX
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */