1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tparea.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
34 #ifdef SVX_DLLIMPLEMENTATION
35 #undef SVX_DLLIMPLEMENTATION
38 // include ---------------------------------------------------------------
39 #include <tools/shl.hxx>
40 #include <tools/urlobj.hxx>
41 #include <sfx2/app.hxx>
42 #include <sfx2/module.hxx>
44 #define _SVX_TPAREA_CXX
46 #if defined (UNX) || defined (WTC) || defined (ICC) || defined(WNT)
51 #include <svx/xpool.hxx>
52 #include <svx/dialogs.hrc>
53 #include "tabarea.hrc"
54 #include "dlgname.hrc"
55 #include <svx/xflbckit.hxx>
56 #include <svx/svdattr.hxx>
57 #include <svx/xtable.hxx>
58 #include <svx/xlineit0.hxx>
59 #include "drawitem.hxx"
60 #include "cuitabarea.hxx"
61 #include "dlgname.hxx"
62 #include <svx/dialmgr.hxx>
63 #include "dlgutil.hxx"
64 #include <svtools/intitem.hxx> //add CHINA001
65 #include <sfx2/request.hxx>//add CHINA001
67 #define DLGWIN this->GetParent()->GetParent()
69 // static ----------------------------------------------------------------
71 static USHORT pAreaRanges
[] =
73 XATTR_GRADIENTSTEPCOUNT
,
74 XATTR_GRADIENTSTEPCOUNT
,
80 static USHORT pTransparenceRanges
[] =
82 XATTR_FILLTRANSPARENCE
,
83 XATTR_FILLTRANSPARENCE
,
84 SDRATTR_SHADOWTRANSPARENCE
,
85 SDRATTR_SHADOWTRANSPARENCE
,
86 XATTR_FILLFLOATTRANSPARENCE
,
87 XATTR_FILLFLOATTRANSPARENCE
,
91 /*************************************************************************
93 |* Dialog for transparence
95 \************************************************************************/
97 IMPL_LINK(SvxTransparenceTabPage
, ClickTransOffHdl_Impl
, void *, EMPTYARG
)
99 // disable all other controls
100 ActivateLinear(FALSE
);
101 ActivateGradient(FALSE
);
104 rXFSet
.ClearItem (XATTR_FILLTRANSPARENCE
);
105 rXFSet
.ClearItem (XATTR_FILLFLOATTRANSPARENCE
);
106 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
107 aCtlBitmapPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
109 InvalidatePreview( FALSE
);
114 IMPL_LINK(SvxTransparenceTabPage
, ClickTransLinearHdl_Impl
, void *, EMPTYARG
)
116 // enable linear, disable other
117 ActivateLinear(TRUE
);
118 ActivateGradient(FALSE
);
121 rXFSet
.ClearItem (XATTR_FILLFLOATTRANSPARENCE
);
122 ModifyTransparentHdl_Impl (NULL
);
127 IMPL_LINK(SvxTransparenceTabPage
, ClickTransGradientHdl_Impl
, void *, EMPTYARG
)
129 // enable gradient, disable other
130 ActivateLinear(FALSE
);
131 ActivateGradient(TRUE
);
134 rXFSet
.ClearItem (XATTR_FILLTRANSPARENCE
);
135 ModifiedTrgrHdl_Impl (NULL
);
140 void SvxTransparenceTabPage::ActivateLinear(BOOL bActivate
)
142 aMtrTransparent
.Enable(bActivate
);
145 IMPL_LINK(SvxTransparenceTabPage
, ModifyTransparentHdl_Impl
, void*, EMPTYARG
)
147 UINT16 nPos
= (UINT16
)aMtrTransparent
.GetValue();
148 XFillTransparenceItem
aItem(nPos
);
149 rXFSet
.Put(XFillTransparenceItem(aItem
));
157 IMPL_LINK(SvxTransparenceTabPage
, ModifiedTrgrHdl_Impl
, void *, pControl
)
159 if(pControl
== &aLbTrgrGradientType
|| pControl
== this)
161 XGradientStyle eXGS
= (XGradientStyle
)aLbTrgrGradientType
.GetSelectEntryPos();
162 SetControlState_Impl( eXGS
);
166 UINT8 nStartCol
= (UINT8
)(((UINT16
)aMtrTrgrStartValue
.GetValue() * 255) / 100);
167 UINT8 nEndCol
= (UINT8
)(((UINT16
)aMtrTrgrEndValue
.GetValue() * 255) / 100);
168 XGradient
aTmpGradient(
169 Color(nStartCol
, nStartCol
, nStartCol
),
170 Color(nEndCol
, nEndCol
, nEndCol
),
171 (XGradientStyle
)aLbTrgrGradientType
.GetSelectEntryPos(),
172 (UINT16
)aMtrTrgrAngle
.GetValue() * 10,
173 (UINT16
)aMtrTrgrCenterX
.GetValue(),
174 (UINT16
)aMtrTrgrCenterY
.GetValue(),
175 (UINT16
)aMtrTrgrBorder
.GetValue(),
179 XFillFloatTransparenceItem
aItem( rXFSet
.GetPool()/*aString*/, aTmpGradient
);
180 rXFSet
.Put ( aItem
);
187 void SvxTransparenceTabPage::ActivateGradient(BOOL bActivate
)
189 aFtTrgrType
.Enable(bActivate
);
190 aLbTrgrGradientType
.Enable(bActivate
);
191 aFtTrgrCenterX
.Enable(bActivate
);
192 aMtrTrgrCenterX
.Enable(bActivate
);
193 aFtTrgrCenterY
.Enable(bActivate
);
194 aMtrTrgrCenterY
.Enable(bActivate
);
195 aFtTrgrAngle
.Enable(bActivate
);
196 aMtrTrgrAngle
.Enable(bActivate
);
197 aFtTrgrBorder
.Enable(bActivate
);
198 aMtrTrgrBorder
.Enable(bActivate
);
199 aFtTrgrStartValue
.Enable(bActivate
);
200 aMtrTrgrStartValue
.Enable(bActivate
);
201 aFtTrgrEndValue
.Enable(bActivate
);
202 aMtrTrgrEndValue
.Enable(bActivate
);
206 XGradientStyle eXGS
= (XGradientStyle
)aLbTrgrGradientType
.GetSelectEntryPos();
207 SetControlState_Impl( eXGS
);
211 IMPL_LINK(SvxTransparenceTabPage
, ChangeTrgrTypeHdl_Impl
, void *, EMPTYARG
)
216 void SvxTransparenceTabPage::SetControlState_Impl(XGradientStyle eXGS
)
222 aFtTrgrCenterX
.Disable();
223 aMtrTrgrCenterX
.Disable();
224 aFtTrgrCenterY
.Disable();
225 aMtrTrgrCenterY
.Disable();
226 aFtTrgrAngle
.Enable();
227 aMtrTrgrAngle
.Enable();
231 aFtTrgrCenterX
.Enable();
232 aMtrTrgrCenterX
.Enable();
233 aFtTrgrCenterY
.Enable();
234 aMtrTrgrCenterY
.Enable();
235 aFtTrgrAngle
.Disable();
236 aMtrTrgrAngle
.Disable();
239 case XGRAD_ELLIPTICAL
:
240 aFtTrgrCenterX
.Enable();
241 aMtrTrgrCenterX
.Enable();
242 aFtTrgrCenterY
.Enable();
243 aMtrTrgrCenterY
.Enable();
244 aFtTrgrAngle
.Enable();
245 aMtrTrgrAngle
.Enable();
250 aFtTrgrCenterX
.Enable();
251 aMtrTrgrCenterX
.Enable();
252 aFtTrgrCenterY
.Enable();
253 aMtrTrgrCenterY
.Enable();
254 aFtTrgrAngle
.Enable();
255 aMtrTrgrAngle
.Enable();
260 SvxTransparenceTabPage::SvxTransparenceTabPage(Window
* pParent
, const SfxItemSet
& rInAttrs
)
261 : SvxTabPage ( pParent
, SVX_RES( RID_SVXPAGE_TRANSPARENCE
), rInAttrs
),
262 rOutAttrs ( rInAttrs
),
266 aFlProp ( this, SVX_RES( FL_PROP
) ),
267 aRbtTransOff ( this, SVX_RES( RBT_TRANS_OFF
) ),
268 aRbtTransLinear ( this, SVX_RES( RBT_TRANS_LINEAR
) ),
269 aRbtTransGradient ( this, SVX_RES( RBT_TRANS_GRADIENT
) ),
271 aMtrTransparent ( this, SVX_RES( MTR_TRANSPARENT
) ),
273 aFtTrgrType ( this, SVX_RES( FT_TRGR_TYPE
) ),
274 aLbTrgrGradientType ( this, SVX_RES( LB_TRGR_GRADIENT_TYPES
) ),
275 aFtTrgrCenterX ( this, SVX_RES( FT_TRGR_CENTER_X
) ),
276 aMtrTrgrCenterX ( this, SVX_RES( MTR_TRGR_CENTER_X
) ),
277 aFtTrgrCenterY ( this, SVX_RES( FT_TRGR_CENTER_Y
) ),
278 aMtrTrgrCenterY ( this, SVX_RES( MTR_TRGR_CENTER_Y
) ),
279 aFtTrgrAngle ( this, SVX_RES( FT_TRGR_ANGLE
) ),
280 aMtrTrgrAngle ( this, SVX_RES( MTR_TRGR_ANGLE
) ),
281 aFtTrgrBorder ( this, SVX_RES( FT_TRGR_BORDER
) ),
282 aMtrTrgrBorder ( this, SVX_RES( MTR_TRGR_BORDER
) ),
283 aFtTrgrStartValue ( this, SVX_RES( FT_TRGR_START_VALUE
) ),
284 aMtrTrgrStartValue ( this, SVX_RES( MTR_TRGR_START_VALUE
) ),
285 aFtTrgrEndValue ( this, SVX_RES( FT_TRGR_END_VALUE
) ),
286 aMtrTrgrEndValue ( this, SVX_RES( MTR_TRGR_END_VALUE
) ),
288 aCtlBitmapPreview ( this, SVX_RES( CTL_BITMAP_PREVIEW
) ),
289 aCtlXRectPreview ( this, SVX_RES( CTL_TRANS_PREVIEW
) ),
291 pXPool ( (XOutdevItemPool
*) rInAttrs
.GetPool() ),
292 aXFillAttr ( pXPool
),
293 rXFSet ( aXFillAttr
.GetItemSet() )
298 aRbtTransOff
.SetClickHdl(LINK(this, SvxTransparenceTabPage
, ClickTransOffHdl_Impl
));
299 aRbtTransLinear
.SetClickHdl(LINK(this, SvxTransparenceTabPage
, ClickTransLinearHdl_Impl
));
300 aRbtTransGradient
.SetClickHdl(LINK(this, SvxTransparenceTabPage
, ClickTransGradientHdl_Impl
));
302 // linear transparency
303 aMtrTransparent
.SetValue( 50 );
304 aMtrTransparent
.SetModifyHdl(LINK(this, SvxTransparenceTabPage
, ModifyTransparentHdl_Impl
));
306 // gradient transparency
307 aMtrTrgrEndValue
.SetValue( 100 );
308 aMtrTrgrStartValue
.SetValue( 0 );
309 aLbTrgrGradientType
.SetSelectHdl(LINK(this, SvxTransparenceTabPage
, ChangeTrgrTypeHdl_Impl
));
310 Link aLink
= LINK( this, SvxTransparenceTabPage
, ModifiedTrgrHdl_Impl
);
311 aLbTrgrGradientType
.SetSelectHdl( aLink
);
312 aMtrTrgrCenterX
.SetModifyHdl( aLink
);
313 aMtrTrgrCenterY
.SetModifyHdl( aLink
);
314 aMtrTrgrAngle
.SetModifyHdl( aLink
);
315 aMtrTrgrBorder
.SetModifyHdl( aLink
);
316 aMtrTrgrStartValue
.SetModifyHdl( aLink
);
317 aMtrTrgrEndValue
.SetModifyHdl( aLink
);
319 // this page needs ExchangeSupport
320 SetExchangeSupport();
323 void SvxTransparenceTabPage::Construct()
327 SfxTabPage
* SvxTransparenceTabPage::Create(Window
* pWindow
, const SfxItemSet
& rAttrs
)
329 return(new SvxTransparenceTabPage(pWindow
, rAttrs
));
332 UINT16
* SvxTransparenceTabPage::GetRanges()
334 return(pTransparenceRanges
);
337 BOOL
SvxTransparenceTabPage::FillItemSet(SfxItemSet
& rAttrs
)
339 const SfxPoolItem
* pGradientItem
= NULL
;
340 const SfxPoolItem
* pLinearItem
= NULL
;
341 SfxItemState
eStateGradient(rOutAttrs
.GetItemState(XATTR_FILLFLOATTRANSPARENCE
, TRUE
, &pGradientItem
));
342 SfxItemState
eStateLinear(rOutAttrs
.GetItemState(XATTR_FILLTRANSPARENCE
, TRUE
, &pLinearItem
));
343 BOOL bGradActive
= (eStateGradient
== SFX_ITEM_SET
&& ((XFillFloatTransparenceItem
*)pGradientItem
)->IsEnabled());
344 BOOL bLinearActive
= (eStateLinear
== SFX_ITEM_SET
&& ((XFillTransparenceItem
*)pLinearItem
)->GetValue() != 0);
347 BOOL bGradUsed
= (eStateGradient
== SFX_ITEM_DONTCARE
);
348 BOOL bLinearUsed
= (eStateLinear
== SFX_ITEM_DONTCARE
);
350 BOOL
bModified(FALSE
);
351 BOOL
bSwitchOffLinear(FALSE
);
352 BOOL
bSwitchOffGradient(FALSE
);
354 if(aMtrTransparent
.IsEnabled())
356 // linear transparence
357 UINT16 nPos
= (UINT16
)aMtrTransparent
.GetValue();
358 if(nPos
!= (UINT16
)aMtrTransparent
.GetSavedValue().ToInt32() || !bLinearActive
)
360 XFillTransparenceItem
aItem(nPos
);
361 SdrShadowTransparenceItem
aShadowItem(nPos
);
362 const SfxPoolItem
* pOld
= GetOldItem(rAttrs
, XATTR_FILLTRANSPARENCE
);
363 if(!pOld
|| !(*(const XFillTransparenceItem
*)pOld
== aItem
) || !bLinearActive
)
366 rAttrs
.Put(aShadowItem
);
368 bSwitchOffGradient
= TRUE
;
372 else if(aLbTrgrGradientType
.IsEnabled())
374 // transparence gradient, fill ItemSet from values
376 || (XGradientStyle
)aLbTrgrGradientType
.GetSelectEntryPos() != (XGradientStyle
)aLbTrgrGradientType
.GetSavedValue()
377 || (UINT16
)aMtrTrgrAngle
.GetValue() != (UINT16
)aMtrTrgrAngle
.GetSavedValue().ToInt32()
378 || (UINT16
)aMtrTrgrCenterX
.GetValue() != (UINT16
)aMtrTrgrCenterX
.GetSavedValue().ToInt32()
379 || (UINT16
)aMtrTrgrCenterY
.GetValue() != (UINT16
)aMtrTrgrCenterY
.GetSavedValue().ToInt32()
380 || (UINT16
)aMtrTrgrBorder
.GetValue() != (UINT16
)aMtrTrgrBorder
.GetSavedValue().ToInt32()
381 || (UINT16
)aMtrTrgrStartValue
.GetValue() != (UINT16
)aMtrTrgrStartValue
.GetSavedValue().ToInt32()
382 || (UINT16
)aMtrTrgrEndValue
.GetValue() != (UINT16
)aMtrTrgrEndValue
.GetSavedValue().ToInt32() )
384 UINT8 nStartCol
= (UINT8
)(((UINT16
)aMtrTrgrStartValue
.GetValue() * 255) / 100);
385 UINT8 nEndCol
= (UINT8
)(((UINT16
)aMtrTrgrEndValue
.GetValue() * 255) / 100);
386 XGradient
aTmpGradient(
387 Color(nStartCol
, nStartCol
, nStartCol
),
388 Color(nEndCol
, nEndCol
, nEndCol
),
389 (XGradientStyle
)aLbTrgrGradientType
.GetSelectEntryPos(),
390 (UINT16
)aMtrTrgrAngle
.GetValue() * 10,
391 (UINT16
)aMtrTrgrCenterX
.GetValue(),
392 (UINT16
)aMtrTrgrCenterY
.GetValue(),
393 (UINT16
)aMtrTrgrBorder
.GetValue(),
397 XFillFloatTransparenceItem
aItem( rXFSet
.GetPool()/*aString*/, aTmpGradient
);
398 const SfxPoolItem
* pOld
= GetOldItem(rAttrs
, XATTR_FILLFLOATTRANSPARENCE
);
400 if(!pOld
|| !(*(const XFillFloatTransparenceItem
*)pOld
== aItem
) || !bGradActive
)
404 bSwitchOffLinear
= TRUE
;
411 bSwitchOffGradient
= TRUE
;
412 bSwitchOffLinear
= TRUE
;
415 // disable unused XFillFloatTransparenceItem
416 if(bSwitchOffGradient
&& (bGradActive
|| bGradUsed
))
418 Color
aColor(COL_BLACK
);
419 XGradient
aGrad(aColor
, Color(COL_WHITE
));
420 aGrad
.SetStartIntens(100);
421 aGrad
.SetEndIntens(100);
423 XFillFloatTransparenceItem
aItem( rXFSet
.GetPool()/*aString*/, aGrad
);
424 aItem
.SetEnabled(FALSE
);
429 // disable unused XFillFloatTransparenceItem
430 if(bSwitchOffLinear
&& (bLinearActive
|| bLinearUsed
))
432 XFillTransparenceItem
aItem(0);
433 SdrShadowTransparenceItem
aShadowItem(0);
435 rAttrs
.Put(aShadowItem
);
439 rAttrs
.Put (CntUInt16Item(SID_PAGE_TYPE
,nPageType
));
444 void SvxTransparenceTabPage::Reset(const SfxItemSet
& rAttrs
)
446 const SfxPoolItem
* pGradientItem
= NULL
;
447 SfxItemState
eStateGradient(rAttrs
.GetItemState(XATTR_FILLFLOATTRANSPARENCE
, TRUE
, &pGradientItem
));
449 pGradientItem
= &rAttrs
.Get(XATTR_FILLFLOATTRANSPARENCE
);
450 BOOL bGradActive
= (eStateGradient
== SFX_ITEM_SET
&& ((XFillFloatTransparenceItem
*)pGradientItem
)->IsEnabled());
452 const SfxPoolItem
* pLinearItem
= NULL
;
453 SfxItemState
eStateLinear(rAttrs
.GetItemState(XATTR_FILLTRANSPARENCE
, TRUE
, &pLinearItem
));
455 pLinearItem
= &rAttrs
.Get(XATTR_FILLTRANSPARENCE
);
456 BOOL bLinearActive
= (eStateLinear
== SFX_ITEM_SET
&& ((XFillTransparenceItem
*)pLinearItem
)->GetValue() != 0);
458 // transparence gradient
459 const XGradient
& rGradient
= ((XFillFloatTransparenceItem
*)pGradientItem
)->GetGradientValue();
460 XGradientStyle
eXGS(rGradient
.GetGradientStyle());
461 aLbTrgrGradientType
.SelectEntryPos(sal::static_int_cast
< USHORT
>(eXGS
));
462 aMtrTrgrAngle
.SetValue(rGradient
.GetAngle() / 10);
463 aMtrTrgrBorder
.SetValue(rGradient
.GetBorder());
464 aMtrTrgrCenterX
.SetValue(rGradient
.GetXOffset());
465 aMtrTrgrCenterY
.SetValue(rGradient
.GetYOffset());
466 aMtrTrgrStartValue
.SetValue((UINT16
)((((UINT16
)rGradient
.GetStartColor().GetRed() + 1) * 100) / 255));
467 aMtrTrgrEndValue
.SetValue((UINT16
)((((UINT16
)rGradient
.GetEndColor().GetRed() + 1) * 100) / 255));
469 // linear transparence
470 UINT16 nTransp
= ((XFillTransparenceItem
*)pLinearItem
)->GetValue();
471 aMtrTransparent
.SetValue(bLinearActive
? nTransp
: 50);
472 ModifyTransparentHdl_Impl(NULL
);
474 // select the correct radio button
477 // transparence gradient, set controls appropriate to item
478 aRbtTransGradient
.Check();
479 ClickTransGradientHdl_Impl(NULL
);
481 else if(bLinearActive
)
483 // linear transparence
484 aRbtTransLinear
.Check();
485 ClickTransLinearHdl_Impl(NULL
);
490 aRbtTransOff
.Check();
491 ClickTransOffHdl_Impl(NULL
);
492 ModifiedTrgrHdl_Impl(NULL
);
496 aMtrTransparent
.SaveValue();
497 aLbTrgrGradientType
.SaveValue();
498 aMtrTrgrCenterX
.SaveValue();
499 aMtrTrgrCenterY
.SaveValue();
500 aMtrTrgrAngle
.SaveValue();
501 aMtrTrgrBorder
.SaveValue();
502 aMtrTrgrStartValue
.SaveValue();
503 aMtrTrgrEndValue
.SaveValue();
505 BOOL bActive
= InitPreview ( rAttrs
);
506 InvalidatePreview ( bActive
);
509 void SvxTransparenceTabPage::ActivatePage(const SfxItemSet
& rSet
)
512 SFX_ITEMSET_ARG (&rSet
,pPageTypeItem
,CntUInt16Item
,SID_PAGE_TYPE
,sal_False
);
514 SetPageType(pPageTypeItem
->GetValue());
516 //CHINA001 if(*pDlgType == 0) // Flaechen-Dialog
517 //CHINA001 *pPageType = PT_TRANSPARENCE;
518 if(nDlgType
== 0) //add CHINA001 // Flaechen-Dialog
519 nPageType
= PT_TRANSPARENCE
; //add CHINA001
521 InitPreview ( rSet
);
524 int SvxTransparenceTabPage::DeactivatePage(SfxItemSet
* _pSet
)
527 FillItemSet( *_pSet
);
531 void SvxTransparenceTabPage::PointChanged(Window
* , RECT_POINT eRcPt
)
539 BOOL
SvxTransparenceTabPage::InitPreview ( const SfxItemSet
& rSet
)
541 // set transparencetyp for preview
542 if ( aRbtTransOff
.IsChecked() )
544 ClickTransOffHdl_Impl(NULL
);
545 } else if ( aRbtTransLinear
.IsChecked() )
547 ClickTransLinearHdl_Impl(NULL
);
548 } else if ( aRbtTransGradient
.IsChecked() )
550 ClickTransGradientHdl_Impl(NULL
);
553 // Get fillstyle for preview
554 rXFSet
.Put ( ( XFillStyleItem
& ) rSet
.Get(XATTR_FILLSTYLE
) );
555 rXFSet
.Put ( ( XFillColorItem
& ) rSet
.Get(XATTR_FILLCOLOR
) );
556 rXFSet
.Put ( ( XFillGradientItem
& ) rSet
.Get(XATTR_FILLGRADIENT
) );
557 rXFSet
.Put ( ( XFillHatchItem
& ) rSet
.Get(XATTR_FILLHATCH
) );
558 rXFSet
.Put ( ( XFillBackgroundItem
&)rSet
.Get(XATTR_FILLBACKGROUND
) );
559 rXFSet
.Put ( ( XFillBitmapItem
& ) rSet
.Get(XATTR_FILLBITMAP
) );
561 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
562 aCtlBitmapPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
564 bBitmap
= ( ( ( XFillStyleItem
& )rSet
.Get(XATTR_FILLSTYLE
) ).GetValue() == XFILL_BITMAP
);
566 // show the right preview window
569 aCtlBitmapPreview
.Show();
570 aCtlXRectPreview
.Hide();
574 aCtlBitmapPreview
.Hide();
575 aCtlXRectPreview
.Show();
578 return !aRbtTransOff
.IsChecked();
581 void SvxTransparenceTabPage::InvalidatePreview (BOOL bEnable
)
587 aCtlBitmapPreview
.Enable();
588 aCtlBitmapPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
591 aCtlBitmapPreview
.Disable();
592 aCtlBitmapPreview
.Invalidate();
598 aCtlXRectPreview
.Enable();
599 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
602 aCtlXRectPreview
.Disable();
603 aCtlXRectPreview
.Invalidate();
607 void SvxTransparenceTabPage::PageCreated (SfxAllItemSet aSet
) //add CHINA001
609 SFX_ITEMSET_ARG (&aSet
,pPageTypeItem
,SfxUInt16Item
,SID_PAGE_TYPE
,sal_False
);
610 SFX_ITEMSET_ARG (&aSet
,pDlgTypeItem
,SfxUInt16Item
,SID_DLG_TYPE
,sal_False
);
613 SetPageType(pPageTypeItem
->GetValue());
615 SetDlgType(pDlgTypeItem
->GetValue());
618 /*************************************************************************
620 |* Dialog to modify fill-attributes
622 \************************************************************************/
624 SvxAreaTabPage::SvxAreaTabPage( Window
* pParent
, const SfxItemSet
& rInAttrs
) :
626 SvxTabPage ( pParent
, SVX_RES( RID_SVXPAGE_AREA
), rInAttrs
),
628 aFlProp ( this, SVX_RES( FL_PROP
) ),
629 aTypeLB ( this, SVX_RES( LB_AREA_TYPE
) ),
631 aLbColor ( this, SVX_RES( LB_COLOR
) ),
632 aLbGradient ( this, SVX_RES( LB_GRADIENT
) ),
633 aLbHatching ( this, SVX_RES( LB_HATCHING
) ),
634 aLbBitmap ( this, SVX_RES( LB_BITMAP
) ),
635 aCtlBitmapPreview ( this, SVX_RES( CTL_BITMAP_PREVIEW
) ),
637 aTsbStepCount ( this, SVX_RES( TSB_STEPCOUNT
) ),
638 aFlStepCount ( this, SVX_RES( FL_STEPCOUNT
) ),
639 aNumFldStepCount ( this, SVX_RES( NUM_FLD_STEPCOUNT
) ),
641 aCbxHatchBckgrd ( this, SVX_RES( CB_HATCHBCKGRD
) ),
642 aLbHatchBckgrdColor ( this, SVX_RES( LB_HATCHBCKGRDCOLOR
) ),
644 aFlSize ( this, SVX_RES( FL_SIZE
) ),
645 aTsbOriginal ( this, SVX_RES( TSB_ORIGINAL
) ),
646 aTsbScale ( this, SVX_RES( TSB_SCALE
) ),
647 aFtXSize ( this, SVX_RES( FT_X_SIZE
) ),
648 aMtrFldXSize ( this, SVX_RES( MTR_FLD_X_SIZE
) ),
649 aFtYSize ( this, SVX_RES( FT_Y_SIZE
) ),
650 aMtrFldYSize ( this, SVX_RES( MTR_FLD_Y_SIZE
) ),
651 aFlPosition ( this, SVX_RES( FL_POSITION
) ),
652 aCtlPosition ( this, SVX_RES( CTL_POSITION
), RP_RM
, 110, 80, CS_RECT
),
653 aFtXOffset ( this, SVX_RES( FT_X_OFFSET
) ),
654 aMtrFldXOffset ( this, SVX_RES( MTR_FLD_X_OFFSET
) ),
655 aFtYOffset ( this, SVX_RES( FT_Y_OFFSET
) ),
656 aMtrFldYOffset ( this, SVX_RES( MTR_FLD_Y_OFFSET
) ),
657 aTsbTile ( this, SVX_RES( TSB_TILE
) ),
658 aTsbStretch ( this, SVX_RES( TSB_STRETCH
) ),
659 aFlOffset ( this, SVX_RES( FL_OFFSET
) ),
660 aRbtRow ( this, SVX_RES( RBT_ROW
) ),
661 aRbtColumn ( this, SVX_RES( RBT_COLUMN
) ),
662 aMtrFldOffset ( this, SVX_RES( MTR_FLD_OFFSET
) ),
664 aCtlXRectPreview ( this, SVX_RES( CTL_COLOR_PREVIEW
) ),
666 rOutAttrs ( rInAttrs
),
669 pGradientList( NULL
),
670 pHatchingList( NULL
),
673 pXPool ( (XOutdevItemPool
*) rInAttrs
.GetPool() ),
674 aXFillAttr ( pXPool
),
675 rXFSet ( aXFillAttr
.GetItemSet() )
679 // Gruppen, die sich ueberlagern
681 aCtlBitmapPreview
.Hide();
684 aTsbStepCount
.Hide();
685 aNumFldStepCount
.Hide();
698 aMtrFldOffset
.Hide();
702 aMtrFldXOffset
.Hide();
704 aMtrFldYOffset
.Hide();
706 // Controls for Hatch-Background
707 aCbxHatchBckgrd
.Hide();
708 aLbHatchBckgrdColor
.Hide();
711 aTsbOriginal
.EnableTriState( FALSE
);
714 // this page needs ExchangeSupport
715 SetExchangeSupport();
718 eFUnit
= GetModuleFieldUnit( &rInAttrs
);
726 default: ;//prevent warning
728 SetFieldUnit( aMtrFldXSize
, eFUnit
, TRUE
);
729 SetFieldUnit( aMtrFldYSize
, eFUnit
, TRUE
);
732 SfxItemPool
* pPool
= rOutAttrs
.GetPool();
733 DBG_ASSERT( pPool
, "Wo ist der Pool?" );
734 ePoolUnit
= pPool
->GetMetric( XATTR_FILLBMP_SIZEX
);
736 // Setzen Output-Devices
737 rXFSet
.Put( XFillStyleItem( XFILL_SOLID
) );
738 rXFSet
.Put( XFillColorItem( String(), COL_BLACK
) );
739 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
740 aCtlBitmapPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
742 aLbColor
.SetSelectHdl( LINK( this, SvxAreaTabPage
, ModifyColorHdl_Impl
) );
743 aLbHatchBckgrdColor
.SetSelectHdl( LINK( this, SvxAreaTabPage
, ModifyHatchBckgrdColorHdl_Impl
) );
744 aCbxHatchBckgrd
.SetToggleHdl( LINK( this, SvxAreaTabPage
, ToggleHatchBckgrdColorHdl_Impl
) );
746 aLbGradient
.SetSelectHdl(
747 LINK( this, SvxAreaTabPage
, ModifyGradientHdl_Impl
) );
748 aLbHatching
.SetSelectHdl(
749 LINK( this, SvxAreaTabPage
, ModifyHatchingHdl_Impl
) );
750 aLbBitmap
.SetSelectHdl(
751 LINK( this, SvxAreaTabPage
, ModifyBitmapHdl_Impl
) );
753 aTsbStepCount
.SetClickHdl(
754 LINK( this, SvxAreaTabPage
, ModifyStepCountHdl_Impl
) );
755 aNumFldStepCount
.SetModifyHdl(
756 LINK( this, SvxAreaTabPage
, ModifyStepCountHdl_Impl
) );
758 Link
aLink( LINK( this, SvxAreaTabPage
, ModifyTileHdl_Impl
) );
759 aTsbTile
.SetClickHdl( aLink
);
760 aTsbStretch
.SetClickHdl( aLink
);
761 aTsbOriginal
.SetClickHdl( aLink
);
762 aMtrFldXSize
.SetModifyHdl( aLink
);
763 aMtrFldYSize
.SetModifyHdl( aLink
);
764 aRbtRow
.SetClickHdl( aLink
);
765 aRbtColumn
.SetClickHdl( aLink
);
766 aMtrFldOffset
.SetModifyHdl( aLink
);
767 aMtrFldXOffset
.SetModifyHdl( aLink
);
768 aMtrFldYOffset
.SetModifyHdl( aLink
);
769 aTsbScale
.SetClickHdl( LINK( this, SvxAreaTabPage
, ClickScaleHdl_Impl
) );
771 aTypeLB
.SetSelectHdl( LINK( this, SvxAreaTabPage
, SelectDialogTypeHdl_Impl
) );
773 // #i76307# always paint the preview in LTR, because this is what the document does
774 aCtlXRectPreview
.EnableRTL(FALSE
);
777 // -----------------------------------------------------------------------
779 void SvxAreaTabPage::Construct()
781 // fill colortables / lists
782 aLbColor
.Fill( pColorTab
);
783 aLbHatchBckgrdColor
.Fill ( pColorTab
);
785 aLbGradient
.Fill( pGradientList
);
786 aLbHatching
.Fill( pHatchingList
);
787 aLbBitmap
.Fill( pBitmapList
);
790 // -----------------------------------------------------------------------
792 void SvxAreaTabPage::ActivatePage( const SfxItemSet
& rSet
)
797 SFX_ITEMSET_ARG (&rSet
,pPageTypeItem
,SfxUInt16Item
,SID_PAGE_TYPE
,sal_False
);
798 SFX_ITEMSET_ARG (&rSet
,pPosItem
,SfxUInt16Item
,SID_TABPAGE_POS
,sal_False
);
800 SetPageType(pPageTypeItem
->GetValue());
802 SetPos(pPosItem
->GetValue());
804 if( nDlgType
== 0 )//CHINA001 if( *pDlgType == 0 ) // Flaechen-Dialog
811 if( *pnBitmapListState
)
813 if( *pnBitmapListState
& CT_CHANGED
)
814 pBitmapList
= ( (SvxAreaTabDialog
*) DLGWIN
)->
817 _nPos
= aLbBitmap
.GetSelectEntryPos();
820 aLbBitmap
.Fill( pBitmapList
);
821 nCount
= aLbBitmap
.GetEntryCount();
823 ; // This case should never occur
824 else if( nCount
<= _nPos
)
825 aLbBitmap
.SelectEntryPos( 0 );
827 aLbBitmap
.SelectEntryPos( _nPos
);
828 ModifyBitmapHdl_Impl( this );
831 if( *pnHatchingListState
)
833 if( *pnHatchingListState
& CT_CHANGED
)
834 pHatchingList
= ( (SvxAreaTabDialog
*) DLGWIN
)->
835 GetNewHatchingList();
837 _nPos
= aLbHatching
.GetSelectEntryPos();
840 aLbHatching
.Fill( pHatchingList
);
841 nCount
= aLbHatching
.GetEntryCount();
843 ; // This case should never occur
844 else if( nCount
<= _nPos
)
845 aLbHatching
.SelectEntryPos( 0 );
847 aLbHatching
.SelectEntryPos( _nPos
);
848 ModifyHatchingHdl_Impl( this );
850 ModifyHatchBckgrdColorHdl_Impl( this );
853 if( *pnGradientListState
)
855 if( *pnGradientListState
& CT_CHANGED
)
856 pGradientList
= ( (SvxAreaTabDialog
*) DLGWIN
)->
857 GetNewGradientList();
859 _nPos
= aLbGradient
.GetSelectEntryPos();
862 aLbGradient
.Fill( pGradientList
);
863 nCount
= aLbGradient
.GetEntryCount();
865 ; // This case should never occur
866 else if( nCount
<= _nPos
)
867 aLbGradient
.SelectEntryPos( 0 );
869 aLbGradient
.SelectEntryPos( _nPos
);
870 ModifyGradientHdl_Impl( this );
873 if( *pnColorTableState
)
875 if( *pnColorTableState
& CT_CHANGED
)
876 pColorTab
= ( (SvxAreaTabDialog
*) DLGWIN
)->
879 _nPos
= aLbColor
.GetSelectEntryPos();
881 aLbColor
.Fill( pColorTab
);
882 nCount
= aLbColor
.GetEntryCount();
884 ; // This case should never occur
885 else if( nCount
<= _nPos
)
886 aLbColor
.SelectEntryPos( 0 );
888 aLbColor
.SelectEntryPos( _nPos
);
890 ModifyColorHdl_Impl( this );
892 // Backgroundcolor of hatch
893 _nPos
= aLbHatchBckgrdColor
.GetSelectEntryPos();
894 aLbHatchBckgrdColor
.Clear();
895 aLbHatchBckgrdColor
.Fill( pColorTab
);
896 nCount
= aLbHatchBckgrdColor
.GetEntryCount();
898 ; // This case should never occur
899 else if( nCount
<= _nPos
)
900 aLbHatchBckgrdColor
.SelectEntryPos( 0 );
902 aLbHatchBckgrdColor
.SelectEntryPos( _nPos
);
904 ModifyHatchBckgrdColorHdl_Impl( this );
907 // evaluate if any other Tabpage set another filltype
908 if( aTypeLB
.GetSelectEntryPos() > XFILL_NONE
)
910 switch( nPageType
)//CHINA001 switch( *pPageType )
913 aTypeLB
.SelectEntryPos( XFILL_GRADIENT
);
914 aLbGradient
.SelectEntryPos( _nPos
);//CHINA001 aLbGradient.SelectEntryPos( *pPos );
915 ClickGradientHdl_Impl( this );
919 aTypeLB
.SelectEntryPos( XFILL_HATCH
);
920 aLbHatching
.SelectEntryPos( _nPos
);//CHINA001 aLbHatching.SelectEntryPos( *pPos );
921 ClickHatchingHdl_Impl( this );
925 aTypeLB
.SelectEntryPos( XFILL_BITMAP
);
926 aLbBitmap
.SelectEntryPos( _nPos
);//CHINA001 aLbBitmap.SelectEntryPos( *pPos );
927 ClickBitmapHdl_Impl( this );
931 aTypeLB
.SelectEntryPos( XFILL_SOLID
);
932 aLbColor
.SelectEntryPos( _nPos
);//CHINA001 aLbColor.SelectEntryPos( *pPos );
933 aLbHatchBckgrdColor
.SelectEntryPos( _nPos
); //CHINA001 aLbHatchBckgrdColor.SelectEntryPos( *pPos );
934 ClickColorHdl_Impl( this );
938 nPageType
= PT_AREA
;//CHINA001 *pPageType = PT_AREA;
943 // -----------------------------------------------------------------------
945 int SvxAreaTabPage::DeactivatePage( SfxItemSet
* _pSet
)
947 if( nDlgType
== 0 ) // Flaechen-Dialog//CHINA001 if( *pDlgType == 0 ) // Flaechen-Dialog
949 XFillStyle eStyle
= (XFillStyle
) aTypeLB
.GetSelectEntryPos();
954 nPageType
= PT_GRADIENT
;//CHINA001 *pPageType = PT_GRADIENT;
955 nPos
= aLbGradient
.GetSelectEntryPos();//CHINA001 *pPos = aLbGradient.GetSelectEntryPos();
960 nPageType
= PT_HATCH
;//CHINA001 *pPageType = PT_HATCH;
961 nPos
= aLbHatching
.GetSelectEntryPos();//CHINA001 *pPos = aLbHatching.GetSelectEntryPos();
966 nPageType
= PT_BITMAP
;//CHINA001 *pPageType = PT_BITMAP;
967 nPos
= aLbBitmap
.GetSelectEntryPos();//CHINA001 *pPos = aLbBitmap.GetSelectEntryPos();
972 nPageType
= PT_COLOR
;//CHINA001 *pPageType = PT_COLOR;
973 nPos
= aLbColor
.GetSelectEntryPos();//CHINA001 *pPos = aLbColor.GetSelectEntryPos();
976 default: ;//prevent warning
981 FillItemSet( *_pSet
);
983 return( LEAVE_PAGE
);
986 // -----------------------------------------------------------------------
988 BOOL
SvxAreaTabPage::FillItemSet( SfxItemSet
& rAttrs
)
990 const SfxPoolItem
* pOld
= NULL
;
992 BOOL bModified
= FALSE
;
994 if( nDlgType
!= 0 || *pbAreaTP
)//CHINA001 if( *pDlgType != 0 || *pbAreaTP )
996 XFillStyle eStyle
= (XFillStyle
) aTypeLB
.GetSelectEntryPos();
997 XFillStyle eSavedStyle
= (XFillStyle
) aTypeLB
.GetSavedValue();
1002 if( eSavedStyle
!= eStyle
)
1004 XFillStyleItem
aStyleItem( XFILL_NONE
);
1005 pOld
= GetOldItem( rAttrs
, XATTR_FILLSTYLE
);
1006 if ( !pOld
|| !( *(const XFillStyleItem
*)pOld
== aStyleItem
) )
1008 rAttrs
.Put( aStyleItem
);
1016 _nPos
= aLbColor
.GetSelectEntryPos();
1017 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
&&
1018 _nPos
!= aLbColor
.GetSavedValue() )
1020 XFillColorItem
aItem( aLbColor
.GetSelectEntry(),
1021 aLbColor
.GetSelectEntryColor() );
1022 pOld
= GetOldItem( rAttrs
, XATTR_FILLCOLOR
);
1023 if ( !pOld
|| !( *(const XFillColorItem
*)pOld
== aItem
) )
1025 rAttrs
.Put( aItem
);
1030 if( (eSavedStyle
!= eStyle
) &&
1032 SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLCOLOR
), TRUE
) ) )
1034 XFillStyleItem
aStyleItem( XFILL_SOLID
);
1035 pOld
= GetOldItem( rAttrs
, XATTR_FILLSTYLE
);
1036 if ( !pOld
|| !( *(const XFillStyleItem
*)pOld
== aStyleItem
) )
1038 rAttrs
.Put( aStyleItem
);
1044 case XFILL_GRADIENT
:
1046 _nPos
= aLbGradient
.GetSelectEntryPos();
1047 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
&&
1048 _nPos
!= aLbGradient
.GetSavedValue() )
1050 XGradient aGradient
= pGradientList
->GetGradient( _nPos
)->GetGradient();
1051 String aString
= aLbGradient
.GetSelectEntry();
1052 XFillGradientItem
aItem( aString
, aGradient
);
1053 pOld
= GetOldItem( rAttrs
, XATTR_FILLGRADIENT
);
1054 if ( !pOld
|| !( *(const XFillGradientItem
*)pOld
== aItem
) )
1056 rAttrs
.Put( aItem
);
1061 if( (eSavedStyle
!= eStyle
) &&
1063 SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLGRADIENT
), TRUE
) ) )
1065 XFillStyleItem
aStyleItem( XFILL_GRADIENT
);
1066 pOld
= GetOldItem( rAttrs
, XATTR_FILLSTYLE
);
1067 if ( !pOld
|| !( *(const XFillStyleItem
*)pOld
== aStyleItem
) )
1069 rAttrs
.Put( aStyleItem
);
1077 _nPos
= aLbHatching
.GetSelectEntryPos();
1078 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
&&
1079 _nPos
!= aLbHatching
.GetSavedValue() )
1081 XHatch aHatching
= pHatchingList
->GetHatch( _nPos
)->GetHatch();
1082 String aString
= aLbHatching
.GetSelectEntry();
1083 XFillHatchItem
aItem( aString
, aHatching
);
1084 pOld
= GetOldItem( rAttrs
, XATTR_FILLHATCH
);
1085 if ( !pOld
|| !( *(const XFillHatchItem
*)pOld
== aItem
) )
1087 rAttrs
.Put( aItem
);
1091 XFillBackgroundItem
aItem ( aCbxHatchBckgrd
.IsChecked() );
1092 rAttrs
.Put( aItem
);
1093 nPos
= aLbHatchBckgrdColor
.GetSelectEntryPos();
1094 if( nPos
!= LISTBOX_ENTRY_NOTFOUND
&&
1095 nPos
!= aLbHatchBckgrdColor
.GetSavedValue() )
1097 XFillColorItem
aFillColorItem( aLbHatchBckgrdColor
.GetSelectEntry(),
1098 aLbHatchBckgrdColor
.GetSelectEntryColor() );
1099 pOld
= GetOldItem( rAttrs
, XATTR_FILLCOLOR
);
1100 if ( !pOld
|| !( *(const XFillColorItem
*)pOld
== aFillColorItem
) )
1102 rAttrs
.Put( aFillColorItem
);
1107 if( (eSavedStyle
!= eStyle
) &&
1109 SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLHATCH
), TRUE
) ) )
1111 XFillStyleItem
aStyleItem( XFILL_HATCH
);
1112 pOld
= GetOldItem( rAttrs
, XATTR_FILLSTYLE
);
1113 if ( !pOld
|| !( *(const XFillStyleItem
*)pOld
== aStyleItem
) )
1115 rAttrs
.Put( aStyleItem
);
1123 nPos
= aLbBitmap
.GetSelectEntryPos();
1124 if( nPos
!= LISTBOX_ENTRY_NOTFOUND
&&
1125 nPos
!= aLbBitmap
.GetSavedValue() )
1127 XOBitmap aXOBitmap
= pBitmapList
->GetBitmap( nPos
)->GetXBitmap();
1128 String aString
= aLbBitmap
.GetSelectEntry();
1129 XFillBitmapItem
aFillBitmapItem( aString
, aXOBitmap
);
1130 pOld
= GetOldItem( rAttrs
, XATTR_FILLBITMAP
);
1131 if ( !pOld
|| !( *(const XFillBitmapItem
*)pOld
== aFillBitmapItem
) )
1133 rAttrs
.Put( aFillBitmapItem
);
1138 if( (eSavedStyle
!= eStyle
) &&
1140 SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLBITMAP
), TRUE
) ) )
1142 XFillStyleItem
aStyleItem( XFILL_BITMAP
);
1143 pOld
= GetOldItem( rAttrs
, XATTR_FILLSTYLE
);
1144 if ( !pOld
|| !( *(const XFillStyleItem
*)pOld
== aStyleItem
) )
1146 rAttrs
.Put( aStyleItem
);
1155 if( aTsbStepCount
.IsEnabled() )
1158 BOOL bValueModified
= FALSE
;
1159 TriState eState
= aTsbStepCount
.GetState();
1160 if( eState
== STATE_CHECK
)
1162 if( eState
!= aTsbStepCount
.GetSavedValue() )
1163 bValueModified
= TRUE
;
1167 // Zustand != Disabled ?
1168 if( aNumFldStepCount
.GetText().Len() > 0 )
1170 nValue
= (UINT16
) aNumFldStepCount
.GetValue();
1171 if( nValue
!= (UINT16
) aNumFldStepCount
.GetSavedValue().ToInt32() )
1172 bValueModified
= TRUE
;
1175 if( bValueModified
)
1177 XGradientStepCountItem
aFillBitmapItem( nValue
);
1178 pOld
= GetOldItem( rAttrs
, XATTR_GRADIENTSTEPCOUNT
);
1179 if ( !pOld
|| !( *(const XGradientStepCountItem
*)pOld
== aFillBitmapItem
) )
1181 rAttrs
.Put( aFillBitmapItem
);
1188 if( aTsbTile
.IsEnabled() )
1190 TriState eState
= aTsbTile
.GetState();
1191 if( eState
!= aTsbTile
.GetSavedValue() )
1193 XFillBmpTileItem
aFillBmpTileItem(
1194 sal::static_int_cast
< BOOL
>( eState
) );
1195 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_TILE
);
1196 if ( !pOld
|| !( *(const XFillBmpTileItem
*)pOld
== aFillBmpTileItem
) )
1198 rAttrs
.Put( aFillBmpTileItem
);
1204 if( aTsbStretch
.IsEnabled() )
1206 TriState eState
= aTsbStretch
.GetState();
1207 if( eState
!= aTsbStretch
.GetSavedValue() )
1209 XFillBmpStretchItem
aFillBmpStretchItem(
1210 sal::static_int_cast
< BOOL
>( eState
) );
1211 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_STRETCH
);
1212 if ( !pOld
|| !( *(const XFillBmpStretchItem
*)pOld
== aFillBmpStretchItem
) )
1214 rAttrs
.Put( aFillBmpStretchItem
);
1220 // Originalgroesse (im UI) wird wie folgt benutzt:
1221 // Controls sind disabled, muessen aber gesetzt werden.
1222 // SizeX = 0; SizeY = 0; Log = TRUE
1225 TriState eState
= aTsbScale
.GetState();
1226 if( eState
!= aTsbScale
.GetSavedValue() ||
1227 ( !aTsbScale
.IsEnabled() &&
1228 aTsbOriginal
.IsEnabled() &&
1229 aTsbScale
.GetSavedValue() != STATE_CHECK
) )
1231 XFillBmpSizeLogItem
* pItem
= NULL
;
1232 if( aTsbScale
.IsEnabled() )
1233 pItem
= new XFillBmpSizeLogItem( eState
== STATE_NOCHECK
);
1234 else if( aTsbOriginal
.IsEnabled() && aTsbOriginal
.GetState() == STATE_CHECK
)
1235 pItem
= new XFillBmpSizeLogItem( TRUE
);
1239 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_SIZELOG
);
1240 if ( !pOld
|| !( *(const XFillBmpSizeLogItem
*)pOld
== *pItem
) )
1242 rAttrs
.Put( *pItem
);
1250 String aStr
= aMtrFldXSize
.GetText();
1252 XFillBmpSizeXItem
* pItem
= NULL
;
1253 TriState eScaleState
= aTsbScale
.GetState();
1255 if( aMtrFldXSize
.IsEnabled() &&
1257 aStr
!= aMtrFldXSize
.GetSavedValue() )
1259 if( eScaleState
== STATE_NOCHECK
)
1260 pItem
= new XFillBmpSizeXItem( GetCoreValue( aMtrFldXSize
, ePoolUnit
) );
1263 // Prozentwerte werden negativ gesetzt, damit
1264 // diese nicht skaliert werden; dieses wird
1265 // im Item beruecksichtigt ( KA05.11.96 )
1266 pItem
= new XFillBmpSizeXItem( -labs( static_cast<long>(aMtrFldXSize
.GetValue()) ) );
1269 else if( aTsbOriginal
.IsEnabled() &&
1270 aTsbOriginal
.GetState() == STATE_CHECK
&&
1271 aMtrFldXSize
.GetSavedValue().Len() > 0 )
1272 pItem
= new XFillBmpSizeXItem( 0 );
1276 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_SIZEX
);
1277 if ( !pOld
|| !( *(const XFillBmpSizeXItem
*)pOld
== *pItem
) )
1279 rAttrs
.Put( *pItem
);
1287 aStr
= aMtrFldYSize
.GetText();
1289 XFillBmpSizeYItem
* pItem
= NULL
;
1290 TriState eScaleState
= aTsbScale
.GetState();
1292 if( aMtrFldYSize
.IsEnabled() &&
1294 aStr
!= aMtrFldYSize
.GetSavedValue() )
1296 if( eScaleState
== STATE_NOCHECK
)
1297 pItem
= new XFillBmpSizeYItem( GetCoreValue( aMtrFldYSize
, ePoolUnit
) );
1300 // Prozentwerte werden negativ gesetzt, damit
1301 // diese vom MetricItem nicht skaliert werden;
1302 // dieses wird im Item beruecksichtigt ( KA05.11.96 )
1303 pItem
= new XFillBmpSizeYItem( -labs( static_cast<long>(aMtrFldYSize
.GetValue()) ) );
1306 else if( aTsbOriginal
.IsEnabled() &&
1307 aTsbOriginal
.GetState() == STATE_CHECK
&&
1308 aMtrFldYSize
.GetSavedValue().Len() > 0 )
1309 pItem
= new XFillBmpSizeYItem( 0 );
1313 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_SIZEY
);
1314 if ( !pOld
|| !( *(const XFillBmpSizeYItem
*)pOld
== *pItem
) )
1316 rAttrs
.Put( *pItem
);
1326 if( aMtrFldOffset
.IsEnabled() )
1328 String aMtrString
= aMtrFldOffset
.GetText();
1329 if( ( aMtrString
.Len() > 0 &&
1330 aMtrString
!= aMtrFldOffset
.GetSavedValue() ) ||
1331 aRbtRow
.GetSavedValue() != aRbtRow
.IsChecked() ||
1332 aRbtColumn
.GetSavedValue() != aRbtColumn
.IsChecked() )
1334 if( aRbtRow
.IsChecked() )
1336 XFillBmpTileOffsetXItem
aFillBmpTileOffsetXItem( (UINT16
) aMtrFldOffset
.GetValue() );
1337 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_TILEOFFSETX
);
1338 if ( !pOld
|| !( *(const XFillBmpTileOffsetXItem
*)pOld
== aFillBmpTileOffsetXItem
) )
1340 rAttrs
.Put( aFillBmpTileOffsetXItem
);
1341 rAttrs
.Put( XFillBmpTileOffsetYItem( 0 ) );
1345 else if( aRbtColumn
.IsChecked() )
1347 XFillBmpTileOffsetYItem
aFillBmpTileOffsetYItem( (UINT16
) aMtrFldOffset
.GetValue() );
1348 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_TILEOFFSETY
);
1349 if ( !pOld
|| !( *(const XFillBmpTileOffsetYItem
*)pOld
== aFillBmpTileOffsetYItem
) )
1351 rAttrs
.Put( aFillBmpTileOffsetYItem
);
1352 rAttrs
.Put( XFillBmpTileOffsetXItem( 0 ) );
1360 if( aCtlPosition
.IsEnabled() )
1363 RECT_POINT _eRP
= aCtlPosition
.GetActualRP();
1365 if( SFX_ITEM_DONTCARE
== rOutAttrs
.GetItemState( XATTR_FILLBMP_POS
) )
1369 RECT_POINT eValue
= ( ( const XFillBmpPosItem
& ) rOutAttrs
.Get( XATTR_FILLBMP_POS
) ).GetValue();
1370 if( eValue
!= _eRP
)
1375 XFillBmpPosItem
aFillBmpPosItem( _eRP
);
1376 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_POS
);
1377 if ( !pOld
|| !( *(const XFillBmpPosItem
*)pOld
== aFillBmpPosItem
) )
1379 rAttrs
.Put( aFillBmpPosItem
);
1386 if( aMtrFldXOffset
.IsEnabled() )
1388 String sMtrXOffset
= aMtrFldXOffset
.GetText();
1389 if( sMtrXOffset
.Len() > 0 &&
1390 sMtrXOffset
!= aMtrFldXOffset
.GetSavedValue() )
1392 XFillBmpPosOffsetXItem
aFillBmpPosOffsetXItem( (UINT16
) aMtrFldXOffset
.GetValue() );
1393 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_POSOFFSETX
);
1394 if ( !pOld
|| !( *(const XFillBmpPosOffsetXItem
*)pOld
== aFillBmpPosOffsetXItem
) )
1396 rAttrs
.Put( aFillBmpPosOffsetXItem
);
1403 if( aMtrFldYOffset
.IsEnabled() )
1405 String sMtrYOffset
= aMtrFldYOffset
.GetText();
1406 if( sMtrYOffset
.Len() > 0 &&
1407 sMtrYOffset
!= aMtrFldYOffset
.GetSavedValue() )
1409 XFillBmpPosOffsetYItem
aFillBmpPosOffsetYItem( (UINT16
) aMtrFldYOffset
.GetValue() );
1410 pOld
= GetOldItem( rAttrs
, XATTR_FILLBMP_POSOFFSETY
);
1411 if ( !pOld
|| !( *(const XFillBmpPosOffsetYItem
*)pOld
== aFillBmpPosOffsetYItem
) )
1413 rAttrs
.Put( aFillBmpPosOffsetYItem
);
1418 //add CHINA001 begin
1419 rAttrs
.Put (SfxUInt16Item(SID_PAGE_TYPE
,nPageType
));
1420 rAttrs
.Put (SfxUInt16Item(SID_TABPAGE_POS
,nPos
));
1424 return( bModified
);
1427 // -----------------------------------------------------------------------
1429 void SvxAreaTabPage::Reset( const SfxItemSet
& rAttrs
)
1431 //const SfxPoolItem *pPoolItem = NULL;
1434 if( rAttrs
.GetItemState( XATTR_FILLSTYLE
) != SFX_ITEM_DONTCARE
)
1436 eXFS
= (XFillStyle
) ( ( ( const XFillStyleItem
& ) rAttrs
.
1437 Get( GetWhich( XATTR_FILLSTYLE
) ) ).GetValue() );
1438 aTypeLB
.SelectEntryPos( sal::static_int_cast
< USHORT
>( eXFS
) );
1442 ClickInvisibleHdl_Impl( this );
1446 //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) )
1447 if( SFX_ITEM_DONTCARE
!= rAttrs
.GetItemState( XATTR_FILLCOLOR
) )
1449 XFillColorItem
aColorItem( ( const XFillColorItem
& )
1450 rAttrs
.Get( XATTR_FILLCOLOR
) );
1452 aLbColor
.SelectEntry( aColorItem
.GetColorValue() );
1453 aLbHatchBckgrdColor
.SelectEntry( aColorItem
.GetColorValue() );
1455 ClickColorHdl_Impl( this );
1459 case XFILL_GRADIENT
:
1460 //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) )
1461 if( SFX_ITEM_DONTCARE
!= rAttrs
.GetItemState( XATTR_FILLGRADIENT
) )
1463 XFillGradientItem
aGradientItem( ( ( const XFillGradientItem
& )
1464 rAttrs
.Get( XATTR_FILLGRADIENT
) ) );
1465 String
aString( aGradientItem
.GetName() );
1466 XGradient
aGradient( aGradientItem
.GetGradientValue() );
1468 aLbGradient
.SelectEntryByList( pGradientList
, aString
, aGradient
);
1470 ClickGradientHdl_Impl( this );
1474 //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) )
1475 if( SFX_ITEM_DONTCARE
!= rAttrs
.GetItemState( XATTR_FILLHATCH
) )
1477 aLbHatching
.SelectEntry( ( ( const XFillHatchItem
& )
1478 rAttrs
.Get( XATTR_FILLHATCH
) ).GetName() );
1480 ClickHatchingHdl_Impl( this );
1482 if ( SFX_ITEM_DONTCARE
!= rAttrs
.GetItemState ( XATTR_FILLBACKGROUND
) )
1484 aCbxHatchBckgrd
.Check ( ( ( const XFillBackgroundItem
& ) rAttrs
.Get ( XATTR_FILLBACKGROUND
) ).GetValue() );
1486 ToggleHatchBckgrdColorHdl_Impl( this );
1487 if( SFX_ITEM_DONTCARE
!= rAttrs
.GetItemState( XATTR_FILLCOLOR
) )
1489 XFillColorItem
aColorItem( ( const XFillColorItem
& )
1490 rAttrs
.Get( XATTR_FILLCOLOR
) );
1492 aLbColor
.SelectEntry( aColorItem
.GetColorValue() );
1493 aLbHatchBckgrdColor
.SelectEntry( aColorItem
.GetColorValue() );
1499 if( SFX_ITEM_DONTCARE
!= rAttrs
.GetItemState( XATTR_FILLBITMAP
) )
1501 XFillBitmapItem
aBitmapItem( ( const XFillBitmapItem
& )
1502 rAttrs
.Get( XATTR_FILLBITMAP
) );
1504 String
aString( aBitmapItem
.GetName() );
1505 aLbBitmap
.SelectEntry( aString
);
1507 ClickBitmapHdl_Impl( this );
1512 //aLbColor.SelectEntryPos(0);
1513 //aRbtColor.Check();
1519 // Alle LBs nicht zug"anglich machen
1524 aCtlBitmapPreview
.Hide();
1528 // Damit Reset() auch mit Zurueck richtig funktioniert
1529 aTypeLB
.SetNoSelection();
1533 if( ( rAttrs
.GetItemState( XATTR_GRADIENTSTEPCOUNT
) != SFX_ITEM_DONTCARE
) ||
1534 ( rAttrs
.GetItemState( XATTR_FILLSTYLE
) != SFX_ITEM_DONTCARE
) )
1536 aTsbStepCount
.EnableTriState( FALSE
);
1537 UINT16 nValue
= ( ( const XGradientStepCountItem
& ) rAttrs
.Get( XATTR_GRADIENTSTEPCOUNT
) ).GetValue();
1540 aTsbStepCount
.SetState( STATE_CHECK
);
1541 aNumFldStepCount
.SetText( String() );
1545 aTsbStepCount
.SetState( STATE_NOCHECK
);
1546 aNumFldStepCount
.SetValue( nValue
);
1548 ModifyStepCountHdl_Impl( &aTsbStepCount
);
1552 aTsbStepCount
.SetState( STATE_DONTKNOW
);
1553 aNumFldStepCount
.SetText( String() );
1556 // Attribute fuer die Bitmap-Fuellung
1558 // Ist Kacheln gesetzt?
1559 if( rAttrs
.GetItemState( XATTR_FILLBMP_TILE
) != SFX_ITEM_DONTCARE
)
1561 aTsbTile
.EnableTriState( FALSE
);
1563 if( ( ( const XFillBmpTileItem
& ) rAttrs
.Get( XATTR_FILLBMP_TILE
) ).GetValue() )
1564 aTsbTile
.SetState( STATE_CHECK
);
1566 aTsbTile
.SetState( STATE_NOCHECK
);
1569 aTsbTile
.SetState( STATE_DONTKNOW
);
1571 // Ist Stretchen gesetzt?
1572 if( rAttrs
.GetItemState( XATTR_FILLBMP_STRETCH
) != SFX_ITEM_DONTCARE
)
1574 aTsbStretch
.EnableTriState( FALSE
);
1576 if( ( ( const XFillBmpStretchItem
& ) rAttrs
.Get( XATTR_FILLBMP_STRETCH
) ).GetValue() )
1577 aTsbStretch
.SetState( STATE_CHECK
);
1579 aTsbStretch
.SetState( STATE_NOCHECK
);
1582 aTsbStretch
.SetState( STATE_DONTKNOW
);
1586 if( rAttrs
.GetItemState( XATTR_FILLBMP_SIZELOG
) != SFX_ITEM_DONTCARE
)
1588 aTsbScale
.EnableTriState( FALSE
);
1590 if( ( ( const XFillBmpSizeLogItem
& ) rAttrs
.Get( XATTR_FILLBMP_SIZELOG
) ).GetValue() )
1591 aTsbScale
.SetState( STATE_NOCHECK
);
1593 aTsbScale
.SetState( STATE_CHECK
);
1595 ClickScaleHdl_Impl( NULL
);
1598 aTsbScale
.SetState( STATE_DONTKNOW
);
1601 // Status fuer Originalgroesse ermitteln
1602 TriState eOriginal
= STATE_NOCHECK
;
1605 if( rAttrs
.GetItemState( XATTR_FILLBMP_SIZEX
) != SFX_ITEM_DONTCARE
)
1607 INT32 nValue
= ( ( const XFillBmpSizeXItem
& ) rAttrs
.Get( XATTR_FILLBMP_SIZEX
) ).GetValue();
1608 if( aTsbScale
.GetState() == STATE_CHECK
)
1610 // Wenn im Item eine Prozentangabe steckt,
1611 // so ist diese wegen des MetricItems negativ
1612 aMtrFldXSize
.SetValue( labs( nValue
) );
1615 SetMetricValue( aMtrFldXSize
, nValue
, ePoolUnit
);
1616 aMtrFldXSize
.SaveValue();
1620 eOriginal
= STATE_CHECK
;
1621 // Wert ist beim Ausschalten von Originalgroesse sonst zu klein
1622 // (Performance-Problem)
1623 aMtrFldXSize
.SetValue( 100 );
1628 aMtrFldXSize
.SetText( String() );
1629 aMtrFldXSize
.SaveValue();
1633 if( rAttrs
.GetItemState( XATTR_FILLBMP_SIZEY
) != SFX_ITEM_DONTCARE
)
1635 INT32 nValue
= ( ( const XFillBmpSizeYItem
& ) rAttrs
.Get( XATTR_FILLBMP_SIZEY
) ).GetValue();
1636 if( aTsbScale
.GetState() == STATE_CHECK
)
1638 // Wenn im Item eine Prozentangabe steckt,
1639 // so ist diese wegen des MetricItems negativ
1640 aMtrFldYSize
.SetValue( labs( nValue
) );
1643 SetMetricValue( aMtrFldYSize
, nValue
, ePoolUnit
);
1644 aMtrFldYSize
.SaveValue();
1647 aMtrFldYSize
.SetValue( 100 ); //s.o.
1649 eOriginal
= STATE_NOCHECK
;
1653 aMtrFldYSize
.SetText( String() );
1654 aMtrFldYSize
.SaveValue();
1655 eOriginal
= STATE_NOCHECK
;
1659 aTsbOriginal
.SetState( eOriginal
);
1661 // #93372# Setting proper state after changing button
1662 ModifyTileHdl_Impl( NULL
);
1667 if( rAttrs
.GetItemState( XATTR_FILLBMP_TILEOFFSETX
) != SFX_ITEM_DONTCARE
)
1669 UINT16 nValue
= ( ( const XFillBmpTileOffsetXItem
& ) rAttrs
.Get( XATTR_FILLBMP_TILEOFFSETX
) ).GetValue();
1672 aMtrFldOffset
.SetValue( nValue
);
1675 else if( rAttrs
.GetItemState( XATTR_FILLBMP_TILEOFFSETY
) != SFX_ITEM_DONTCARE
)
1677 nValue
= ( ( const XFillBmpTileOffsetYItem
& ) rAttrs
.Get( XATTR_FILLBMP_TILEOFFSETY
) ).GetValue();
1680 aMtrFldOffset
.SetValue( nValue
);
1685 aMtrFldOffset
.SetValue( 0 );
1688 aMtrFldOffset
.SetText( String() );
1692 if( rAttrs
.GetItemState( XATTR_FILLBMP_POS
) != SFX_ITEM_DONTCARE
)
1694 RECT_POINT eValue
= ( ( const XFillBmpPosItem
& ) rAttrs
.Get( XATTR_FILLBMP_POS
) ).GetValue();
1695 aCtlPosition
.SetActualRP( eValue
);
1698 aCtlPosition
.Reset();
1701 if( rAttrs
.GetItemState( XATTR_FILLBMP_POSOFFSETX
) != SFX_ITEM_DONTCARE
)
1703 INT32 nValue
= ( ( const XFillBmpPosOffsetXItem
& ) rAttrs
.Get( XATTR_FILLBMP_POSOFFSETX
) ).GetValue();
1704 aMtrFldXOffset
.SetValue( nValue
);
1707 aMtrFldXOffset
.SetText( String() );
1710 if( rAttrs
.GetItemState( XATTR_FILLBMP_POSOFFSETY
) != SFX_ITEM_DONTCARE
)
1712 INT32 nValue
= ( ( const XFillBmpPosOffsetYItem
& ) rAttrs
.Get( XATTR_FILLBMP_POSOFFSETY
) ).GetValue();
1713 aMtrFldYOffset
.SetValue( nValue
);
1716 aMtrFldYOffset
.SetText( String() );
1718 // Erst hier, damit Tile und Stretch mit beruecksichtigt wird
1719 if( aTypeLB
.GetSelectEntryPos() == XFILL_BITMAP
)
1720 ClickBitmapHdl_Impl( NULL
);
1723 aTypeLB
.SaveValue();
1724 aLbColor
.SaveValue();
1725 aLbGradient
.SaveValue();
1726 aLbHatching
.SaveValue();
1727 //aCbxHatchBckgrd.SaveValue();
1728 aLbHatchBckgrdColor
.SaveValue();
1729 aLbBitmap
.SaveValue();
1730 // aLbTransparent.SaveValue();
1731 aTsbStepCount
.SaveValue();
1732 aNumFldStepCount
.SaveValue();
1733 aTsbTile
.SaveValue();
1734 aTsbStretch
.SaveValue();
1735 aTsbScale
.SaveValue();
1736 aRbtRow
.SaveValue();
1737 aRbtColumn
.SaveValue();
1738 aMtrFldOffset
.SaveValue();
1739 aMtrFldXOffset
.SaveValue();
1740 aMtrFldYOffset
.SaveValue();
1741 //aMtrFldXSize.SaveValue(); <- wird oben behandelt
1742 //aMtrFldYSize.SaveValue(); <- wird oben behandelt
1745 // -----------------------------------------------------------------------
1747 SfxTabPage
* SvxAreaTabPage::Create( Window
* pWindow
,
1748 const SfxItemSet
& rAttrs
)
1750 return( new SvxAreaTabPage( pWindow
, rAttrs
) );
1753 //------------------------------------------------------------------------
1755 USHORT
* SvxAreaTabPage::GetRanges()
1757 return( pAreaRanges
);
1760 //------------------------------------------------------------------------
1761 IMPL_LINK( SvxAreaTabPage
, SelectDialogTypeHdl_Impl
, ListBox
*, EMPTYARG
)
1763 switch( (XFillStyle
)aTypeLB
.GetSelectEntryPos() )
1765 case XFILL_NONE
: ClickInvisibleHdl_Impl( this ); break;
1766 case XFILL_SOLID
: ClickColorHdl_Impl( this ); break;
1767 case XFILL_GRADIENT
: ClickGradientHdl_Impl( this ); break;
1768 case XFILL_HATCH
: ClickHatchingHdl_Impl( this ); break;
1769 case XFILL_BITMAP
: ClickBitmapHdl_Impl( this ); break;
1775 IMPL_LINK( SvxAreaTabPage
, ClickInvisibleHdl_Impl
, void *, EMPTYARG
)
1780 aTsbOriginal
.Hide();
1782 aMtrFldXSize
.Hide();
1784 aMtrFldYSize
.Hide();
1788 aMtrFldOffset
.Hide();
1790 aCtlPosition
.Hide();
1792 aMtrFldXOffset
.Hide();
1794 aMtrFldYOffset
.Hide();
1801 aCtlXRectPreview
.Hide();
1802 aCtlBitmapPreview
.Hide();
1804 aFlStepCount
.Hide();
1805 aTsbStepCount
.Hide();
1806 aNumFldStepCount
.Hide();
1808 // Controls for Hatch-Background
1809 aCbxHatchBckgrd
.Hide();
1810 aLbHatchBckgrdColor
.Hide();
1812 rXFSet
.Put( XFillStyleItem( XFILL_NONE
) );
1813 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
1814 aCtlBitmapPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
1816 aCtlXRectPreview
.Invalidate();
1817 aCtlBitmapPreview
.Invalidate();
1822 //------------------------------------------------------------------------
1824 IMPL_LINK( SvxAreaTabPage
, ClickColorHdl_Impl
, void *, EMPTYARG
)
1829 aTsbOriginal
.Hide();
1831 aMtrFldXSize
.Hide();
1833 aMtrFldYSize
.Hide();
1837 aMtrFldOffset
.Hide();
1839 aCtlPosition
.Hide();
1841 aMtrFldXOffset
.Hide();
1843 aMtrFldYOffset
.Hide();
1851 aCtlXRectPreview
.Enable();
1852 aCtlXRectPreview
.Show();
1853 aCtlBitmapPreview
.Hide();
1855 aFlStepCount
.Hide();
1856 aTsbStepCount
.Hide();
1857 aNumFldStepCount
.Hide();
1859 // Controls for Hatch-Background
1860 aCbxHatchBckgrd
.Hide();
1861 aLbHatchBckgrdColor
.Hide();
1863 // Text der Tabelle setzen
1864 String
aString( SVX_RES( RID_SVXSTR_TABLE
) ); aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
1865 INetURLObject
aURL( pColorTab
->GetPath() );
1867 aURL
.Append( pColorTab
->GetName() );
1868 DBG_ASSERT( aURL
.GetProtocol() != INET_PROT_NOT_VALID
, "invalid URL" );
1870 if( aURL
.getBase().getLength() > 18 )
1872 aString
+= String(aURL
.getBase()).Copy( 0, 15 );
1873 aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
1876 aString
+= String(aURL
.getBase());
1878 ModifyColorHdl_Impl( this );
1882 //------------------------------------------------------------------------
1884 IMPL_LINK( SvxAreaTabPage
, ModifyColorHdl_Impl
, void *, EMPTYARG
)
1886 const SfxPoolItem
* pPoolItem
= NULL
;
1887 USHORT _nPos
= aLbColor
.GetSelectEntryPos();
1888 aLbHatchBckgrdColor
.SelectEntryPos( _nPos
);
1889 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
)
1891 rXFSet
.Put( XFillStyleItem( XFILL_SOLID
) );
1892 rXFSet
.Put( XFillColorItem( String(),
1893 aLbColor
.GetSelectEntryColor() ) );
1896 else if( SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLCOLOR
), TRUE
, &pPoolItem
) )
1898 rXFSet
.Put( XFillStyleItem( XFILL_SOLID
) );
1899 Color
aColor( ( ( const XFillColorItem
* ) pPoolItem
)->GetColorValue() );
1900 rXFSet
.Put( XFillColorItem( String(), aColor
) );
1903 rXFSet
.Put( XFillStyleItem( XFILL_NONE
) );
1905 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
1906 aCtlXRectPreview
.Invalidate();
1910 //------------------------------------------------------------------------
1912 IMPL_LINK( SvxAreaTabPage
, ClickGradientHdl_Impl
, void *, EMPTYARG
)
1917 aTsbOriginal
.Hide();
1919 aMtrFldXSize
.Hide();
1921 aMtrFldYSize
.Hide();
1925 aMtrFldOffset
.Hide();
1927 aCtlPosition
.Hide();
1929 aMtrFldXOffset
.Hide();
1931 aMtrFldYOffset
.Hide();
1935 aLbGradient
.Enable();
1939 aCtlXRectPreview
.Enable();
1940 aCtlXRectPreview
.Show();
1941 aCtlBitmapPreview
.Hide();
1943 aFlStepCount
.Enable();
1944 aFlStepCount
.Show();
1945 aTsbStepCount
.Enable();
1946 aTsbStepCount
.Show();
1947 aNumFldStepCount
.Show();
1949 // Controls for Hatch-Background
1950 aCbxHatchBckgrd
.Hide();
1951 aLbHatchBckgrdColor
.Hide();
1953 // Text der Tabelle setzen
1954 String
aString( SVX_RES( RID_SVXSTR_TABLE
) ); aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
1955 INetURLObject
aURL( pGradientList
->GetPath() );
1957 aURL
.Append( pGradientList
->GetName() );
1958 DBG_ASSERT( aURL
.GetProtocol() != INET_PROT_NOT_VALID
, "invalid URL" );
1960 if( aURL
.getBase().getLength() > 18 )
1962 aString
+= String(aURL
.getBase()).Copy( 0, 15 );
1963 aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
1966 aString
+= String(aURL
.getBase());
1968 ModifyGradientHdl_Impl( this );
1969 ModifyStepCountHdl_Impl( &aTsbStepCount
);
1973 //------------------------------------------------------------------------
1975 IMPL_LINK( SvxAreaTabPage
, ModifyGradientHdl_Impl
, void *, EMPTYARG
)
1977 const SfxPoolItem
* pPoolItem
= NULL
;
1978 USHORT _nPos
= aLbGradient
.GetSelectEntryPos();
1979 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
)
1981 // ItemSet fuellen und an aCtlXRectPreview weiterleiten
1982 XGradientEntry
* pEntry
= pGradientList
->GetGradient( _nPos
);
1984 rXFSet
.Put( XFillStyleItem( XFILL_GRADIENT
) );
1985 rXFSet
.Put( XFillGradientItem( String(),
1986 pEntry
->GetGradient() ) );
1989 else if( SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLGRADIENT
), TRUE
, &pPoolItem
) )
1991 rXFSet
.Put( XFillStyleItem( XFILL_GRADIENT
) );
1992 rXFSet
.Put( XFillGradientItem( String(), ( ( const XFillGradientItem
* ) pPoolItem
)->GetGradientValue() ) );
1995 rXFSet
.Put( XFillStyleItem( XFILL_NONE
) );
1997 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
1998 aCtlXRectPreview
.Invalidate();
2003 //------------------------------------------------------------------------
2005 IMPL_LINK( SvxAreaTabPage
, ClickHatchingHdl_Impl
, void *, EMPTYARG
)
2009 aLbHatching
.Enable();
2012 aCtlXRectPreview
.Enable();
2013 aCtlXRectPreview
.Show();
2014 aCtlBitmapPreview
.Hide();
2016 // aGrpTransparent.Hide();
2017 // aLbTransparent.Hide();
2018 aFlStepCount
.Hide();
2019 aTsbStepCount
.Hide();
2020 aNumFldStepCount
.Hide();
2025 aTsbOriginal
.Hide();
2027 aMtrFldXSize
.Hide();
2029 aMtrFldYSize
.Hide();
2033 aMtrFldOffset
.Hide();
2035 aCtlPosition
.Hide();
2037 aMtrFldXOffset
.Hide();
2039 aMtrFldYOffset
.Hide();
2042 // Controls for Hatch-Background
2043 aCbxHatchBckgrd
.Show();
2044 aLbHatchBckgrdColor
.Show();
2045 aCbxHatchBckgrd
.Enable();
2046 aLbHatchBckgrdColor
.Enable();
2048 // Text der Tabelle setzen
2049 String
aString( SVX_RES( RID_SVXSTR_TABLE
) ); aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
2050 INetURLObject
aURL( pHatchingList
->GetPath() );
2052 aURL
.Append( pHatchingList
->GetName() );
2053 DBG_ASSERT( aURL
.GetProtocol() != INET_PROT_NOT_VALID
, "invalid URL" );
2055 if( aURL
.getBase().getLength() > 18 )
2057 aString
+= String(String(aURL
.getBase()).Copy( 0, 15 ));
2058 aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
2061 aString
+= String(aURL
.getBase());
2063 ModifyHatchingHdl_Impl( this );
2064 ModifyHatchBckgrdColorHdl_Impl( this );
2065 ToggleHatchBckgrdColorHdl_Impl( this );
2070 //------------------------------------------------------------------------
2072 IMPL_LINK( SvxAreaTabPage
, ModifyHatchingHdl_Impl
, void *, EMPTYARG
)
2074 const SfxPoolItem
* pPoolItem
= NULL
;
2075 USHORT _nPos
= aLbHatching
.GetSelectEntryPos();
2076 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
)
2078 // ItemSet fuellen und an aCtlXRectPreview weiterleiten
2079 XHatchEntry
* pEntry
= pHatchingList
->GetHatch( _nPos
);
2081 rXFSet
.Put( XFillStyleItem( XFILL_HATCH
) );
2082 rXFSet
.Put( XFillHatchItem( String(), pEntry
->GetHatch() ) );
2085 else if( SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLHATCH
), TRUE
, &pPoolItem
) )
2087 rXFSet
.Put( XFillStyleItem( XFILL_HATCH
) );
2088 rXFSet
.Put( XFillHatchItem( String(), ( ( const XFillHatchItem
* ) pPoolItem
)->GetHatchValue() ) );
2091 rXFSet
.Put( XFillStyleItem( XFILL_NONE
) );
2093 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
2094 aCtlXRectPreview
.Invalidate();
2099 //------------------------------------------------------------------------
2101 IMPL_LINK( SvxAreaTabPage
, ModifyHatchBckgrdColorHdl_Impl
, void *, EMPTYARG
)
2103 const SfxPoolItem
* pPoolItem
= NULL
;
2104 USHORT _nPos
= aLbHatchBckgrdColor
.GetSelectEntryPos();
2105 aLbColor
.SelectEntryPos( _nPos
);
2106 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
)
2108 // rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
2109 rXFSet
.Put( XFillColorItem( String(),
2110 aLbHatchBckgrdColor
.GetSelectEntryColor() ) );
2113 else if( SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLCOLOR
), TRUE
, &pPoolItem
) )
2115 // rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
2116 Color
aColor( ( ( const XFillColorItem
* ) pPoolItem
)->GetColorValue() );
2117 rXFSet
.Put( XFillColorItem( String(), aColor
) );
2120 rXFSet
.Put( XFillStyleItem( XFILL_NONE
) );
2122 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
2123 aCtlXRectPreview
.Invalidate();
2128 //------------------------------------------------------------------------
2130 IMPL_LINK( SvxAreaTabPage
, ToggleHatchBckgrdColorHdl_Impl
, void *, EMPTYARG
)
2132 // switch on/off backgroundcolor for hatches
2133 aLbHatchBckgrdColor
.Enable( aCbxHatchBckgrd
.IsChecked() );
2135 XFillBackgroundItem
aItem( aCbxHatchBckgrd
.IsChecked() );
2136 rXFSet
.Put ( aItem
, XATTR_FILLBACKGROUND
);
2138 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
2139 aCtlXRectPreview
.Invalidate();
2141 if( aLbHatchBckgrdColor
.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND
)
2143 if ( SFX_ITEM_SET
== rOutAttrs
.GetItemState( XATTR_FILLCOLOR
) )//>= SFX_ITEM_DEFAULT )
2145 XFillColorItem
aColorItem( (const XFillColorItem
&)rOutAttrs
.Get( XATTR_FILLCOLOR
) );
2146 aLbHatchBckgrdColor
.SelectEntry( aColorItem
.GetColorValue() );
2153 //------------------------------------------------------------------------
2155 IMPL_LINK( SvxAreaTabPage
, ClickBitmapHdl_Impl
, void *, EMPTYARG
)
2162 aCtlBitmapPreview
.Enable();
2163 aCtlBitmapPreview
.Show();
2164 aCtlXRectPreview
.Hide();
2165 // aGrpPreview.Hide();
2166 // aGrpTransparent.Hide();
2167 // aLbTransparent.Hide();
2168 aFlStepCount
.Hide();
2169 aTsbStepCount
.Hide();
2170 aNumFldStepCount
.Hide();
2173 aTsbStretch
.Enable();
2175 aTsbOriginal
.Enable();
2177 aMtrFldXSize
.Enable();
2179 aMtrFldYSize
.Enable();
2181 aCtlPosition
.Enable();
2182 aFtXOffset
.Enable();
2183 aMtrFldXOffset
.Enable();
2184 aFtYOffset
.Enable();
2185 aMtrFldYOffset
.Enable();
2186 aFlPosition
.Enable();
2188 aRbtColumn
.Enable();
2189 aMtrFldOffset
.Enable();
2192 // Controls for Hatch-Background
2193 aCbxHatchBckgrd
.Hide();
2194 aLbHatchBckgrdColor
.Hide();
2199 aTsbOriginal
.Show();
2201 aMtrFldXSize
.Show();
2203 aMtrFldYSize
.Show();
2205 aCtlPosition
.Show();
2207 aMtrFldXOffset
.Show();
2209 aMtrFldYOffset
.Show();
2213 aMtrFldOffset
.Show();
2216 // Text der Tabelle setzen
2217 String
aString( SVX_RES( RID_SVXSTR_TABLE
) ); aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
2218 INetURLObject
aURL( pBitmapList
->GetPath() );
2220 aURL
.Append( pBitmapList
->GetName() );
2221 DBG_ASSERT( aURL
.GetProtocol() != INET_PROT_NOT_VALID
, "invalid URL" );
2223 if( aURL
.getBase().getLength() > 18 )
2225 aString
+= String(aURL
.getBase()).Copy( 0, 15 );
2226 aString
.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
2229 aString
+= String(aURL
.getBase());
2231 ModifyBitmapHdl_Impl( this );
2232 ModifyTileHdl_Impl( &aTsbOriginal
);
2236 //------------------------------------------------------------------------
2238 IMPL_LINK( SvxAreaTabPage
, ModifyBitmapHdl_Impl
, void *, EMPTYARG
)
2240 const SfxPoolItem
* pPoolItem
= NULL
;
2241 USHORT _nPos
= aLbBitmap
.GetSelectEntryPos();
2242 if( _nPos
!= LISTBOX_ENTRY_NOTFOUND
)
2244 // ItemSet fuellen und an aCtlXRectPreview weiterleiten
2245 XBitmapEntry
* pEntry
= pBitmapList
->GetBitmap( _nPos
);
2247 rXFSet
.Put( XFillStyleItem( XFILL_BITMAP
) );
2248 rXFSet
.Put( XFillBitmapItem( String(), pEntry
->GetXBitmap() ) );
2251 else if( SFX_ITEM_SET
== rOutAttrs
.GetItemState( GetWhich( XATTR_FILLBITMAP
), TRUE
, &pPoolItem
) )
2253 rXFSet
.Put( XFillStyleItem( XFILL_BITMAP
) );
2254 rXFSet
.Put( XFillBitmapItem( String(), ( ( const XFillBitmapItem
* ) pPoolItem
)->GetBitmapValue() ) );
2257 rXFSet
.Put( XFillStyleItem( XFILL_NONE
) );
2259 aCtlBitmapPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
2260 aCtlBitmapPreview
.Invalidate();
2265 //------------------------------------------------------------------------
2267 //IMPL_LINK( SvxAreaTabPage, ModifyTransparentHdl_Impl, void *, EMPTYARG )
2269 // USHORT nPos = aLbTransparent.GetSelectEntryPos();
2270 // if( nPos != LISTBOX_ENTRY_NOTFOUND )
2272 // XFillTransparenceItem aItem( nPos * 25 );
2274 // rXFSet.Put( XFillTransparenceItem( aItem ) );
2275 // aCtlXRectPreview.SetAttributes( aXFillAttr );
2277 // aCtlXRectPreview.Invalidate();
2283 //------------------------------------------------------------------------
2285 IMPL_LINK( SvxAreaTabPage
, ModifyStepCountHdl_Impl
, void *, p
)
2287 if( p
== &aTsbStepCount
)
2289 if( aTsbStepCount
.GetState() == STATE_NOCHECK
)
2291 if( aNumFldStepCount
.GetText().Len() == 0 )
2292 aNumFldStepCount
.SetText( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "64") ));
2294 aNumFldStepCount
.Enable();
2297 aNumFldStepCount
.Disable();
2301 if( aTsbStepCount
.GetState() != STATE_CHECK
)
2303 // Zustand != Disabled ?
2304 if( aNumFldStepCount
.GetText().Len() > 0 )
2305 nValue
= (UINT16
) aNumFldStepCount
.GetValue();
2307 rXFSet
.Put( XGradientStepCountItem( nValue
) );
2308 aCtlXRectPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
2309 aCtlXRectPreview
.Invalidate();
2314 //------------------------------------------------------------------------
2316 IMPL_LINK( SvxAreaTabPage
, ModifyTileHdl_Impl
, void *, EMPTYARG
)
2318 TriState eState
= aTsbTile
.GetState();
2319 if( eState
== STATE_CHECK
)
2321 aTsbStretch
.Disable();
2323 aRbtColumn
.Enable();
2324 aMtrFldOffset
.Enable();
2327 aCtlPosition
.Enable();
2328 aCtlPosition
.Invalidate();
2329 aFtXOffset
.Enable();
2330 aMtrFldXOffset
.Enable();
2331 aFtYOffset
.Enable();
2332 aMtrFldYOffset
.Enable();
2333 aFlPosition
.Enable();
2336 aTsbOriginal
.Enable();
2338 aMtrFldXSize
.Enable();
2340 aMtrFldYSize
.Enable();
2343 else if( eState
== STATE_NOCHECK
)
2345 aTsbStretch
.Enable();
2347 aRbtColumn
.Disable();
2348 aMtrFldOffset
.Disable();
2349 aFlOffset
.Disable();
2351 aCtlPosition
.Disable();
2352 aCtlPosition
.Invalidate();
2353 aFtXOffset
.Disable();
2354 aMtrFldXOffset
.Disable();
2355 aFtYOffset
.Disable();
2356 aMtrFldYOffset
.Disable();
2357 aFlPosition
.Disable();
2359 if( aTsbStretch
.GetState() != STATE_NOCHECK
)
2361 aTsbScale
.Disable();
2362 aTsbOriginal
.Disable();
2364 aMtrFldXSize
.Disable();
2366 aMtrFldYSize
.Disable();
2372 aTsbOriginal
.Enable();
2374 aMtrFldXSize
.Enable();
2376 aMtrFldYSize
.Enable();
2382 aTsbStretch
.Disable();
2384 aRbtColumn
.Disable();
2385 aMtrFldOffset
.Disable();
2386 aFlOffset
.Disable();
2388 aCtlPosition
.Disable();
2389 aCtlPosition
.Invalidate();
2390 aFtXOffset
.Disable();
2391 aMtrFldXOffset
.Disable();
2392 aFtYOffset
.Disable();
2393 aMtrFldYOffset
.Disable();
2394 aFlPosition
.Disable();
2396 aTsbScale
.Disable();
2397 aTsbOriginal
.Disable();
2399 aMtrFldXSize
.Disable();
2401 aMtrFldYSize
.Disable();
2405 if( aTsbOriginal
.GetState() == STATE_CHECK
)
2407 aMtrFldXSize
.SetText( String() );
2408 aMtrFldYSize
.SetText( String() );
2411 aMtrFldXSize
.Disable();
2412 aMtrFldYSize
.Disable();
2413 aTsbScale
.Disable();
2417 aMtrFldXSize
.SetValue( aMtrFldXSize
.GetValue() );
2418 aMtrFldYSize
.SetValue( aMtrFldYSize
.GetValue() );
2420 if( eState == STATE_CHECK )
2424 aMtrFldXSize.Enable();
2425 aMtrFldYSize.Enable();
2430 rXFSet
.Put( XFillBmpTileItem( sal::static_int_cast
< BOOL
>( eState
) ) );
2432 if( aTsbStretch
.IsEnabled() )
2434 XFillBmpStretchItem(
2435 sal::static_int_cast
< BOOL
>( aTsbStretch
.GetState() ) ) );
2437 if( aTsbScale
.IsEnabled() )
2438 rXFSet
.Put( XFillBmpSizeLogItem( aTsbScale
.GetState() == STATE_NOCHECK
) );
2440 if( aMtrFldXSize
.IsEnabled() )
2442 XFillBmpSizeXItem
* pItem
= NULL
;
2443 TriState eScaleState
= aTsbScale
.GetState();
2445 if( eScaleState
== STATE_NOCHECK
)
2446 pItem
= new XFillBmpSizeXItem( GetCoreValue( aMtrFldXSize
, ePoolUnit
) );
2448 pItem
= new XFillBmpSizeXItem( -labs( static_cast<long>(aMtrFldXSize
.GetValue()) ) );
2450 rXFSet
.Put( *pItem
);
2454 else if( aTsbOriginal
.IsEnabled() && aTsbOriginal
.GetState() == STATE_CHECK
)
2456 // Originalgroesse -> Size == 0
2457 rXFSet
.Put( XFillBmpSizeXItem( 0 ) );
2458 rXFSet
.Put( XFillBmpSizeLogItem( TRUE
) );
2461 if( aMtrFldYSize
.IsEnabled() )
2463 XFillBmpSizeYItem
* pItem
= NULL
;
2464 TriState eScaleState
= aTsbScale
.GetState();
2466 if( eScaleState
== STATE_NOCHECK
)
2467 pItem
= new XFillBmpSizeYItem( GetCoreValue( aMtrFldYSize
, ePoolUnit
) );
2469 pItem
= new XFillBmpSizeYItem( -labs( static_cast<long>(aMtrFldYSize
.GetValue()) ) );
2471 rXFSet
.Put( *pItem
);
2475 else if( aTsbOriginal
.IsEnabled() && aTsbOriginal
.GetState() == STATE_CHECK
)
2477 // Originalgroesse -> Size == 0
2478 rXFSet
.Put( XFillBmpSizeYItem( 0 ) );
2479 rXFSet
.Put( XFillBmpSizeLogItem( TRUE
) );
2482 if( aMtrFldOffset
.IsEnabled() )
2484 if( aRbtRow
.IsChecked() )
2486 rXFSet
.Put( XFillBmpTileOffsetXItem( (UINT16
) aMtrFldOffset
.GetValue() ) );
2487 rXFSet
.Put( XFillBmpTileOffsetYItem( (UINT16
) 0 ) );
2489 else if( aRbtColumn
.IsChecked() )
2491 rXFSet
.Put( XFillBmpTileOffsetXItem( (UINT16
) 0 ) );
2492 rXFSet
.Put( XFillBmpTileOffsetYItem( (UINT16
) aMtrFldOffset
.GetValue() ) );
2496 if( aCtlPosition
.IsEnabled() )
2497 rXFSet
.Put( XFillBmpPosItem( aCtlPosition
.GetActualRP() ) );
2499 if( aMtrFldXOffset
.IsEnabled() )
2500 rXFSet
.Put( XFillBmpPosOffsetXItem( (UINT16
) aMtrFldXOffset
.GetValue() ) );
2502 if( aMtrFldYOffset
.IsEnabled() )
2503 rXFSet
.Put( XFillBmpPosOffsetYItem( (UINT16
) aMtrFldYOffset
.GetValue() ) );
2506 aCtlBitmapPreview
.SetAttributes( aXFillAttr
.GetItemSet() );
2507 aCtlBitmapPreview
.Invalidate();
2512 //------------------------------------------------------------------------
2514 IMPL_LINK( SvxAreaTabPage
, ClickScaleHdl_Impl
, void *, EMPTYARG
)
2516 if( aTsbScale
.GetState() == STATE_CHECK
)
2518 aMtrFldXSize
.SetDecimalDigits( 0 );
2519 aMtrFldXSize
.SetUnit( FUNIT_CUSTOM
);
2520 aMtrFldXSize
.SetValue( 100 );
2521 aMtrFldXSize
.SetMax( 100 );
2522 aMtrFldXSize
.SetLast( 100 );
2524 aMtrFldYSize
.SetDecimalDigits( 0 );
2525 aMtrFldYSize
.SetUnit( FUNIT_CUSTOM
);
2526 aMtrFldYSize
.SetValue( 100 );
2527 aMtrFldYSize
.SetMax( 100 );
2528 aMtrFldYSize
.SetLast( 100 );
2532 aMtrFldXSize
.SetDecimalDigits( 2 );
2533 aMtrFldXSize
.SetUnit( eFUnit
);
2534 aMtrFldXSize
.SetValue( 100 );
2535 aMtrFldXSize
.SetMax( 999900 );
2536 aMtrFldXSize
.SetLast( 100000 );
2538 aMtrFldYSize
.SetDecimalDigits( 2 );
2539 aMtrFldYSize
.SetUnit( eFUnit
);
2540 aMtrFldYSize
.SetValue( 100 );
2541 aMtrFldYSize
.SetMax( 999900 );
2542 aMtrFldYSize
.SetLast( 100000 );
2545 ModifyTileHdl_Impl( NULL
);
2550 //------------------------------------------------------------------------
2552 void SvxAreaTabPage::PointChanged( Window
* pWindow
, RECT_POINT eRcPt
)
2556 // Ausrichtung der Bitmapfuellung
2557 ModifyTileHdl_Impl( pWindow
);
2560 void SvxAreaTabPage::PageCreated (SfxAllItemSet aSet
) //add CHINA001
2562 SFX_ITEMSET_ARG (&aSet
,pColorTabItem
,SvxColorTableItem
,SID_COLOR_TABLE
,sal_False
);
2563 SFX_ITEMSET_ARG (&aSet
,pGradientListItem
,SvxGradientListItem
,SID_GRADIENT_LIST
,sal_False
);
2564 SFX_ITEMSET_ARG (&aSet
,pHatchingListItem
,SvxHatchListItem
,SID_HATCH_LIST
,sal_False
);
2565 SFX_ITEMSET_ARG (&aSet
,pBitmapListItem
,SvxBitmapListItem
,SID_BITMAP_LIST
,sal_False
);
2566 SFX_ITEMSET_ARG (&aSet
,pPageTypeItem
,SfxUInt16Item
,SID_PAGE_TYPE
,sal_False
);
2567 SFX_ITEMSET_ARG (&aSet
,pDlgTypeItem
,SfxUInt16Item
,SID_DLG_TYPE
,sal_False
);
2568 SFX_ITEMSET_ARG (&aSet
,pPosItem
,SfxUInt16Item
,SID_TABPAGE_POS
,sal_False
);
2571 SetColorTable(pColorTabItem
->GetColorTable());
2572 if (pGradientListItem
)
2573 SetGradientList(pGradientListItem
->GetGradientList());
2574 if (pHatchingListItem
)
2575 SetHatchingList(pHatchingListItem
->GetHatchList());
2576 if (pBitmapListItem
)
2577 SetBitmapList(pBitmapListItem
->GetBitmapList());
2579 SetPageType(pPageTypeItem
->GetValue());
2581 SetDlgType(pDlgTypeItem
->GetValue());
2583 SetPos(pPosItem
->GetValue());