| 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 |
|
| 10 |
#pragma once |
| 11 |
|
| 12 |
#include <comphelper/compbase.hxx> |
| 13 |
|
| 14 |
#include <com/sun/star/frame/XToolbarController.hpp> |
| 15 |
#include <com/sun/star/frame/XStatusListener.hpp> |
| 16 |
#include <com/sun/star/util/XUpdatable.hpp> |
| 17 |
#include <com/sun/star/lang/XInitialization.hpp> |
| 18 |
#include <com/sun/star/lang/XServiceInfo.hpp> |
| 19 |
|
| 20 |
namespace com::sun::star::frame { class XFramesSupplier; } |
| 21 |
|
| 22 |
namespace chart { |
| 23 |
|
| 24 |
typedef comphelper::WeakComponentImplHelper< |
| 25 |
css::frame::XToolbarController, css::frame::XStatusListener, |
| 26 |
css::util::XUpdatable, css::lang::XInitialization, |
| 27 |
css::lang::XServiceInfo> ChartToolbarControllerBase; |
| 28 |
|
| 29 |
class ChartToolbarController final : public ChartToolbarControllerBase |
| 30 |
{ |
| 31 |
public: |
| 32 |
ChartToolbarController(const css::uno::Sequence<css::uno::Any>& rProperties); |
| 33 |
virtual ~ChartToolbarController() override; |
| 34 |
|
| 35 |
ChartToolbarController(const ChartToolbarController&) = delete; |
| 36 |
const ChartToolbarController& operator=(const ChartToolbarController&) = delete; |
| 37 |
|
| 38 |
// XToolbarController |
| 39 |
virtual void SAL_CALL execute(sal_Int16 nKeyModifier) override; |
| 40 |
|
| 41 |
virtual void SAL_CALL click() override; |
| 42 |
|
| 43 |
virtual void SAL_CALL doubleClick() override; |
| 44 |
|
| 45 |
virtual css::uno::Reference<css::awt::XWindow> SAL_CALL createPopupWindow() override; |
| 46 |
|
| 47 |
virtual css::uno::Reference<css::awt::XWindow> SAL_CALL |
| 48 |
createItemWindow(const css::uno::Reference<css::awt::XWindow>& rParent) override; |
| 49 |
|
| 50 |
// XServiceInfo |
| 51 |
virtual OUString SAL_CALL getImplementationName() override; |
| 52 |
|
| 53 |
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override; |
| 54 |
|
| 55 |
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; |
| 56 |
|
| 57 |
// XStatusListener |
| 58 |
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override; |
| 59 |
|
| 60 |
// XEventListener |
| 61 |
virtual void SAL_CALL disposing(const css::lang::EventObject& rSource) override; |
| 62 |
|
| 63 |
// XInitialization |
| 64 |
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rAny) override; |
| 65 |
|
| 66 |
// XUpdatable |
| 67 |
virtual void SAL_CALL update() override; |
| 68 |
|
| 69 |
using comphelper::WeakComponentImplHelperBase::disposing; |
| 70 |
|
| 71 |
private: |
| 72 |
|
| 73 |
css::uno::Reference<css::frame::XFramesSupplier> mxFramesSupplier; |
| 74 |
}; |
| 75 |
|
| 76 |
} |
| 77 |
|
| 78 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |