Debian Codegraph @

chart2/source/controller/dialogs/res_DataLabel.hxx

raw
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 <svl/itemset.hxx>
22 #include <svx/dialcontrol.hxx>
23 #include <TextDirectionListBox.hxx>
24
25 #include <map>
26
27 class SvNumberFormatter;
28
29 namespace chart
30 {
31
32 class DataLabelResources final
33 {
34 public:
35 DataLabelResources(weld::Builder* pBuilder, weld::Window* pParent, const SfxItemSet& rInAttrs);
36 ~DataLabelResources();
37
38 void FillItemSet(SfxItemSet* rOutAttrs) const;
39 void Reset(const SfxItemSet& rInAttrs);
40
41 void SetNumberFormatter( SvNumberFormatter* pFormatter );
42
43 private:
44 std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap;
45 std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap;
46
47 SvNumberFormatter* m_pNumberFormatter;
48 bool m_bNumberFormatMixedState;
49 bool m_bPercentFormatMixedState;
50 sal_uInt32 m_nNumberFormatForValue;
51 sal_uInt32 m_nNumberFormatForPercent;
52
53 bool m_bSourceFormatMixedState;
54 bool m_bPercentSourceMixedState;
55 bool m_bSourceFormatForValue;
56 bool m_bSourceFormatForPercent;
57
58 weld::Window* m_pWindow;
59 SfxItemPool* m_pPool;
60
61 weld::TriStateEnabled m_aNumberState;
62 weld::TriStateEnabled m_aPercentState;
63 weld::TriStateEnabled m_aCategoryState;
64 weld::TriStateEnabled m_aSymbolState;
65 weld::TriStateEnabled m_aDataSeriesState;
66 weld::TriStateEnabled m_aWrapTextState;
67 weld::TriStateEnabled m_aCustomLeaderLinesState;
68
69 std::unique_ptr<weld::CheckButton> m_xCBNumber;
70 std::unique_ptr<weld::Button> m_xPB_NumberFormatForValue;
71 std::unique_ptr<weld::CheckButton> m_xCBPercent;
72 std::unique_ptr<weld::Button> m_xPB_NumberFormatForPercent;
73 std::unique_ptr<weld::Label> m_xFT_NumberFormatForPercent;
74 std::unique_ptr<weld::CheckButton> m_xCBCategory;
75 std::unique_ptr<weld::CheckButton> m_xCBSymbol;
76 std::unique_ptr<weld::CheckButton> m_xCBDataSeries;
77 std::unique_ptr<weld::CheckButton> m_xCBWrapText;
78
79 std::unique_ptr<weld::ComboBox> m_xLB_Separator;
80 std::unique_ptr<weld::ComboBox> m_xLB_LabelPlacement;
81
82 std::unique_ptr<weld::Widget> m_xBxOrientation;
83 std::unique_ptr<weld::Label> m_xFT_Dial;
84 std::unique_ptr<weld::MetricSpinButton> m_xNF_Degrees;
85
86 std::unique_ptr<weld::Widget> m_xBxTextDirection;
87
88 TextDirectionListBox m_aLB_TextDirection;
89 std::unique_ptr<svx::DialControl> m_xDC_Dial;
90 std::unique_ptr<weld::CustomWeld> m_xDC_DialWin;
91
92 std::unique_ptr<weld::CheckButton> m_xCBCustomLeaderLines;
93
94 DECL_LINK(NumberFormatDialogHdl, weld::Button&, void );
95 DECL_LINK(CheckHdl, weld::Toggleable&, void );
96 void EnableControls();
97 };
98
99 } //namespace chart
100
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */