1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <loadenv/loadenv.hxx>
24 #include <com/sun/star/frame/XNotifyingDispatch.hpp>
25 #include <com/sun/star/frame/XSynchronousDispatch.hpp>
27 #include <cppuhelper/implbase.hxx>
28 #include <cppuhelper/weakref.hxx>
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 class LoadDispatcher final
: public ::cppu::WeakImplHelper
< css::frame::XNotifyingDispatch
, // => XDispatch => XInterface
37 css::frame::XSynchronousDispatch
>
45 /** @short TODO document me */
46 css::uno::WeakReference
< css::frame::XFrame
> m_xOwnerFrame
;
48 /** @short TODO document me */
51 /** @short TODO document me */
52 sal_Int32 m_nSearchFlags
;
54 /** @short TODO document me */
61 /** @short creates a new instance and initialize it with all necessary parameters.
63 @descr Every instance of such LoadDispatcher can be used for the specified context only.
64 That means: it can be used to load any further requested content into the here(!)
65 specified target frame.
68 will be used to create own needed services on demand.
71 used as startpoint to locate the right target frame.
74 the name or the target frame for loading or a special qualifier
75 which define such target.
78 used in case sTargetFrame isn't a special one.
80 LoadDispatcher(const css::uno::Reference
< css::uno::XComponentContext
>& xContext
,
81 const css::uno::Reference
< css::frame::XFrame
>& xOwnerFrame
,
82 OUString sTargetName
,
83 sal_Int32 nSearchFlags
);
85 /** @short used to free internal resources.
87 virtual ~LoadDispatcher() override
;
94 virtual void SAL_CALL
dispatchWithNotification(const css::util::URL
& aURL
,
95 const css::uno::Sequence
< css::beans::PropertyValue
>& lArguments
,
96 const css::uno::Reference
< css::frame::XDispatchResultListener
>& xListener
) override
;
99 virtual void SAL_CALL
dispatch(const css::util::URL
& aURL
,
100 const css::uno::Sequence
< css::beans::PropertyValue
>& lArguments
) override
;
102 virtual void SAL_CALL
addStatusListener(const css::uno::Reference
< css::frame::XStatusListener
>& xListener
,
103 const css::util::URL
& aURL
) override
;
105 virtual void SAL_CALL
removeStatusListener(const css::uno::Reference
< css::frame::XStatusListener
>& xListener
,
106 const css::util::URL
& aURL
) override
;
108 // XSynchronousDispatch
109 virtual css::uno::Any SAL_CALL
dispatchWithReturnValue( const css::util::URL
& aURL
,
110 const css::uno::Sequence
< css::beans::PropertyValue
>& lArguments
) override
;
113 css::uno::Any
impl_dispatch( const css::util::URL
& rURL
,
114 const css::uno::Sequence
< css::beans::PropertyValue
>& lArguments
,
115 const css::uno::Reference
< css::frame::XDispatchResultListener
>& xListener
);
116 }; // class LoadDispatcher
118 } // namespace framework
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */