1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
22 #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
23 #include <com/sun/star/drawing/ShadeMode.hpp>
24 #include <com/sun/star/drawing/Position3D.hpp>
25 #include <com/sun/star/drawing/Direction3D.hpp>
26 #include <com/sun/star/drawing/ProjectionMode.hpp>
27 #include <svx/svdundo.hxx>
28 #include <sfx2/app.hxx>
29 #include <sfx2/request.hxx>
30 #include <sfx2/objface.hxx>
31 #include <sfx2/viewsh.hxx>
32 #include <sfx2/bindings.hxx>
33 #include <svx/xsflclit.hxx>
34 #include <svx/dialmgr.hxx>
35 #include <svx/svdoashp.hxx>
36 #include <svx/dialogs.hrc>
37 #include <svx/svdview.hxx>
38 #include <editeng/colritem.hxx>
39 #include "svx/chrtitem.hxx"
41 #include <svx/extrusionbar.hxx>
42 #include "extrusiondepthdialog.hxx"
44 using namespace ::svx
;
45 using namespace ::cppu
;
46 using namespace ::com::sun::star::beans
;
47 using namespace ::com::sun::star::drawing
;
48 using namespace ::com::sun::star::uno
;
50 // Standardinterface deklarieren (Die Slotmap darf nicht leer sein, also
51 // tragen wir etwas ein, was hier (hoffentlich) nie vorkommt).
52 static SfxSlot aExtrusionBarSlots_Impl
[] =
54 { 0, 0, 0, SfxSlotMode::NONE
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
57 SFX_IMPL_INTERFACE(ExtrusionBar
, SfxShell
)
59 void ExtrusionBar::InitInterface_Impl()
61 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT
, RID_SVX_EXTRUSION_BAR
);
64 TYPEINIT1( ExtrusionBar
, SfxShell
);
66 ExtrusionBar::ExtrusionBar(SfxViewShell
* pViewShell
)
67 : SfxShell(pViewShell
)
69 DBG_ASSERT( pViewShell
, "svx::ExtrusionBar::ExtrusionBar(), I need a viewshell!" );
71 SetPool(&pViewShell
->GetPool());
73 SetHelpId( SVX_INTERFACE_EXTRUSION_BAR
);
74 SetName(SVX_RESSTR(RID_SVX_EXTRUSION_BAR
));
77 ExtrusionBar::~ExtrusionBar()
79 SetRepeatTarget(NULL
);
82 void getLightingDirectionDefaults( const Direction3D
**pLighting1Defaults
, const Direction3D
**pLighting2Defaults
)
85 static const Direction3D aLighting1Defaults
[9] =
87 Direction3D( -50000, -50000, 10000 ),
88 Direction3D( 0, -50000, 10000 ),
89 Direction3D( 50000, -50000, 10000 ),
90 Direction3D( -50000, 0, 10000 ),
91 Direction3D( 0, 0, 10000 ),
92 Direction3D( 50000, 0, 10000 ),
93 Direction3D( -50000, 50000, 10000 ),
94 Direction3D( 0, 50000, 10000 ),
95 Direction3D( 50000, 50000, 10000 )
98 static const Direction3D aLighting2Defaults
[9] =
100 Direction3D( 50000,0, 10000 ),
101 Direction3D( 0, 50000, 10000 ),
102 Direction3D( -50000, 0, 10000 ),
103 Direction3D( 50000, 0, 10000 ),
104 Direction3D( 0, 0, 10000 ),
105 Direction3D( -50000, 0, 10000 ),
106 Direction3D( 50000, 0, 10000 ),
107 Direction3D( 0, -50000, 10000 ),
108 Direction3D( -50000, 0, 10000 )
111 *pLighting1Defaults
= (const Direction3D
*)aLighting1Defaults
;
112 *pLighting2Defaults
= (const Direction3D
*)aLighting2Defaults
;
115 static void impl_execute( SdrView
*, SfxRequest
& rReq
, SdrCustomShapeGeometryItem
& rGeometryItem
, SdrObject
* pObj
)
117 static const char sExtrusion
[] = "Extrusion";
118 static const char sProjectionMode
[] = "ProjectionMode";
119 static const char sRotateAngle
[] = "RotateAngle";
120 static const char sViewPoint
[] = "ViewPoint";
121 static const char sOrigin
[] = "Origin";
122 static const char sSkew
[] = "Skew";
123 static const char sDepth
[] = "Depth";
125 sal_uInt16 nSID
= rReq
.GetSlot();
128 case SID_EXTRUSION_TOOGLE
:
130 com::sun::star::uno::Any
* pAny
= rGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
141 com::sun::star::beans::PropertyValue aPropValue
;
142 aPropValue
.Name
= sExtrusion
;
143 aPropValue
.Value
<<= sal_True
;
144 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
149 case SID_EXTRUSION_TILT_DOWN
:
150 case SID_EXTRUSION_TILT_UP
:
151 case SID_EXTRUSION_TILT_LEFT
:
152 case SID_EXTRUSION_TILT_RIGHT
:
154 bool bHorizontal
= ( nSID
== SID_EXTRUSION_TILT_DOWN
) || ( nSID
== SID_EXTRUSION_TILT_UP
);
155 sal_Int32 nDiff
= ( nSID
== SID_EXTRUSION_TILT_LEFT
) || ( nSID
== SID_EXTRUSION_TILT_UP
) ? 5 : -5;
156 EnhancedCustomShapeParameterPair aRotateAnglePropPair
;
159 aRotateAnglePropPair
.First
.Value
<<= fX
;
160 aRotateAnglePropPair
.First
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
161 aRotateAnglePropPair
.Second
.Value
<<= fY
;
162 aRotateAnglePropPair
.Second
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
163 com::sun::star::uno::Any
* pAny
= rGeometryItem
.GetPropertyValueByName( sExtrusion
, sRotateAngle
);
164 if( pAny
&& ( *pAny
>>= aRotateAnglePropPair
) )
166 aRotateAnglePropPair
.First
.Value
>>= fX
;
167 aRotateAnglePropPair
.Second
.Value
>>= fY
;
173 aRotateAnglePropPair
.First
.Value
<<= fX
;
174 aRotateAnglePropPair
.Second
.Value
<<= fY
;
175 com::sun::star::beans::PropertyValue aPropValue
;
176 aPropValue
.Name
= sRotateAngle
;
177 aPropValue
.Value
<<= aRotateAnglePropPair
;
178 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
182 case SID_EXTRUSION_DIRECTION
:
184 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_EXTRUSION_DIRECTION
) == SfxItemState::SET
)
186 sal_Int32 nSkew
= static_cast<const SfxInt32Item
*>(rReq
.GetArgs()->GetItem(SID_EXTRUSION_DIRECTION
))->GetValue();
188 Position3D
aViewPoint( 3472, -3472, 25000 );
189 double fOriginX
= 0.50;
190 double fOriginY
= -0.50;
191 double fSkewAngle
= nSkew
;
197 aViewPoint
.PositionY
= 3472;
201 aViewPoint
.PositionX
= 0;
202 aViewPoint
.PositionY
= 3472;
207 aViewPoint
.PositionX
= -3472;
208 aViewPoint
.PositionY
= 3472;
213 aViewPoint
.PositionY
= 0;
217 aViewPoint
.PositionX
= 0;
218 aViewPoint
.PositionY
= 0;
224 aViewPoint
.PositionX
= -3472;
225 aViewPoint
.PositionY
= 0;
230 aViewPoint
.PositionX
= 0;
234 aViewPoint
.PositionX
= -3472;
239 com::sun::star::beans::PropertyValue aPropValue
;
241 aPropValue
.Name
= sViewPoint
;
242 aPropValue
.Value
<<= aViewPoint
;
243 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
246 EnhancedCustomShapeParameterPair aOriginPropPair
;
247 aOriginPropPair
.First
.Value
<<= fOriginX
;
248 aOriginPropPair
.First
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
249 aOriginPropPair
.Second
.Value
<<= fOriginY
;
250 aOriginPropPair
.Second
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
251 aPropValue
.Name
= sOrigin
;
252 aPropValue
.Value
<<= aOriginPropPair
;
253 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
255 EnhancedCustomShapeParameterPair aSkewPropPair
;
256 aSkewPropPair
.First
.Value
<<= fSkew
;
257 aSkewPropPair
.First
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
258 aSkewPropPair
.Second
.Value
<<= fSkewAngle
;
259 aSkewPropPair
.Second
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
260 aPropValue
.Name
= sSkew
;
261 aPropValue
.Value
<<= aSkewPropPair
;
262 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
266 case SID_EXTRUSION_PROJECTION
:
268 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_EXTRUSION_PROJECTION
) == SfxItemState::SET
)
270 sal_Int32 nProjection
= static_cast<const SfxInt32Item
*>(rReq
.GetArgs()->GetItem(SID_EXTRUSION_PROJECTION
))->GetValue();
271 ProjectionMode eProjectionMode
= nProjection
== 1 ? ProjectionMode_PARALLEL
: ProjectionMode_PERSPECTIVE
;
272 com::sun::star::beans::PropertyValue aPropValue
;
273 aPropValue
.Name
= sProjectionMode
;
274 aPropValue
.Value
<<= eProjectionMode
;
275 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
279 case SID_EXTRUSION_DEPTH
:
281 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH
) == SfxItemState::SET
)
283 double fDepth
= static_cast<const SvxDoubleItem
*>(rReq
.GetArgs()->GetItem(SID_EXTRUSION_DEPTH
))->GetValue();
284 double fFraction
= 0.0;
285 EnhancedCustomShapeParameterPair aDepthPropPair
;
286 aDepthPropPair
.First
.Value
<<= fDepth
;
287 aDepthPropPair
.First
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
288 aDepthPropPair
.Second
.Value
<<= fFraction
;
289 aDepthPropPair
.Second
.Type
= EnhancedCustomShapeParameterType::NORMAL
;
291 com::sun::star::beans::PropertyValue aPropValue
;
292 aPropValue
.Name
= sDepth
;
293 aPropValue
.Value
<<= aDepthPropPair
;
294 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
298 case SID_EXTRUSION_3D_COLOR
:
300 static const char sExtrusionColor
[] = "Color";
302 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_EXTRUSION_3D_COLOR
) == SfxItemState::SET
)
304 Color
aColor( static_cast<const SvxColorItem
&>(rReq
.GetArgs()->Get(SID_EXTRUSION_3D_COLOR
)).GetValue() );
306 const bool bAuto
= aColor
== COL_AUTO
;
308 com::sun::star::beans::PropertyValue aPropValue
;
309 aPropValue
.Name
= sExtrusionColor
;
310 aPropValue
.Value
<<= bAuto
? sal_False
: sal_True
;
311 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
315 pObj
->ClearMergedItem( XATTR_SECONDARYFILLCOLOR
);
319 pObj
->SetMergedItem( XSecondaryFillColorItem( "", aColor
) );
321 pObj
->BroadcastObjectChange();
325 case SID_EXTRUSION_SURFACE
:
327 static const char sShadeMode
[] = "ShadeMode";
328 static const char sSpecularity
[] = "Specularity";
329 static const char sDiffusion
[] = "Diffusion";
330 static const char sMetal
[] = "Metal";
332 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_EXTRUSION_SURFACE
) == SfxItemState::SET
)
334 sal_Int32 nSurface
= static_cast<const SfxInt32Item
*>(rReq
.GetArgs()->GetItem(SID_EXTRUSION_SURFACE
))->GetValue();
336 ShadeMode
eShadeMode( ShadeMode_FLAT
);
338 double fSpecularity
= 0;
339 double fDiffusion
= 0;
344 eShadeMode
= ShadeMode_DRAFT
;
349 fSpecularity
= 122.0;
353 fSpecularity
= 122.0;
358 com::sun::star::beans::PropertyValue aPropValue
;
359 aPropValue
.Name
= sShadeMode
;
360 aPropValue
.Value
<<= eShadeMode
;
361 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
363 aPropValue
.Name
= sMetal
;
364 aPropValue
.Value
<<= bMetal
;
365 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
367 aPropValue
.Name
= sSpecularity
;
368 aPropValue
.Value
<<= fSpecularity
;
369 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
371 aPropValue
.Name
= sDiffusion
;
372 aPropValue
.Value
<<= fDiffusion
;
373 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
377 case SID_EXTRUSION_LIGHTING_INTENSITY
:
379 static const char sBrightness
[] = "Brightness";
380 static const char sLightFace
[] = "LightFace";
381 static const char sFirstLightHarsh
[] = "FirstLightHarsh";
382 static const char sSecondLightHarsh
[] = "SecondLightHarsh";
383 static const char sFirstLightLevel
[] = "FirstLightLevel";
384 static const char sSecondLightLevel
[] = "SecondLightLevel";
386 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_EXTRUSION_LIGHTING_INTENSITY
) == SfxItemState::SET
)
388 sal_Int32 nLevel
= static_cast<const SfxInt32Item
*>(rReq
.GetArgs()->GetItem(SID_EXTRUSION_LIGHTING_INTENSITY
))->GetValue();
391 bool bHarsh2
= false;
417 com::sun::star::beans::PropertyValue aPropValue
;
418 aPropValue
.Name
= sBrightness
;
419 aPropValue
.Value
<<= fBrightness
;
420 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
422 aPropValue
.Name
= sLightFace
;
423 aPropValue
.Value
<<= sal_True
;
424 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
426 aPropValue
.Name
= sFirstLightHarsh
;
427 aPropValue
.Value
<<= sal_True
;
428 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
430 aPropValue
.Name
= sSecondLightHarsh
;
431 aPropValue
.Value
<<= bHarsh2
;
432 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
434 aPropValue
.Name
= sFirstLightLevel
;
435 aPropValue
.Value
<<= fLevel1
;
436 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
438 aPropValue
.Name
= sSecondLightLevel
;
439 aPropValue
.Value
<<= fLevel2
;
440 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
444 case SID_EXTRUSION_LIGHTING_DIRECTION
:
446 if( rReq
.GetArgs() && rReq
.GetArgs()->GetItemState( SID_EXTRUSION_LIGHTING_DIRECTION
) == SfxItemState::SET
)
448 sal_Int32 nDirection
= static_cast<const SfxInt32Item
*>(rReq
.GetArgs()->GetItem(SID_EXTRUSION_LIGHTING_DIRECTION
))->GetValue();
450 if((nDirection
>= 0) && (nDirection
< 9))
452 const OUString
sFirstLightDirection( "FirstLightDirection" );
453 const OUString
sSecondLightDirection( "SecondLightDirection" );
455 const Direction3D
* pLighting1Defaults
;
456 const Direction3D
* pLighting2Defaults
;
458 getLightingDirectionDefaults( &pLighting1Defaults
, &pLighting2Defaults
);
460 com::sun::star::beans::PropertyValue aPropValue
;
461 aPropValue
.Name
= sFirstLightDirection
;
462 aPropValue
.Value
<<= pLighting1Defaults
[nDirection
];
463 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
465 aPropValue
.Name
= sSecondLightDirection
;
466 aPropValue
.Value
<<= pLighting2Defaults
[nDirection
];
467 rGeometryItem
.SetPropertyValue( sExtrusion
, aPropValue
);
476 void ExtrusionBar::execute( SdrView
* pSdrView
, SfxRequest
& rReq
, SfxBindings
& rBindings
)
478 sal_uInt16 nSID
= rReq
.GetSlot();
479 sal_uInt16 nStrResId
= 0;
481 const bool bUndo
= pSdrView
&& pSdrView
->IsUndoEnabled();
485 case SID_EXTRUSION_TOOGLE
:
488 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_ON_OFF
;
490 case SID_EXTRUSION_TILT_DOWN
:
493 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_DOWN
;
495 case SID_EXTRUSION_TILT_UP
:
498 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_UP
;
500 case SID_EXTRUSION_TILT_LEFT
:
503 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_LEFT
;
505 case SID_EXTRUSION_TILT_RIGHT
:
508 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_RIGHT
;
510 case SID_EXTRUSION_DIRECTION
:
513 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_ORIENTATION
;
515 case SID_EXTRUSION_PROJECTION
:
518 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_PROJECTION
;
520 case SID_EXTRUSION_DEPTH
:
523 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_DEPTH
;
525 case SID_EXTRUSION_3D_COLOR
:
528 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_COLOR
;
530 case SID_EXTRUSION_SURFACE
:
533 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_SURFACE
;
535 case SID_EXTRUSION_LIGHTING_INTENSITY
:
538 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_BRIGHTNESS
;
540 case SID_EXTRUSION_LIGHTING_DIRECTION
:
543 nStrResId
= RID_SVXSTR_UNDO_APPLY_EXTRUSION_LIGHTING
;
547 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
548 const size_t nCount
= rMarkList
.GetMarkCount();
550 for(size_t i
=0; i
<nCount
; ++i
)
552 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
553 if( pObj
->ISA(SdrObjCustomShape
) )
557 OUString
aStr( SVX_RESSTR( nStrResId
) );
558 pSdrView
->BegUndo( aStr
);
559 pSdrView
->AddUndo( pSdrView
->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj
) );
561 SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)));
562 impl_execute( pSdrView
, rReq
, aGeometryItem
, pObj
);
563 pObj
->SetMergedItem( aGeometryItem
);
564 pObj
->BroadcastObjectChange();
568 // simulate a context change:
569 // force SelectionHasChanged() being called
570 // so that extrusion bar will be visible/hidden
571 pSdrView
->MarkListHasChanged();
578 case SID_EXTRUSION_DEPTH_DIALOG
:
579 if( rReq
.GetArgs() &&
580 (rReq
.GetArgs()->GetItemState( SID_EXTRUSION_DEPTH
) == SfxItemState::SET
) &&
581 (rReq
.GetArgs()->GetItemState( SID_ATTR_METRIC
) == SfxItemState::SET
))
583 double fDepth
= static_cast<const SvxDoubleItem
*>(rReq
.GetArgs()->GetItem(SID_EXTRUSION_DEPTH
))->GetValue();
584 FieldUnit eUnit
= (FieldUnit
)static_cast<const SfxUInt16Item
*>(rReq
.GetArgs()->GetItem(SID_ATTR_METRIC
))->GetValue();
586 ScopedVclPtrInstance
< ExtrusionDepthDialog
> aDlg(nullptr, fDepth
, eUnit
);
587 sal_uInt16 nRet
= aDlg
->Execute();
590 fDepth
= aDlg
->getDepth();
592 SvxDoubleItem
aItem( fDepth
, SID_EXTRUSION_DEPTH
);
593 SfxPoolItem
* aItems
[] = { &aItem
, 0 };
594 rBindings
.Execute( SID_EXTRUSION_DEPTH
, (const SfxPoolItem
**)aItems
);
600 if( nSID
== SID_EXTRUSION_TOOGLE
)
602 static sal_uInt16 SidArray
[] = {
603 SID_EXTRUSION_TILT_DOWN
,
604 SID_EXTRUSION_TILT_UP
,
605 SID_EXTRUSION_TILT_LEFT
,
606 SID_EXTRUSION_TILT_RIGHT
,
607 SID_EXTRUSION_DEPTH_FLOATER
,
608 SID_EXTRUSION_DIRECTION_FLOATER
,
609 SID_EXTRUSION_LIGHTING_FLOATER
,
610 SID_EXTRUSION_SURFACE_FLOATER
,
611 SID_EXTRUSION_3D_COLOR
,
613 SID_EXTRUSION_DIRECTION
,
614 SID_EXTRUSION_PROJECTION
,
615 SID_EXTRUSION_LIGHTING_DIRECTION
,
616 SID_EXTRUSION_LIGHTING_INTENSITY
,
617 SID_EXTRUSION_SURFACE
,
620 rBindings
.Invalidate( SidArray
);
624 void getExtrusionDirectionState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
626 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
627 const size_t nCount
= rMarkList
.GetMarkCount();
629 static const char sExtrusion
[] = "Extrusion";
630 static const char sViewPoint
[] = "ViewPoint";
631 static const char sOrigin
[] = "Origin";
632 static const char sSkew
[] = "Skew";
633 static const char sProjectionMode
[] = "ProjectionMode";
635 const com::sun::star::uno::Any
* pAny
;
637 double fFinalSkewAngle
= -1;
638 bool bHasCustomShape
= false;
640 for(size_t i
=0; i
<nCount
; ++i
)
642 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
643 if( pObj
->ISA(SdrObjCustomShape
) )
645 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
647 // see if this is an extruded customshape
648 if( !bHasCustomShape
)
650 const Any
* pAny_
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
652 *pAny_
>>= bHasCustomShape
;
654 if( !bHasCustomShape
)
658 bool bParallel
= true;
659 Position3D
aViewPoint( 3472, -3472, 25000 );
660 double fSkewAngle
= -135;
662 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sProjectionMode
);
663 sal_Int16 nProjectionMode
= sal_Int16();
664 if( pAny
&& ( *pAny
>>= nProjectionMode
) )
665 bParallel
= nProjectionMode
== ProjectionMode_PARALLEL
;
670 EnhancedCustomShapeParameterPair aSkewPropPair
;
671 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sSkew
);
672 if( pAny
&& ( *pAny
>>= aSkewPropPair
) )
674 aSkewPropPair
.First
.Value
>>= fSkew
;
675 aSkewPropPair
.Second
.Value
>>= fSkewAngle
;
679 else if ( fSkewAngle
== 0.0 )
684 double fOriginX
= 0.50;
685 double fOriginY
= -0.50;
686 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sViewPoint
);
688 *pAny
>>= aViewPoint
;
690 EnhancedCustomShapeParameterPair aOriginPropPair
;
691 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sOrigin
);
692 if( pAny
&& ( *pAny
>>= aOriginPropPair
) )
694 aOriginPropPair
.First
.Value
>>= fOriginX
;
695 aOriginPropPair
.Second
.Value
>>= fOriginY
;
698 const double e
= 0.0001;
699 if( aViewPoint
.PositionX
> e
)
701 if( aViewPoint
.PositionY
> e
)
703 if( (fOriginX
> e
) && ( fOriginY
> e
) )
706 else if( aViewPoint
.PositionY
< -e
)
708 if( ( fOriginX
> e
) && ( fOriginY
< -e
) )
713 if( ( fOriginX
> e
) && ( fOriginY
> -e
) && ( fOriginY
< e
) )
717 else if( aViewPoint
.PositionX
< -e
)
719 if( aViewPoint
.PositionY
< -e
)
721 if( ( fOriginX
< -e
) && ( fOriginY
< -e
) )
724 else if( aViewPoint
.PositionY
> e
)
726 if( ( fOriginX
< -e
) && ( fOriginY
> e
) )
731 if( ( fOriginX
< e
) && ( fOriginY
> -e
) && ( fOriginY
< e
) )
737 if( aViewPoint
.PositionY
< -e
)
739 if( ( fOriginX
> -e
) && ( fOriginX
< e
) && ( fOriginY
< -e
) )
742 else if( aViewPoint
.PositionY
> e
)
744 if( ( fOriginX
> -e
) && ( fOriginX
< e
) && ( fOriginY
> e
) )
749 if( ( fOriginX
> -e
) && ( fOriginX
< e
) && ( fOriginY
> -e
) && ( fOriginY
< e
) )
755 if( fFinalSkewAngle
== -1.0 )
757 fFinalSkewAngle
= fSkewAngle
;
759 else if( fSkewAngle
!= fFinalSkewAngle
)
761 fFinalSkewAngle
= -1.0;
764 if( fFinalSkewAngle
== -1.0 )
769 if( bHasCustomShape
)
770 rSet
.Put( SfxInt32Item( SID_EXTRUSION_DIRECTION
, (sal_Int32
)fFinalSkewAngle
) );
772 rSet
.DisableItem( SID_EXTRUSION_DIRECTION
);
775 void getExtrusionProjectionState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
777 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
778 const size_t nCount
= rMarkList
.GetMarkCount();
780 static const char sExtrusion
[] = "Extrusion";
781 static const char sProjectionMode
[] = "ProjectionMode";
783 const com::sun::star::uno::Any
* pAny
;
785 sal_Int32 nFinalProjection
= -1;
786 bool bHasCustomShape
= false;
788 for(size_t i
=0; i
<nCount
; ++i
)
790 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
791 if( pObj
->ISA(SdrObjCustomShape
) )
793 // see if this is an extruded customshape
794 if( !bHasCustomShape
)
796 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
797 const Any
* pAny_
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
799 *pAny_
>>= bHasCustomShape
;
801 if( !bHasCustomShape
)
805 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
807 bool bParallel
= true;
808 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sProjectionMode
);
809 ProjectionMode eProjectionMode
;
810 if( pAny
&& ( *pAny
>>= eProjectionMode
) )
811 bParallel
= eProjectionMode
== ProjectionMode_PARALLEL
;
813 if( nFinalProjection
== -1 )
815 nFinalProjection
= bParallel
? 1 : 0;
817 else if( nFinalProjection
!= (bParallel
? 1 : 0) )
819 nFinalProjection
= -1;
825 if( bHasCustomShape
)
826 rSet
.Put( SfxInt32Item( SID_EXTRUSION_PROJECTION
, nFinalProjection
) );
828 rSet
.DisableItem( SID_EXTRUSION_PROJECTION
);
831 void getExtrusionSurfaceState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
833 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
834 const size_t nCount
= rMarkList
.GetMarkCount();
836 static const char sExtrusion
[] = "Extrusion";
837 static const char sShadeMode
[] = "ShadeMode";
838 static const char sSpecularity
[] = "Specularity";
839 static const char sMetal
[] = "Metal";
841 const com::sun::star::uno::Any
* pAny
;
843 sal_Int32 nFinalSurface
= -1;
844 bool bHasCustomShape
= false;
846 for(size_t i
=0; i
<nCount
; ++i
)
848 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
849 if( pObj
->ISA(SdrObjCustomShape
) )
851 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
853 // see if this is an extruded customshape
854 if( !bHasCustomShape
)
856 const Any
* pAny_
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
858 *pAny_
>>= bHasCustomShape
;
860 if( !bHasCustomShape
)
864 sal_Int32 nSurface
= 0; // wire frame
866 ShadeMode
eShadeMode( ShadeMode_FLAT
);
867 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sShadeMode
);
869 *pAny
>>= eShadeMode
;
871 if( eShadeMode
== ShadeMode_FLAT
)
874 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sMetal
);
880 nSurface
= 3; // metal
884 double fSpecularity
= 0;
885 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sSpecularity
);
887 *pAny
>>= fSpecularity
;
889 const double e
= 0.0001;
890 if( (fSpecularity
> -e
) && (fSpecularity
< e
) )
892 nSurface
= 1; // matte
896 nSurface
= 2; // plastic
901 if( nFinalSurface
== -1 )
903 nFinalSurface
= nSurface
;
905 else if( nFinalSurface
!= nSurface
)
913 if( bHasCustomShape
)
914 rSet
.Put( SfxInt32Item( SID_EXTRUSION_SURFACE
, nFinalSurface
) );
916 rSet
.DisableItem( SID_EXTRUSION_SURFACE
);
919 void getExtrusionDepthState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
921 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
922 const size_t nCount
= rMarkList
.GetMarkCount();
924 static const char sExtrusion
[] = "Extrusion";
925 static const char sDepth
[] = "Depth";
927 const com::sun::star::uno::Any
* pAny
;
929 double fFinalDepth
= -1;
930 bool bHasCustomShape
= false;
932 for(size_t i
=0; i
<nCount
; ++i
)
934 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
935 if( pObj
->ISA(SdrObjCustomShape
) )
937 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
939 // see if this is an extruded customshape
940 if( !bHasCustomShape
)
942 const Any
* pAny_
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
944 *pAny_
>>= bHasCustomShape
;
946 if( !bHasCustomShape
)
950 double fDepth
= 1270.0;
951 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sDepth
);
954 EnhancedCustomShapeParameterPair aDepthPropPair
;
955 if ( *pAny
>>= aDepthPropPair
)
956 aDepthPropPair
.First
.Value
>>= fDepth
;
959 if( fFinalDepth
== -1 )
961 fFinalDepth
= fDepth
;
963 else if( fFinalDepth
!= fDepth
)
971 if( pSdrView
->GetModel() )
973 FieldUnit eUnit
= pSdrView
->GetModel()->GetUIUnit();
974 rSet
.Put( SfxUInt16Item( SID_ATTR_METRIC
, (sal_uInt16
)eUnit
) );
977 if( bHasCustomShape
)
978 rSet
.Put( SvxDoubleItem( fFinalDepth
, SID_EXTRUSION_DEPTH
) );
980 rSet
.DisableItem( SID_EXTRUSION_DEPTH
);
983 static bool compare_direction( const Direction3D
& d1
, const Direction3D
& d2
)
985 if( ((d1
.DirectionX
< 0) && (d2
.DirectionX
< 0)) || ((d1
.DirectionX
== 0) && (d2
.DirectionX
== 0)) || ((d1
.DirectionX
> 0) && (d2
.DirectionX
> 0)) )
987 if( ((d1
.DirectionY
< 0) && (d2
.DirectionY
< 0)) || ((d1
.DirectionY
== 0) && (d2
.DirectionY
== 0)) || ((d1
.DirectionY
> 0) && (d2
.DirectionY
> 0)) )
989 if( ((d1
.DirectionZ
< 0) && (d2
.DirectionZ
< 0)) || ((d1
.DirectionZ
== 0) && (d2
.DirectionZ
== 0)) || ((d1
.DirectionZ
> 0) && (d2
.DirectionZ
> 0)) )
999 void getExtrusionLightingDirectionState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
1001 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
1002 const size_t nCount
= rMarkList
.GetMarkCount();
1004 static const char sExtrusion
[] = "Extrusion";
1005 static const char sFirstLightDirection
[] = "FirstLightDirection";
1006 static const char sSecondLightDirection
[] = "SecondLightDirection";
1008 const Direction3D
* pLighting1Defaults
;
1009 const Direction3D
* pLighting2Defaults
;
1011 getLightingDirectionDefaults( &pLighting1Defaults
, &pLighting2Defaults
);
1013 const com::sun::star::uno::Any
* pAny
;
1015 int nFinalDirection
= -1;
1016 bool bHasCustomShape
= false;
1018 for(size_t i
=0; i
<nCount
; ++i
)
1020 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
1021 if( pObj
->ISA(SdrObjCustomShape
) )
1023 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
1025 // see if this is an extruded customshape
1026 if( !bHasCustomShape
)
1028 const Any
* pAny_
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
1030 *pAny_
>>= bHasCustomShape
;
1032 if( !bHasCustomShape
)
1036 Direction3D
aFirstLightDirection( 50000, 0, 10000 );
1037 Direction3D
aSecondLightDirection( -50000, 0, 10000 );
1039 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sFirstLightDirection
);
1041 *pAny
>>= aFirstLightDirection
;
1043 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sSecondLightDirection
);
1045 *pAny
>>= aSecondLightDirection
;
1047 int nDirection
= -1;
1050 for( j
= 0; j
< 9; j
++ )
1052 if( compare_direction( aFirstLightDirection
, pLighting1Defaults
[j
] ) &&
1053 compare_direction( aSecondLightDirection
, pLighting2Defaults
[j
] ))
1060 if( nFinalDirection
== -1 )
1062 nFinalDirection
= nDirection
;
1064 else if( nDirection
!= nFinalDirection
)
1066 nFinalDirection
= -1;
1069 if( nFinalDirection
== -1 )
1074 if( bHasCustomShape
)
1075 rSet
.Put( SfxInt32Item( SID_EXTRUSION_LIGHTING_DIRECTION
, (sal_Int32
)nFinalDirection
) );
1077 rSet
.DisableItem( SID_EXTRUSION_LIGHTING_DIRECTION
);
1080 void getExtrusionLightingIntensityState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
1082 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
1083 const size_t nCount
= rMarkList
.GetMarkCount();
1085 static const char sExtrusion
[] = "Extrusion";
1086 static const char sBrightness
[] = "Brightness";
1088 const com::sun::star::uno::Any
* pAny
;
1090 int nFinalLevel
= -1;
1091 bool bHasCustomShape
= false;
1093 for(size_t i
=0; i
<nCount
; ++i
)
1095 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
1096 if( pObj
->ISA(SdrObjCustomShape
) )
1098 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
1100 // see if this is an extruded customshape
1101 if( !bHasCustomShape
)
1103 const Any
* pAny_
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
1105 *pAny_
>>= bHasCustomShape
;
1107 if( !bHasCustomShape
)
1111 double fBrightness
= 22178.0 / 655.36;
1112 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sBrightness
);
1114 *pAny
>>= fBrightness
;
1117 if( fBrightness
>= 30.0 )
1119 nLevel
= 0; // Bright
1121 else if( fBrightness
>= 10.0 )
1123 nLevel
= 1; // Noraml;
1130 if( nFinalLevel
== -1 )
1132 nFinalLevel
= nLevel
;
1134 else if( nFinalLevel
!= nLevel
)
1142 if( bHasCustomShape
)
1143 rSet
.Put( SfxInt32Item( SID_EXTRUSION_LIGHTING_INTENSITY
, nFinalLevel
) );
1145 rSet
.DisableItem( SID_EXTRUSION_LIGHTING_INTENSITY
);
1148 void getExtrusionColorState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
1150 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
1151 const size_t nCount
= rMarkList
.GetMarkCount();
1153 static const char sExtrusion
[] = "Extrusion";
1154 static const char sExtrusionColor
[] = "Color";
1156 const com::sun::star::uno::Any
* pAny
;
1159 bool bAmbigius
= false;
1161 bool bHasCustomShape
= false;
1163 for(size_t i
=0; i
<nCount
; ++i
)
1165 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
1166 if( pObj
->ISA(SdrObjCustomShape
) )
1168 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
)) );
1170 // see if this is an extruded customshape
1171 if( !bHasCustomShape
)
1173 const Any
* pAny_
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
1175 *pAny_
>>= bHasCustomShape
;
1177 if( !bHasCustomShape
)
1183 bool bUseColor
= false;
1184 pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusionColor
);
1186 *pAny
>>= bUseColor
;
1190 const XSecondaryFillColorItem
& rItem
= *static_cast<const XSecondaryFillColorItem
*>(&(pObj
->GetMergedItem( XATTR_SECONDARYFILLCOLOR
)));
1191 aColor
= rItem
.GetColorValue();
1200 aFinalColor
= aColor
;
1203 else if( aFinalColor
!= aColor
)
1212 aFinalColor
= COL_AUTO
;
1214 if( bHasCustomShape
)
1215 rSet
.Put( SvxColorItem( aFinalColor
, SID_EXTRUSION_3D_COLOR
) );
1217 rSet
.DisableItem( SID_EXTRUSION_3D_COLOR
);
1221 bool checkForSelectedCustomShapes( SdrView
* pSdrView
, bool bOnlyExtruded
)
1223 static const char sExtrusion
[] = "Extrusion";
1225 const SdrMarkList
& rMarkList
= pSdrView
->GetMarkedObjectList();
1226 const size_t nCount
= rMarkList
.GetMarkCount();
1227 bool bFound
= false;
1229 for(size_t i
=0;(i
<nCount
) && !bFound
; ++i
)
1231 SdrObject
* pObj
= rMarkList
.GetMark(i
)->GetMarkedSdrObj();
1232 if( pObj
->ISA(SdrObjCustomShape
) )
1236 const SdrCustomShapeGeometryItem
aGeometryItem( static_cast<const SdrCustomShapeGeometryItem
&>(pObj
->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY
) ));
1237 const Any
* pAny
= aGeometryItem
.GetPropertyValueByName( sExtrusion
, sExtrusion
);
1252 void ExtrusionBar::getState( SdrView
* pSdrView
, SfxItemSet
& rSet
)
1254 if (rSet
.GetItemState(SID_EXTRUSION_DIRECTION
) != SfxItemState::UNKNOWN
)
1256 getExtrusionDirectionState( pSdrView
, rSet
);
1258 if (rSet
.GetItemState(SID_EXTRUSION_PROJECTION
) != SfxItemState::UNKNOWN
)
1260 getExtrusionProjectionState( pSdrView
, rSet
);
1262 const bool bOnlyExtrudedCustomShapes
=
1263 checkForSelectedCustomShapes( pSdrView
, true );
1264 if (rSet
.GetItemState(SID_EXTRUSION_TILT_DOWN
) != SfxItemState::UNKNOWN
)
1266 if (! bOnlyExtrudedCustomShapes
)
1267 rSet
.DisableItem( SID_EXTRUSION_TILT_DOWN
);
1269 if (rSet
.GetItemState(SID_EXTRUSION_TILT_DOWN
) != SfxItemState::UNKNOWN
)
1271 if (! bOnlyExtrudedCustomShapes
)
1272 rSet
.DisableItem( SID_EXTRUSION_TILT_DOWN
);
1274 if (rSet
.GetItemState(SID_EXTRUSION_TILT_UP
) != SfxItemState::UNKNOWN
)
1276 if (! bOnlyExtrudedCustomShapes
)
1277 rSet
.DisableItem( SID_EXTRUSION_TILT_UP
);
1279 if (rSet
.GetItemState(SID_EXTRUSION_TILT_LEFT
) != SfxItemState::UNKNOWN
)
1281 if (! bOnlyExtrudedCustomShapes
)
1282 rSet
.DisableItem( SID_EXTRUSION_TILT_LEFT
);
1284 if (rSet
.GetItemState(SID_EXTRUSION_TILT_RIGHT
) != SfxItemState::UNKNOWN
)
1286 if (! bOnlyExtrudedCustomShapes
)
1287 rSet
.DisableItem( SID_EXTRUSION_TILT_RIGHT
);
1289 if (rSet
.GetItemState(SID_EXTRUSION_3D_COLOR
) != SfxItemState::UNKNOWN
)
1291 if (! bOnlyExtrudedCustomShapes
)
1292 rSet
.DisableItem( SID_EXTRUSION_3D_COLOR
);
1294 if (rSet
.GetItemState(SID_EXTRUSION_DEPTH_FLOATER
) != SfxItemState::UNKNOWN
)
1296 if (! bOnlyExtrudedCustomShapes
)
1297 rSet
.DisableItem( SID_EXTRUSION_DEPTH_FLOATER
);
1299 if (rSet
.GetItemState(SID_EXTRUSION_DIRECTION_FLOATER
) != SfxItemState::UNKNOWN
)
1301 if (! bOnlyExtrudedCustomShapes
)
1302 rSet
.DisableItem( SID_EXTRUSION_DIRECTION_FLOATER
);
1304 if (rSet
.GetItemState(SID_EXTRUSION_LIGHTING_FLOATER
) != SfxItemState::UNKNOWN
)
1306 if (! bOnlyExtrudedCustomShapes
)
1307 rSet
.DisableItem( SID_EXTRUSION_LIGHTING_FLOATER
);
1309 if (rSet
.GetItemState(SID_EXTRUSION_SURFACE_FLOATER
) != SfxItemState::UNKNOWN
)
1311 if(! bOnlyExtrudedCustomShapes
)
1312 rSet
.DisableItem( SID_EXTRUSION_SURFACE_FLOATER
);
1314 if (rSet
.GetItemState(SID_EXTRUSION_TOOGLE
) != SfxItemState::UNKNOWN
)
1316 if( !checkForSelectedCustomShapes( pSdrView
, false ) )
1317 rSet
.DisableItem( SID_EXTRUSION_TOOGLE
);
1319 if (rSet
.GetItemState(SID_EXTRUSION_DEPTH
) != SfxItemState::UNKNOWN
)
1321 getExtrusionDepthState( pSdrView
, rSet
);
1323 if (rSet
.GetItemState(SID_EXTRUSION_SURFACE
) != SfxItemState::UNKNOWN
)
1325 getExtrusionSurfaceState( pSdrView
, rSet
);
1327 if (rSet
.GetItemState(SID_EXTRUSION_LIGHTING_INTENSITY
) != SfxItemState::UNKNOWN
)
1329 getExtrusionLightingIntensityState( pSdrView
, rSet
);
1332 if (rSet
.GetItemState(SID_EXTRUSION_LIGHTING_DIRECTION
) != SfxItemState::UNKNOWN
)
1334 getExtrusionLightingDirectionState( pSdrView
, rSet
);
1337 if (rSet
.GetItemState(SID_EXTRUSION_3D_COLOR
) != SfxItemState::UNKNOWN
)
1339 getExtrusionColorState( pSdrView
, rSet
);
1343 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */