Coverage Report

Created: 2026-04-09 11:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/chart2/source/controller/sidebar/ChartAxisPanel.hxx
Line
Count
Source
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
11
#pragma once
12
13
#include <sfx2/sidebar/ControllerItem.hxx>
14
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
15
#include <sfx2/sidebar/SidebarModelUpdate.hxx>
16
#include <sfx2/sidebar/PanelLayout.hxx>
17
#include <vcl/weld/ComboBox.hxx>
18
#include <vcl/weld/MetricSpinButton.hxx>
19
#include "ChartSidebarModifyListener.hxx"
20
#include "ChartSidebarSelectionListener.hxx"
21
22
namespace com::sun::star::util { class XModifyListener; }
23
namespace com::sun::star::view { class XSelectionChangeListener; }
24
25
namespace chart {
26
27
class ChartController;
28
29
namespace sidebar {
30
31
class ChartAxisPanel : public PanelLayout,
32
    public ::sfx2::sidebar::IContextChangeReceiver,
33
    public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
34
    public sfx2::sidebar::SidebarModelUpdate,
35
    public ChartSidebarModifyListenerParent,
36
    public ChartSidebarSelectionListenerParent
37
{
38
public:
39
    static std::unique_ptr<PanelLayout> Create(
40
        weld::Widget* pParent,
41
        ChartController* pController);
42
43
    virtual void DataChanged(
44
        const DataChangedEvent& rEvent) override;
45
46
    virtual void HandleContextChange(
47
        const vcl::EnumContext& rContext) override;
48
49
    virtual void NotifyItemUpdate(
50
        const sal_uInt16 nSId,
51
        const SfxItemState eState,
52
        const SfxPoolItem* pState) override;
53
54
    virtual void GetControlState(
55
        const sal_uInt16 /*nSId*/,
56
0
        boost::property_tree::ptree& /*rState*/) override {};
57
58
    // constructor/destructor
59
    ChartAxisPanel(
60
        weld::Widget* pParent,
61
        ChartController* pController);
62
    virtual ~ChartAxisPanel() override;
63
64
    virtual void updateData() override;
65
    virtual void modelInvalid() override;
66
67
    virtual void selectionChanged(bool bCorrectType) override;
68
69
    virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
70
71
private:
72
    //ui controls
73
    std::unique_ptr<weld::CheckButton> mxCBShowLabel;
74
    std::unique_ptr<weld::CheckButton> mxCBReverse;
75
    std::unique_ptr<weld::ComboBox> mxLBLabelPos;
76
    std::unique_ptr<weld::Widget> mxGridLabel;
77
    std::unique_ptr<weld::MetricSpinButton> mxNFRotation;
78
79
    rtl::Reference<::chart::ChartModel> mxModel;
80
    css::uno::Reference<css::util::XModifyListener> mxModifyListener;
81
    css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
82
83
    bool mbModelValid;
84
85
    void Initialize();
86
    void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
87
88
    DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
89
    DECL_LINK(ListBoxHdl, weld::ComboBox&, void);
90
    DECL_LINK(TextRotationHdl, weld::MetricSpinButton&, void);
91
};
92
93
} } // end of namespace ::chart::sidebar
94
95
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */