LibreOffice Module framework (master) 1
startmoduledispatcher.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 <com/sun/star/frame/XStatusListener.hpp>
23#include <com/sun/star/frame/XNotifyingDispatch.hpp>
24#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
25#include <com/sun/star/util/URL.hpp>
26#include <com/sun/star/frame/XDispatchResultListener.hpp>
27#include <com/sun/star/uno/XComponentContext.hpp>
28
30
31namespace framework{
32
36class StartModuleDispatcher final : public ::cppu::WeakImplHelper<
37 css::frame::XNotifyingDispatch, // => XDispatch
38 css::frame::XDispatchInformationProvider >
39{
40
41 // member
42
43 private:
44
48 css::uno::Reference< css::uno::XComponentContext > m_xContext;
49
50 // native interface
51
52 public:
53
65 StartModuleDispatcher(css::uno::Reference< css::uno::XComponentContext > xContext);
66
68 virtual ~StartModuleDispatcher() override;
69
70 // uno interface
71
72 public:
73
74 // XNotifyingDispatch
75 virtual void SAL_CALL dispatchWithNotification( const css::util::URL& aURL ,
76 const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
77 const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) override;
78
79 // XDispatch
80 virtual void SAL_CALL dispatch ( const css::util::URL& aURL ,
81 const css::uno::Sequence< css::beans::PropertyValue >& lArguments) override;
82 virtual void SAL_CALL addStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xListener ,
83 const css::util::URL& aURL ) override;
84 virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener ,
85 const css::util::URL& aURL ) override;
86
87 // XDispatchInformationProvider
88 virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups ( ) override;
89 virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( sal_Int16 nCommandGroup ) override;
90
91 // internal helper
92
93 private:
94
98
102
118 void implts_notifyResultListener(const css::uno::Reference< css::frame::XDispatchResultListener >& xListener,
119 sal_Int16 nState ,
120 const css::uno::Any& aResult );
121
122}; // class StartModuleDispatcher
123
124} // namespace framework
125
126/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
helper to handle all URLs related to the StartModule
StartModuleDispatcher(css::uno::Reference< css::uno::XComponentContext > xContext)
connect a new StartModuleDispatcher instance to its "owner frame".
virtual ~StartModuleDispatcher() override
does nothing real.
bool implts_isBackingModePossible()
check if StartModule can be shown.
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation(sal_Int16 nCommandGroup) override
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups() override
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to a uno service manager, which can be used to create own needed uno resources.
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
void implts_establishBackingMode()
open the special BackingComponent (now StartModule)
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
void implts_notifyResultListener(const css::uno::Reference< css::frame::XDispatchResultListener > &xListener, sal_Int16 nState, const css::uno::Any &aResult)
notify a DispatchResultListener.