xref: /aoo41x/main/cui/source/inc/border.hxx (revision c4eee24d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX_BORDER_HXX
24 #define _SVX_BORDER_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 
29 #include <svtools/ctrlbox.hxx>
30 #include <vcl/group.hxx>
31 #include <vcl/field.hxx>
32 #include <vcl/fixed.hxx>
33 #include <svtools/valueset.hxx>
34 #include <sfx2/tabdlg.hxx>
35 #include <svx/frmsel.hxx>
36 
37 // forward ---------------------------------------------------------------
38 
39 class SvxBorderLine;
40 class XColorTable;
41 
42 #include <svx/flagsdef.hxx>
43 
44 class SvxBorderTabPage : public SfxTabPage
45 {
46 	using TabPage::DeactivatePage;
47 
48 public:
49 	static SfxTabPage*	Create( Window* pParent,
50 								const SfxItemSet& rAttrSet);
51 	static sal_uInt16*		GetRanges();
52 
53 	virtual	sal_Bool		FillItemSet( SfxItemSet& rCoreAttrs );
54 	virtual	void		Reset( const SfxItemSet& );
55 
56 	void				HideShadowControls();
57 	virtual void		PageCreated (SfxAllItemSet aSet); //add CHINA001
58 protected:
59 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
60     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
61 
62 private:
63 	SvxBorderTabPage( Window* pParent, const SfxItemSet& rCoreAttrs );
64 	~SvxBorderTabPage();
65 
66 	// Controls
67 	FixedLine			aFlBorder;
68     FixedText           aDefaultFT;
69     ValueSet            aWndPresets;
70     FixedText           aUserDefFT;
71     svx::FrameSelector  aFrameSel;
72 
73     FixedLine           aFlSep1;
74 	FixedLine			aFlLine;
75     FixedText           aStyleFT;
76     LineListBox         aLbLineStyle;
77     FixedText           aColorFT;
78 	ColorListBox		aLbLineColor;
79 
80     FixedLine           aFlSep2;
81 	FixedLine			aDistanceFL;
82 	FixedText 			aLeftFT;
83 	MetricField			aLeftMF;
84 	FixedText 			aRightFT;
85 	MetricField			aRightMF;
86 	FixedText 			aTopFT;
87 	MetricField			aTopMF;
88 	FixedText 			aBottomFT;
89 	MetricField			aBottomMF;
90 	CheckBox			aSynchronizeCB;
91 
92 	FixedLine			aFlShadow;
93 	FixedText			aFtShadowPos;
94 	ValueSet			aWndShadows;
95 	FixedText			aFtShadowSize;
96 	MetricField			aEdShadowSize;
97 	FixedText			aFtShadowColor;
98 	ColorListBox		aLbShadowColor;
99 
100     //properties - "Merge with next paragraph" in Writer
101     FixedLine           aPropertiesFL;
102     CheckBox            aMergeWithNextCB;
103 	// --> collapsing table borders FME 2005-05-27 #i29550#
104 	CheckBox            aMergeAdjacentBordersCB;
105 	// <--
106 
107     ImageList           aShadowImgLstH;
108     ImageList           aShadowImgLst;
109     ImageList           aBorderImgLstH;
110     ImageList           aBorderImgLst;
111 
112 	long				nMinValue;	// minimum distance
113 	int             	nSWMode;	// table, textframe, paragraph
114 
115     bool                mbHorEnabled;       /// true = Inner horizontal border enabled.
116     bool                mbVerEnabled;       /// true = Inner vertical border enabled.
117     bool                mbTLBREnabled;      /// true = Top-left to bottom-right border enabled.
118     bool                mbBLTREnabled;      /// true = Bottom-left to top-right border enabled.
119     bool                mbUseMarginItem;
120 
121 	static sal_Bool 		bSync;
122 
123 #ifdef _SVX_BORDER_CXX
124 	// Handler
125 	DECL_LINK( SelStyleHdl_Impl, ListBox* pLb );
126 	DECL_LINK( SelColHdl_Impl, ListBox* pLb );
127 	DECL_LINK( SelPreHdl_Impl, void* );
128 	DECL_LINK( SelSdwHdl_Impl, void* );
129 	DECL_LINK( LinesChanged_Impl, void* );
130 	DECL_LINK( ModifyDistanceHdl_Impl, MetricField*);
131 	DECL_LINK( SyncHdl_Impl, CheckBox*);
132 
133     sal_uInt16              GetPresetImageId( sal_uInt16 nValueSetIdx ) const;
134     sal_uInt16              GetPresetStringId( sal_uInt16 nValueSetIdx ) const;
135 
136     void                FillPresetVS();
137     void                FillShadowVS();
138     void                FillValueSets();
139 
140 	// Filler
141 	void				FillLineListBox_Impl();
142 
143 	// Setzen von einzelnen Frame-/Core-Linien
144     void                ResetFrameLine_Impl( svx::FrameBorderType eBorder,
145                                              const SvxBorderLine* pCurLine,
146                                              bool bValid );
147 #endif
148 };
149 
150 
151 #endif
152 
153