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