Coverage Report

Created: 2026-03-31 11:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/svx/sidebar/LineWidthPopup.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
 * 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 <tools/mapunit.hxx>
22
#include <vcl/image.hxx>
23
#include <vcl/weld/MetricSpinButton.hxx>
24
#include <vcl/weld/customweld.hxx>
25
#include <vcl/weld/weld.hxx>
26
#include <svtools/toolbarmenu.hxx>
27
#include <array>
28
29
class ValueSet;
30
31
namespace svx::sidebar
32
{
33
class LinePropertyPanelBase;
34
class LineWidthValueSet;
35
36
class LineWidthPopup final : public WeldToolbarPopup
37
{
38
public:
39
    LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent);
40
    ~LineWidthPopup();
41
42
    void SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit);
43
44
0
    weld::Container* getTopLevel() const { return m_xTopLevel.get(); }
45
46
    virtual void GrabFocus() override;
47
48
private:
49
    LinePropertyPanelBase& m_rParent;
50
    std::array<OUString, 9> maStrUnits;
51
    OUString m_sPt;
52
    MapUnit m_eMapUnit;
53
    bool m_bVSFocus;
54
    bool m_bCustom;
55
    tools::Long m_nCustomWidth;
56
    Image m_aIMGCus;
57
    Image m_aIMGCusGray;
58
59
    std::unique_ptr<weld::MetricSpinButton> m_xMFWidth;
60
    std::unique_ptr<LineWidthValueSet> m_xVSWidth;
61
    std::unique_ptr<weld::CustomWeld> m_xVSWidthWin;
62
63
    DECL_LINK(VSSelectHdl, ValueSet*, void);
64
    DECL_LINK(MFModifyHdl, weld::MetricSpinButton&, void);
65
};
66
67
} // end of namespace svx::sidebar
68
69
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */