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