LibreOffice Module svx (master) 1
unoshap3.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <sal/config.h>
21
22#include <initializer_list>
23#include <string_view>
24
25#include <com/sun/star/drawing/HomogenMatrix.hpp>
26#include <com/sun/star/drawing/Position3D.hpp>
27#include <com/sun/star/drawing/Direction3D.hpp>
28#include <com/sun/star/drawing/DoubleSequence.hpp>
29#include <com/sun/star/drawing/CameraGeometry.hpp>
30#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
31#include <o3tl/safeint.hxx>
32#include <vcl/svapp.hxx>
34#include <sal/log.hxx>
35
36#include <svx/svdpool.hxx>
37#include <svx/svditer.hxx>
38#include <svx/unoshape.hxx>
39#include <svx/unopage.hxx>
40#include <svx/cube3d.hxx>
41#include <svx/sphere3d.hxx>
42#include <svx/lathe3d.hxx>
43#include <extrud3d.hxx>
44#include <polygn3d.hxx>
45#include <svx/unoshprp.hxx>
46#include <svx/svdmodel.hxx>
47#include <svx/scene3d.hxx>
50#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
53#include "shapeimpl.hxx"
54
55using namespace ::cppu;
56using namespace ::com::sun::star;
57using namespace ::com::sun::star::uno;
58using namespace ::com::sun::star::lang;
59using namespace ::com::sun::star::container;
60
61#define QUERYINT( xint ) \
62 if( rType == cppu::UnoType<xint>::get() ) \
63 aAny <<= Reference< xint >(this)
64
66: SvxShapeGroupAnyD( pObj, getSvxMapProvider().GetMap(SVXMAP_3DSCENEOBJECT), getSvxMapProvider().GetPropertySet(SVXMAP_3DSCENEOBJECT, SdrObject::GetGlobalDrawObjectItemPool()) )
67, mxPage( pDrawPage )
68{
69}
70
71
73{
74}
75
76
78{
79 SvxShape::Create( pNewObj, pNewPage );
80 mxPage = pNewPage;
81}
82
83
85{
86 uno::Any aAny;
87
88 QUERYINT( drawing::XShapes );
89 else QUERYINT( container::XIndexAccess );
90 else QUERYINT( container::XElementAccess );
91 else
92 return SvxShape::queryAggregation( rType );
93
94 return aAny;
95}
96
98{
99 return SvxShape::queryInterface( rType );
100}
101
102// XTypeProvider
103
104uno::Sequence< sal_Int8 > SAL_CALL Svx3DSceneObject::getImplementationId()
105{
106 return css::uno::Sequence<sal_Int8>();
107}
108
109
110void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape )
111{
112 SolarMutexGuard aGuard;
113
114 SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape );
115
116 if(!HasSdrObject() || !mxPage.is() || pShape == nullptr || nullptr != pShape->GetSdrObject() )
117 throw uno::RuntimeException();
118
119 rtl::Reference<SdrObject> pSdrShape = mxPage->CreateSdrObject_( xShape );
120 if( DynCastE3dObject(pSdrShape.get()) )
121 {
122 GetSdrObject()->GetSubList()->NbcInsertObject( pSdrShape.get() );
123 pShape->Create(pSdrShape.get(), mxPage.get());
124 }
125 else
126 {
127 pSdrShape.clear();
128 throw uno::RuntimeException();
129 }
130
132}
133
135{
136 SolarMutexGuard aGuard;
137
138 if(!HasSdrObject() || !mxPage.is() || nullptr != rShape.GetSdrObject() )
139 throw uno::RuntimeException();
140
141 rtl::Reference<SdrObject> pSdrShape = mxPage->CreateSdrObject_( &rShape );
142 if( DynCastE3dObject(pSdrShape.get()) )
143 {
144 GetSdrObject()->GetSubList()->NbcInsertObject( pSdrShape.get() );
145 rShape.Create(pSdrShape.get(), mxPage.get());
146 }
147 else
148 {
149 pSdrShape.clear();
150 throw uno::RuntimeException();
151 }
152
154}
155
156void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xShape )
157{
158 SolarMutexGuard aGuard;
159
160 SdrObject* pSdrShape = SdrObject::getSdrObjectFromXShape( xShape );
161
162 if(!HasSdrObject() || !pSdrShape ||
164 throw uno::RuntimeException();
165
166 SdrObjList& rList = *pSdrShape->getParentSdrObjListFromSdrObject();
167
168 const size_t nObjCount = rList.GetObjCount();
169 size_t nObjNum = 0;
170 while( nObjNum < nObjCount )
171 {
172 if(rList.GetObj( nObjNum ) == pSdrShape )
173 break;
174 nObjNum++;
175 }
176
177 if( nObjNum < nObjCount )
178 {
179 rList.NbcRemoveObject( nObjNum );
180 }
181 else
182 {
183 SAL_WARN( "svx", "Fatality! SdrObject is not belonging to its SdrObjList! [CL]" );
184 }
185}
186
187
188sal_Int32 SAL_CALL Svx3DSceneObject::getCount()
189{
190 SolarMutexGuard aGuard;
191
192 sal_Int32 nRetval = 0;
193
194 if(HasSdrObject() && DynCastE3dScene(GetSdrObject()) && GetSdrObject()->GetSubList())
195 nRetval = GetSdrObject()->GetSubList()->GetObjCount();
196 return nRetval;
197}
198
199
201{
202 SolarMutexGuard aGuard;
203
204 if( !HasSdrObject() || GetSdrObject()->GetSubList() == nullptr )
205 throw uno::RuntimeException();
206
207 if( Index<0 || GetSdrObject()->GetSubList()->GetObjCount() <= o3tl::make_unsigned(Index) )
208 throw lang::IndexOutOfBoundsException();
209
210 SdrObject* pDestObj = GetSdrObject()->GetSubList()->GetObj( Index );
211 if(pDestObj == nullptr)
212 throw lang::IndexOutOfBoundsException();
213
214 Reference< drawing::XShape > xShape( pDestObj->getUnoShape(), uno::UNO_QUERY );
215 return uno::Any(xShape);
216}
217
218
219// css::container::XElementAccess
220
222{
224}
225
226
228{
229 SolarMutexGuard aGuard;
230
231 return HasSdrObject() && GetSdrObject()->GetSubList() && (GetSdrObject()->GetSubList()->GetObjCount() > 0);
232}
233
234
235static bool ConvertHomogenMatrixToObject( E3dObject* pObject, const Any& rValue )
236{
237 drawing::HomogenMatrix aMat;
238 if( rValue >>= aMat )
239 {
241 return true;
242 }
243 return false;
244}
245
246static void ConvertObjectToHomogenMatric( E3dObject const * pObject, Any& rValue )
247{
248 drawing::HomogenMatrix aHomMat;
249 const basegfx::B3DHomMatrix& rMat = pObject->GetTransform();
251 rValue <<= aHomMat;
252}
253
254namespace {
255
256struct ImpRememberTransAndRect
257{
259 tools::Rectangle maRect;
260};
261
262}
263
264bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
265{
266 switch( pProperty->nWID )
267 {
269 {
270 // patch transformation matrix to the object
271 if( ConvertHomogenMatrixToObject( static_cast< E3dObject* >( GetSdrObject() ), rValue ) )
272 return true;
273 break;
274 }
276 {
277 // set CameraGeometry at scene
278 E3dScene* pScene = static_cast< E3dScene* >( GetSdrObject() );
279 drawing::CameraGeometry aCamGeo;
280
281 if(rValue >>= aCamGeo)
282 {
283 basegfx::B3DPoint aVRP(aCamGeo.vrp.PositionX, aCamGeo.vrp.PositionY, aCamGeo.vrp.PositionZ);
284 basegfx::B3DVector aVPN(aCamGeo.vpn.DirectionX, aCamGeo.vpn.DirectionY, aCamGeo.vpn.DirectionZ);
285 basegfx::B3DVector aVUP(aCamGeo.vup.DirectionX, aCamGeo.vup.DirectionY, aCamGeo.vup.DirectionZ);
286
287 // rescue scene transformation
288 ImpRememberTransAndRect aSceneTAR;
289 aSceneTAR.maMat = pScene->GetTransform();
290 aSceneTAR.maRect = pScene->GetSnapRect();
291
292 // rescue object transformations
294 std::vector<basegfx::B3DHomMatrix*> aObjTrans;
295 while(aIter.IsMore())
296 {
297 E3dObject* p3DObj = static_cast<E3dObject*>(aIter.Next());
299 *pNew = p3DObj->GetTransform();
300 aObjTrans.push_back(pNew);
301 }
302
303 // reset object transformations
304 aIter.Reset();
305 while(aIter.IsMore())
306 {
307 E3dObject* p3DObj = static_cast<E3dObject*>(aIter.Next());
309 }
310
311 // reset scene transformation and make a complete recalc
313
314 // fill old camera from new parameters
315 Camera3D aCam(pScene->GetCamera());
316 const basegfx::B3DRange& rVolume = pScene->GetBoundVolume();
317 double fW = rVolume.getWidth();
318 double fH = rVolume.getHeight();
319
320 const SfxItemSet& rSceneSet = pScene->GetMergedItemSet();
321 double fCamPosZ =
322 static_cast<double>(rSceneSet.Get(SDRATTR_3DSCENE_DISTANCE).GetValue());
323 double fCamFocal =
324 static_cast<double>(rSceneSet.Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue());
325
326 aCam.SetAutoAdjustProjection(false);
327 aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
328 basegfx::B3DPoint aLookAt;
329 basegfx::B3DPoint aCamPos(0.0, 0.0, fCamPosZ);
330 aCam.SetPosAndLookAt(aCamPos, aLookAt);
331 aCam.SetFocalLength(fCamFocal / 100.0);
332 aCam.SetDeviceWindow(tools::Rectangle(0, 0, static_cast<tools::Long>(fW), static_cast<tools::Long>(fH)));
333
334 // set at scene
335 pScene->SetCamera(aCam);
336
337 // #91047# use imported VRP, VPN and VUP (if used)
338 bool bVRPUsed(!aVRP.equal(basegfx::B3DPoint(0.0, 0.0, 1.0)));
339 bool bVPNUsed(!aVPN.equal(basegfx::B3DVector(0.0, 0.0, 1.0)));
340 bool bVUPUsed(!aVUP.equal(basegfx::B3DVector(0.0, 1.0, 0.0)));
341
342 if(bVRPUsed || bVPNUsed || bVUPUsed)
343 {
344 pScene->GetCameraSet().SetViewportValues(aVRP, aVPN, aVUP);
345 }
346
347 // set object transformations again at objects
348 aIter.Reset();
349 sal_uInt32 nIndex(0);
350 while(aIter.IsMore())
351 {
352 E3dObject* p3DObj = static_cast<E3dObject*>(aIter.Next());
353 basegfx::B3DHomMatrix* pMat = aObjTrans[nIndex++];
354 p3DObj->NbcSetTransform(*pMat);
355 delete pMat;
356 }
357
358 // set scene transformation again at scene
359 pScene->NbcSetTransform(aSceneTAR.maMat);
360 pScene->NbcSetSnapRect(aSceneTAR.maRect);
361
362 return true;
363 }
364 break;
365 }
366 default:
367 return SvxShape::setPropertyValueImpl(rName, pProperty, rValue);
368 }
369
370 throw IllegalArgumentException();
371}
372
373
374bool Svx3DSceneObject::getPropertyValueImpl(const OUString& rName, const SfxItemPropertyMapEntry* pProperty,
375 css::uno::Any& rValue)
376{
377 switch( pProperty->nWID )
378 {
380 {
381 // patch object to a homogeneous 4x4 matrix
382 ConvertObjectToHomogenMatric( static_cast< E3dObject* >( GetSdrObject() ), rValue );
383 break;
384 }
386 {
387 // get CameraGeometry from scene
388 E3dScene* pScene = static_cast< E3dScene* >( GetSdrObject() );
389 drawing::CameraGeometry aCamGeo;
390
391 // fill Vectors from scene camera
392 B3dCamera& aCameraSet = pScene->GetCameraSet();
393 basegfx::B3DPoint aVRP(aCameraSet.GetVRP());
394 basegfx::B3DVector aVPN(aCameraSet.GetVPN());
395 basegfx::B3DVector aVUP(aCameraSet.GetVUV());
396
397 // transfer to structure
398 aCamGeo.vrp.PositionX = aVRP.getX();
399 aCamGeo.vrp.PositionY = aVRP.getY();
400 aCamGeo.vrp.PositionZ = aVRP.getZ();
401 aCamGeo.vpn.DirectionX = aVPN.getX();
402 aCamGeo.vpn.DirectionY = aVPN.getY();
403 aCamGeo.vpn.DirectionZ = aVPN.getZ();
404 aCamGeo.vup.DirectionX = aVUP.getX();
405 aCamGeo.vup.DirectionY = aVUP.getY();
406 aCamGeo.vup.DirectionZ = aVUP.getZ();
407
408 rValue <<= aCamGeo;
409 break;
410 }
411 default:
412 return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
413 }
414
415 return true;
416}
417
418// css::lang::XServiceInfo
419uno::Sequence< OUString > SAL_CALL Svx3DSceneObject::getSupportedServiceNames()
420{
423 std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.Shape3DScene" });
424}
425
427: SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_3DCUBEOBJECT), getSvxMapProvider().GetPropertySet(SVXMAP_3DCUBEOBJECT, SdrObject::GetGlobalDrawObjectItemPool()) )
428{
429}
430
432{
433}
434
435bool Svx3DCubeObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
436{
437 SolarMutexGuard aGuard;
438
439 switch( pProperty->nWID )
440 {
442 {
443 // pack transformationmatrix to the object
444 if( ConvertHomogenMatrixToObject( static_cast< E3dObject* >( GetSdrObject() ), rValue ) )
445 return true;
446 break;
447 }
449 {
450 // pack position to the object
451 drawing::Position3D aUnoPos;
452 if( rValue >>= aUnoPos )
453 {
454 basegfx::B3DPoint aPos(aUnoPos.PositionX, aUnoPos.PositionY, aUnoPos.PositionZ);
455 static_cast< E3dCubeObj* >( GetSdrObject() )->SetCubePos(aPos);
456 return true;
457 }
458 break;
459 }
461 {
462 // pack size to the object
463 drawing::Direction3D aDirection;
464 if( rValue >>= aDirection )
465 {
466 basegfx::B3DVector aSize(aDirection.DirectionX, aDirection.DirectionY, aDirection.DirectionZ);
467 static_cast< E3dCubeObj* >( GetSdrObject() )->SetCubeSize(aSize);
468 return true;
469 }
470 break;
471 }
473 {
474 bool bNew = false;
475 // pack sal_Bool bPosIsCenter to the object
476 if( rValue >>= bNew )
477 {
478 static_cast< E3dCubeObj* >( GetSdrObject() )->SetPosIsCenter(bNew);
479 return true;
480 }
481 break;
482 }
483 default:
484 return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
485 }
486
487 throw IllegalArgumentException();
488}
489
490bool Svx3DCubeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
491{
492 switch( pProperty->nWID )
493 {
495 {
496 // pack transformation to a homogeneous matrix
497 ConvertObjectToHomogenMatric( static_cast< E3dObject* >( GetSdrObject() ), rValue );
498 break;
499 }
501 {
502 // pack position
503 const basegfx::B3DPoint& rPos = static_cast<E3dCubeObj*>(GetSdrObject())->GetCubePos();
504 drawing::Position3D aPos;
505
506 aPos.PositionX = rPos.getX();
507 aPos.PositionY = rPos.getY();
508 aPos.PositionZ = rPos.getZ();
509
510 rValue <<= aPos;
511 break;
512 }
514 {
515 // pack size
516 const basegfx::B3DVector& rSize = static_cast<E3dCubeObj*>(GetSdrObject())->GetCubeSize();
517 drawing::Direction3D aDir;
518
519 aDir.DirectionX = rSize.getX();
520 aDir.DirectionY = rSize.getY();
521 aDir.DirectionZ = rSize.getZ();
522
523 rValue <<= aDir;
524 break;
525 }
527 {
528 rValue <<= static_cast<E3dCubeObj*>(GetSdrObject())->GetPosIsCenter();
529 break;
530 }
531 default:
532 return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
533 }
534
535 return true;
536}
537
538// css::lang::XServiceInfo
539uno::Sequence< OUString > SAL_CALL Svx3DCubeObject::getSupportedServiceNames()
540{
543 std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.Shape3D",
544 u"com.sun.star.drawing.Shape3DCube" });
545}
546
548 : SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_3DSPHEREOBJECT), getSvxMapProvider().GetPropertySet(SVXMAP_3DSPHEREOBJECT, SdrObject::GetGlobalDrawObjectItemPool()) )
549{
550}
551
553{
554}
555
556bool Svx3DSphereObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
557{
558 switch( pProperty->nWID )
559 {
561 {
562 // pack transformation matrix to the object
563 if( ConvertHomogenMatrixToObject( static_cast< E3dObject* >( GetSdrObject() ), rValue ) )
564 return true;
565 break;
566 }
567
569 {
570 // pack position to the object
571 drawing::Position3D aUnoPos;
572 if( rValue >>= aUnoPos )
573 {
574 basegfx::B3DPoint aPos(aUnoPos.PositionX, aUnoPos.PositionY, aUnoPos.PositionZ);
575 static_cast<E3dSphereObj*>(GetSdrObject())->SetCenter(aPos);
576 return true;
577 }
578 break;
579 }
580
582 {
583 // pack size to the object
584 drawing::Direction3D aDir;
585 if( rValue >>= aDir )
586 {
587 basegfx::B3DVector aPos(aDir.DirectionX, aDir.DirectionY, aDir.DirectionZ);
588 static_cast<E3dSphereObj*>(GetSdrObject())->SetSize(aPos);
589 return true;
590 }
591 break;
592 }
593 default:
594 return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
595 }
596
597 throw IllegalArgumentException();
598}
599
600bool Svx3DSphereObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
601{
602 switch( pProperty->nWID )
603 {
605 {
606 // pack transformation to a homogeneous matrix
607 ConvertObjectToHomogenMatric( static_cast< E3dObject* >( GetSdrObject() ), rValue );
608 break;
609 }
611 {
612 // pack position
613 const basegfx::B3DPoint& rPos = static_cast<E3dSphereObj*>(GetSdrObject())->Center();
614 drawing::Position3D aPos;
615
616 aPos.PositionX = rPos.getX();
617 aPos.PositionY = rPos.getY();
618 aPos.PositionZ = rPos.getZ();
619
620 rValue <<= aPos;
621 break;
622 }
624 {
625 // pack size
626 const basegfx::B3DVector& rSize = static_cast<E3dSphereObj*>(GetSdrObject())->Size();
627 drawing::Direction3D aDir;
628
629 aDir.DirectionX = rSize.getX();
630 aDir.DirectionY = rSize.getY();
631 aDir.DirectionZ = rSize.getZ();
632
633 rValue <<= aDir;
634 break;
635 }
636 default:
637 return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
638 }
639
640 return true;
641}
642
643// css::lang::XServiceInfo
644uno::Sequence< OUString > SAL_CALL Svx3DSphereObject::getSupportedServiceNames()
645{
648 std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.Shape3D",
649 u"com.sun.star.drawing.Shape3DSphere" });
650}
651
653: SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_3DLATHEOBJECT), getSvxMapProvider().GetPropertySet(SVXMAP_3DLATHEOBJECT, SdrObject::GetGlobalDrawObjectItemPool()) )
654{
655}
656
658{
659}
660
662 const Any& rValue,
663 basegfx::B3DPolyPolygon& rResultPolygon,
664 bool bCorrectPolygon)
665{
666 drawing::PolyPolygonShape3D aSourcePolyPolygon;
667 if( !(rValue >>= aSourcePolyPolygon) )
668 return false;
669
670 sal_Int32 nOuterSequenceCount = aSourcePolyPolygon.SequenceX.getLength();
671 if(nOuterSequenceCount != aSourcePolyPolygon.SequenceY.getLength() || nOuterSequenceCount != aSourcePolyPolygon.SequenceZ.getLength())
672 return false;
673
674 const drawing::DoubleSequence* pInnerSequenceX = aSourcePolyPolygon.SequenceX.getConstArray();
675 const drawing::DoubleSequence* pInnerSequenceY = aSourcePolyPolygon.SequenceY.getConstArray();
676 const drawing::DoubleSequence* pInnerSequenceZ = aSourcePolyPolygon.SequenceZ.getConstArray();
677 for(sal_Int32 a(0);a<nOuterSequenceCount;a++)
678 {
679 sal_Int32 nInnerSequenceCount = pInnerSequenceX->getLength();
680 if(nInnerSequenceCount != pInnerSequenceY->getLength() || nInnerSequenceCount != pInnerSequenceZ->getLength())
681 {
682 return false;
683 }
684 basegfx::B3DPolygon aNewPolygon;
685 const double* pArrayX = pInnerSequenceX->getConstArray();
686 const double* pArrayY = pInnerSequenceY->getConstArray();
687 const double* pArrayZ = pInnerSequenceZ->getConstArray();
688 for(sal_Int32 b(0);b<nInnerSequenceCount;b++)
689 {
690 aNewPolygon.append(basegfx::B3DPoint(*pArrayX++,*pArrayY++,*pArrayZ++));
691 }
692 pInnerSequenceX++;
693 pInnerSequenceY++;
694 pInnerSequenceZ++;
695
696 // #i101520# correction is needed for imported polygons of old format,
697 // see callers
698 if(bCorrectPolygon)
699 {
700 basegfx::utils::checkClosed(aNewPolygon);
701 }
702
703 rResultPolygon.append(aNewPolygon);
704 }
705 return true;
706}
707
708static void B3dPolyPolygon_to_PolyPolygonShape3D( const basegfx::B3DPolyPolygon& rSourcePolyPolygon, Any& rValue )
709{
710 drawing::PolyPolygonShape3D aRetval;
711 aRetval.SequenceX.realloc(rSourcePolyPolygon.count());
712 aRetval.SequenceY.realloc(rSourcePolyPolygon.count());
713 aRetval.SequenceZ.realloc(rSourcePolyPolygon.count());
714 drawing::DoubleSequence* pOuterSequenceX = aRetval.SequenceX.getArray();
715 drawing::DoubleSequence* pOuterSequenceY = aRetval.SequenceY.getArray();
716 drawing::DoubleSequence* pOuterSequenceZ = aRetval.SequenceZ.getArray();
717 for(sal_uInt32 a(0);a<rSourcePolyPolygon.count();a++)
718 {
719 const basegfx::B3DPolygon& aPoly(rSourcePolyPolygon.getB3DPolygon(a));
720 sal_Int32 nPointCount(aPoly.count());
721 if(aPoly.isClosed()) nPointCount++;
722 pOuterSequenceX->realloc(nPointCount);
723 pOuterSequenceY->realloc(nPointCount);
724 pOuterSequenceZ->realloc(nPointCount);
725 double* pInnerSequenceX = pOuterSequenceX->getArray();
726 double* pInnerSequenceY = pOuterSequenceY->getArray();
727 double* pInnerSequenceZ = pOuterSequenceZ->getArray();
728 for(sal_uInt32 b(0);b<aPoly.count();b++)
729 {
730 const basegfx::B3DPoint aPoint(aPoly.getB3DPoint(b));
731 *pInnerSequenceX++ = aPoint.getX();
732 *pInnerSequenceY++ = aPoint.getY();
733 *pInnerSequenceZ++ = aPoint.getZ();
734 }
735 if(aPoly.isClosed())
736 {
737 const basegfx::B3DPoint aPoint(aPoly.getB3DPoint(0));
738 *pInnerSequenceX++ = aPoint.getX();
739 *pInnerSequenceY++ = aPoint.getY();
740 *pInnerSequenceZ++ = aPoint.getZ();
741 }
742 pOuterSequenceX++;
743 pOuterSequenceY++;
744 pOuterSequenceZ++;
745 }
746 rValue <<= aRetval;
747}
748
749bool Svx3DLatheObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
750{
751 switch( pProperty->nWID )
752 {
754 {
755 // pack transformation matrix to the object
756 if( ConvertHomogenMatrixToObject( static_cast< E3dObject* >( GetSdrObject() ), rValue ) )
757 return true;
758 break;
759 }
761 {
762 // pack polygon definition to the object
763 basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
764
765 // #i101520# Probably imported
766 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, true ) )
767 {
768 // #105127# SetPolyPoly3D sets the Svx3DVerticalSegmentsItem to the number
769 // of points of the polygon. Thus, value gets lost. To avoid this, rescue
770 // item here and re-set after setting the polygon.
771 const sal_uInt32 nPrevVerticalSegs(static_cast<E3dLatheObj*>(GetSdrObject())->GetVerticalSegments());
772
773 // set polygon
774 const basegfx::B3DHomMatrix aIdentity;
775 const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity));
776 static_cast<E3dLatheObj*>(GetSdrObject())->SetPolyPoly2D(aB2DPolyPolygon);
777 const sal_uInt32 nPostVerticalSegs(static_cast<E3dLatheObj*>(GetSdrObject())->GetVerticalSegments());
778
779 if(nPrevVerticalSegs != nPostVerticalSegs)
780 {
781 // restore the vertical segment count
782 static_cast<E3dLatheObj*>(GetSdrObject())->SetMergedItem(makeSvx3DVerticalSegmentsItem(nPrevVerticalSegs));
783 }
784 return true;
785 }
786 break;
787 }
788 default:
789 return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
790 }
791
792 throw IllegalArgumentException();
793}
794
795bool Svx3DLatheObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
796{
797 switch( pProperty->nWID )
798 {
800 {
801 // pack transformation to a homogeneous matrix
802 drawing::HomogenMatrix aHomMat;
803 basegfx::B3DHomMatrix aMat = static_cast<E3dObject*>(GetSdrObject())->GetTransform();
805 rValue <<= aHomMat;
806 break;
807 }
809 {
810 const basegfx::B2DPolyPolygon& rPolyPoly = static_cast<E3dLatheObj*>(GetSdrObject())->GetPolyPoly2D();
812
813 B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon, rValue);
814 break;
815 }
816 default:
817 return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
818 }
819
820 return true;
821}
822
823// css::lang::XServiceInfo
824uno::Sequence< OUString > SAL_CALL Svx3DLatheObject::getSupportedServiceNames()
825{
828 std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.Shape3D",
829 u"com.sun.star.drawing.Shape3DLathe" });
830}
831
833: SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_3DEXTRUDEOBJECT), getSvxMapProvider().GetPropertySet(SVXMAP_3DEXTRUDEOBJECT, SdrObject::GetGlobalDrawObjectItemPool()) )
834{
835}
836
838{
839}
840
841bool Svx3DExtrudeObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
842{
843 switch( pProperty->nWID )
844 {
846 {
847 // pack transformation matrix to the object
848 if( ConvertHomogenMatrixToObject( static_cast< E3dObject* >( GetSdrObject() ), rValue ) )
849 return true;
850 break;
851 }
852
854 {
855 // pack polygon definition to the object
856 basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
857
858 // #i101520# Probably imported
859 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, true ) )
860 {
861 // set polygon
862 const basegfx::B3DHomMatrix aIdentity;
863 const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity));
864 static_cast<E3dExtrudeObj*>(GetSdrObject())->SetExtrudePolygon(aB2DPolyPolygon);
865 return true;
866 }
867 break;
868 }
869 default:
870 return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
871 }
872
873 throw IllegalArgumentException();
874}
875
876bool Svx3DExtrudeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
877{
878 switch( pProperty->nWID )
879 {
881 {
882 // pack transformation to a homogeneous matrix
883 drawing::HomogenMatrix aHomMat;
884 basegfx::B3DHomMatrix aMat = static_cast<E3dObject*>(GetSdrObject())->GetTransform();
886 rValue <<= aHomMat;
887 break;
888 }
889
891 {
892 // pack polygon definition
893 const basegfx::B2DPolyPolygon& rPolyPoly = static_cast<E3dExtrudeObj*>(GetSdrObject())->GetExtrudePolygon();
895
896 B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon, rValue);
897 break;
898 }
899 default:
900 return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
901 }
902
903 return true;
904}
905
906// css::lang::XServiceInfo
907uno::Sequence< OUString > SAL_CALL Svx3DExtrudeObject::getSupportedServiceNames()
908{
911 std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.Shape3D",
912 u"com.sun.star.drawing.Shape3DExtrude" });
913}
914
916: SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_3DPOLYGONOBJECT), getSvxMapProvider().GetPropertySet(SVXMAP_3DPOLYGONOBJECT, SdrObject::GetGlobalDrawObjectItemPool()) )
917{
918}
919
921{
922}
923
924bool Svx3DPolygonObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
925{
926 switch( pProperty->nWID )
927 {
929 {
930 // pack transformation matrix to the object
931 if( ConvertHomogenMatrixToObject( static_cast< E3dObject* >( GetSdrObject() ), rValue ) )
932 return true;
933 break;
934 }
935
937 {
938 // pack polygon definition to the object
939 basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
940
941 // #i101520# Direct API data (e.g. from chart)
942 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) )
943 {
944 // set polygon
945 static_cast<E3dPolygonObj*>(GetSdrObject())->SetPolyPolygon3D(aNewB3DPolyPolygon);
946 return true;
947 }
948 break;
949 }
951 {
952 // pack perpendicular definition to the object
953 basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
954
955 // #i101520# Direct API data (e.g. from chart)
956 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) )
957 {
958 // set polygon
959 static_cast<E3dPolygonObj*>(GetSdrObject())->SetPolyNormals3D(aNewB3DPolyPolygon);
960 return true;
961 }
962 break;
963 }
965 {
966 // pack texture definition to the object
967 basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
968
969 // #i101520# Direct API data (e.g. from chart)
970 if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) )
971 {
972 // set polygon
973 const basegfx::B3DHomMatrix aIdentity;
974 const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon(aNewB3DPolyPolygon, aIdentity));
975 static_cast<E3dPolygonObj*>(GetSdrObject())->SetPolyTexture2D(aB2DPolyPolygon);
976 return true;
977 }
978 break;
979 }
981 {
982 bool bNew = false;
983 if( rValue >>= bNew )
984 {
985 static_cast<E3dPolygonObj*>(GetSdrObject())->SetLineOnly(bNew);
986 return true;
987 }
988 break;
989 }
990 default:
991 return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
992 }
993
994 throw IllegalArgumentException();
995}
996
997bool Svx3DPolygonObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
998{
999 switch( pProperty->nWID )
1000 {
1002 {
1003 ConvertObjectToHomogenMatric( static_cast< E3dObject* >( GetSdrObject() ), rValue );
1004 break;
1005 }
1006
1008 {
1009 B3dPolyPolygon_to_PolyPolygonShape3D(static_cast<E3dPolygonObj*>(GetSdrObject())->GetPolyPolygon3D(),rValue);
1010 break;
1011 }
1012
1014 {
1015 B3dPolyPolygon_to_PolyPolygonShape3D(static_cast<E3dPolygonObj*>(GetSdrObject())->GetPolyNormals3D(),rValue);
1016 break;
1017 }
1018
1020 {
1021 // pack texture definition
1022 const basegfx::B2DPolyPolygon& rPolyPoly = static_cast<E3dPolygonObj*>(GetSdrObject())->GetPolyTexture2D();
1024
1025 B3dPolyPolygon_to_PolyPolygonShape3D(aB3DPolyPolygon,rValue);
1026 break;
1027 }
1028
1030 {
1031 rValue <<= static_cast<E3dPolygonObj*>(GetSdrObject())->GetLineOnly();
1032 break;
1033 }
1034
1035 default:
1036 return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
1037 }
1038
1039 return true;
1040}
1041
1042// css::lang::XServiceInfo
1043uno::Sequence< OUString > SAL_CALL Svx3DPolygonObject::getSupportedServiceNames()
1044{
1047 std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.Shape3D",
1048 u"com.sun.star.drawing.Shape3DPolygon" });
1049}
1050
1051/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
void SetViewportValues(const basegfx::B3DPoint &rNewVRP, const basegfx::B3DVector &rNewVPN, const basegfx::B3DVector &rNewVUV)
const basegfx::B3DPoint & GetVRP() const
const basegfx::B3DVector & GetVPN() const
const basegfx::B3DVector & GetVUV() const
void SetAutoAdjustProjection(bool bAdjust)
Definition: camera3d.hxx:62
void SetFocalLength(double fLen)
Definition: camera3d.cxx:172
void SetPosAndLookAt(const basegfx::B3DPoint &rNewPos, const basegfx::B3DPoint &rNewLookAt)
Definition: camera3d.cxx:69
void SetViewWindow(double fX, double fY, double fW, double fH)
Definition: camera3d.cxx:41
const basegfx::B3DRange & GetBoundVolume() const
Definition: obj3d.cxx:310
const basegfx::B3DHomMatrix & GetTransform() const
Definition: obj3d.hxx:112
virtual void NbcSetTransform(const basegfx::B3DHomMatrix &rMatrix)
Definition: obj3d.cxx:353
B3dCamera & GetCameraSet()
Definition: scene3d.hxx:145
virtual void NbcSetTransform(const basegfx::B3DHomMatrix &rMatrix) override
Definition: scene3d.cxx:584
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: scene3d.cxx:315
virtual SdrObjList * GetSubList() const override
Definition: scene3d.cxx:851
void SetCamera(const Camera3D &rNewCamera)
Definition: scene3d.cxx:343
const Camera3D & GetCamera() const
Definition: scene3d.hxx:125
SphereObject with diameter r3DSize.
Definition: sphere3d.hxx:36
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdoattr.cxx:49
virtual void SetChanged(bool bFlg=true)
Definition: svdmodel.cxx:1143
void Reset()
Definition: svditer.hxx:61
SdrObject * Next()
Definition: svditer.hxx:63
bool IsMore() const
Definition: svditer.hxx:62
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:785
size_t GetObjCount() const
Definition: svdpage.cxx:779
virtual void NbcInsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Definition: svdpage.cxx:244
virtual rtl::Reference< SdrObject > NbcRemoveObject(size_t nObjNum)
remove from list without delete
Definition: svdpage.cxx:334
Abstract DrawObject.
Definition: svdobj.hxx:260
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
Definition: unoshape.cxx:4020
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
Definition: svdobj.cxx:2866
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:717
SdrObjList * getParentSdrObjListFromSdrObject() const
Definition: svdobj.cxx:318
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:289
const SfxItemSet & GetMergedItemSet() const
Definition: svdobj.cxx:1974
SdrObject * getParentSdrObjectFromSdrObject() const
Definition: svdobj.cxx:722
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual ~Svx3DCubeObject() noexcept override
Definition: unoshap3.cxx:431
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoshap3.cxx:539
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap3.cxx:435
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap3.cxx:490
Svx3DCubeObject(SdrObject *pObj)
Definition: unoshap3.cxx:426
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap3.cxx:876
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoshap3.cxx:907
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap3.cxx:841
virtual ~Svx3DExtrudeObject() noexcept override
Definition: unoshap3.cxx:837
SVXCORE_DLLPUBLIC Svx3DExtrudeObject(SdrObject *pObj)
Definition: unoshap3.cxx:832
SVXCORE_DLLPUBLIC Svx3DLatheObject(SdrObject *pObj)
Definition: unoshap3.cxx:652
virtual ~Svx3DLatheObject() noexcept override
Definition: unoshap3.cxx:657
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoshap3.cxx:824
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap3.cxx:795
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap3.cxx:749
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoshap3.cxx:1043
virtual ~Svx3DPolygonObject() noexcept override
Definition: unoshap3.cxx:920
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap3.cxx:997
SVXCORE_DLLPUBLIC Svx3DPolygonObject(SdrObject *pObj)
Definition: unoshap3.cxx:915
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap3.cxx:924
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap3.cxx:374
virtual void addShape(SvxShape &rShape) override final
Definition: unoshap3.cxx:134
rtl::Reference< SvxDrawPage > mxPage
Definition: unoshape.hxx:665
virtual ~Svx3DSceneObject() noexcept override
Definition: unoshap3.cxx:72
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unoshap3.cxx:97
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoshap3.cxx:419
virtual void SAL_CALL add(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unoshap3.cxx:110
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage) override
Definition: unoshap3.cxx:77
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: unoshap3.cxx:200
SVXCORE_DLLPUBLIC Svx3DSceneObject(SdrObject *pObj, SvxDrawPage *pDrawPage)
Definition: unoshap3.cxx:65
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XShape > &xShape) override
Definition: unoshap3.cxx:156
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap3.cxx:264
virtual sal_Int32 SAL_CALL getCount() override
Definition: unoshap3.cxx:188
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoshap3.cxx:227
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
Definition: unoshap3.cxx:84
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoshap3.cxx:221
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unoshap3.cxx:104
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap3.cxx:556
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoshap3.cxx:644
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap3.cxx:600
Svx3DSphereObject(SdrObject *pObj)
Definition: unoshap3.cxx:547
virtual ~Svx3DSphereObject() noexcept override
Definition: unoshap3.cxx:552
This only exists so I have a common base class for SvxShapeGroup and Svx3DSceneObject.
Definition: unoshape.hxx:404
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue)
Definition: unoshape.cxx:2542
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage)
Definition: unoshape.cxx:361
bool HasSdrObject() const
Definition: unoshape.hxx:173
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoshape.cxx:3201
SdrObject * GetSdrObject() const
Definition: unoshape.hxx:172
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue)
Definition: unoshape.cxx:2026
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
Definition: unoshape.cxx:268
void SetDeviceWindow(const tools::Rectangle &rRect)
Definition: viewpt3d2.cxx:113
sal_uInt32 count() const
void append(const B3DPolygon &rPolygon, sal_uInt32 nCount=1)
B3DPolygon const & getB3DPolygon(sal_uInt32 nIndex) const
bool isClosed() const
void append(const B3DPoint &rPoint, sal_uInt32 nCount=1)
B3DPoint const & getB3DPoint(sal_uInt32 nIndex) const
sal_uInt32 count() const
double getHeight() const
double getWidth() const
bool equal(const B3DTuple &rTup) const
TYPE getX() const
TYPE getZ() const
TYPE getY() const
css::uno::Type const & get()
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
float u
EmbeddedObjectRef * pObject
sal_Int32 nIndex
uno_Any a
#define SAL_WARN(area, stream)
void B3DHomMatrixToUnoHomogenMatrix(const B3DHomMatrix &rMatrixIn, com::sun::star::drawing::HomogenMatrix &rMatrixOut)
B3DPolyPolygon createB3DPolyPolygonFromB2DPolyPolygon(const B2DPolyPolygon &rCandidate, double fZCoordinate)
B2DPolyPolygon createB2DPolyPolygonFromB3DPolyPolygon(const B3DPolyPolygon &rCandidate, const B3DHomMatrix &rMat)
B3DHomMatrix UnoHomogenMatrixToB3DHomMatrix(const com::sun::star::drawing::HomogenMatrix &rMatrixIn)
void checkClosed(B2DPolygon &rCandidate)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
long Long
SvxUnoPropertyMapProvider & getSvxMapProvider()
Definition: unoprov.cxx:868
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DSCENE_FOCAL_LENGTH(SDRATTR_3DSCENE_FIRST+2)
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DSCENE_DISTANCE(SDRATTR_3DSCENE_FIRST+1)
E3dObject * DynCastE3dObject(SdrObject *pObj)
Definition: svdobj.cxx:3205
E3dScene * DynCastE3dScene(SdrObject *pObj)
Definition: svdobj.cxx:3198
SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:50
css::drawing::Direction3D aDirection
Center
unsigned char sal_Bool
#define SVXMAP_3DEXTRUDEOBJECT
Definition: unoprov.hxx:62
#define SVXMAP_3DCUBEOBJECT
Definition: unoprov.hxx:59
#define SVXMAP_3DLATHEOBJECT
Definition: unoprov.hxx:61
#define SVXMAP_3DSPHEREOBJECT
Definition: unoprov.hxx:60
#define SVXMAP_3DPOLYGONOBJECT
Definition: unoprov.hxx:63
#define SVXMAP_3DSCENEOBJECT
Definition: unoprov.hxx:58
static bool ConvertHomogenMatrixToObject(E3dObject *pObject, const Any &rValue)
Definition: unoshap3.cxx:235
static void ConvertObjectToHomogenMatric(E3dObject const *pObject, Any &rValue)
Definition: unoshap3.cxx:246
#define QUERYINT(xint)
Definition: unoshap3.cxx:61
static void B3dPolyPolygon_to_PolyPolygonShape3D(const basegfx::B3DPolyPolygon &rSourcePolyPolygon, Any &rValue)
Definition: unoshap3.cxx:708
static bool PolyPolygonShape3D_to_B3dPolyPolygon(const Any &rValue, basegfx::B3DPolyPolygon &rResultPolygon, bool bCorrectPolygon)
Definition: unoshap3.cxx:661
#define OWN_ATTR_3D_VALUE_SIZE
Definition: unoshprp.hxx:85
#define OWN_ATTR_3D_VALUE_TEXTUREPOLYGON3D
Definition: unoshprp.hxx:172
#define OWN_ATTR_3D_VALUE_POLYPOLYGON3D
Definition: unoshprp.hxx:87
#define OWN_ATTR_3D_VALUE_NORMALSPOLYGON3D
Definition: unoshprp.hxx:171
#define OWN_ATTR_3D_VALUE_POSITION
Definition: unoshprp.hxx:84
#define OWN_ATTR_3D_VALUE_CAMERA_GEOMETRY
Definition: unoshprp.hxx:111
#define OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX
Definition: unoshprp.hxx:83
#define OWN_ATTR_3D_VALUE_LINEONLY
Definition: unoshprp.hxx:88
#define OWN_ATTR_3D_VALUE_POS_IS_CENTER
Definition: unoshprp.hxx:86