xref: /aoo41x/main/cui/source/inc/cuitabarea.hxx (revision c7be74b1)
1c4eee24dSAndrew Rist /**************************************************************
2c4eee24dSAndrew Rist  *
3c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c4eee24dSAndrew Rist  * distributed with this work for additional information
6c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10c4eee24dSAndrew Rist  *
11c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18c4eee24dSAndrew Rist  * under the License.
19c4eee24dSAndrew Rist  *
20c4eee24dSAndrew Rist  *************************************************************/
21c4eee24dSAndrew Rist 
22c4eee24dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _CUI_TAB_AREA_HXX
24cdf0e10cSrcweir #define _CUI_TAB_AREA_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <svx/tabarea.hxx>
2928bcfa49SArmin Le Grand #include <svx/SvxColorValueSet.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir /*************************************************************************
32cdf0e10cSrcweir |*
33cdf0e10cSrcweir |* Fl"achen-Tab-Dialog
34cdf0e10cSrcweir |*
35cdf0e10cSrcweir \************************************************************************/
36cdf0e10cSrcweir 
37cdf0e10cSrcweir class SvxAreaTabDialog : public SfxTabDialog
38cdf0e10cSrcweir {
39cdf0e10cSrcweir private:
40cdf0e10cSrcweir 	SdrModel*           mpDrawModel;
41cdf0e10cSrcweir //	const SdrView*		mpView;
42cdf0e10cSrcweir 
43*c7be74b1SArmin Le Grand 	XColorListSharedPtr     maColorTab;
44*c7be74b1SArmin Le Grand 	XColorListSharedPtr     maNewColorTab;
45*c7be74b1SArmin Le Grand 	XGradientListSharedPtr  maGradientList;
46*c7be74b1SArmin Le Grand 	XGradientListSharedPtr  maNewGradientList;
47*c7be74b1SArmin Le Grand 	XHatchListSharedPtr     maHatchingList;
48*c7be74b1SArmin Le Grand 	XHatchListSharedPtr     maNewHatchingList;
49*c7be74b1SArmin Le Grand 	XBitmapListSharedPtr    maBitmapList;
50*c7be74b1SArmin Le Grand 	XBitmapListSharedPtr    maNewBitmapList;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 	const SfxItemSet&   mrOutAttrs;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 	ChangeType          mnColorTableState;
55cdf0e10cSrcweir 	ChangeType          mnBitmapListState;
56cdf0e10cSrcweir 	ChangeType          mnGradientListState;
57cdf0e10cSrcweir 	ChangeType          mnHatchingListState;
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 	sal_uInt16              mnPageType;
60cdf0e10cSrcweir 	sal_uInt16              mnDlgType;
61cdf0e10cSrcweir 	sal_uInt16              mnPos;
62cdf0e10cSrcweir 	sal_Bool                mbAreaTP;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 	virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
65cdf0e10cSrcweir 
66cdf0e10cSrcweir protected:
67cdf0e10cSrcweir 	virtual short       Ok();
68cdf0e10cSrcweir #ifdef _SVX_TABAREA_CXX
69cdf0e10cSrcweir 	DECL_LINK( CancelHdlImpl, void * );
70cdf0e10cSrcweir 	void                SavePalettes();
71cdf0e10cSrcweir #endif
72cdf0e10cSrcweir 
73cdf0e10cSrcweir public:
74cdf0e10cSrcweir 	SvxAreaTabDialog( Window* pParent,
75cdf0e10cSrcweir 					  const SfxItemSet* pAttr, SdrModel* pModel,
76cdf0e10cSrcweir 					  const SdrView* pSdrView = NULL );
77cdf0e10cSrcweir 	~SvxAreaTabDialog();
78cdf0e10cSrcweir 
SetNewColorTable(XColorListSharedPtr aColTab)79*c7be74b1SArmin Le Grand 	void SetNewColorTable( XColorListSharedPtr aColTab ) { maNewColorTab = aColTab; }
GetNewColorTable() const80*c7be74b1SArmin Le Grand 	XColorListSharedPtr GetNewColorTable() const { return maNewColorTab; }
GetColorTable() const81*c7be74b1SArmin Le Grand 	const XColorListSharedPtr GetColorTable() const { return maColorTab; }
82*c7be74b1SArmin Le Grand 
SetNewGradientList(XGradientListSharedPtr aGrdLst)83*c7be74b1SArmin Le Grand 	void SetNewGradientList( XGradientListSharedPtr aGrdLst) { maNewGradientList = aGrdLst; }
GetNewGradientList() const84*c7be74b1SArmin Le Grand 	XGradientListSharedPtr GetNewGradientList() const { return maNewGradientList; }
GetGradientList() const85*c7be74b1SArmin Le Grand 	const XGradientListSharedPtr GetGradientList() const { return maGradientList; }
86*c7be74b1SArmin Le Grand 
SetNewHatchingList(XHatchListSharedPtr aHtchLst)87*c7be74b1SArmin Le Grand 	void SetNewHatchingList( XHatchListSharedPtr aHtchLst) { maNewHatchingList = aHtchLst; }
GetNewHatchingList() const88*c7be74b1SArmin Le Grand 	XHatchListSharedPtr GetNewHatchingList() const { return maNewHatchingList; }
GetHatchingList() const89*c7be74b1SArmin Le Grand 	const XHatchListSharedPtr GetHatchingList() const { return maHatchingList; }
90*c7be74b1SArmin Le Grand 
SetNewBitmapList(XBitmapListSharedPtr aBmpLst)91*c7be74b1SArmin Le Grand 	void SetNewBitmapList( XBitmapListSharedPtr aBmpLst) { maNewBitmapList = aBmpLst; }
GetNewBitmapList() const92*c7be74b1SArmin Le Grand 	XBitmapListSharedPtr GetNewBitmapList() const { return maNewBitmapList; }
GetBitmapList() const93*c7be74b1SArmin Le Grand 	const XBitmapListSharedPtr GetBitmapList() const { return maBitmapList; }
94cdf0e10cSrcweir };
95cdf0e10cSrcweir 
96cdf0e10cSrcweir /*************************************************************************
97cdf0e10cSrcweir |*
98cdf0e10cSrcweir |* Transparence-Tab-Page
99cdf0e10cSrcweir |*
100cdf0e10cSrcweir \************************************************************************/
101cdf0e10cSrcweir 
102cdf0e10cSrcweir class SvxTransparenceTabPage : public SvxTabPage
103cdf0e10cSrcweir {
104cdf0e10cSrcweir 	using TabPage::ActivatePage;
105cdf0e10cSrcweir 	using TabPage::DeactivatePage;
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
108cdf0e10cSrcweir 	RECT_POINT          eRP;
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pPageType;
111cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pDlgType;
112cdf0e10cSrcweir 	sal_uInt16             nPageType; //add CHINA001
113cdf0e10cSrcweir 	sal_uInt16             nDlgType;  //add CHINA001
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	// main selection
116cdf0e10cSrcweir     FixedLine           aFlProp;
117cdf0e10cSrcweir     RadioButton         aRbtTransOff;
118cdf0e10cSrcweir     RadioButton         aRbtTransLinear;
119cdf0e10cSrcweir 	RadioButton         aRbtTransGradient;
120cdf0e10cSrcweir 
121cdf0e10cSrcweir 	// linear transparency
122cdf0e10cSrcweir 	MetricField         aMtrTransparent;
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 	// gradient transparency
125cdf0e10cSrcweir 	FixedText           aFtTrgrType;
126cdf0e10cSrcweir 	ListBox             aLbTrgrGradientType;
127cdf0e10cSrcweir 	FixedText           aFtTrgrCenterX;
128cdf0e10cSrcweir 	MetricField         aMtrTrgrCenterX;
129cdf0e10cSrcweir 	FixedText           aFtTrgrCenterY;
130cdf0e10cSrcweir 	MetricField         aMtrTrgrCenterY;
131cdf0e10cSrcweir 	FixedText           aFtTrgrAngle;
132cdf0e10cSrcweir 	MetricField         aMtrTrgrAngle;
133cdf0e10cSrcweir 	FixedText           aFtTrgrBorder;
134cdf0e10cSrcweir 	MetricField         aMtrTrgrBorder;
135cdf0e10cSrcweir 	FixedText           aFtTrgrStartValue;
136cdf0e10cSrcweir 	MetricField         aMtrTrgrStartValue;
137cdf0e10cSrcweir 	FixedText           aFtTrgrEndValue;
138cdf0e10cSrcweir 	MetricField         aMtrTrgrEndValue;
139cdf0e10cSrcweir 
140cdf0e10cSrcweir 	// preview
141cdf0e10cSrcweir 	SvxXRectPreview     aCtlBitmapPreview;
142cdf0e10cSrcweir 	SvxXRectPreview     aCtlXRectPreview;
143cdf0e10cSrcweir 	sal_Bool				bBitmap;
144cdf0e10cSrcweir 
145cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
146cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
147cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
148cdf0e10cSrcweir 
149cdf0e10cSrcweir #ifdef _SVX_TPAREA_CXX
150cdf0e10cSrcweir 	DECL_LINK(ClickTransOffHdl_Impl, void * );
151cdf0e10cSrcweir 	DECL_LINK(ClickTransLinearHdl_Impl, void * );
152cdf0e10cSrcweir 	DECL_LINK(ClickTransGradientHdl_Impl, void * );
153cdf0e10cSrcweir 	DECL_LINK(ModifyTransparentHdl_Impl, void*);
154cdf0e10cSrcweir 	DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
155cdf0e10cSrcweir 	DECL_LINK(ModifiedTrgrHdl_Impl, void*);
156cdf0e10cSrcweir #endif
157cdf0e10cSrcweir 
158cdf0e10cSrcweir 	void ActivateLinear(sal_Bool bActivate);
159cdf0e10cSrcweir 	void ActivateGradient(sal_Bool bActivate);
160cdf0e10cSrcweir 	void SetControlState_Impl(XGradientStyle eXGS);
161cdf0e10cSrcweir 
162cdf0e10cSrcweir 	sal_Bool InitPreview ( const SfxItemSet& rSet );
163cdf0e10cSrcweir 	void InvalidatePreview (sal_Bool bEnable = sal_True );
164cdf0e10cSrcweir 
165cdf0e10cSrcweir public:
166cdf0e10cSrcweir 	SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs);
167cdf0e10cSrcweir 	void Construct();
168cdf0e10cSrcweir 
169cdf0e10cSrcweir 	static SfxTabPage* Create(Window*, const SfxItemSet&);
170cdf0e10cSrcweir 	static sal_uInt16* GetRanges();
171cdf0e10cSrcweir 
172cdf0e10cSrcweir 	virtual sal_Bool FillItemSet(SfxItemSet&);
173cdf0e10cSrcweir 	virtual void Reset(const SfxItemSet&);
174cdf0e10cSrcweir 	virtual void ActivatePage(const SfxItemSet& rSet);
175cdf0e10cSrcweir 	virtual int  DeactivatePage(SfxItemSet* pSet);
176cdf0e10cSrcweir 	virtual void PointChanged(Window* pWindow, RECT_POINT eRP);
177cdf0e10cSrcweir 
178cdf0e10cSrcweir 	//CHINA001 void SetPageType(sal_uInt16 *pInType) { pPageType = pInType; }
179cdf0e10cSrcweir 	//CHINA001 void SetDlgType(sal_uInt16* pInType) { pDlgType = pInType; }
SetPageType(sal_uInt16 nInType)180cdf0e10cSrcweir 	void SetPageType(sal_uInt16 nInType) { nPageType = nInType; } //add CHINA001
SetDlgType(sal_uInt16 nInType)181cdf0e10cSrcweir 	void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }//add CHINA001
182cdf0e10cSrcweir 	virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
183cdf0e10cSrcweir };
184cdf0e10cSrcweir 
185cdf0e10cSrcweir /*************************************************************************
186cdf0e10cSrcweir |*
187cdf0e10cSrcweir |* Fl"achen-Tab-Page
188cdf0e10cSrcweir |*
189cdf0e10cSrcweir \************************************************************************/
190cdf0e10cSrcweir 
191cdf0e10cSrcweir class SvxAreaTabPage : public SvxTabPage
192cdf0e10cSrcweir {
193cdf0e10cSrcweir 	using TabPage::ActivatePage;
194cdf0e10cSrcweir 	using TabPage::DeactivatePage;
195cdf0e10cSrcweir 
196cdf0e10cSrcweir private:
197cdf0e10cSrcweir     FixedLine           aFlProp;
198cdf0e10cSrcweir     ListBox             aTypeLB;
199cdf0e10cSrcweir 
200cdf0e10cSrcweir 	ColorLB             aLbColor;
201cdf0e10cSrcweir 	GradientLB          aLbGradient;
202cdf0e10cSrcweir 	HatchingLB          aLbHatching;
203cdf0e10cSrcweir 	BitmapLB            aLbBitmap;
204cdf0e10cSrcweir 	SvxXRectPreview     aCtlBitmapPreview;
205cdf0e10cSrcweir 
206cdf0e10cSrcweir 	TriStateBox         aTsbStepCount;
207cdf0e10cSrcweir     FixedLine           aFlStepCount;
208cdf0e10cSrcweir 	NumericField        aNumFldStepCount;
209cdf0e10cSrcweir 
210cdf0e10cSrcweir 	CheckBox			aCbxHatchBckgrd;
211cdf0e10cSrcweir 	ColorLB             aLbHatchBckgrdColor;
212cdf0e10cSrcweir 
213cdf0e10cSrcweir     FixedLine           aFlSize;
214cdf0e10cSrcweir 	TriStateBox			aTsbOriginal;
215cdf0e10cSrcweir 	TriStateBox			aTsbScale;
216cdf0e10cSrcweir 	FixedText			aFtXSize;
217cdf0e10cSrcweir 	MetricField			aMtrFldXSize;
218cdf0e10cSrcweir 	FixedText			aFtYSize;
219cdf0e10cSrcweir 	MetricField			aMtrFldYSize;
220cdf0e10cSrcweir     FixedLine           aFlPosition;
221cdf0e10cSrcweir 	SvxRectCtl			aCtlPosition;
222cdf0e10cSrcweir 	FixedText			aFtXOffset;
223cdf0e10cSrcweir 	MetricField			aMtrFldXOffset;
224cdf0e10cSrcweir 	FixedText			aFtYOffset;
225cdf0e10cSrcweir 	MetricField			aMtrFldYOffset;
226cdf0e10cSrcweir 	TriStateBox         aTsbTile;
227cdf0e10cSrcweir 	TriStateBox         aTsbStretch;
228cdf0e10cSrcweir     FixedLine           aFlOffset;
229cdf0e10cSrcweir 	RadioButton			aRbtRow;
230cdf0e10cSrcweir 	RadioButton			aRbtColumn;
231cdf0e10cSrcweir 	MetricField			aMtrFldOffset;
232cdf0e10cSrcweir 
233cdf0e10cSrcweir 	SvxXRectPreview     aCtlXRectPreview;
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
236cdf0e10cSrcweir 	RECT_POINT          eRP;
237cdf0e10cSrcweir 
238*c7be74b1SArmin Le Grand 	XColorListSharedPtr     maColorTab;
239*c7be74b1SArmin Le Grand 	XGradientListSharedPtr  maGradientList;
240*c7be74b1SArmin Le Grand 	XHatchListSharedPtr     maHatchingList;
241*c7be74b1SArmin Le Grand 	XBitmapListSharedPtr    maBitmapList;
242cdf0e10cSrcweir 
243cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
244cdf0e10cSrcweir 	ChangeType*         pnBitmapListState;
245cdf0e10cSrcweir 	ChangeType*         pnGradientListState;
246cdf0e10cSrcweir 	ChangeType*         pnHatchingListState;
247cdf0e10cSrcweir 
248cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pPageType;
249cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pDlgType;
250cdf0e10cSrcweir 	//CHINA001 sal_uInt16*             pPos;
251cdf0e10cSrcweir 	sal_uInt16 nPageType; //add CHINA001
252cdf0e10cSrcweir 	sal_uInt16 nDlgType;//add CHINA001
253cdf0e10cSrcweir 	sal_uInt16 nPos; //add CHINA001
254cdf0e10cSrcweir 
255cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
256cdf0e10cSrcweir 
257cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
258cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
259cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
260cdf0e10cSrcweir 
261cdf0e10cSrcweir 	SfxMapUnit			ePoolUnit;
262cdf0e10cSrcweir 	FieldUnit			eFUnit;
263cdf0e10cSrcweir 
264cdf0e10cSrcweir #ifdef _SVX_TPAREA_CXX
265cdf0e10cSrcweir 	DECL_LINK( SelectDialogTypeHdl_Impl, ListBox * );
266cdf0e10cSrcweir 	DECL_LINK( ClickInvisibleHdl_Impl, void * );
267cdf0e10cSrcweir 	DECL_LINK( ClickColorHdl_Impl, void * );
268cdf0e10cSrcweir 	DECL_LINK( ModifyColorHdl_Impl, void * );
269cdf0e10cSrcweir 	DECL_LINK( ModifyHatchBckgrdColorHdl_Impl, void * );
270cdf0e10cSrcweir 	DECL_LINK( ClickGradientHdl_Impl, void * );
271cdf0e10cSrcweir 	DECL_LINK( ModifyGradientHdl_Impl, void * );
272cdf0e10cSrcweir 	DECL_LINK( ClickHatchingHdl_Impl, void * );
273cdf0e10cSrcweir 	DECL_LINK( ModifyHatchingHdl_Impl, void * );
274cdf0e10cSrcweir 	DECL_LINK( ToggleHatchBckgrdColorHdl_Impl, void * );
275cdf0e10cSrcweir 	DECL_LINK( ClickBitmapHdl_Impl, void * );
276cdf0e10cSrcweir 	DECL_LINK( ModifyBitmapHdl_Impl, void * );
277cdf0e10cSrcweir //	DECL_LINK( ModifyTransparentHdl_Impl, void * );
278cdf0e10cSrcweir 	DECL_LINK( ModifyStepCountHdl_Impl, void * );
279cdf0e10cSrcweir 	DECL_LINK( ModifyTileHdl_Impl, void * );
280cdf0e10cSrcweir 	DECL_LINK( ClickScaleHdl_Impl, void * );
281cdf0e10cSrcweir #endif
282cdf0e10cSrcweir 
283cdf0e10cSrcweir public:
284cdf0e10cSrcweir 	SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
285cdf0e10cSrcweir 
286cdf0e10cSrcweir 	void    Construct();
287cdf0e10cSrcweir 
288cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
289cdf0e10cSrcweir 	static  sal_uInt16*	    GetRanges();
290cdf0e10cSrcweir 
291cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
292cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
293cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
294cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
295cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
296cdf0e10cSrcweir 
SetColorTable(XColorListSharedPtr aColTab)297*c7be74b1SArmin Le Grand 	void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
SetGradientList(XGradientListSharedPtr aGrdLst)298*c7be74b1SArmin Le Grand 	void    SetGradientList( XGradientListSharedPtr aGrdLst) { maGradientList = aGrdLst; }
SetHatchingList(XHatchListSharedPtr aHtchLst)299*c7be74b1SArmin Le Grand 	void    SetHatchingList( XHatchListSharedPtr aHtchLst) { maHatchingList = aHtchLst; }
SetBitmapList(XBitmapListSharedPtr aBmpLst)300*c7be74b1SArmin Le Grand 	void    SetBitmapList( XBitmapListSharedPtr aBmpLst) { maBitmapList = aBmpLst; }
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 	//CHINA001 void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
SetPageType(sal_uInt16 nInType)303cdf0e10cSrcweir 	void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001
304cdf0e10cSrcweir 	//CHINA001 void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
SetDlgType(sal_uInt16 nInType)305cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }//add CHINA001
306cdf0e10cSrcweir 	//CHINA001 void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
SetPos(sal_uInt16 nInPos)307cdf0e10cSrcweir 	void    SetPos( sal_uInt16 nInPos ) { nPos = nInPos; }//add CHINA001
SetAreaTP(sal_Bool * pIn)308cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
309cdf0e10cSrcweir 	virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
SetColorChgd(ChangeType * pIn)310cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
SetGrdChgd(ChangeType * pIn)311cdf0e10cSrcweir 	void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
SetHtchChgd(ChangeType * pIn)312cdf0e10cSrcweir 	void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
SetBmpChgd(ChangeType * pIn)313cdf0e10cSrcweir 	void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
314cdf0e10cSrcweir };
315cdf0e10cSrcweir 
316cdf0e10cSrcweir /*************************************************************************
317cdf0e10cSrcweir |*
318cdf0e10cSrcweir |* Schatten-Tab-Page
319cdf0e10cSrcweir |*
320cdf0e10cSrcweir \************************************************************************/
321cdf0e10cSrcweir 
322cdf0e10cSrcweir class SvxShadowTabPage : public SvxTabPage
323cdf0e10cSrcweir {
324cdf0e10cSrcweir 	using TabPage::ActivatePage;
325cdf0e10cSrcweir 	using TabPage::DeactivatePage;
326cdf0e10cSrcweir 
327cdf0e10cSrcweir private:
328cdf0e10cSrcweir     FixedLine           aFlProp;
329cdf0e10cSrcweir     TriStateBox         aTsbShowShadow;
330cdf0e10cSrcweir 	FixedText           aFtPosition;
331cdf0e10cSrcweir 	SvxRectCtl          aCtlPosition;
332cdf0e10cSrcweir 	FixedText           aFtDistance;
333cdf0e10cSrcweir 	MetricField         aMtrDistance;
334cdf0e10cSrcweir 	FixedText           aFtShadowColor;
335cdf0e10cSrcweir 	ColorLB             aLbShadowColor;
336cdf0e10cSrcweir 	FixedText           aFtTransparent;
337cdf0e10cSrcweir 	MetricField         aMtrTransparent;
338cdf0e10cSrcweir 	SvxXShadowPreview	aCtlXRectPreview;
339cdf0e10cSrcweir 
340cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
341cdf0e10cSrcweir 	RECT_POINT          eRP;
342cdf0e10cSrcweir 
343*c7be74b1SArmin Le Grand 	XColorListSharedPtr maColorTab;
344cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
345cdf0e10cSrcweir 	sal_uInt16				nPageType;	//add CHINA001
346cdf0e10cSrcweir 	sal_uInt16				nDlgType;	//add CHINA001
347cdf0e10cSrcweir 	sal_uInt16*             pPos;
348cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
349cdf0e10cSrcweir 
350cdf0e10cSrcweir 	sal_Bool				bDisable;
351cdf0e10cSrcweir 
352cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
353cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
354cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
355cdf0e10cSrcweir 	SfxMapUnit			ePoolUnit;
356cdf0e10cSrcweir 
357cdf0e10cSrcweir #ifdef _SVX_TPSHADOW_CXX
358cdf0e10cSrcweir 	DECL_LINK( ClickShadowHdl_Impl, void * );
359cdf0e10cSrcweir 	DECL_LINK( ModifyShadowHdl_Impl, void * );
360cdf0e10cSrcweir #endif
361cdf0e10cSrcweir 
362cdf0e10cSrcweir public:
363cdf0e10cSrcweir 	SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
364cdf0e10cSrcweir 
365cdf0e10cSrcweir 	void    Construct();
366cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
367cdf0e10cSrcweir 	static  sal_uInt16*	    GetRanges();
368cdf0e10cSrcweir 
369cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
370cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
371cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
372cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
373cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
374cdf0e10cSrcweir 
SetColorTable(XColorListSharedPtr aColTab)375*c7be74b1SArmin Le Grand 	void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
376cdf0e10cSrcweir //CHINA001	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
377cdf0e10cSrcweir //CHINA001	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
SetPageType(sal_uInt16 nInType)378cdf0e10cSrcweir 	void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001
SetDlgType(sal_uInt16 nInType)379cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }	//add CHINA001
SetAreaTP(sal_Bool * pIn)380cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
SetColorChgd(ChangeType * pIn)381cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
382cdf0e10cSrcweir 	virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001
DisablePage(sal_Bool bIn)383cdf0e10cSrcweir 	void	DisablePage( sal_Bool bIn ) { bDisable = bIn; }
384cdf0e10cSrcweir };
385cdf0e10cSrcweir 
386cdf0e10cSrcweir /*************************************************************************
387cdf0e10cSrcweir |*
388cdf0e10cSrcweir |* Farbverlauf-Tab-Page
389cdf0e10cSrcweir |*
390cdf0e10cSrcweir \************************************************************************/
391cdf0e10cSrcweir 
392cdf0e10cSrcweir class SvxGradientTabPage : public SfxTabPage
393cdf0e10cSrcweir {
394cdf0e10cSrcweir 	using TabPage::ActivatePage;
395cdf0e10cSrcweir 	using TabPage::DeactivatePage;
396cdf0e10cSrcweir 
397cdf0e10cSrcweir private:
398cdf0e10cSrcweir     FixedLine           aFlProp;
399cdf0e10cSrcweir 	FixedText           aFtType;
400cdf0e10cSrcweir 	ListBox             aLbGradientType;
401cdf0e10cSrcweir 	FixedText           aFtCenterX;
402cdf0e10cSrcweir 	MetricField         aMtrCenterX;
403cdf0e10cSrcweir 	FixedText           aFtCenterY;
404cdf0e10cSrcweir 	MetricField         aMtrCenterY;
405cdf0e10cSrcweir 	FixedText           aFtAngle;
406cdf0e10cSrcweir 	MetricField         aMtrAngle;
407cdf0e10cSrcweir 	FixedText           aFtBorder;
408cdf0e10cSrcweir 	MetricField         aMtrBorder;
409cdf0e10cSrcweir 	FixedText           aFtColorFrom;
410cdf0e10cSrcweir 	ColorLB             aLbColorFrom;
411cdf0e10cSrcweir 	MetricField         aMtrColorFrom;
412cdf0e10cSrcweir 	FixedText           aFtColorTo;
413cdf0e10cSrcweir 	ColorLB             aLbColorTo;
414cdf0e10cSrcweir 	MetricField         aMtrColorTo;
415cdf0e10cSrcweir 	GradientLB          aLbGradients;
416cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreview;
417cdf0e10cSrcweir 	PushButton          aBtnAdd;
418cdf0e10cSrcweir 	PushButton          aBtnModify;
419cdf0e10cSrcweir 	PushButton          aBtnDelete;
420cdf0e10cSrcweir 	ImageButton         aBtnLoad;
421cdf0e10cSrcweir 	ImageButton         aBtnSave;
422cdf0e10cSrcweir 
423cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
424cdf0e10cSrcweir 
425*c7be74b1SArmin Le Grand 	XColorListSharedPtr     maColorTab;
426*c7be74b1SArmin Le Grand 	XGradientListSharedPtr  maGradientList;
427cdf0e10cSrcweir 
428cdf0e10cSrcweir 	ChangeType*         pnGradientListState;
429cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
430cdf0e10cSrcweir 	sal_uInt16*             pPageType;
431cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
432cdf0e10cSrcweir 	sal_uInt16*             pPos;
433cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
434cdf0e10cSrcweir 
435cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
436cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
437cdf0e10cSrcweir 	XFillGradientItem   aXGradientItem;
438cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
439cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
440cdf0e10cSrcweir 
441cdf0e10cSrcweir #ifdef _SVX_TPGRADNT_CXX
442cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );
443cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );
444cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );
445cdf0e10cSrcweir 	DECL_LINK( ChangeGradientHdl_Impl, void * );
446cdf0e10cSrcweir 	DECL_LINK( ModifiedHdl_Impl, void * );
447cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );
448cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );
449cdf0e10cSrcweir 
450cdf0e10cSrcweir 	long CheckChanges_Impl();
451cdf0e10cSrcweir 	void SetControlState_Impl( XGradientStyle eXGS );
452cdf0e10cSrcweir #endif
453cdf0e10cSrcweir 
454cdf0e10cSrcweir public:
455cdf0e10cSrcweir 	SvxGradientTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
456cdf0e10cSrcweir 
457cdf0e10cSrcweir 	void    Construct();
458cdf0e10cSrcweir 
459cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
460cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
461cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
462cdf0e10cSrcweir 
463cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
464cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
465cdf0e10cSrcweir 
SetColorTable(XColorListSharedPtr aColTab)466*c7be74b1SArmin Le Grand 	void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
SetGradientList(XGradientListSharedPtr aGrdLst)467*c7be74b1SArmin Le Grand 	void    SetGradientList( XGradientListSharedPtr aGrdLst) { maGradientList = aGrdLst; }
468cdf0e10cSrcweir 
SetPageType(sal_uInt16 * pInType)469cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
SetDlgType(sal_uInt16 * pInType)470cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
SetPos(sal_uInt16 * pInPos)471cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
SetAreaTP(sal_Bool * pIn)472cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
473cdf0e10cSrcweir 
SetGrdChgd(ChangeType * pIn)474cdf0e10cSrcweir 	void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
SetColorChgd(ChangeType * pIn)475cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
476cdf0e10cSrcweir };
477cdf0e10cSrcweir 
478cdf0e10cSrcweir /*************************************************************************
479cdf0e10cSrcweir |*
480cdf0e10cSrcweir |* Schraffuren-Tab-Page
481cdf0e10cSrcweir |*
482cdf0e10cSrcweir \************************************************************************/
483cdf0e10cSrcweir 
484cdf0e10cSrcweir class SvxHatchTabPage : public SvxTabPage
485cdf0e10cSrcweir {
486cdf0e10cSrcweir 	using TabPage::ActivatePage;
487cdf0e10cSrcweir 	using TabPage::DeactivatePage;
488cdf0e10cSrcweir 
489cdf0e10cSrcweir private:
490cdf0e10cSrcweir 	FixedText           aFtDistance;
491cdf0e10cSrcweir 	MetricField         aMtrDistance;
492cdf0e10cSrcweir 	FixedText           aFtAngle;
493cdf0e10cSrcweir 	MetricField         aMtrAngle;
494cdf0e10cSrcweir 	SvxRectCtl          aCtlAngle;
495cdf0e10cSrcweir     FixedLine           aFlProp;
496cdf0e10cSrcweir 	FixedText           aFtLineType;
497cdf0e10cSrcweir 	ListBox             aLbLineType;
498cdf0e10cSrcweir 	FixedText           aFtLineColor;
499cdf0e10cSrcweir 	ColorLB             aLbLineColor;
500cdf0e10cSrcweir 	HatchingLB          aLbHatchings;
501cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreview;
502cdf0e10cSrcweir 	PushButton          aBtnAdd;
503cdf0e10cSrcweir 	PushButton          aBtnModify;
504cdf0e10cSrcweir 	PushButton          aBtnDelete;
505cdf0e10cSrcweir 	ImageButton         aBtnLoad;
506cdf0e10cSrcweir 	ImageButton         aBtnSave;
507cdf0e10cSrcweir 
508cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
509cdf0e10cSrcweir 	RECT_POINT          eRP;
510cdf0e10cSrcweir 
511*c7be74b1SArmin Le Grand 	XColorListSharedPtr maColorTab;
512*c7be74b1SArmin Le Grand 	XHatchListSharedPtr maHatchingList;
513cdf0e10cSrcweir 
514cdf0e10cSrcweir 	ChangeType*         pnHatchingListState;
515cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
516cdf0e10cSrcweir 	sal_uInt16*             pPageType;
517cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
518cdf0e10cSrcweir 	sal_uInt16*             pPos;
519cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
520cdf0e10cSrcweir 
521cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
522cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
523cdf0e10cSrcweir 	XFillHatchItem      aXHatchItem;
524cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
525cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
526cdf0e10cSrcweir 
527cdf0e10cSrcweir 	SfxMapUnit			ePoolUnit;
528cdf0e10cSrcweir 
529cdf0e10cSrcweir #ifdef _SVX_TPHATCH_CXX
530cdf0e10cSrcweir 	DECL_LINK( ChangeHatchHdl_Impl, void * );
531cdf0e10cSrcweir 	DECL_LINK( ModifiedHdl_Impl, void * );
532cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );
533cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );
534cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );
535cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );
536cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );
537cdf0e10cSrcweir 
538cdf0e10cSrcweir 	long CheckChanges_Impl();
539cdf0e10cSrcweir #endif
540cdf0e10cSrcweir 
541cdf0e10cSrcweir public:
542cdf0e10cSrcweir 	SvxHatchTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
543cdf0e10cSrcweir 
544cdf0e10cSrcweir 	void    Construct();
545cdf0e10cSrcweir 
546cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
547cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
548cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
549cdf0e10cSrcweir 
550cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
551cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
552cdf0e10cSrcweir 
553cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
554cdf0e10cSrcweir 
SetColorTable(XColorListSharedPtr aColTab)555*c7be74b1SArmin Le Grand 	void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
SetHatchingList(XHatchListSharedPtr aHtchLst)556*c7be74b1SArmin Le Grand 	void    SetHatchingList( XHatchListSharedPtr aHtchLst) { maHatchingList = aHtchLst; }
557cdf0e10cSrcweir 
SetPageType(sal_uInt16 * pInType)558cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
SetDlgType(sal_uInt16 * pInType)559cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
SetPos(sal_uInt16 * pInPos)560cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
SetAreaTP(sal_Bool * pIn)561cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
562cdf0e10cSrcweir 
SetHtchChgd(ChangeType * pIn)563cdf0e10cSrcweir 	void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
SetColorChgd(ChangeType * pIn)564cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
565cdf0e10cSrcweir 
566cdf0e10cSrcweir 	virtual void		DataChanged( const DataChangedEvent& rDCEvt );
567cdf0e10cSrcweir };
568cdf0e10cSrcweir 
569cdf0e10cSrcweir /*************************************************************************
570cdf0e10cSrcweir |*
571cdf0e10cSrcweir |* Bitmap-Tab-Page
572cdf0e10cSrcweir |*
573cdf0e10cSrcweir \************************************************************************/
574cdf0e10cSrcweir 
575cdf0e10cSrcweir class SvxBitmapTabPage : public SvxTabPage
576cdf0e10cSrcweir {
577cdf0e10cSrcweir 	using TabPage::ActivatePage;
578cdf0e10cSrcweir 	using TabPage::DeactivatePage;
579cdf0e10cSrcweir 
580cdf0e10cSrcweir private:
581cdf0e10cSrcweir 	SvxPixelCtl         aCtlPixel;
582cdf0e10cSrcweir     FixedText           aFtPixelEdit;
583cdf0e10cSrcweir 	FixedText           aFtColor;
584cdf0e10cSrcweir 	ColorLB             aLbColor;
585cdf0e10cSrcweir 	FixedText           aFtBackgroundColor;
586cdf0e10cSrcweir 	ColorLB             aLbBackgroundColor;
587cdf0e10cSrcweir 	FixedText           aLbBitmapsHidden;
588cdf0e10cSrcweir 	BitmapLB            aLbBitmaps;
589cdf0e10cSrcweir     FixedLine           aFlProp;
590cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreview;
591cdf0e10cSrcweir 	PushButton          aBtnAdd;
592cdf0e10cSrcweir 	PushButton          aBtnModify;
593cdf0e10cSrcweir 	PushButton          aBtnImport;
594cdf0e10cSrcweir 	PushButton          aBtnDelete;
595cdf0e10cSrcweir 	ImageButton         aBtnLoad;
596cdf0e10cSrcweir 	ImageButton         aBtnSave;
597cdf0e10cSrcweir 
598cdf0e10cSrcweir 	SvxBitmapCtl        aBitmapCtl;
599cdf0e10cSrcweir 
600cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
601cdf0e10cSrcweir 
602*c7be74b1SArmin Le Grand 	XColorListSharedPtr     maColorTab;
603*c7be74b1SArmin Le Grand 	XBitmapListSharedPtr    maBitmapList;
604cdf0e10cSrcweir 
605cdf0e10cSrcweir 	ChangeType*         pnBitmapListState;
606cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
607cdf0e10cSrcweir 	sal_uInt16*             pPageType;
608cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
609cdf0e10cSrcweir 	sal_uInt16*             pPos;
610cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
611cdf0e10cSrcweir 
612cdf0e10cSrcweir 	sal_Bool                bBmpChanged;
613cdf0e10cSrcweir 
614cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
615cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
616cdf0e10cSrcweir 	XFillBitmapItem     aXBitmapItem;
617cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
618cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
619cdf0e10cSrcweir 
620cdf0e10cSrcweir #ifdef _SVX_TPBITMAP_CXX
621cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );
622cdf0e10cSrcweir 	DECL_LINK( ClickImportHdl_Impl, void * );
623cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );
624cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );
625cdf0e10cSrcweir 	DECL_LINK( ChangeBitmapHdl_Impl, void * );
626cdf0e10cSrcweir 	DECL_LINK( ChangePixelColorHdl_Impl, void * );
627cdf0e10cSrcweir 	DECL_LINK( ChangeBackgrndColorHdl_Impl, void * );
628cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );
629cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );
630cdf0e10cSrcweir 
631cdf0e10cSrcweir 	long CheckChanges_Impl();
632cdf0e10cSrcweir #endif
633cdf0e10cSrcweir 
634cdf0e10cSrcweir public:
635cdf0e10cSrcweir 	SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
636cdf0e10cSrcweir 
637cdf0e10cSrcweir 	void    Construct();
638cdf0e10cSrcweir 
639cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
640cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
641cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
642cdf0e10cSrcweir 
643cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
644cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
645cdf0e10cSrcweir 
646cdf0e10cSrcweir 	virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
647cdf0e10cSrcweir 
SetColorTable(XColorListSharedPtr aColTab)648*c7be74b1SArmin Le Grand 	void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
SetBitmapList(XBitmapListSharedPtr aBmpLst)649*c7be74b1SArmin Le Grand 	void    SetBitmapList( XBitmapListSharedPtr aBmpLst) { maBitmapList = aBmpLst; }
650cdf0e10cSrcweir 
SetPageType(sal_uInt16 * pInType)651cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
SetDlgType(sal_uInt16 * pInType)652cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
SetPos(sal_uInt16 * pInPos)653cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
SetAreaTP(sal_Bool * pIn)654cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
655cdf0e10cSrcweir 
SetBmpChgd(ChangeType * pIn)656cdf0e10cSrcweir 	void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
SetColorChgd(ChangeType * pIn)657cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
658cdf0e10cSrcweir 
659cdf0e10cSrcweir     /** Return a label that is associated with the given control.  This
660cdf0e10cSrcweir         label is used to the determine the name for the control.
661cdf0e10cSrcweir         @param pLabeled
662cdf0e10cSrcweir             The control for which to return a label.
663cdf0e10cSrcweir         @return
664cdf0e10cSrcweir             Return a label control that provides a name for the specified
665cdf0e10cSrcweir             control.
666cdf0e10cSrcweir     */
667cdf0e10cSrcweir     virtual Window*	GetParentLabeledBy( const Window* pLabeled ) const;
668cdf0e10cSrcweir };
669cdf0e10cSrcweir 
670cdf0e10cSrcweir /*************************************************************************
671cdf0e10cSrcweir |*
672cdf0e10cSrcweir |* Farben-Tab-Page
673cdf0e10cSrcweir |*
674cdf0e10cSrcweir \************************************************************************/
675cdf0e10cSrcweir 
676cdf0e10cSrcweir class SvxColorTabPage : public SfxTabPage
677cdf0e10cSrcweir {
678cdf0e10cSrcweir 	using TabPage::ActivatePage;
679cdf0e10cSrcweir 	using TabPage::DeactivatePage;
680cdf0e10cSrcweir 
681cdf0e10cSrcweir private:
682cdf0e10cSrcweir     FixedLine           aFlProp;
683cdf0e10cSrcweir 	FixedText           aFtName;
684cdf0e10cSrcweir 	Edit                aEdtName;
685cdf0e10cSrcweir     FixedText           aFtColor;
686cdf0e10cSrcweir 	ColorLB             aLbColor;
687cdf0e10cSrcweir 
688cdf0e10cSrcweir     FixedText           aTableNameFT;
68928bcfa49SArmin Le Grand     SvxColorValueSet    aValSetColorTable;
690cdf0e10cSrcweir 
691cdf0e10cSrcweir     SvxXRectPreview     aCtlPreviewOld;
692cdf0e10cSrcweir 	SvxXRectPreview     aCtlPreviewNew;
693cdf0e10cSrcweir 
694cdf0e10cSrcweir     ListBox             aLbColorModel;
695cdf0e10cSrcweir     FixedText           aFtColorModel1;
696cdf0e10cSrcweir 	MetricField         aMtrFldColorModel1;
697cdf0e10cSrcweir     FixedText           aFtColorModel2;
698cdf0e10cSrcweir 	MetricField         aMtrFldColorModel2;
699cdf0e10cSrcweir     FixedText           aFtColorModel3;
700cdf0e10cSrcweir 	MetricField         aMtrFldColorModel3;
701cdf0e10cSrcweir 
702cdf0e10cSrcweir     FixedText           aFtColorModel4;
703cdf0e10cSrcweir 	MetricField         aMtrFldColorModel4;
704cdf0e10cSrcweir 
705cdf0e10cSrcweir     PushButton          aBtnAdd;
706cdf0e10cSrcweir 	PushButton          aBtnModify;
707cdf0e10cSrcweir 	PushButton          aBtnWorkOn;
708cdf0e10cSrcweir 	PushButton          aBtnDelete;
709cdf0e10cSrcweir 	ImageButton         aBtnLoad;
710cdf0e10cSrcweir 	ImageButton         aBtnSave;
711cdf0e10cSrcweir 
712cdf0e10cSrcweir 	const SfxItemSet&   rOutAttrs;
713cdf0e10cSrcweir 
714*c7be74b1SArmin Le Grand 	XColorListSharedPtr maColorTab;
715cdf0e10cSrcweir 
716cdf0e10cSrcweir 	ChangeType*         pnColorTableState;
717cdf0e10cSrcweir 	sal_uInt16*             pPageType;
718cdf0e10cSrcweir 	sal_uInt16*             pDlgType;
719cdf0e10cSrcweir 	sal_uInt16*             pPos;
720cdf0e10cSrcweir 	sal_Bool*               pbAreaTP;
721cdf0e10cSrcweir 
722cdf0e10cSrcweir 	XOutdevItemPool*    pXPool;
723cdf0e10cSrcweir 	XFillStyleItem      aXFStyleItem;
724cdf0e10cSrcweir 	XFillColorItem      aXFillColorItem;
725cdf0e10cSrcweir 	XFillAttrSetItem    aXFillAttr;
726cdf0e10cSrcweir 	SfxItemSet&         rXFSet;
727cdf0e10cSrcweir 
728cdf0e10cSrcweir 	ColorModel          eCM;
729cdf0e10cSrcweir 
730cdf0e10cSrcweir 	Color				aAktuellColor;
731cdf0e10cSrcweir 
732cdf0e10cSrcweir #ifdef _SVX_TPCOLOR_CXX
733cdf0e10cSrcweir 	void    ConvertColorValues (Color& rColor, ColorModel eModell);
734cdf0e10cSrcweir 	void    RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK );
735cdf0e10cSrcweir 	void    CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey );
736cdf0e10cSrcweir 	sal_uInt16  ColorToPercent_Impl( sal_uInt16 nColor );
737cdf0e10cSrcweir 	sal_uInt16  PercentToColor_Impl( sal_uInt16 nPercent );
738cdf0e10cSrcweir 
73928bcfa49SArmin Le Grand     void ImpColorCountChanged();
74028bcfa49SArmin Le Grand 
741cdf0e10cSrcweir 	//-----------------------------------------------------------------------------------------------------
742cdf0e10cSrcweir 	DECL_LINK( ClickAddHdl_Impl, void * );		// Button 'Hinzufuegen'
743cdf0e10cSrcweir 	DECL_LINK( ClickModifyHdl_Impl, void * );	// Button 'Aendern'
744cdf0e10cSrcweir 	DECL_LINK( ClickDeleteHdl_Impl, void * );	// Button 'loeschen'
745cdf0e10cSrcweir 	DECL_LINK( ClickWorkOnHdl_Impl, void * );	// Button 'Bearbeiten'
746cdf0e10cSrcweir 
747cdf0e10cSrcweir 	DECL_LINK( SelectColorLBHdl_Impl, void * );	// Farbe aus Listbox ausw�hlen
748cdf0e10cSrcweir 	DECL_LINK( SelectValSetHdl_Impl, void * );	// Farbe aus Farbpalette (links) ausw�hlen
749cdf0e10cSrcweir 	DECL_LINK( SelectColorModelHdl_Impl, void * );	// Auswahl Listbox 'Farbmodell'
750cdf0e10cSrcweir 	long ChangeColorHdl_Impl( void* p );
751cdf0e10cSrcweir 	DECL_LINK( ModifiedHdl_Impl, void * );		// Inhalt der Farbwerte-Felder wurde ver�ndert
752cdf0e10cSrcweir 	DECL_LINK( ClickLoadHdl_Impl, void * );		// Button 'Farbtabelle laden'
753cdf0e10cSrcweir 	DECL_LINK( ClickSaveHdl_Impl, void * );		// Button 'Farbtabelle sichern'
754cdf0e10cSrcweir 
755cdf0e10cSrcweir 	long CheckChanges_Impl();
756cdf0e10cSrcweir #endif
757cdf0e10cSrcweir 
758cdf0e10cSrcweir public:
759cdf0e10cSrcweir 	SvxColorTabPage( Window* pParent, const SfxItemSet& rInAttrs  );
760cdf0e10cSrcweir 
761cdf0e10cSrcweir 	void    Construct();
762cdf0e10cSrcweir 
763cdf0e10cSrcweir 	static  SfxTabPage* Create( Window*, const SfxItemSet& );
764cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
765cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
766cdf0e10cSrcweir 
767cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
768cdf0e10cSrcweir 	virtual int  DeactivatePage( SfxItemSet* pSet );
769cdf0e10cSrcweir 
SetColorTable(XColorListSharedPtr aColTab)770*c7be74b1SArmin Le Grand 	void    SetColorTable( XColorListSharedPtr aColTab ) { maColorTab = aColTab; }
771cdf0e10cSrcweir 
SetPageType(sal_uInt16 * pInType)772cdf0e10cSrcweir 	void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
SetDlgType(sal_uInt16 * pInType)773cdf0e10cSrcweir 	void    SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; }
SetPos(sal_uInt16 * pInPos)774cdf0e10cSrcweir 	void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
SetAreaTP(sal_Bool * pIn)775cdf0e10cSrcweir 	void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
776cdf0e10cSrcweir 
SetColorChgd(ChangeType * pIn)777cdf0e10cSrcweir 	void    SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; }
778cdf0e10cSrcweir 
779cdf0e10cSrcweir 	virtual void FillUserData();
780cdf0e10cSrcweir };
781cdf0e10cSrcweir 
782cdf0e10cSrcweir 
783cdf0e10cSrcweir #endif // _CUI_TAB_AREA_HXX
784cdf0e10cSrcweir 
785