LibreOffice Module chart2 (master) 1
StatusBarCommandDispatch.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#pragma once
20
21#include "CommandDispatch.hxx"
22#include <ObjectIdentifier.hxx>
24#include <com/sun/star/view/XSelectionChangeListener.hpp>
25#include <rtl/ref.hxx>
26
27namespace com::sun::star::frame { class XModel; }
28namespace com::sun::star::util { class XModifiable; }
29namespace com::sun::star::view { class XSelectionSupplier; }
30
31namespace chart
32{
33
39namespace impl
40{
41typedef ::cppu::ImplInheritanceHelper<
42 CommandDispatch,
43 css::view::XSelectionChangeListener >
45}
46
48{
49public:
51 const css::uno::Reference< css::uno::XComponentContext > & xContext,
53 const css::uno::Reference< css::view::XSelectionSupplier > & xSelSupp );
54 virtual ~StatusBarCommandDispatch() override;
55
56 // late initialisation, especially for adding as listener
57 virtual void initialize() override;
58
59protected:
60 // ____ XDispatch ____
61 virtual void SAL_CALL dispatch(
62 const css::util::URL& URL,
63 const css::uno::Sequence< css::beans::PropertyValue >& Arguments ) override;
64
65 // ____ WeakComponentImplHelperBase ____
67 virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
68
69 // ____ XModifyListener (override from CommandDispatch) ____
70 virtual void SAL_CALL modified(
71 const css::lang::EventObject& aEvent ) override;
72
73 // ____ XEventListener (base of XModifyListener) ____
74 virtual void SAL_CALL disposing(
75 const css::lang::EventObject& Source ) override;
76
77 virtual void fireStatusEvent(
78 const OUString & rURL,
79 const css::uno::Reference< css::frame::XStatusListener > & xSingleListener ) override;
80
81 // ____ XSelectionChangeListener ____
82 virtual void SAL_CALL selectionChanged(
83 const css::lang::EventObject& aEvent ) override;
84
85private:
87 css::uno::Reference< css::view::XSelectionSupplier > m_xSelectionSupplier;
90};
91
92} // namespace chart
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AnyEventRef aEvent
virtual void SAL_CALL selectionChanged(const css::lang::EventObject &aEvent) override
virtual void fireStatusEvent(const OUString &rURL, const css::uno::Reference< css::frame::XStatusListener > &xSingleListener) override
css::uno::Reference< css::view::XSelectionSupplier > m_xSelectionSupplier
StatusBarCommandDispatch(const css::uno::Reference< css::uno::XComponentContext > &xContext, rtl::Reference<::chart::ChartModel > xModel, const css::uno::Reference< css::view::XSelectionSupplier > &xSelSupp)
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL dispatch(const css::util::URL &URL, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
rtl::Reference<::chart::ChartModel > m_xChartModel
virtual void disposing(std::unique_lock< std::mutex > &rGuard) override
is called when this is disposed
::cppu::ImplInheritanceHelper< CommandDispatch, css::view::XSelectionChangeListener > StatusBarCommandDispatch_Base
Reference< XModel > xModel