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