LibreOffice Module framework (master) 1
loaddispatcher.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <loadenv/loadenv.hxx>
23
24#include <com/sun/star/frame/XNotifyingDispatch.hpp>
25#include <com/sun/star/frame/XSynchronousDispatch.hpp>
26
29
30namespace framework{
31
36class LoadDispatcher final : public ::cppu::WeakImplHelper< css::frame::XNotifyingDispatch, // => XDispatch => XInterface
37 css::frame::XSynchronousDispatch >
38{
39
40 // member
41
42 private:
43 osl::Mutex m_mutex;
44
46 css::uno::WeakReference< css::frame::XFrame > m_xOwnerFrame;
47
49 OUString m_sTarget;
50
52 sal_Int32 m_nSearchFlags;
53
56
57 // native interface
58
59 public:
60
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);
84
87 virtual ~LoadDispatcher() override;
88
89 // uno interface
90
91 public:
92
93 // XNotifyingDispatch
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;
97
98 // XDispatch
99 virtual void SAL_CALL dispatch(const css::util::URL& aURL ,
100 const css::uno::Sequence< css::beans::PropertyValue >& lArguments) override;
101
102 virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener >& xListener,
103 const css::util::URL& aURL ) override;
104
105 virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener >& xListener,
106 const css::util::URL& aURL ) override;
107
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;
111
112 private:
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
117
118} // namespace framework
119
120/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
implements a dispatch object which can be used to load non-visible components (by using the mechanism...
virtual ~LoadDispatcher() override
used to free internal resources.
css::uno::WeakReference< css::frame::XFrame > m_xOwnerFrame
TODO document me.
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
css::uno::Any impl_dispatch(const css::util::URL &rURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Reference< css::frame::XDispatchResultListener > &xListener)
virtual css::uno::Any SAL_CALL dispatchWithReturnValue(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
LoadEnv m_aLoader
TODO document me.
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
LoadDispatcher(const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XFrame > &xOwnerFrame, OUString sTargetName, sal_Int32 nSearchFlags)
creates a new instance and initialize it with all necessary parameters.
sal_Int32 m_nSearchFlags
TODO document me.
OUString m_sTarget
TODO document me.
virtual void SAL_CALL dispatchWithNotification(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Reference< css::frame::XDispatchResultListener > &xListener) override
implements general mechanism for loading documents.
Definition: loadenv.hxx:68