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 .
20 #include <com/sun/star/drawing/HomogenMatrix.hpp>
21 #include <com/sun/star/drawing/Position3D.hpp>
22 #include <com/sun/star/drawing/Direction3D.hpp>
23 #include <com/sun/star/drawing/DoubleSequence.hpp>
24 #include <com/sun/star/drawing/CameraGeometry.hpp>
25 #include <vcl/svapp.hxx>
26 #include <osl/mutex.hxx>
27 #include <comphelper/servicehelper.hxx>
28 #include <comphelper/serviceinfohelper.hxx>
30 #include <svx/svdpool.hxx>
31 #include <svx/unoshape.hxx>
32 #include <svx/unopage.hxx>
33 #include <editeng/unoprnms.hxx>
34 #include <svx/polysc3d.hxx>
35 #include "svx/globl3d.hxx"
36 #include <svx/cube3d.hxx>
37 #include <svx/sphere3d.hxx>
38 #include <svx/lathe3d.hxx>
39 #include <svx/extrud3d.hxx>
40 #include <svx/polygn3d.hxx>
41 #include "svx/unoshprp.hxx"
42 #include "svx/svdmodel.hxx"
43 #include <basegfx/polygon/b3dpolygon.hxx>
44 #include <basegfx/polygon/b3dpolygontools.hxx>
45 #include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
46 #include <basegfx/polygon/b2dpolypolygontools.hxx>
47 #include "shapeimpl.hxx"
49 using namespace ::cppu
;
50 using namespace ::com::sun::star
;
51 using namespace ::com::sun::star::uno
;
52 using namespace ::com::sun::star::lang
;
53 using namespace ::com::sun::star::container
;
55 #define QUERYINT( xint ) \
56 if( rType == cppu::UnoType<xint>::get() ) \
57 aAny <<= Reference< xint >(this)
59 Svx3DSceneObject::Svx3DSceneObject( SdrObject
* pObj
, SvxDrawPage
* pDrawPage
) throw()
60 : SvxShape( pObj
, getSvxMapProvider().GetMap(SVXMAP_3DSCENEOBJECT
), getSvxMapProvider().GetPropertySet(SVXMAP_3DSCENEOBJECT
, SdrObject::GetGlobalDrawObjectItemPool()) )
66 Svx3DSceneObject::~Svx3DSceneObject() throw()
71 void Svx3DSceneObject::Create( SdrObject
* pNewObj
, SvxDrawPage
* pNewPage
)
73 SvxShape::Create( pNewObj
, pNewPage
);
78 uno::Any SAL_CALL
Svx3DSceneObject::queryAggregation( const uno::Type
& rType
) throw(uno::RuntimeException
, std::exception
)
82 QUERYINT( drawing::XShapes
);
83 else QUERYINT( container::XIndexAccess
);
84 else QUERYINT( container::XElementAccess
);
86 return SvxShape::queryAggregation( rType
);
91 uno::Any SAL_CALL
Svx3DSceneObject::queryInterface( const uno::Type
& rType
) throw( uno::RuntimeException
, std::exception
)
93 return SvxShape::queryInterface( rType
);
96 void SAL_CALL
Svx3DSceneObject::acquire() throw ( )
101 void SAL_CALL
Svx3DSceneObject::release() throw ( )
108 uno::Sequence
< uno::Type
> SAL_CALL
Svx3DSceneObject::getTypes()
109 throw (uno::RuntimeException
, std::exception
)
112 return SvxShape::getTypes();
115 uno::Sequence
< sal_Int8
> SAL_CALL
Svx3DSceneObject::getImplementationId()
116 throw (uno::RuntimeException
, std::exception
)
118 return css::uno::Sequence
<sal_Int8
>();
122 void SAL_CALL
Svx3DSceneObject::add( const Reference
< drawing::XShape
>& xShape
)
123 throw( uno::RuntimeException
, std::exception
)
125 SolarMutexGuard aGuard
;
127 SvxShape
* pShape
= SvxShape::getImplementation( xShape
);
129 if(!mpObj
.is() || !mxPage
.is() || pShape
== NULL
|| NULL
!= pShape
->GetSdrObject() )
130 throw uno::RuntimeException();
132 SdrObject
* pSdrShape
= mxPage
->_CreateSdrObject( xShape
);
133 if( pSdrShape
->ISA(E3dObject
) )
135 mpObj
->GetSubList()->NbcInsertObject( pSdrShape
);
138 pShape
->Create( pSdrShape
, mxPage
.get() );
142 SdrObject::Free( pSdrShape
);
143 throw uno::RuntimeException();
147 mpModel
->SetChanged();
151 void SAL_CALL
Svx3DSceneObject::remove( const Reference
< drawing::XShape
>& xShape
)
152 throw( uno::RuntimeException
, std::exception
)
154 SolarMutexGuard aGuard
;
156 SvxShape
* pShape
= SvxShape::getImplementation( xShape
);
158 if(!mpObj
.is() || pShape
== NULL
)
159 throw uno::RuntimeException();
161 SdrObject
* pSdrShape
= pShape
->GetSdrObject();
162 if(pSdrShape
== NULL
|| pSdrShape
->GetObjList()->GetOwnerObj() != mpObj
.get())
164 throw uno::RuntimeException();
168 SdrObjList
& rList
= *pSdrShape
->GetObjList();
170 const size_t nObjCount
= rList
.GetObjCount();
172 while( nObjNum
< nObjCount
)
174 if(rList
.GetObj( nObjNum
) == pSdrShape
)
179 if( nObjNum
< nObjCount
)
181 SdrObject
* pObject
= rList
.NbcRemoveObject( nObjNum
);
182 SdrObject::Free( pObject
);
186 DBG_ASSERT( false, "Fatality! SdrObject is not belonging to its SdrObjList! [CL]" );
192 sal_Int32 SAL_CALL
Svx3DSceneObject::getCount()
193 throw( uno::RuntimeException
, std::exception
)
195 SolarMutexGuard aGuard
;
197 sal_Int32 nRetval
= 0;
199 if(mpObj
.is() && mpObj
->ISA(E3dPolyScene
) && mpObj
->GetSubList())
200 nRetval
= mpObj
->GetSubList()->GetObjCount();
206 uno::Any SAL_CALL
Svx3DSceneObject::getByIndex( sal_Int32 Index
)
207 throw( lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
, std::exception
)
209 SolarMutexGuard aGuard
;
211 if( !mpObj
.is() || mpObj
->GetSubList() == NULL
)
212 throw uno::RuntimeException();
214 if( Index
<0 || mpObj
->GetSubList()->GetObjCount() <= static_cast<size_t>(Index
) )
215 throw lang::IndexOutOfBoundsException();
217 SdrObject
* pDestObj
= mpObj
->GetSubList()->GetObj( Index
);
219 throw lang::IndexOutOfBoundsException();
221 Reference
< drawing::XShape
> xShape( pDestObj
->getUnoShape(), uno::UNO_QUERY
);
228 // ::com::sun::star::container::XElementAccess
230 uno::Type SAL_CALL
Svx3DSceneObject::getElementType()
231 throw( uno::RuntimeException
, std::exception
)
233 return cppu::UnoType
<drawing::XShape
>::get();
237 sal_Bool SAL_CALL
Svx3DSceneObject::hasElements()
238 throw( uno::RuntimeException
, std::exception
)
240 SolarMutexGuard aGuard
;
242 return mpObj
.is() && mpObj
->GetSubList() && (mpObj
->GetSubList()->GetObjCount() > 0);
247 static bool ConvertHomogenMatrixToObject( E3dObject
* pObject
, const Any
& rValue
)
249 drawing::HomogenMatrix m
;
252 basegfx::B3DHomMatrix aMat
;
253 aMat
.set(0, 0, m
.Line1
.Column1
);
254 aMat
.set(0, 1, m
.Line1
.Column2
);
255 aMat
.set(0, 2, m
.Line1
.Column3
);
256 aMat
.set(0, 3, m
.Line1
.Column4
);
257 aMat
.set(1, 0, m
.Line2
.Column1
);
258 aMat
.set(1, 1, m
.Line2
.Column2
);
259 aMat
.set(1, 2, m
.Line2
.Column3
);
260 aMat
.set(1, 3, m
.Line2
.Column4
);
261 aMat
.set(2, 0, m
.Line3
.Column1
);
262 aMat
.set(2, 1, m
.Line3
.Column2
);
263 aMat
.set(2, 2, m
.Line3
.Column3
);
264 aMat
.set(2, 3, m
.Line3
.Column4
);
265 aMat
.set(3, 0, m
.Line4
.Column1
);
266 aMat
.set(3, 1, m
.Line4
.Column2
);
267 aMat
.set(3, 2, m
.Line4
.Column3
);
268 aMat
.set(3, 3, m
.Line4
.Column4
);
269 pObject
->SetTransform(aMat
);
275 static void ConvertObjectToHomogenMatric( E3dObject
* pObject
, Any
& rValue
)
277 drawing::HomogenMatrix aHomMat
;
278 const basegfx::B3DHomMatrix
& rMat
= pObject
->GetTransform();
279 aHomMat
.Line1
.Column1
= rMat
.get(0, 0);
280 aHomMat
.Line1
.Column2
= rMat
.get(0, 1);
281 aHomMat
.Line1
.Column3
= rMat
.get(0, 2);
282 aHomMat
.Line1
.Column4
= rMat
.get(0, 3);
283 aHomMat
.Line2
.Column1
= rMat
.get(1, 0);
284 aHomMat
.Line2
.Column2
= rMat
.get(1, 1);
285 aHomMat
.Line2
.Column3
= rMat
.get(1, 2);
286 aHomMat
.Line2
.Column4
= rMat
.get(1, 3);
287 aHomMat
.Line3
.Column1
= rMat
.get(2, 0);
288 aHomMat
.Line3
.Column2
= rMat
.get(2, 1);
289 aHomMat
.Line3
.Column3
= rMat
.get(2, 2);
290 aHomMat
.Line3
.Column4
= rMat
.get(2, 3);
291 aHomMat
.Line4
.Column1
= rMat
.get(3, 0);
292 aHomMat
.Line4
.Column2
= rMat
.get(3, 1);
293 aHomMat
.Line4
.Column3
= rMat
.get(3, 2);
294 aHomMat
.Line4
.Column4
= rMat
.get(3, 3);
299 #include <svx/svditer.hxx>
301 struct ImpRememberTransAndRect
303 basegfx::B3DHomMatrix maMat
;
307 bool Svx3DSceneObject::setPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, const ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
, std::exception
)
309 switch( pProperty
->nWID
)
311 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
313 // pach transformation matrix to the object
314 if( ConvertHomogenMatrixToObject( static_cast< E3dObject
* >( mpObj
.get() ), rValue
) )
318 case OWN_ATTR_3D_VALUE_CAMERA_GEOMETRY
:
320 // set CameraGeometry at scene
321 E3dScene
* pScene
= static_cast< E3dScene
* >( mpObj
.get() );
322 drawing::CameraGeometry aCamGeo
;
324 if(rValue
>>= aCamGeo
)
326 basegfx::B3DPoint
aVRP(aCamGeo
.vrp
.PositionX
, aCamGeo
.vrp
.PositionY
, aCamGeo
.vrp
.PositionZ
);
327 basegfx::B3DVector
aVPN(aCamGeo
.vpn
.DirectionX
, aCamGeo
.vpn
.DirectionY
, aCamGeo
.vpn
.DirectionZ
);
328 basegfx::B3DVector
aVUP(aCamGeo
.vup
.DirectionX
, aCamGeo
.vup
.DirectionY
, aCamGeo
.vup
.DirectionZ
);
330 // rescue scene transformation
331 ImpRememberTransAndRect aSceneTAR
;
332 aSceneTAR
.maMat
= pScene
->GetTransform();
333 aSceneTAR
.maRect
= pScene
->GetSnapRect();
335 // rescue object transformations
336 SdrObjListIter
aIter(*pScene
->GetSubList(), IM_DEEPWITHGROUPS
);
337 std::vector
<basegfx::B3DHomMatrix
*> aObjTrans
;
338 while(aIter
.IsMore())
340 E3dObject
* p3DObj
= static_cast<E3dObject
*>(aIter
.Next());
341 basegfx::B3DHomMatrix
* pNew
= new basegfx::B3DHomMatrix
;
342 *pNew
= p3DObj
->GetTransform();
343 aObjTrans
.push_back(pNew
);
346 // reset object transformations
348 while(aIter
.IsMore())
350 E3dObject
* p3DObj
= static_cast<E3dObject
*>(aIter
.Next());
351 p3DObj
->NbcSetTransform(basegfx::B3DHomMatrix());
354 // reset scene transformation and make a complete recalc
355 pScene
->NbcSetTransform(basegfx::B3DHomMatrix());
357 // fill old camera from new parameters
358 Camera3D
aCam(pScene
->GetCamera());
359 const basegfx::B3DRange
& rVolume
= pScene
->GetBoundVolume();
360 double fW
= rVolume
.getWidth();
361 double fH
= rVolume
.getHeight();
363 const SfxItemSet
& rSceneSet
= pScene
->GetMergedItemSet();
365 (double)static_cast<const SfxUInt32Item
&>(rSceneSet
.Get(SDRATTR_3DSCENE_DISTANCE
)).GetValue();
367 (double)static_cast<const SfxUInt32Item
&>(rSceneSet
.Get(SDRATTR_3DSCENE_FOCAL_LENGTH
)).GetValue();
369 aCam
.SetAutoAdjustProjection(false);
370 aCam
.SetViewWindow(- fW
/ 2, - fH
/ 2, fW
, fH
);
371 basegfx::B3DPoint aLookAt
;
372 basegfx::B3DPoint
aCamPos(0.0, 0.0, fCamPosZ
);
373 aCam
.SetPosAndLookAt(aCamPos
, aLookAt
);
374 aCam
.SetFocalLength(fCamFocal
/ 100.0);
375 aCam
.SetDefaults(basegfx::B3DPoint(0.0, 0.0, fCamPosZ
), aLookAt
, fCamFocal
/ 100.0);
376 aCam
.SetDeviceWindow(Rectangle(0, 0, (long)fW
, (long)fH
));
379 pScene
->SetCamera(aCam
);
381 // #91047# use imported VRP, VPN and VUP (if used)
382 bool bVRPUsed(!aVRP
.equal(basegfx::B3DPoint(0.0, 0.0, 1.0)));
383 bool bVPNUsed(!aVPN
.equal(basegfx::B3DVector(0.0, 0.0, 1.0)));
384 bool bVUPUsed(!aVUP
.equal(basegfx::B3DVector(0.0, 1.0, 0.0)));
386 if(bVRPUsed
|| bVPNUsed
|| bVUPUsed
)
388 pScene
->GetCameraSet().SetViewportValues(aVRP
, aVPN
, aVUP
);
391 // set object transformations again at objects
393 sal_uInt32
nIndex(0L);
394 while(aIter
.IsMore())
396 E3dObject
* p3DObj
= static_cast<E3dObject
*>(aIter
.Next());
397 basegfx::B3DHomMatrix
* pMat
= aObjTrans
[nIndex
++];
398 p3DObj
->NbcSetTransform(*pMat
);
402 // set scene transformation again at scene
403 pScene
->NbcSetTransform(aSceneTAR
.maMat
);
404 pScene
->NbcSetSnapRect(aSceneTAR
.maRect
);
411 return SvxShape::setPropertyValueImpl(rName
, pProperty
, rValue
);
414 throw IllegalArgumentException();
419 bool Svx3DSceneObject::getPropertyValueImpl(const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
,
420 css::uno::Any
& rValue
)
421 throw (css::beans::UnknownPropertyException
,
422 css::lang::WrappedTargetException
,
423 css::uno::RuntimeException
,
426 switch( pProperty
->nWID
)
428 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
430 // pach object to a homogeneous 4x4 matrix
431 ConvertObjectToHomogenMatric( static_cast< E3dObject
* >( mpObj
.get() ), rValue
);
434 case OWN_ATTR_3D_VALUE_CAMERA_GEOMETRY
:
436 // get CameraGeometry from scene
437 E3dScene
* pScene
= static_cast< E3dScene
* >( mpObj
.get() );
438 drawing::CameraGeometry aCamGeo
;
440 // fill Vectors from scene camera
441 B3dCamera
& aCameraSet
= pScene
->GetCameraSet();
442 basegfx::B3DPoint
aVRP(aCameraSet
.GetVRP());
443 basegfx::B3DVector
aVPN(aCameraSet
.GetVPN());
444 basegfx::B3DVector
aVUP(aCameraSet
.GetVUV());
446 // transfer to structure
447 aCamGeo
.vrp
.PositionX
= aVRP
.getX();
448 aCamGeo
.vrp
.PositionY
= aVRP
.getY();
449 aCamGeo
.vrp
.PositionZ
= aVRP
.getZ();
450 aCamGeo
.vpn
.DirectionX
= aVPN
.getX();
451 aCamGeo
.vpn
.DirectionY
= aVPN
.getY();
452 aCamGeo
.vpn
.DirectionZ
= aVPN
.getZ();
453 aCamGeo
.vup
.DirectionX
= aVUP
.getX();
454 aCamGeo
.vup
.DirectionY
= aVUP
.getY();
455 aCamGeo
.vup
.DirectionZ
= aVUP
.getZ();
461 return SvxShape::getPropertyValueImpl( rName
, pProperty
, rValue
);
467 // ::com::sun::star::lang::XServiceInfo
468 uno::Sequence
< OUString
> SAL_CALL
Svx3DSceneObject::getSupportedServiceNames()
469 throw(uno::RuntimeException
, std::exception
)
471 uno::Sequence
< OUString
> aSeq( SvxShape::getSupportedServiceNames() );
472 comphelper::ServiceInfoHelper::addToSequence( aSeq
, 1, "com.sun.star.drawing.Shape3DScene" );
475 Svx3DCubeObject::Svx3DCubeObject( SdrObject
* pObj
) throw()
476 : SvxShape( pObj
, getSvxMapProvider().GetMap(SVXMAP_3DCUBEOBJEKT
), getSvxMapProvider().GetPropertySet(SVXMAP_3DCUBEOBJEKT
, SdrObject::GetGlobalDrawObjectItemPool()) )
481 Svx3DCubeObject::~Svx3DCubeObject() throw()
486 bool Svx3DCubeObject::setPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, const ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
)
488 SolarMutexGuard aGuard
;
490 switch( pProperty
->nWID
)
492 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
494 // pack transformationmatrix to the object
495 if( ConvertHomogenMatrixToObject( static_cast< E3dObject
* >( mpObj
.get() ), rValue
) )
499 case OWN_ATTR_3D_VALUE_POSITION
:
501 // pack position to the object
502 drawing::Position3D aUnoPos
;
503 if( rValue
>>= aUnoPos
)
505 basegfx::B3DPoint
aPos(aUnoPos
.PositionX
, aUnoPos
.PositionY
, aUnoPos
.PositionZ
);
506 static_cast< E3dCubeObj
* >( mpObj
.get() )->SetCubePos(aPos
);
511 case OWN_ATTR_3D_VALUE_SIZE
:
513 // pack size to the object
514 drawing::Direction3D aDirection
;
515 if( rValue
>>= aDirection
)
517 basegfx::B3DVector
aSize(aDirection
.DirectionX
, aDirection
.DirectionY
, aDirection
.DirectionZ
);
518 static_cast< E3dCubeObj
* >( mpObj
.get() )->SetCubeSize(aSize
);
523 case OWN_ATTR_3D_VALUE_POS_IS_CENTER
:
526 // pack sal_Bool bPosIsCenter to the object
527 if( rValue
>>= bNew
)
529 static_cast< E3dCubeObj
* >( mpObj
.get() )->SetPosIsCenter(bNew
);
535 return SvxShape::setPropertyValueImpl( rName
, pProperty
, rValue
);
538 throw IllegalArgumentException();
543 bool Svx3DCubeObject::getPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
, std::exception
)
545 switch( pProperty
->nWID
)
547 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
549 // pack transformation to a homogeneous matrix
550 ConvertObjectToHomogenMatric( static_cast< E3dObject
* >( mpObj
.get() ), rValue
);
553 case OWN_ATTR_3D_VALUE_POSITION
:
556 const basegfx::B3DPoint
& rPos
= static_cast<E3dCubeObj
*>(mpObj
.get())->GetCubePos();
557 drawing::Position3D aPos
;
559 aPos
.PositionX
= rPos
.getX();
560 aPos
.PositionY
= rPos
.getY();
561 aPos
.PositionZ
= rPos
.getZ();
566 case OWN_ATTR_3D_VALUE_SIZE
:
569 const basegfx::B3DVector
& rSize
= static_cast<E3dCubeObj
*>(mpObj
.get())->GetCubeSize();
570 drawing::Direction3D aDir
;
572 aDir
.DirectionX
= rSize
.getX();
573 aDir
.DirectionY
= rSize
.getY();
574 aDir
.DirectionZ
= rSize
.getZ();
579 case OWN_ATTR_3D_VALUE_POS_IS_CENTER
:
581 rValue
<<= static_cast<E3dCubeObj
*>(mpObj
.get())->GetPosIsCenter();
585 return SvxShape::getPropertyValueImpl( rName
, pProperty
, rValue
);
591 // ::com::sun::star::lang::XServiceInfo
592 uno::Sequence
< OUString
> SAL_CALL
Svx3DCubeObject::getSupportedServiceNames()
593 throw(uno::RuntimeException
, std::exception
)
595 uno::Sequence
< OUString
> aSeq( SvxShape::getSupportedServiceNames() );
596 comphelper::ServiceInfoHelper::addToSequence( aSeq
, 2, "com.sun.star.drawing.Shape3D",
597 "com.sun.star.drawing.Shape3DCube");
600 Svx3DSphereObject::Svx3DSphereObject( SdrObject
* pObj
) throw()
601 : SvxShape( pObj
, getSvxMapProvider().GetMap(SVXMAP_3DSPHEREOBJECT
), getSvxMapProvider().GetPropertySet(SVXMAP_3DSPHEREOBJECT
, SdrObject::GetGlobalDrawObjectItemPool()) )
606 Svx3DSphereObject::~Svx3DSphereObject() throw()
612 bool Svx3DSphereObject::setPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, const ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
)
614 switch( pProperty
->nWID
)
616 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
618 // pack transformation matrix to the object
619 if( ConvertHomogenMatrixToObject( static_cast< E3dObject
* >( mpObj
.get() ), rValue
) )
624 case OWN_ATTR_3D_VALUE_POSITION
:
626 // pack position to the object
627 drawing::Position3D aUnoPos
;
628 if( rValue
>>= aUnoPos
)
630 basegfx::B3DPoint
aPos(aUnoPos
.PositionX
, aUnoPos
.PositionY
, aUnoPos
.PositionZ
);
631 static_cast<E3dSphereObj
*>(mpObj
.get())->SetCenter(aPos
);
637 case OWN_ATTR_3D_VALUE_SIZE
:
639 // pack size to the object
640 drawing::Direction3D aDir
;
641 if( rValue
>>= aDir
)
643 basegfx::B3DVector
aPos(aDir
.DirectionX
, aDir
.DirectionY
, aDir
.DirectionZ
);
644 static_cast<E3dSphereObj
*>(mpObj
.get())->SetSize(aPos
);
650 return SvxShape::setPropertyValueImpl( rName
, pProperty
, rValue
);
653 throw IllegalArgumentException();
658 bool Svx3DSphereObject::getPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
, std::exception
)
660 switch( pProperty
->nWID
)
662 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
664 // pack transformation to a homogeneous matrix
665 ConvertObjectToHomogenMatric( static_cast< E3dObject
* >( mpObj
.get() ), rValue
);
668 case OWN_ATTR_3D_VALUE_POSITION
:
671 const basegfx::B3DPoint
& rPos
= static_cast<E3dSphereObj
*>(mpObj
.get())->Center();
672 drawing::Position3D aPos
;
674 aPos
.PositionX
= rPos
.getX();
675 aPos
.PositionY
= rPos
.getY();
676 aPos
.PositionZ
= rPos
.getZ();
681 case OWN_ATTR_3D_VALUE_SIZE
:
684 const basegfx::B3DVector
& rSize
= static_cast<E3dSphereObj
*>(mpObj
.get())->Size();
685 drawing::Direction3D aDir
;
687 aDir
.DirectionX
= rSize
.getX();
688 aDir
.DirectionY
= rSize
.getY();
689 aDir
.DirectionZ
= rSize
.getZ();
695 return SvxShape::getPropertyValueImpl( rName
, pProperty
, rValue
);
701 // ::com::sun::star::lang::XServiceInfo
702 uno::Sequence
< OUString
> SAL_CALL
Svx3DSphereObject::getSupportedServiceNames()
703 throw(uno::RuntimeException
, std::exception
)
705 uno::Sequence
< OUString
> aSeq( SvxShape::getSupportedServiceNames() );
706 comphelper::ServiceInfoHelper::addToSequence( aSeq
, 2, "com.sun.star.drawing.Shape3D",
707 "com.sun.star.drawing.Shape3DSphere");
710 Svx3DLatheObject::Svx3DLatheObject( SdrObject
* pObj
) throw()
711 : SvxShape( pObj
, getSvxMapProvider().GetMap(SVXMAP_3DLATHEOBJECT
), getSvxMapProvider().GetPropertySet(SVXMAP_3DLATHEOBJECT
, SdrObject::GetGlobalDrawObjectItemPool()) )
716 Svx3DLatheObject::~Svx3DLatheObject() throw()
720 bool PolyPolygonShape3D_to_B3dPolyPolygon(
722 basegfx::B3DPolyPolygon
& rResultPolygon
,
723 bool bCorrectPolygon
)
725 drawing::PolyPolygonShape3D aSourcePolyPolygon
;
726 if( !(rValue
>>= aSourcePolyPolygon
) )
729 sal_Int32 nOuterSequenceCount
= aSourcePolyPolygon
.SequenceX
.getLength();
730 if(nOuterSequenceCount
!= aSourcePolyPolygon
.SequenceY
.getLength() || nOuterSequenceCount
!= aSourcePolyPolygon
.SequenceZ
.getLength())
733 drawing::DoubleSequence
* pInnerSequenceX
= aSourcePolyPolygon
.SequenceX
.getArray();
734 drawing::DoubleSequence
* pInnerSequenceY
= aSourcePolyPolygon
.SequenceY
.getArray();
735 drawing::DoubleSequence
* pInnerSequenceZ
= aSourcePolyPolygon
.SequenceZ
.getArray();
736 for(sal_Int32
a(0L);a
<nOuterSequenceCount
;a
++)
738 sal_Int32 nInnerSequenceCount
= pInnerSequenceX
->getLength();
739 if(nInnerSequenceCount
!= pInnerSequenceY
->getLength() || nInnerSequenceCount
!= pInnerSequenceZ
->getLength())
743 basegfx::B3DPolygon aNewPolygon
;
744 double* pArrayX
= pInnerSequenceX
->getArray();
745 double* pArrayY
= pInnerSequenceY
->getArray();
746 double* pArrayZ
= pInnerSequenceZ
->getArray();
747 for(sal_Int32
b(0L);b
<nInnerSequenceCount
;b
++)
749 aNewPolygon
.append(basegfx::B3DPoint(*pArrayX
++,*pArrayY
++,*pArrayZ
++));
755 // #i101520# correction is needed for imported polygons of old format,
759 basegfx::tools::checkClosed(aNewPolygon
);
762 rResultPolygon
.append(aNewPolygon
);
767 static void B3dPolyPolygon_to_PolyPolygonShape3D( const basegfx::B3DPolyPolygon
& rSourcePolyPolygon
, Any
& rValue
)
769 drawing::PolyPolygonShape3D aRetval
;
770 aRetval
.SequenceX
.realloc(rSourcePolyPolygon
.count());
771 aRetval
.SequenceY
.realloc(rSourcePolyPolygon
.count());
772 aRetval
.SequenceZ
.realloc(rSourcePolyPolygon
.count());
773 drawing::DoubleSequence
* pOuterSequenceX
= aRetval
.SequenceX
.getArray();
774 drawing::DoubleSequence
* pOuterSequenceY
= aRetval
.SequenceY
.getArray();
775 drawing::DoubleSequence
* pOuterSequenceZ
= aRetval
.SequenceZ
.getArray();
776 for(sal_uInt32
a(0L);a
<rSourcePolyPolygon
.count();a
++)
778 const basegfx::B3DPolygon
aPoly(rSourcePolyPolygon
.getB3DPolygon(a
));
779 sal_Int32
nPointCount(aPoly
.count());
780 if(aPoly
.isClosed()) nPointCount
++;
781 pOuterSequenceX
->realloc(nPointCount
);
782 pOuterSequenceY
->realloc(nPointCount
);
783 pOuterSequenceZ
->realloc(nPointCount
);
784 double* pInnerSequenceX
= pOuterSequenceX
->getArray();
785 double* pInnerSequenceY
= pOuterSequenceY
->getArray();
786 double* pInnerSequenceZ
= pOuterSequenceZ
->getArray();
787 for(sal_uInt32
b(0L);b
<aPoly
.count();b
++)
789 const basegfx::B3DPoint
aPoint(aPoly
.getB3DPoint(b
));
790 *pInnerSequenceX
++ = aPoint
.getX();
791 *pInnerSequenceY
++ = aPoint
.getY();
792 *pInnerSequenceZ
++ = aPoint
.getZ();
796 const basegfx::B3DPoint
aPoint(aPoly
.getB3DPoint(0L));
797 *pInnerSequenceX
++ = aPoint
.getX();
798 *pInnerSequenceY
++ = aPoint
.getY();
799 *pInnerSequenceZ
++ = aPoint
.getZ();
810 bool Svx3DLatheObject::setPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, const ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
)
812 switch( pProperty
->nWID
)
814 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
816 // pack transformation matrix to the object
817 if( ConvertHomogenMatrixToObject( static_cast< E3dObject
* >( mpObj
.get() ), rValue
) )
821 case OWN_ATTR_3D_VALUE_POLYPOLYGON3D
:
823 // pack polygon definition to the object
824 basegfx::B3DPolyPolygon aNewB3DPolyPolygon
;
826 // #i101520# Probably imported
827 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue
, aNewB3DPolyPolygon
, true ) )
829 // #105127# SetPolyPoly3D sets the Svx3DVerticalSegmentsItem to the number
830 // of points of the polygon. Thus, value gets lost. To avoid this, rescue
831 // item here and re-set after setting the polygon.
832 const sal_uInt32
nPrevVerticalSegs(static_cast<E3dLatheObj
*>(mpObj
.get())->GetVerticalSegments());
835 const basegfx::B3DHomMatrix aIdentity
;
836 const basegfx::B2DPolyPolygon
aB2DPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon
, aIdentity
));
837 static_cast<E3dLatheObj
*>(mpObj
.get())->SetPolyPoly2D(aB2DPolyPolygon
);
838 const sal_uInt32
nPostVerticalSegs(static_cast<E3dLatheObj
*>(mpObj
.get())->GetVerticalSegments());
840 if(nPrevVerticalSegs
!= nPostVerticalSegs
)
842 // restore the vertical segment count
843 static_cast<E3dLatheObj
*>(mpObj
.get())->SetMergedItem(makeSvx3DVerticalSegmentsItem(nPrevVerticalSegs
));
850 return SvxShape::setPropertyValueImpl( rName
, pProperty
, rValue
);
853 throw IllegalArgumentException();
857 bool Svx3DLatheObject::getPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, ::com::sun::star::uno::Any
& rValue
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
, std::exception
)
859 switch( pProperty
->nWID
)
861 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
863 // pack transformation to a homogeneous matrix
864 drawing::HomogenMatrix aHomMat
;
865 basegfx::B3DHomMatrix aMat
= static_cast<E3dObject
*>(mpObj
.get())->GetTransform();
867 // pack evtl. transformed matrix to output
868 aHomMat
.Line1
.Column1
= aMat
.get(0, 0);
869 aHomMat
.Line1
.Column2
= aMat
.get(0, 1);
870 aHomMat
.Line1
.Column3
= aMat
.get(0, 2);
871 aHomMat
.Line1
.Column4
= aMat
.get(0, 3);
872 aHomMat
.Line2
.Column1
= aMat
.get(1, 0);
873 aHomMat
.Line2
.Column2
= aMat
.get(1, 1);
874 aHomMat
.Line2
.Column3
= aMat
.get(1, 2);
875 aHomMat
.Line2
.Column4
= aMat
.get(1, 3);
876 aHomMat
.Line3
.Column1
= aMat
.get(2, 0);
877 aHomMat
.Line3
.Column2
= aMat
.get(2, 1);
878 aHomMat
.Line3
.Column3
= aMat
.get(2, 2);
879 aHomMat
.Line3
.Column4
= aMat
.get(2, 3);
880 aHomMat
.Line4
.Column1
= aMat
.get(3, 0);
881 aHomMat
.Line4
.Column2
= aMat
.get(3, 1);
882 aHomMat
.Line4
.Column3
= aMat
.get(3, 2);
883 aHomMat
.Line4
.Column4
= aMat
.get(3, 3);
888 case OWN_ATTR_3D_VALUE_POLYPOLYGON3D
:
890 const basegfx::B2DPolyPolygon
& rPolyPoly
= static_cast<E3dLatheObj
*>(mpObj
.get())->GetPolyPoly2D();
891 const basegfx::B3DPolyPolygon
aB3DPolyPolygon(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly
));
893 B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon
, rValue
);
897 return SvxShape::getPropertyValueImpl( rName
, pProperty
, rValue
);
903 // ::com::sun::star::lang::XServiceInfo
904 uno::Sequence
< OUString
> SAL_CALL
Svx3DLatheObject::getSupportedServiceNames()
905 throw(uno::RuntimeException
, std::exception
)
907 uno::Sequence
< OUString
> aSeq( SvxShape::getSupportedServiceNames() );
908 comphelper::ServiceInfoHelper::addToSequence( aSeq
, 2, "com.sun.star.drawing.Shape3D",
909 "com.sun.star.drawing.Shape3DLathe");
912 Svx3DExtrudeObject::Svx3DExtrudeObject( SdrObject
* pObj
) throw()
913 : SvxShape( pObj
, getSvxMapProvider().GetMap(SVXMAP_3DEXTRUDEOBJECT
), getSvxMapProvider().GetPropertySet(SVXMAP_3DEXTRUDEOBJECT
, SdrObject::GetGlobalDrawObjectItemPool()) )
918 Svx3DExtrudeObject::~Svx3DExtrudeObject() throw()
924 bool Svx3DExtrudeObject::setPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, const ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
)
926 switch( pProperty
->nWID
)
928 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
930 // pack transformation matrix to the object
931 if( ConvertHomogenMatrixToObject( static_cast< E3dObject
* >( mpObj
.get() ), rValue
) )
936 case OWN_ATTR_3D_VALUE_POLYPOLYGON3D
:
938 // pack polygon definition to the object
939 basegfx::B3DPolyPolygon aNewB3DPolyPolygon
;
941 // #i101520# Probably imported
942 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue
, aNewB3DPolyPolygon
, true ) )
945 const basegfx::B3DHomMatrix aIdentity
;
946 const basegfx::B2DPolyPolygon
aB2DPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon
, aIdentity
));
947 static_cast<E3dExtrudeObj
*>(mpObj
.get())->SetExtrudePolygon(aB2DPolyPolygon
);
953 return SvxShape::setPropertyValueImpl( rName
, pProperty
, rValue
);
956 throw IllegalArgumentException();
961 bool Svx3DExtrudeObject::getPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
, std::exception
)
963 switch( pProperty
->nWID
)
965 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
967 // pack transformation to a homogeneous matrix
968 drawing::HomogenMatrix aHomMat
;
969 basegfx::B3DHomMatrix aMat
= static_cast<E3dObject
*>(mpObj
.get())->GetTransform();
971 // pack evtl. transformed matrix to output
972 aHomMat
.Line1
.Column1
= aMat
.get(0, 0);
973 aHomMat
.Line1
.Column2
= aMat
.get(0, 1);
974 aHomMat
.Line1
.Column3
= aMat
.get(0, 2);
975 aHomMat
.Line1
.Column4
= aMat
.get(0, 3);
976 aHomMat
.Line2
.Column1
= aMat
.get(1, 0);
977 aHomMat
.Line2
.Column2
= aMat
.get(1, 1);
978 aHomMat
.Line2
.Column3
= aMat
.get(1, 2);
979 aHomMat
.Line2
.Column4
= aMat
.get(1, 3);
980 aHomMat
.Line3
.Column1
= aMat
.get(2, 0);
981 aHomMat
.Line3
.Column2
= aMat
.get(2, 1);
982 aHomMat
.Line3
.Column3
= aMat
.get(2, 2);
983 aHomMat
.Line3
.Column4
= aMat
.get(2, 3);
984 aHomMat
.Line4
.Column1
= aMat
.get(3, 0);
985 aHomMat
.Line4
.Column2
= aMat
.get(3, 1);
986 aHomMat
.Line4
.Column3
= aMat
.get(3, 2);
987 aHomMat
.Line4
.Column4
= aMat
.get(3, 3);
993 case OWN_ATTR_3D_VALUE_POLYPOLYGON3D
:
995 // pack polygon definition
996 const basegfx::B2DPolyPolygon
& rPolyPoly
= static_cast<E3dExtrudeObj
*>(mpObj
.get())->GetExtrudePolygon();
997 const basegfx::B3DPolyPolygon
aB3DPolyPolygon(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly
));
999 B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon
, rValue
);
1003 return SvxShape::getPropertyValueImpl( rName
, pProperty
, rValue
);
1009 // ::com::sun::star::lang::XServiceInfo
1010 uno::Sequence
< OUString
> SAL_CALL
Svx3DExtrudeObject::getSupportedServiceNames()
1011 throw(uno::RuntimeException
, std::exception
)
1013 uno::Sequence
< OUString
> aSeq( SvxShape::getSupportedServiceNames() );
1014 comphelper::ServiceInfoHelper::addToSequence( aSeq
, 2, "com.sun.star.drawing.Shape3D",
1015 "com.sun.star.drawing.Shape3DExtrude");
1018 Svx3DPolygonObject::Svx3DPolygonObject( SdrObject
* pObj
) throw()
1019 : SvxShape( pObj
, getSvxMapProvider().GetMap(SVXMAP_3DPOLYGONOBJECT
), getSvxMapProvider().GetPropertySet(SVXMAP_3DPOLYGONOBJECT
, SdrObject::GetGlobalDrawObjectItemPool()) )
1024 Svx3DPolygonObject::~Svx3DPolygonObject() throw()
1029 bool Svx3DPolygonObject::setPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, const ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
)
1031 switch( pProperty
->nWID
)
1033 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
1035 // pack transformation matrix to the object
1036 if( ConvertHomogenMatrixToObject( static_cast< E3dObject
* >( mpObj
.get() ), rValue
) )
1041 case OWN_ATTR_3D_VALUE_POLYPOLYGON3D
:
1043 // pack polygon definition to the object
1044 basegfx::B3DPolyPolygon aNewB3DPolyPolygon
;
1046 // #i101520# Direct API data (e.g. from chart)
1047 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue
, aNewB3DPolyPolygon
, false ) )
1050 static_cast<E3dPolygonObj
*>(mpObj
.get())->SetPolyPolygon3D(aNewB3DPolyPolygon
);
1055 case OWN_ATTR_3D_VALUE_NORMALSPOLYGON3D
:
1057 // pack perpendicular definition to the object
1058 basegfx::B3DPolyPolygon aNewB3DPolyPolygon
;
1060 // #i101520# Direct API data (e.g. from chart)
1061 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue
, aNewB3DPolyPolygon
, false ) )
1064 static_cast<E3dPolygonObj
*>(mpObj
.get())->SetPolyNormals3D(aNewB3DPolyPolygon
);
1069 case OWN_ATTR_3D_VALUE_TEXTUREPOLYGON3D
:
1071 // pack texture definition to the object
1072 basegfx::B3DPolyPolygon aNewB3DPolyPolygon
;
1074 // #i101520# Direct API data (e.g. from chart)
1075 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue
, aNewB3DPolyPolygon
, false ) )
1078 const basegfx::B3DHomMatrix aIdentity
;
1079 const basegfx::B2DPolyPolygon
aB2DPolyPolygon(basegfx::tools::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon
, aIdentity
));
1080 static_cast<E3dPolygonObj
*>(mpObj
.get())->SetPolyTexture2D(aB2DPolyPolygon
);
1085 case OWN_ATTR_3D_VALUE_LINEONLY
:
1088 if( rValue
>>= bNew
)
1090 static_cast<E3dPolygonObj
*>(mpObj
.get())->SetLineOnly(bNew
);
1096 return SvxShape::setPropertyValueImpl( rName
, pProperty
, rValue
);
1099 throw IllegalArgumentException();
1103 bool Svx3DPolygonObject::getPropertyValueImpl( const OUString
& rName
, const SfxItemPropertySimpleEntry
* pProperty
, ::com::sun::star::uno::Any
& rValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
, std::exception
)
1105 switch( pProperty
->nWID
)
1107 case OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
:
1109 ConvertObjectToHomogenMatric( static_cast< E3dObject
* >( mpObj
.get() ), rValue
);
1113 case OWN_ATTR_3D_VALUE_POLYPOLYGON3D
:
1115 B3dPolyPolygon_to_PolyPolygonShape3D(static_cast<E3dPolygonObj
*>(mpObj
.get())->GetPolyPolygon3D(),rValue
);
1119 case OWN_ATTR_3D_VALUE_NORMALSPOLYGON3D
:
1121 B3dPolyPolygon_to_PolyPolygonShape3D(static_cast<E3dPolygonObj
*>(mpObj
.get())->GetPolyNormals3D(),rValue
);
1125 case OWN_ATTR_3D_VALUE_TEXTUREPOLYGON3D
:
1127 // pack texture definition
1128 const basegfx::B2DPolyPolygon
& rPolyPoly
= static_cast<E3dPolygonObj
*>(mpObj
.get())->GetPolyTexture2D();
1129 const basegfx::B3DPolyPolygon
aB3DPolyPolygon(basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPoly
));
1131 B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon
,rValue
);
1135 case OWN_ATTR_3D_VALUE_LINEONLY
:
1137 rValue
<<= static_cast<E3dPolygonObj
*>(mpObj
.get())->GetLineOnly();
1142 return SvxShape::getPropertyValueImpl( rName
, pProperty
, rValue
);
1148 // ::com::sun::star::lang::XServiceInfo
1149 uno::Sequence
< OUString
> SAL_CALL
Svx3DPolygonObject::getSupportedServiceNames()
1150 throw(uno::RuntimeException
, std::exception
)
1152 Sequence
< OUString
> aSeq( SvxShape::getSupportedServiceNames() );
1153 comphelper::ServiceInfoHelper::addToSequence( aSeq
, 2, "com.sun.star.drawing.Shape3D",
1154 "com.sun.star.drawing.Shape3DPolygon");
1158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */