1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef CHART2_RES_DATALABEL_HXX
28 #define CHART2_RES_DATALABEL_HXX
29 
30 #include "res_TextSeparator.hxx"
31 // header for class CheckBox
32 #include <vcl/button.hxx>
33 // header for class SfxItemSet
34 #include <svl/itemset.hxx>
35 #include "TextDirectionListBox.hxx"
36 
37 #include <svx/dialcontrol.hxx>
38 
39 class SvNumberFormatter;
40 
41 //.............................................................................
42 namespace chart
43 {
44 //.............................................................................
45 
46 class DataLabelResources
47 {
48 public:
49     DataLabelResources( Window* pParent, const SfxItemSet& rInAttrs );
50     virtual ~DataLabelResources();
51 
52     sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const;
53     void Reset(const SfxItemSet& rInAttrs);
54 
55     void SetNumberFormatter( SvNumberFormatter* pFormatter );
56 
57 private:
58     CheckBox            m_aCBNumber;
59     PushButton          m_aPB_NumberFormatForValue;
60     CheckBox            m_aCBPercent;
61     PushButton          m_aPB_NumberFormatForPercent;
62     CheckBox            m_aCBCategory;
63     CheckBox            m_aCBSymbol;
64 
65     TextSeparatorResources  m_aSeparatorResources;
66 
67     FixedText           m_aFT_LabelPlacement;
68     ListBox             m_aLB_LabelPlacement;
69 
70     FixedLine           m_aFL_Rotate;
71     svx::DialControl    m_aDC_Dial;
72     FixedText           m_aFT_Degrees;
73     NumericField        m_aNF_Degrees;
74 
75     FixedText               m_aFT_TextDirection;
76     TextDirectionListBox    m_aLB_TextDirection;
77 
78     ::std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap;
79     ::std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap;
80 
81     SvNumberFormatter*  m_pNumberFormatter;
82     bool                m_bNumberFormatMixedState;
83     bool                m_bPercentFormatMixedState;
84     sal_uLong               m_nNumberFormatForValue;
85     sal_uLong               m_nNumberFormatForPercent;
86 
87     bool                m_bSourceFormatMixedState;
88     bool                m_bPercentSourceMixedState;
89     bool                m_bSourceFormatForValue;
90     bool                m_bSourceFormatForPercent;
91 
92     Window*             m_pWindow;
93     SfxItemPool*        m_pPool;
94 
95     DECL_LINK(NumberFormatDialogHdl, PushButton * );
96     DECL_LINK(CheckHdl, CheckBox* );
97     void EnableControls();
98 };
99 
100 //.............................................................................
101 } //namespace chart
102 //.............................................................................
103 
104 #endif
105