masterfix DEV300: #i10000# build fix
[LibreOffice.git] / cui / source / tabpages / tpshadow.cxx
blobb4ed21ef0aad670a7f9dd8a1d7462edcf1aa5a1b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_cui.hxx"
31 // include ---------------------------------------------------------------
32 #include <tools/shl.hxx>
33 #include <sfx2/app.hxx>
34 #include <sfx2/module.hxx>
35 #include <svx/dialogs.hrc>
37 #define _SVX_TPSHADOW_CXX
39 #include "svx/xattr.hxx"
40 #include <svx/xpool.hxx>
41 #include <cuires.hrc>
42 #include "tabarea.hrc"
43 #include <svx/svdattr.hxx>
44 #include "svx/drawitem.hxx"
45 #include "cuitabarea.hxx"
46 #include <dialmgr.hxx>
47 #include "svx/dlgutil.hxx"
48 #include <cuitabline.hxx>
49 #include "paragrph.hrc"
50 #include <svx/xlineit0.hxx>
51 #include <sfx2/request.hxx> //add CHINA001
53 #define DLGWIN this->GetParent()->GetParent()
55 // static ----------------------------------------------------------------
57 static sal_uInt16 pShadowRanges[] =
59 SDRATTR_SHADOWCOLOR,
60 SDRATTR_SHADOWTRANSPARENCE,
61 SID_ATTR_FILL_SHADOW,
62 SID_ATTR_FILL_SHADOW,
66 /*************************************************************************
68 |* Dialog zum Aendern des Schattens
70 \************************************************************************/
72 SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
74 SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_SHADOW ), rInAttrs ),
76 aFlProp ( this, CUI_RES( FL_PROP ) ),
77 aTsbShowShadow ( this, CUI_RES( TSB_SHOW_SHADOW ) ),
78 aFtPosition ( this, CUI_RES( FT_POSITION ) ),
79 aCtlPosition ( this, CUI_RES( CTL_POSITION ) ),
80 aFtDistance ( this, CUI_RES( FT_DISTANCE ) ),
81 aMtrDistance ( this, CUI_RES( MTR_FLD_DISTANCE ) ),
82 aFtShadowColor ( this, CUI_RES( FT_SHADOW_COLOR ) ),
83 aLbShadowColor ( this, CUI_RES( LB_SHADOW_COLOR ) ),
84 aFtTransparent ( this, CUI_RES( FT_TRANSPARENT ) ),
85 aMtrTransparent ( this, CUI_RES( MTR_SHADOW_TRANSPARENT ) ),
86 aCtlXRectPreview ( this, CUI_RES( CTL_COLOR_PREVIEW ) ),
87 rOutAttrs ( rInAttrs ),
88 pColorTab( NULL ),
89 bDisable ( sal_False ),
90 pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
91 aXFillAttr ( pXPool ),
92 rXFSet ( aXFillAttr.GetItemSet() )
94 FreeResource();
96 // diese Page braucht ExchangeSupport
97 SetExchangeSupport();
99 // Metrik einstellen
100 FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs );
102 switch ( eFUnit )
104 case FUNIT_M:
105 case FUNIT_KM:
106 eFUnit = FUNIT_MM;
107 break;
108 default: ;//prevent warning
110 SetFieldUnit( aMtrDistance, eFUnit );
112 // PoolUnit ermitteln
113 SfxItemPool* pPool = rOutAttrs.GetPool();
114 DBG_ASSERT( pPool, "Wo ist der Pool?" );
115 ePoolUnit = pPool->GetMetric( SDRATTR_SHADOWXDIST );
117 // Setzen des Output-Devices
118 XFillStyle eXFS = XFILL_SOLID;
119 if( rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE )
121 eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rOutAttrs.
122 Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() );
123 switch( eXFS )
125 //case XFILL_NONE: --> NICHTS
127 case XFILL_SOLID:
128 if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )
130 XFillColorItem aColorItem( ( const XFillColorItem& )
131 rOutAttrs.Get( XATTR_FILLCOLOR ) );
132 rXFSet.Put( aColorItem );
134 break;
136 case XFILL_GRADIENT:
137 if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) )
139 XFillGradientItem aGradientItem( ( ( const XFillGradientItem& )
140 rOutAttrs.Get( XATTR_FILLGRADIENT ) ) );
141 rXFSet.Put( aGradientItem );
143 break;
145 case XFILL_HATCH:
146 if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLHATCH ) )
148 XFillHatchItem aHatchItem( ( ( const XFillHatchItem& )
149 rOutAttrs.Get( XATTR_FILLHATCH ) ) );
150 rXFSet.Put( aHatchItem );
152 break;
154 case XFILL_BITMAP:
156 if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLBITMAP ) )
158 XFillBitmapItem aBitmapItem( ( const XFillBitmapItem& )
159 rOutAttrs.Get( XATTR_FILLBITMAP ) );
160 rXFSet.Put( aBitmapItem );
163 break;
164 case XFILL_NONE : break;
167 else
169 rXFSet.Put( XFillColorItem( String(), COL_LIGHTRED ) );
172 if(XFILL_NONE == eXFS)
174 // #i96350#
175 // fallback to solid fillmode when no fill mode is provided to have
176 // a reasonable shadow preview. The used color will be a set one or
177 // the default (currently blue8)
178 eXFS = XFILL_SOLID;
181 rXFSet.Put( XFillStyleItem( eXFS ) );
182 aCtlXRectPreview.SetRectangleAttributes(aXFillAttr.GetItemSet());
183 //aCtlXRectPreview.SetFillAttr( aXFillAttr );
185 aTsbShowShadow.SetClickHdl( LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl ) );
186 Link aLink = LINK( this, SvxShadowTabPage, ModifyShadowHdl_Impl );
187 aLbShadowColor.SetSelectHdl( aLink );
188 aMtrTransparent.SetModifyHdl( aLink );
189 aMtrDistance.SetModifyHdl( aLink );
191 aCtlXRectPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE)));
192 aCtlPosition.SetAccessibleRelationMemberOf( &aFlProp );
195 // -----------------------------------------------------------------------
197 void SvxShadowTabPage::Construct()
199 // Farbtabelle fuellen
200 aLbShadowColor.Fill( pColorTab );
202 if( bDisable )
204 aTsbShowShadow.Disable();
205 aFtPosition.Disable();
206 aCtlPosition.Disable();
207 aFtDistance.Disable();
208 aMtrDistance.Disable();
209 aFtShadowColor.Disable();
210 aLbShadowColor.Disable();
211 aFtTransparent.Disable();
212 aMtrTransparent.Disable();
216 // -----------------------------------------------------------------------
218 void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet )
220 sal_uInt16 nPos;
221 sal_uInt16 nCount;
222 //add CHINA001 Begin
223 SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False);
224 if (pPageTypeItem)
225 SetPageType(pPageTypeItem->GetValue());
226 //add CHINA001 end
227 if( nDlgType == 0 ) //CHINA001 // Flaechen-Dialogif( *pDlgType == 0 ) // Flaechen-Dialog
229 if( pColorTab )
231 // ColorTable
232 if( *pnColorTableState & CT_CHANGED ||
233 *pnColorTableState & CT_MODIFIED )
235 if( *pnColorTableState & CT_CHANGED )
237 SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( DLGWIN );
238 if( pArea )
240 pColorTab = pArea->GetNewColorTable();
242 else
244 SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( DLGWIN );
245 if( pLine )
246 pColorTab = pLine->GetNewColorTable();
250 // aLbShadowColor
251 nPos = aLbShadowColor.GetSelectEntryPos();
252 aLbShadowColor.Clear();
253 aLbShadowColor.Fill( pColorTab );
254 nCount = aLbShadowColor.GetEntryCount();
255 if( nCount == 0 )
256 ; // Dieser Fall sollte nicht auftreten
257 else if( nCount <= nPos )
258 aLbShadowColor.SelectEntryPos( 0 );
259 else
260 aLbShadowColor.SelectEntryPos( nPos );
262 ModifyShadowHdl_Impl( this );
264 nPageType = PT_SHADOW;//CHINA001 *pPageType = PT_SHADOW;
269 // -----------------------------------------------------------------------
271 int SvxShadowTabPage::DeactivatePage( SfxItemSet* _pSet )
273 if( _pSet )
274 FillItemSet( *_pSet );
276 return( LEAVE_PAGE );
279 // -----------------------------------------------------------------------
281 sal_Bool SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs )
283 const SfxPoolItem* pOld = NULL;
284 sal_Bool bModified = sal_False;
286 if( !bDisable )
288 // Schatten
289 TriState eState = aTsbShowShadow.GetState();
290 if( eState != aTsbShowShadow.GetSavedValue() )
292 SdrShadowItem aItem( sal::static_int_cast< sal_Bool >( eState ) );
293 pOld = GetOldItem( rAttrs, SDRATTR_SHADOW );
294 if ( !pOld || !( *(const SdrShadowItem*)pOld == aItem ) )
296 rAttrs.Put( aItem );
297 bModified = sal_True;
301 // Schatten-Entfernung
302 // Etwas umstaendliche Abfrage, ob etwas geaendert wurde,
303 // da Items nicht direkt auf Controls abbildbar sind
304 sal_Int32 nX = 0L, nY = 0L;
305 sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit );
307 switch( aCtlPosition.GetActualRP() )
309 case RP_LT: nX = nY = -nXY; break;
310 case RP_MT: nY = -nXY; break;
311 case RP_RT: nX = nXY; nY = -nXY; break;
312 case RP_LM: nX = -nXY; break;
313 case RP_RM: nX = nXY; break;
314 case RP_LB: nX = -nXY; nY = nXY; break;
315 case RP_MB: nY = nXY; break;
316 case RP_RB: nX = nY = nXY; break;
317 case RP_MM: break;
320 // Wenn die Werte des Schattenabstanden==SFX_ITEM_DONTCARE und der angezeigte
321 // String im entspr. MetricField=="", dann w�rde der Vergleich zw. alten und
322 // neuen Distance-Werte ein falsches Ergebnis liefern, da in so einem Fall die
323 // neuen Distance-Werte den Default-Werten des MetricField entspr�chen !!!!
324 if ( !aMtrDistance.IsEmptyFieldValue() ||
325 rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE ||
326 rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE )
328 sal_Int32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare
329 sal_Int32 nOldY = 9876543;
330 if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE &&
331 rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE )
333 nOldX = ( ( const SdrShadowXDistItem& ) rOutAttrs.
334 Get( SDRATTR_SHADOWXDIST ) ).GetValue();
335 nOldY = ( ( const SdrShadowYDistItem& ) rOutAttrs.
336 Get( SDRATTR_SHADOWYDIST ) ).GetValue();
338 SdrShadowXDistItem aXItem( nX );
339 pOld = GetOldItem( rAttrs, SDRATTR_SHADOWXDIST );
340 if ( nX != nOldX &&
341 ( !pOld || !( *(const SdrShadowXDistItem*)pOld == aXItem ) ) )
343 rAttrs.Put( aXItem );
344 bModified = sal_True;
346 SdrShadowYDistItem aYItem( nY );
347 pOld = GetOldItem( rAttrs, SDRATTR_SHADOWYDIST );
348 if ( nY != nOldY &&
349 ( !pOld || !( *(const SdrShadowYDistItem*)pOld == aYItem ) ) )
351 rAttrs.Put( aYItem );
352 bModified = sal_True;
356 // ShadowColor
357 sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos();
358 if( nPos != LISTBOX_ENTRY_NOTFOUND &&
359 nPos != aLbShadowColor.GetSavedValue() )
361 SdrShadowColorItem aItem( aLbShadowColor.GetSelectEntry(),
362 aLbShadowColor.GetSelectEntryColor() );
363 pOld = GetOldItem( rAttrs, SDRATTR_SHADOWCOLOR );
364 if ( !pOld || !( *(const SdrShadowColorItem*)pOld == aItem ) )
366 rAttrs.Put( aItem );
367 bModified = sal_True;
371 // Transparenz
372 sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue();
373 if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() )
375 SdrShadowTransparenceItem aItem( nVal );
376 pOld = GetOldItem( rAttrs, SDRATTR_SHADOWTRANSPARENCE );
377 if ( !pOld || !( *(const SdrShadowTransparenceItem*)pOld == aItem ) )
379 rAttrs.Put( aItem );
380 bModified = sal_True;
384 //add CHINA001 begin
385 rAttrs.Put (CntUInt16Item(SID_PAGE_TYPE,nPageType));
386 //add CHINA001 end
387 return( bModified );
390 // -----------------------------------------------------------------------
392 void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs )
394 if( !bDisable )
396 // Alle Objekte koennen einen Schatten besitzen
397 // z.Z. gibt es nur 8 m�gliche Positionen den Schatten zu setzen
399 // Ist Schatten gesetzt?
400 if( rAttrs.GetItemState( SDRATTR_SHADOW ) != SFX_ITEM_DONTCARE )
402 aTsbShowShadow.EnableTriState( sal_False );
404 if( ( ( const SdrShadowItem& ) rAttrs.Get( SDRATTR_SHADOW ) ).GetValue() )
405 aTsbShowShadow.SetState( STATE_CHECK );
406 else
408 aTsbShowShadow.SetState( STATE_NOCHECK );
411 else
412 aTsbShowShadow.SetState( STATE_DONTKNOW );
414 // Entfernung (nur 8 moegliche Positionen), deshalb
415 // wird nur ein Item ausgewertet
417 if( rAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE &&
418 rAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE )
420 sal_Int32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue();
421 sal_Int32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue();
423 if( nX != 0 )
424 SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit );
425 else
426 SetMetricValue( aMtrDistance, nY < 0L ? -nY : nY, ePoolUnit );
428 // Setzen des Schatten-Controls
429 if ( nX < 0L && nY < 0L ) aCtlPosition.SetActualRP( RP_LT );
430 else if( nX == 0L && nY < 0L ) aCtlPosition.SetActualRP( RP_MT );
431 else if( nX > 0L && nY < 0L ) aCtlPosition.SetActualRP( RP_RT );
432 else if( nX < 0L && nY == 0L ) aCtlPosition.SetActualRP( RP_LM );
433 // Mittelpunkt gibt es nicht mehr
434 else if( nX == 0L && nY == 0L ) aCtlPosition.SetActualRP( RP_RB );
435 else if( nX > 0L && nY == 0L ) aCtlPosition.SetActualRP( RP_RM );
436 else if( nX < 0L && nY > 0L ) aCtlPosition.SetActualRP( RP_LB );
437 else if( nX == 0L && nY > 0L ) aCtlPosition.SetActualRP( RP_MB );
438 else if( nX > 0L && nY > 0L ) aCtlPosition.SetActualRP( RP_RB );
440 else
442 // determine default-distance
443 SfxItemPool* pPool = rOutAttrs.GetPool();
444 SdrShadowXDistItem* pXDistItem = (SdrShadowXDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWXDIST);
445 SdrShadowYDistItem* pYDistItem = (SdrShadowYDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWYDIST);
446 if (pXDistItem && pYDistItem)
448 sal_Int32 nX = pXDistItem->GetValue();
449 sal_Int32 nY = pYDistItem->GetValue();
450 if( nX != 0 )
451 SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit );
452 else
453 SetMetricValue( aMtrDistance, nY < 0L ? -nY : nY, ePoolUnit );
456 // Tristate, z.B. mehrer Objekte wurden markiert, wovon einige einen Schatten besitzen, einige nicht.
457 // Der anzuzeigende Text des MetricFields wird auf "" gesetzt und dient in der Methode FillItemSet
458 // als Erkennungszeichen daf�r, das der Distance-Wert NICHT ver�ndert wurde !!!!
459 aMtrDistance.SetText( String() );
460 aCtlPosition.SetActualRP( RP_MM );
463 // SchattenFarbe:
464 if( rAttrs.GetItemState( SDRATTR_SHADOWCOLOR ) != SFX_ITEM_DONTCARE )
466 aLbShadowColor.SelectEntry( ( ( const SdrShadowColorItem& ) rAttrs.Get( SDRATTR_SHADOWCOLOR ) ).GetColorValue() );
468 else
469 aLbShadowColor.SetNoSelection();
471 // Transparenz
472 if( rAttrs.GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SFX_ITEM_DONTCARE )
474 sal_uInt16 nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue();
475 aMtrTransparent.SetValue( nTransp );
477 else
478 aMtrTransparent.SetText( String() );
480 // Werte sichern
481 //aCtlPosition
482 aMtrDistance.SaveValue();
483 aLbShadowColor.SaveValue();
484 aTsbShowShadow.SaveValue();
486 // #66832# This field was not saved, but used to determine changes.
487 // Why? Seems to be the error.
488 // It IS the error.
489 aMtrTransparent.SaveValue();
491 ClickShadowHdl_Impl( NULL );
492 ModifyShadowHdl_Impl( NULL );
496 // -----------------------------------------------------------------------
498 SfxTabPage* SvxShadowTabPage::Create( Window* pWindow,
499 const SfxItemSet& rAttrs )
501 return( new SvxShadowTabPage( pWindow, rAttrs ) );
504 //------------------------------------------------------------------------
506 sal_uInt16* SvxShadowTabPage::GetRanges()
508 return( pShadowRanges );
511 //------------------------------------------------------------------------
513 IMPL_LINK( SvxShadowTabPage, ClickShadowHdl_Impl, void *, EMPTYARG )
515 if( aTsbShowShadow.GetState() == STATE_NOCHECK )
517 aFtPosition.Disable();
518 aCtlPosition.Disable();
519 aFtDistance.Disable();
520 aMtrDistance.Disable();
521 aFtShadowColor.Disable();
522 aLbShadowColor.Disable();
523 aFtTransparent.Disable();
524 aMtrTransparent.Disable();
526 else
528 aFtPosition.Enable();
529 aCtlPosition.Enable();
530 aFtDistance.Enable();
531 aMtrDistance.Enable();
532 aFtShadowColor.Enable();
533 aLbShadowColor.Enable();
534 aFtTransparent.Enable();
535 aMtrTransparent.Enable();
537 aCtlPosition.Invalidate();
539 ModifyShadowHdl_Impl( NULL );
541 return( 0L );
544 //------------------------------------------------------------------------
546 IMPL_LINK( SvxShadowTabPage, ModifyShadowHdl_Impl, void *, EMPTYARG )
548 if( aTsbShowShadow.GetState() == STATE_CHECK )
549 rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
550 else
551 rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
553 sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos();
554 if( nPos != LISTBOX_ENTRY_NOTFOUND )
556 rXFSet.Put( XFillColorItem( String(),
557 aLbShadowColor.GetSelectEntryColor() ) );
559 sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue();
560 XFillTransparenceItem aItem( nVal );
561 rXFSet.Put( XFillTransparenceItem( aItem ) );
563 // Schatten-Entfernung
564 sal_Int32 nX = 0L, nY = 0L;
565 sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit );
566 switch( aCtlPosition.GetActualRP() )
568 case RP_LT: nX = nY = -nXY; break;
569 case RP_MT: nY = -nXY; break;
570 case RP_RT: nX = nXY; nY = -nXY; break;
571 case RP_LM: nX = -nXY; break;
572 case RP_RM: nX = nXY; break;
573 case RP_LB: nX = -nXY; nY = nXY; break;
574 case RP_MB: nY = nXY; break;
575 case RP_RB: nX = nY = nXY; break;
576 case RP_MM: break;
579 aCtlXRectPreview.SetShadowPosition(Point(nX, nY));
581 aCtlXRectPreview.SetShadowAttributes(aXFillAttr.GetItemSet());
582 //aCtlXRectPreview.SetFillAttr( aXFillAttr );
583 aCtlXRectPreview.Invalidate();
585 return( 0L );
588 //------------------------------------------------------------------------
590 void SvxShadowTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
592 eRP = eRcPt;
594 // Schatten neu zeichnen
595 ModifyShadowHdl_Impl( pWindow );
598 void SvxShadowTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001
600 SFX_ITEMSET_ARG (&aSet,pColorTabItem,SvxColorTableItem,SID_COLOR_TABLE,sal_False);
601 SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False);
602 SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,sal_False);
605 if (pColorTabItem)
606 SetColorTable(pColorTabItem->GetColorTable());
607 if (pPageTypeItem)
608 SetPageType(pPageTypeItem->GetValue());
609 if (pDlgTypeItem)
610 SetDlgType(pDlgTypeItem->GetValue());
611 Construct();