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