1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_DATALABEL_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_DATALABEL_HXX
22 #include <svl/itemset.hxx>
23 #include <svx/dialcontrol.hxx>
27 class SvNumberFormatter
;
28 namespace chart
{ class TextDirectionListBox
; }
33 class DataLabelResources final
36 DataLabelResources(weld::Builder
* pBuilder
, weld::Window
* pParent
, const SfxItemSet
& rInAttrs
);
37 ~DataLabelResources();
39 void FillItemSet(SfxItemSet
* rOutAttrs
) const;
40 void Reset(const SfxItemSet
& rInAttrs
);
42 void SetNumberFormatter( SvNumberFormatter
* pFormatter
);
45 std::map
< sal_Int32
, sal_uInt16
> m_aPlacementToListBoxMap
;
46 std::map
< sal_uInt16
, sal_Int32
> m_aListBoxToPlacementMap
;
48 SvNumberFormatter
* m_pNumberFormatter
;
49 bool m_bNumberFormatMixedState
;
50 bool m_bPercentFormatMixedState
;
51 sal_uLong m_nNumberFormatForValue
;
52 sal_uLong m_nNumberFormatForPercent
;
54 bool m_bSourceFormatMixedState
;
55 bool m_bPercentSourceMixedState
;
56 bool m_bSourceFormatForValue
;
57 bool m_bSourceFormatForPercent
;
59 weld::Window
* m_pWindow
;
62 svx::SvxDialControl m_aDC_Dial
;
64 std::unique_ptr
<weld::CheckButton
> m_xCBNumber
;
65 std::unique_ptr
<weld::Button
> m_xPB_NumberFormatForValue
;
66 std::unique_ptr
<weld::CheckButton
> m_xCBPercent
;
67 std::unique_ptr
<weld::Button
> m_xPB_NumberFormatForPercent
;
68 std::unique_ptr
<weld::Label
> m_xFT_NumberFormatForPercent
;
69 std::unique_ptr
<weld::CheckButton
> m_xCBCategory
;
70 std::unique_ptr
<weld::CheckButton
> m_xCBSymbol
;
71 std::unique_ptr
<weld::CheckButton
> m_xCBWrapText
;
73 std::unique_ptr
<weld::Widget
> m_xSeparatorResources
;
74 std::unique_ptr
<weld::ComboBox
> m_xLB_Separator
;
76 std::unique_ptr
<weld::Widget
> m_xBxLabelPlacement
;
77 std::unique_ptr
<weld::ComboBox
> m_xLB_LabelPlacement
;
79 std::unique_ptr
<weld::Widget
> m_xBxOrientation
;
80 std::unique_ptr
<weld::Label
> m_xFT_Dial
;
81 std::unique_ptr
<weld::SpinButton
> m_xNF_Degrees
;
83 std::unique_ptr
<weld::Widget
> m_xBxTextDirection
;
85 std::unique_ptr
<TextDirectionListBox
> m_xLB_TextDirection
;
86 std::unique_ptr
<weld::CustomWeld
> m_xDC_Dial
;
88 DECL_LINK(NumberFormatDialogHdl
, weld::Button
&, void );
89 DECL_LINK(CheckHdl
, weld::ToggleButton
&, void );
90 void EnableControls();
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */