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