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_LEGENPOSITION_HXX
28 #define _CHART2_RES_LEGENPOSITION_HXX
29 
30 // header for class CheckBox
31 #ifndef _SV_BUTTON_HXX
32 #include <vcl/button.hxx>
33 #endif
34 #include <vcl/fixed.hxx>
35 // header for class SfxItemSet
36 #include <svl/itemset.hxx>
37 #include <com/sun/star/frame/XModel.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 
40 //.............................................................................
41 namespace chart
42 {
43 //.............................................................................
44 
45 class LegendPositionResources
46 {
47 
48 public:
49     //constructor without Display checkbox
50     LegendPositionResources( Window* pParent );
51     //constructor inclusive Display checkbox
52 	LegendPositionResources( Window* pParent, const ::com::sun::star::uno::Reference<
53                        ::com::sun::star::uno::XComponentContext>& xCC );
54 	virtual ~LegendPositionResources();
55 
56     void writeToResources( const ::com::sun::star::uno::Reference<
57                        ::com::sun::star::frame::XModel >& xChartModel );
58     void writeToModel( const ::com::sun::star::uno::Reference<
59                        ::com::sun::star::frame::XModel >& xChartModel ) const;
60 
61 
62     void initFromItemSet( const SfxItemSet& rInAttrs );
63     void writeToItemSet( SfxItemSet& rOutAttrs ) const;
64 
65     void SetChangeHdl( const Link& rLink );
66 
67     DECL_LINK( PositionEnableHdl, void* );
68     DECL_LINK( PositionChangeHdl, RadioButton* );
69 
70     void SetAccessibleRelationMemberOf(Window* pMemberOf); //IAccessibility2 Implementation 2009-----
71 
72 private:
73     void impl_setRadioButtonToggleHdl();
74 
75 private:
76     ::com::sun::star::uno::Reference<
77                        ::com::sun::star::uno::XComponentContext>    m_xCC;
78 
79 	CheckBox        m_aCbxShow;
80 
81 	RadioButton		m_aRbtLeft;
82 	RadioButton		m_aRbtRight;
83 	RadioButton		m_aRbtTop;
84 	RadioButton		m_aRbtBottom;
85 
86     Link            m_aChangeLink;
87 };
88 
89 //.............................................................................
90 } //namespace chart
91 //.............................................................................
92 
93 #endif
94