xref: /aoo41x/main/cui/source/inc/border.hxx (revision 97e8a929)
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 
41 #include <svx/flagsdef.hxx>
42 
43 class SvxBorderTabPage : public SfxTabPage
44 {
45 	using TabPage::DeactivatePage;
46 
47 public:
48 	static SfxTabPage*	Create( Window* pParent,
49 								const SfxItemSet& rAttrSet);
50 	static sal_uInt16*		GetRanges();
51 
52 	virtual	sal_Bool		FillItemSet( SfxItemSet& rCoreAttrs );
53 	virtual	void		Reset( const SfxItemSet& );
54 
55 	void				HideShadowControls();
56 	virtual void		PageCreated (SfxAllItemSet aSet); //add CHINA001
57 protected:
58 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
59     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
60 
61 private:
62 	SvxBorderTabPage( Window* pParent, const SfxItemSet& rCoreAttrs );
63 	~SvxBorderTabPage();
64 
65 	// Controls
66 	FixedLine			aFlBorder;
67     FixedText           aDefaultFT;
68     ValueSet            aWndPresets;
69     FixedText           aUserDefFT;
70     svx::FrameSelector  aFrameSel;
71 
72     FixedLine           aFlSep1;
73 	FixedLine			aFlLine;
74     FixedText           aStyleFT;
75     LineListBox         aLbLineStyle;
76     FixedText           aColorFT;
77 	ColorListBox		aLbLineColor;
78 
79     FixedLine           aFlSep2;
80 	FixedLine			aDistanceFL;
81 	FixedText 			aLeftFT;
82 	MetricField			aLeftMF;
83 	FixedText 			aRightFT;
84 	MetricField			aRightMF;
85 	FixedText 			aTopFT;
86 	MetricField			aTopMF;
87 	FixedText 			aBottomFT;
88 	MetricField			aBottomMF;
89 	CheckBox			aSynchronizeCB;
90 
91 	FixedLine			aFlShadow;
92 	FixedText			aFtShadowPos;
93 	ValueSet			aWndShadows;
94 	FixedText			aFtShadowSize;
95 	MetricField			aEdShadowSize;
96 	FixedText			aFtShadowColor;
97 	ColorListBox		aLbShadowColor;
98 
99     //properties - "Merge with next paragraph" in Writer
100     FixedLine           aPropertiesFL;
101     CheckBox            aMergeWithNextCB;
102 	// --> collapsing table borders FME 2005-05-27 #i29550#
103 	CheckBox            aMergeAdjacentBordersCB;
104 	// <--
105 
106     ImageList           aShadowImgLstH;
107     ImageList           aShadowImgLst;
108     ImageList           aBorderImgLstH;
109     ImageList           aBorderImgLst;
110 
111 	long				nMinValue;	// minimum distance
112 	int             	nSWMode;	// table, textframe, paragraph
113 
114     bool                mbHorEnabled;       /// true = Inner horizontal border enabled.
115     bool                mbVerEnabled;       /// true = Inner vertical border enabled.
116     bool                mbTLBREnabled;      /// true = Top-left to bottom-right border enabled.
117     bool                mbBLTREnabled;      /// true = Bottom-left to top-right border enabled.
118     bool                mbUseMarginItem;
119 
120 	static sal_Bool 		bSync;
121 
122 #ifdef _SVX_BORDER_CXX
123 	// Handler
124 	DECL_LINK( SelStyleHdl_Impl, ListBox* pLb );
125 	DECL_LINK( SelColHdl_Impl, ListBox* pLb );
126 	DECL_LINK( SelPreHdl_Impl, void* );
127 	DECL_LINK( SelSdwHdl_Impl, void* );
128 	DECL_LINK( LinesChanged_Impl, void* );
129 	DECL_LINK( ModifyDistanceHdl_Impl, MetricField*);
130 	DECL_LINK( SyncHdl_Impl, CheckBox*);
131 
132     sal_uInt16              GetPresetImageId( sal_uInt16 nValueSetIdx ) const;
133     sal_uInt16              GetPresetStringId( sal_uInt16 nValueSetIdx ) const;
134 
135     void                FillPresetVS();
136     void                FillShadowVS();
137     void                FillValueSets();
138 
139 	// Filler
140 	void				FillLineListBox_Impl();
141 
142 	// Setzen von einzelnen Frame-/Core-Linien
143     void                ResetFrameLine_Impl( svx::FrameBorderType eBorder,
144                                              const SvxBorderLine* pCurLine,
145                                              bool bValid );
146 #endif
147 };
148 
149 
150 #endif
151 
152