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