Coverage Report

Created: 2026-08-14 10:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/chart2/source/view/main/VButton.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
#pragma once
11
12
#include <tools/color.hxx>
13
#include <com/sun/star/awt/Point.hpp>
14
#include <com/sun/star/awt/Size.hpp>
15
#include <com/sun/star/uno/Reference.hxx>
16
#include <rtl/ref.hxx>
17
#include <svx/unoshape.hxx>
18
19
namespace com::sun::star::beans { class XPropertySet; }
20
21
namespace chart
22
{
23
24
class VButton final
25
{
26
private:
27
    rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
28
    rtl::Reference<SvxShapeGroup> m_xShape;
29
    OUString m_sLabel;
30
    OUString m_sCID;
31
    css::awt::Point m_aPosition;
32
    css::awt::Size m_aSize;
33
    bool m_bShowArrow;
34
    Color m_nArrowColor;
35
    Color m_nBGColor;
36
37
    rtl::Reference<SvxShapePolyPolygon>
38
        createTriangle(css::awt::Size aSize);
39
40
public:
41
    VButton();
42
43
    void init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage);
44
45
    void createShapes(const css::uno::Reference<css::beans::XPropertySet>& xTextProp);
46
47
    void showArrow(bool bShowArrow)
48
0
    {
49
0
        m_bShowArrow = bShowArrow;
50
0
    }
51
    void setArrowColor(Color nArrowColor)
52
0
    {
53
0
        m_nArrowColor = nArrowColor;
54
0
    }
55
    void setBGColor(Color nBGColor)
56
0
    {
57
0
        m_nBGColor = nBGColor;
58
0
    }
59
    void setLabel(OUString const & rLabel)
60
0
    {
61
0
        m_sLabel = rLabel;
62
0
    }
63
    void setCID(OUString const & rCID)
64
0
    {
65
0
        m_sCID = rCID;
66
0
    }
67
    void setPosition(css::awt::Point const & rPosition)
68
0
    {
69
0
        m_aPosition = rPosition;
70
0
    }
71
    css::awt::Size const & getSize() const
72
0
    {
73
0
        return m_aSize;
74
0
    }
75
    void setSize(css::awt::Size const & rSize)
76
0
    {
77
0
        m_aSize = rSize;
78
0
    }
79
};
80
81
} //namespace chart
82
83
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */