xref: /aoo41x/main/cui/source/inc/border.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _SVX_BORDER_HXX
28*cdf0e10cSrcweir #define _SVX_BORDER_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir // include ---------------------------------------------------------------
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir #include <svtools/ctrlbox.hxx>
34*cdf0e10cSrcweir #include <vcl/group.hxx>
35*cdf0e10cSrcweir #include <vcl/field.hxx>
36*cdf0e10cSrcweir #include <vcl/fixed.hxx>
37*cdf0e10cSrcweir #include <svtools/valueset.hxx>
38*cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
39*cdf0e10cSrcweir #include <svx/frmsel.hxx>
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir // forward ---------------------------------------------------------------
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir class SvxBorderLine;
44*cdf0e10cSrcweir class XColorTable;
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir #include <svx/flagsdef.hxx>
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir class SvxBorderTabPage : public SfxTabPage
49*cdf0e10cSrcweir {
50*cdf0e10cSrcweir 	using TabPage::DeactivatePage;
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir public:
53*cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
54*cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
55*cdf0e10cSrcweir 	static sal_uInt16*		GetRanges();
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir 	virtual	sal_Bool		FillItemSet( SfxItemSet& rCoreAttrs );
58*cdf0e10cSrcweir 	virtual	void		Reset( const SfxItemSet& );
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir 	void				HideShadowControls();
61*cdf0e10cSrcweir 	virtual void		PageCreated (SfxAllItemSet aSet); //add CHINA001
62*cdf0e10cSrcweir protected:
63*cdf0e10cSrcweir 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
64*cdf0e10cSrcweir     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir private:
67*cdf0e10cSrcweir 	SvxBorderTabPage( Window* pParent, const SfxItemSet& rCoreAttrs );
68*cdf0e10cSrcweir 	~SvxBorderTabPage();
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir 	// Controls
71*cdf0e10cSrcweir 	FixedLine			aFlBorder;
72*cdf0e10cSrcweir     FixedText           aDefaultFT;
73*cdf0e10cSrcweir     ValueSet            aWndPresets;
74*cdf0e10cSrcweir     FixedText           aUserDefFT;
75*cdf0e10cSrcweir     svx::FrameSelector  aFrameSel;
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir     FixedLine           aFlSep1;
78*cdf0e10cSrcweir 	FixedLine			aFlLine;
79*cdf0e10cSrcweir     FixedText           aStyleFT;
80*cdf0e10cSrcweir     LineListBox         aLbLineStyle;
81*cdf0e10cSrcweir     FixedText           aColorFT;
82*cdf0e10cSrcweir 	ColorListBox		aLbLineColor;
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir     FixedLine           aFlSep2;
85*cdf0e10cSrcweir 	FixedLine			aDistanceFL;
86*cdf0e10cSrcweir 	FixedText 			aLeftFT;
87*cdf0e10cSrcweir 	MetricField			aLeftMF;
88*cdf0e10cSrcweir 	FixedText 			aRightFT;
89*cdf0e10cSrcweir 	MetricField			aRightMF;
90*cdf0e10cSrcweir 	FixedText 			aTopFT;
91*cdf0e10cSrcweir 	MetricField			aTopMF;
92*cdf0e10cSrcweir 	FixedText 			aBottomFT;
93*cdf0e10cSrcweir 	MetricField			aBottomMF;
94*cdf0e10cSrcweir 	CheckBox			aSynchronizeCB;
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir 	FixedLine			aFlShadow;
97*cdf0e10cSrcweir 	FixedText			aFtShadowPos;
98*cdf0e10cSrcweir 	ValueSet			aWndShadows;
99*cdf0e10cSrcweir 	FixedText			aFtShadowSize;
100*cdf0e10cSrcweir 	MetricField			aEdShadowSize;
101*cdf0e10cSrcweir 	FixedText			aFtShadowColor;
102*cdf0e10cSrcweir 	ColorListBox		aLbShadowColor;
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir     //properties - "Merge with next paragraph" in Writer
105*cdf0e10cSrcweir     FixedLine           aPropertiesFL;
106*cdf0e10cSrcweir     CheckBox            aMergeWithNextCB;
107*cdf0e10cSrcweir 	// --> collapsing table borders FME 2005-05-27 #i29550#
108*cdf0e10cSrcweir 	CheckBox            aMergeAdjacentBordersCB;
109*cdf0e10cSrcweir 	// <--
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir     ImageList           aShadowImgLstH;
112*cdf0e10cSrcweir     ImageList           aShadowImgLst;
113*cdf0e10cSrcweir     ImageList           aBorderImgLstH;
114*cdf0e10cSrcweir     ImageList           aBorderImgLst;
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 	long				nMinValue;	// minimum distance
117*cdf0e10cSrcweir 	int             	nSWMode;	// table, textframe, paragraph
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir     bool                mbHorEnabled;       /// true = Inner horizontal border enabled.
120*cdf0e10cSrcweir     bool                mbVerEnabled;       /// true = Inner vertical border enabled.
121*cdf0e10cSrcweir     bool                mbTLBREnabled;      /// true = Top-left to bottom-right border enabled.
122*cdf0e10cSrcweir     bool                mbBLTREnabled;      /// true = Bottom-left to top-right border enabled.
123*cdf0e10cSrcweir     bool                mbUseMarginItem;
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir 	static sal_Bool 		bSync;
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir #ifdef _SVX_BORDER_CXX
128*cdf0e10cSrcweir 	// Handler
129*cdf0e10cSrcweir 	DECL_LINK( SelStyleHdl_Impl, ListBox* pLb );
130*cdf0e10cSrcweir 	DECL_LINK( SelColHdl_Impl, ListBox* pLb );
131*cdf0e10cSrcweir 	DECL_LINK( SelPreHdl_Impl, void* );
132*cdf0e10cSrcweir 	DECL_LINK( SelSdwHdl_Impl, void* );
133*cdf0e10cSrcweir 	DECL_LINK( LinesChanged_Impl, void* );
134*cdf0e10cSrcweir 	DECL_LINK( ModifyDistanceHdl_Impl, MetricField*);
135*cdf0e10cSrcweir 	DECL_LINK( SyncHdl_Impl, CheckBox*);
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir     sal_uInt16              GetPresetImageId( sal_uInt16 nValueSetIdx ) const;
138*cdf0e10cSrcweir     sal_uInt16              GetPresetStringId( sal_uInt16 nValueSetIdx ) const;
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir     void                FillPresetVS();
141*cdf0e10cSrcweir     void                FillShadowVS();
142*cdf0e10cSrcweir     void                FillValueSets();
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir 	// Filler
145*cdf0e10cSrcweir 	void				FillLineListBox_Impl();
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir 	// Setzen von einzelnen Frame-/Core-Linien
148*cdf0e10cSrcweir     void                ResetFrameLine_Impl( svx::FrameBorderType eBorder,
149*cdf0e10cSrcweir                                              const SvxBorderLine* pCurLine,
150*cdf0e10cSrcweir                                              bool bValid );
151*cdf0e10cSrcweir #endif
152*cdf0e10cSrcweir };
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir 
155*cdf0e10cSrcweir #endif
156*cdf0e10cSrcweir 
157