28#include <com/sun/star/beans/XPropertySet.hpp>
29#include <com/sun/star/chart2/XFormattedString.hpp>
30#include <com/sun/star/drawing/CircleKind.hpp>
31#include <com/sun/star/drawing/DoubleSequence.hpp>
32#include <com/sun/star/drawing/FlagSequence.hpp>
33#include <com/sun/star/drawing/FillStyle.hpp>
34#include <com/sun/star/drawing/LineStyle.hpp>
35#include <com/sun/star/drawing/NormalsKind.hpp>
36#include <com/sun/star/drawing/PointSequence.hpp>
37#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
38#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
39#include <com/sun/star/drawing/TextureProjectionMode.hpp>
40#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
41#include <com/sun/star/drawing/XShapes2.hpp>
42#include <com/sun/star/graphic/XGraphic.hpp>
43#include <com/sun/star/drawing/XShapes.hpp>
44#include <com/sun/star/style/ParagraphAdjust.hpp>
45#include <com/sun/star/uno/Sequence.hxx>
46#include <com/sun/star/uno/Any.hxx>
49#include <rtl/math.hxx>
65using ::com::sun::star::uno::Reference;
73void lcl_addProperty(uno::Sequence<OUString> & rPropertyNames, uno::Sequence<uno::Any> & rPropertyValues,
74 OUString
const & rName,
uno::Any const & rAny)
76 rPropertyNames.realloc(rPropertyNames.getLength() + 1);
77 rPropertyNames.getArray()[rPropertyNames.getLength() - 1] = rName;
79 rPropertyValues.realloc(rPropertyValues.getLength() + 1);
80 rPropertyValues.getArray()[rPropertyValues.getLength() - 1] = rAny;
83css::drawing::PolyPolygonShape3D toPolyPolygonShape3D(
const std::vector<std::vector<css::drawing::Position3D>>& rPoints)
85 css::drawing::PolyPolygonShape3D aUnoPoly;
86 aUnoPoly.SequenceX.realloc(rPoints.size());
87 aUnoPoly.SequenceY.realloc(rPoints.size());
88 aUnoPoly.SequenceZ.realloc(rPoints.size());
89 for (std::size_t nPolygonIndex=0; nPolygonIndex<rPoints.size(); ++nPolygonIndex)
91 drawing::DoubleSequence* pOuterSequenceX = &aUnoPoly.SequenceX.getArray()[nPolygonIndex];
92 drawing::DoubleSequence* pOuterSequenceY = &aUnoPoly.SequenceY.getArray()[nPolygonIndex];
93 drawing::DoubleSequence* pOuterSequenceZ = &aUnoPoly.SequenceZ.getArray()[nPolygonIndex];
94 pOuterSequenceX->realloc(rPoints[nPolygonIndex].
size());
95 pOuterSequenceY->realloc(rPoints[nPolygonIndex].
size());
96 pOuterSequenceZ->realloc(rPoints[nPolygonIndex].
size());
97 double* pInnerSequenceX = pOuterSequenceX->getArray();
98 double* pInnerSequenceY = pOuterSequenceY->getArray();
99 double* pInnerSequenceZ = pOuterSequenceZ->getArray();
100 for (std::size_t nPointIndex=0; nPointIndex<rPoints[nPolygonIndex].size(); ++nPointIndex)
102 auto& rPos = rPoints[nPolygonIndex][nPointIndex];
103 pInnerSequenceX[nPointIndex] = rPos.PositionX;
104 pInnerSequenceY[nPointIndex] = rPos.PositionY;
105 pInnerSequenceZ[nPointIndex] = rPos.PositionZ;
123 xShapeGroup->setShapeKind(SdrObjKind::Group);
125 xDrawPage->addBottom(
static_cast<SvxShape*
>(xShapeGroup.get()));
127 setShapeName(xShapeGroup,
"com.sun.star.chart2.shapes");
128 xShapeGroup->setSize(awt::Size(0,0));
138 const drawing::Direction3D& rSize,
double fRoundedEdge,
bool bRounded )
140 OSL_PRECOND(fRoundedEdge>=0,
"fRoundedEdge needs to be >= 0");
143 if( fRoundedEdge == 0.0 && bRounded)
144 fRoundedEdge = 0.4 / 200.0;
149 const double fWidthH = rSize.DirectionX >=0.0? rSize.DirectionX/2.0 : -rSize.DirectionX/2.0;
150 const double fHeight = rSize.DirectionY;
152 const double fHeightSign = fHeight >= 0.0 ? 1.0 : -1.0;
154 const double fOffset = (fWidthH * fRoundedEdge) * 1.05;
155 const bool bRoundEdges = fRoundedEdge && fOffset < fWidthH && 2.0 * fOffset < fHeightSign*fHeight;
156 const sal_Int32 nPointCount = bRoundEdges ? 13 : 5;
158 drawing::PolyPolygonShape3D aPP;
160 aPP.SequenceX.realloc(1);
161 aPP.SequenceY.realloc(1);
162 aPP.SequenceZ.realloc(1);
164 drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray();
165 drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray();
166 drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray();
168 pOuterSequenceX->realloc(nPointCount);
169 pOuterSequenceY->realloc(nPointCount);
170 pOuterSequenceZ->realloc(nPointCount);
172 double* pInnerSequenceX = pOuterSequenceX->getArray();
173 double* pInnerSequenceY = pOuterSequenceY->getArray();
174 double* pInnerSequenceZ = pOuterSequenceZ->getArray();
176 for(sal_Int32 nN = nPointCount; nN--;)
177 *pInnerSequenceZ++ = 0.0;
181 *pInnerSequenceY++ = 0.0;
182 *pInnerSequenceY++ = 0.0;
183 *pInnerSequenceY++ = fHeight;
184 *pInnerSequenceY++ = fHeight;
185 *pInnerSequenceY++ = 0.0;
187 *pInnerSequenceX++ = -fWidthH;
188 *pInnerSequenceX++ = fWidthH;
189 *pInnerSequenceX++ = fWidthH;
190 *pInnerSequenceX++ = -fWidthH;
191 *pInnerSequenceX++ = -fWidthH;
195 *pInnerSequenceY++ = 0.0;
196 *pInnerSequenceY++ = 0.0;
197 *pInnerSequenceY++ = 0.0;
198 *pInnerSequenceY++ = fHeightSign*fOffset;
199 *pInnerSequenceY++ = fHeight - fHeightSign*fOffset;
200 *pInnerSequenceY++ = fHeight;
201 *pInnerSequenceY++ = fHeight;
202 *pInnerSequenceY++ = fHeight;
203 *pInnerSequenceY++ = fHeight;
204 *pInnerSequenceY++ = fHeight - fHeightSign*fOffset;
205 *pInnerSequenceY++ = fHeightSign*fOffset;
206 *pInnerSequenceY++ = 0.0;
207 *pInnerSequenceY++ = 0.0;
209 *pInnerSequenceX++ = -fWidthH + fOffset;
210 *pInnerSequenceX++ = fWidthH - fOffset;
211 *pInnerSequenceX++ = fWidthH;
212 *pInnerSequenceX++ = fWidthH;
213 *pInnerSequenceX++ = fWidthH;
214 *pInnerSequenceX++ = fWidthH;
215 *pInnerSequenceX++ = fWidthH - fOffset;
216 *pInnerSequenceX++ = -fWidthH + fOffset;
217 *pInnerSequenceX++ = -fWidthH;
218 *pInnerSequenceX++ = -fWidthH;
219 *pInnerSequenceX++ = -fWidthH;
220 *pInnerSequenceX++ = -fWidthH;
221 *pInnerSequenceX++ = -fWidthH + fOffset;
229 , sal_Int32& nVerticalSegmentCount )
232 OSL_PRECOND(fRadius>0,
"The radius of a cylinder needs to be > 0");
234 drawing::PolyPolygonShape3D aPP;
236 nVerticalSegmentCount=1;
238 aPP.SequenceX.realloc(3);
239 aPP.SequenceY.realloc(3);
240 aPP.SequenceZ.realloc(3);
242 drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray();
243 drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray();
244 drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray();
246 pOuterSequenceX->realloc(2);
247 pOuterSequenceY->realloc(2);
248 pOuterSequenceZ->realloc(2);
250 double* pInnerSequenceX = pOuterSequenceX->getArray();
251 double* pInnerSequenceY = pOuterSequenceY->getArray();
252 double* pInnerSequenceZ = pOuterSequenceZ->getArray();
255 double fY2 = fHeight;
260 for(sal_Int32 nN = 2; nN--;)
261 *pInnerSequenceZ++ = 0.0;
263 *pInnerSequenceX++ = 0.0;
264 *pInnerSequenceY++ = fY1;
266 *pInnerSequenceX++ = fRadius;
267 *pInnerSequenceY++ = fY1;
269 pOuterSequenceX++;pOuterSequenceY++;pOuterSequenceZ++;
270 pOuterSequenceX->realloc(2);
271 pOuterSequenceY->realloc(2);
272 pOuterSequenceZ->realloc(2);
274 pInnerSequenceX = pOuterSequenceX->getArray();
275 pInnerSequenceY = pOuterSequenceY->getArray();
276 pInnerSequenceZ = pOuterSequenceZ->getArray();
278 for(sal_Int32 nN = 2; nN--;)
279 *pInnerSequenceZ++ = 0.0;
281 *pInnerSequenceX++ = fRadius;
282 *pInnerSequenceY++ = fY1;
284 *pInnerSequenceX++ = fRadius;
285 *pInnerSequenceY++ = fY2;
287 pOuterSequenceX++;pOuterSequenceY++;pOuterSequenceZ++;
288 pOuterSequenceX->realloc(2);
289 pOuterSequenceY->realloc(2);
290 pOuterSequenceZ->realloc(2);
292 pInnerSequenceX = pOuterSequenceX->getArray();
293 pInnerSequenceY = pOuterSequenceY->getArray();
294 pInnerSequenceZ = pOuterSequenceZ->getArray();
296 for(sal_Int32 nN = 2; nN--;)
297 *pInnerSequenceZ++ = 0.0;
299 *pInnerSequenceX++ = fRadius;
300 *pInnerSequenceY++ = fY2;
302 *pInnerSequenceX++ = 0.0;
303 *pInnerSequenceY++ = fY2;
309 , sal_Int32& nVerticalSegmentCount )
311 OSL_PRECOND(fRadius>0,
"The radius of a cone needs to be > 0");
315 bool bTopless = !::rtl::math::approxEqual( fHeight, fHeight + fTopHeight );
317 double r1= 0.0, r2 = fRadius;
320 r1 = fRadius * fTopHeight/(fabs(fHeight)+fTopHeight);
322 nVerticalSegmentCount=1;
323 drawing::PolyPolygonShape3D aPP;
325 aPP.SequenceX.realloc(2);
326 aPP.SequenceY.realloc(2);
327 aPP.SequenceZ.realloc(2);
329 drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray();
330 drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray();
331 drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray();
333 pOuterSequenceX->realloc(2);
334 pOuterSequenceY->realloc(2);
335 pOuterSequenceZ->realloc(2);
337 double* pInnerSequenceX = pOuterSequenceX->getArray();
338 double* pInnerSequenceY = pOuterSequenceY->getArray();
339 double* pInnerSequenceZ = pOuterSequenceZ->getArray();
347 double fY3 = fHeight;
355 for(sal_Int32 nN = 2; nN--;)
356 *pInnerSequenceZ++ = 0.0;
358 *pInnerSequenceY++ = fY1;
359 *pInnerSequenceX++ = fX1;
361 *pInnerSequenceY++ = fY2;
362 *pInnerSequenceX++ = fX2;
364 pOuterSequenceX++;pOuterSequenceY++;pOuterSequenceZ++;
365 pOuterSequenceX->realloc(2);
366 pOuterSequenceY->realloc(2);
367 pOuterSequenceZ->realloc(2);
369 pInnerSequenceX = pOuterSequenceX->getArray();
370 pInnerSequenceY = pOuterSequenceY->getArray();
371 pInnerSequenceZ = pOuterSequenceZ->getArray();
373 for(sal_Int32 nN = 2; nN--;)
374 *pInnerSequenceZ++ = 0.0;
376 *pInnerSequenceY++ = fY2;
377 *pInnerSequenceX++ = fX2;
379 *pInnerSequenceY++ = fY3;
380 *pInnerSequenceX++ = fX3;
390 ,
const drawing::Position3D& rPosition,
const drawing::Direction3D& rSize
391 , sal_Int32 nRotateZAngleHundredthDegree
402 if( xSourceProp.is() )
404 drawing::LineStyle aLineStyle;
405 xSourceProp->getPropertyValue(
"BorderStyle" ) >>= aLineStyle;
406 if( aLineStyle == drawing::LineStyle_SOLID )
410 catch(
const uno::Exception& )
416 if( xSourceProp.is())
424 ,
const drawing::Position3D& rPosition,
const drawing::Direction3D& rSize
425 , sal_Int32 nRotateZAngleHundredthDegree
433 xShape->setShapeKind(SdrObjKind::E3D_Extrusion);
440 double fDepth = rSize.DirectionZ;
445 sal_Int16 nPercentDiagonal = bRounded ? 3 : 0;
449 if (nRotateZAngleHundredthDegree != 0)
450 aHomMatrix.
rotate(0.0, 0.0, -basegfx::deg2rad<100>(nRotateZAngleHundredthDegree));
451 aHomMatrix.
translate(rPosition.PositionX, rPosition.PositionY,
452 rPosition.PositionZ - (fDepth / 2.0));
470 catch(
const uno::Exception& )
480 ,
const drawing::Position3D& rPosition,
const drawing::Direction3D& rSize
481 , sal_Int32 nRotateZAngleHundredthDegree )
484 xTarget, rPosition, rSize, 0.0, nRotateZAngleHundredthDegree,
true );
490 ,
const drawing::Position3D& rPosition,
const drawing::Direction3D& rSize
491 ,
double fTopHeight,
bool bRotateZ
500 bool bDoubleSided =
false;
501 short nRotatedTexture = 0;
503 const double fWidth = rSize.DirectionX;
504 const double fDepth = rSize.DirectionZ;
505 const double fHeight = rSize.DirectionY;
507 drawing::Position3D aBottomP1( rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ - fDepth/2.0 );
509 aBottomP1.PositionY -= fWidth/2.0;
511 aBottomP1.PositionX -= fWidth/2.0;
512 drawing::Position3D aBottomP2( aBottomP1 );
514 aBottomP2.PositionY += fWidth;
516 aBottomP2.PositionX += fWidth;
517 drawing::Position3D aBottomP3( aBottomP2 );
518 drawing::Position3D aBottomP4( aBottomP1 );
519 aBottomP3.PositionZ += fDepth;
520 aBottomP4.PositionZ += fDepth;
522 const double fTopFactor = fTopHeight/(fabs(fHeight)+fTopHeight);
523 drawing::Position3D aTopP1( rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ - fDepth*fTopFactor/2.0 );
526 aTopP1.PositionY -= fWidth*fTopFactor/2.0;
527 aTopP1.PositionX += fHeight;
531 aTopP1.PositionX -= fWidth*fTopFactor/2.0;
532 aTopP1.PositionY += fHeight;
534 drawing::Position3D aTopP2( aTopP1 );
536 aTopP2.PositionY += fWidth*fTopFactor;
538 aTopP2.PositionX += fWidth*fTopFactor;
539 drawing::Position3D aTopP3( aTopP2 );
540 drawing::Position3D aTopP4( aTopP1 );
541 aTopP3.PositionZ += fDepth*fTopFactor;
542 aTopP4.PositionZ += fDepth*fTopFactor;
544 Stripe aStripeBottom( aBottomP1, aBottomP4, aBottomP3, aBottomP2 );
546 drawing::Position3D aNormalsBottomP1( aBottomP1 );
547 drawing::Position3D aNormalsBottomP2( aBottomP2 );
548 drawing::Position3D aNormalsBottomP3( aBottomP3 );
549 drawing::Position3D aNormalsBottomP4( aBottomP4 );
550 drawing::Position3D aNormalsTopP1( aBottomP1 );
551 drawing::Position3D aNormalsTopP2( aBottomP2 );
552 drawing::Position3D aNormalsTopP3( aBottomP3 );
553 drawing::Position3D aNormalsTopP4( aBottomP4 );
556 aNormalsTopP1.PositionX += fHeight;
557 aNormalsTopP2.PositionX += fHeight;
558 aNormalsTopP3.PositionX += fHeight;
559 aNormalsTopP4.PositionX += fHeight;
563 aNormalsTopP1.PositionY += fHeight;
564 aNormalsTopP2.PositionY += fHeight;
565 aNormalsTopP3.PositionY += fHeight;
566 aNormalsTopP4.PositionY += fHeight;
569 bool bInvertPolygon =
false;
570 bool bInvertNormals =
false;
578 bInvertNormals =
true;
579 aStripeBottom =
Stripe( aBottomP1, aBottomP4, aBottomP3, aBottomP2 );
583 bInvertPolygon =
true;
585 aStripeBottom =
Stripe( aBottomP2, aBottomP3, aBottomP4, aBottomP1 );
593 bInvertPolygon =
true;
595 aStripeBottom =
Stripe( aBottomP2, aBottomP3, aBottomP4, aBottomP1 );
600 bInvertNormals =
true;
601 aStripeBottom =
Stripe( aBottomP4, aBottomP3, aBottomP2, aBottomP1 );
606 Stripe aStripe1( aTopP2, aTopP1, aBottomP1, aBottomP2 );
607 Stripe aStripe2( aTopP3, aTopP2, aBottomP2, aBottomP3 );
608 Stripe aStripe3( aTopP4, aTopP3, aBottomP3, aBottomP4 );
609 Stripe aStripe4( aTopP1, aTopP4, aBottomP4, aBottomP1 );
613 aStripe1 =
Stripe( aBottomP1, aTopP1, aTopP2, aBottomP2 );
614 aStripe2 =
Stripe( aBottomP2, aTopP2, aTopP3, aBottomP3 );
615 aStripe3 =
Stripe( aBottomP3, aTopP3, aTopP4, aBottomP4 );
616 aStripe4 =
Stripe( aBottomP4, aTopP4, aTopP1, aBottomP1 );
619 Stripe aNormalsStripe1( aNormalsTopP1, aNormalsBottomP1, aNormalsBottomP2, aNormalsTopP2 );
620 Stripe aNormalsStripe2( aNormalsTopP2, aNormalsBottomP2, aNormalsBottomP3, aNormalsTopP3 );
621 Stripe aNormalsStripe3( aNormalsTopP3, aNormalsBottomP3, aNormalsBottomP4, aNormalsTopP4 );
622 Stripe aNormalsStripe4( aNormalsTopP4, aNormalsBottomP4, aNormalsBottomP1, aNormalsTopP1 );
626 aNormalsStripe1 =
Stripe( aNormalsTopP2, aNormalsBottomP2, aNormalsBottomP1, aNormalsTopP1 );
627 aNormalsStripe2 =
Stripe( aNormalsTopP3, aNormalsBottomP3, aNormalsBottomP2, aNormalsTopP2 );
628 aNormalsStripe3 =
Stripe( aNormalsTopP4, aNormalsBottomP4, aNormalsBottomP3, aNormalsTopP3 );
629 aNormalsStripe4 =
Stripe( aNormalsTopP1, aNormalsBottomP1, aNormalsBottomP4, aNormalsTopP4 );
637 const bool bFlatNormals =
false;
642 ShapeFactory::createStripe( xGroup, aStripeBottom, xSourceProp, rPropertyNameMap, bDoubleSided, nRotatedTexture, bFlatNormals );
650 ,
const drawing::Position3D& rPosition,
const drawing::Direction3D& rSize
651 ,
double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree )
659 ,
const drawing::Position3D& rPosition,
const drawing::Direction3D& rSize
660 ,
double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree
668 xShape->setShapeKind(SdrObjKind::E3D_Lathe);
671 double fWidth = rSize.DirectionX/2.0;
672 double fRadius = fWidth;
673 double fHeight = rSize.DirectionY;
679 sal_Int32 nVerticalSegmentCount = 0;
686 if (nRotateZAngleHundredthDegree != 0)
687 aHomMatrix.
rotate(0.0,0.0,-basegfx::deg2rad<100>(nRotateZAngleHundredthDegree));
689 aHomMatrix.
scale(1.0,1.0,rSize.DirectionZ/rSize.DirectionX);
690 aHomMatrix.
translate(rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ);
712 catch(
const uno::Exception& )
719static void appendAndCloseBezierCoords( drawing::PolyPolygonBezierCoords& rReturn,
const drawing::PolyPolygonBezierCoords& rAdd,
bool bAppendInverse )
721 if(!rAdd.Coordinates.hasElements())
723 sal_Int32 nAddCount = rAdd.Coordinates[0].getLength();
727 sal_Int32 nOldCount = rReturn.Coordinates[0].getLength();
729 auto pCoordinates = rReturn.Coordinates.getArray();
730 pCoordinates[0].realloc(nOldCount + nAddCount + 1);
731 auto pCoordinates0 = pCoordinates[0].getArray();
732 auto pFlags = rReturn.Flags.getArray();
733 pFlags[0].realloc(nOldCount+nAddCount+1);
734 auto pFlags0 = pFlags[0].getArray();
736 for(sal_Int32 nN=0;nN<nAddCount; nN++ )
738 sal_Int32 nAdd = bAppendInverse ? (nAddCount-1-nN) : nN;
739 pCoordinates0[nOldCount+nN] = rAdd.Coordinates[0][nAdd];
740 pFlags0[nOldCount+nN] = rAdd.Flags[0][nAdd];
744 pCoordinates0[nOldCount+nAddCount] = rReturn.Coordinates[0][0];
745 pFlags0[nOldCount+nAddCount] = rReturn.Flags[0][0];
749 double fStartAngleRadian,
double fWidthAngleRadian,
double fUnitRadius
750 , const ::basegfx::B2DHomMatrix& rTransformationFromUnitCircle
751 ,
const double fAngleSubdivisionRadian )
756 drawing::PolyPolygonBezierCoords aReturn;
757 sal_Int32 nSegmentCount =
static_cast< sal_Int32
>( fWidthAngleRadian/fAngleSubdivisionRadian );
758 if( fWidthAngleRadian > fAngleSubdivisionRadian*nSegmentCount )
761 double fFirstSegmentAngle = fAngleSubdivisionRadian;
762 double fLastSegmentAngle = fAngleSubdivisionRadian;
765 fFirstSegmentAngle = fWidthAngleRadian;
766 fLastSegmentAngle = 0.0;
770 double fFirstAngleOnSubDivision = (
static_cast<sal_Int32
>(fStartAngleRadian/fAngleSubdivisionRadian)+1)*fAngleSubdivisionRadian;
771 if( !::rtl::math::approxEqual( fStartAngleRadian, fFirstAngleOnSubDivision ) )
772 fFirstSegmentAngle = fFirstAngleOnSubDivision-fStartAngleRadian;
776 fLastSegmentAngle = fWidthAngleRadian-fFirstSegmentAngle-fAngleSubdivisionRadian*(nSegmentCount-2);
777 if( fLastSegmentAngle<0 )
779 if( fLastSegmentAngle>fAngleSubdivisionRadian )
781 fLastSegmentAngle-=fAngleSubdivisionRadian;
787 sal_Int32 nPointCount = 1 + 3*nSegmentCount;
789 drawing::PointSequence aPoints(nPointCount);
790 auto pPoints = aPoints.getArray();
791 drawing::FlagSequence aFlags(nPointCount);
792 auto pFlags = aFlags.getArray();
798 double fCurrentRotateAngle = fStartAngleRadian;
799 for(sal_Int32 nSegment=0; nSegment<nSegmentCount; nSegment++)
801 double fCurrentSegmentAngle = fAngleSubdivisionRadian;
803 fCurrentSegmentAngle = fFirstSegmentAngle;
804 else if(nSegment==(nSegmentCount-1))
805 fCurrentSegmentAngle = fLastSegmentAngle;
808 const double fCos = cos(fCurrentSegmentAngle/2.0);
809 const double fSin = sin(fCurrentSegmentAngle/2.0);
815 P1.setX((4.0-fCos)/3.0);
817 P1.setY((1.0-fCos)*(fCos-3.0)/(3.0*fSin));
821 aStart.
rotate(fCurrentSegmentAngle/2.0 + fCurrentRotateAngle );
822 fCurrentRotateAngle+=fCurrentSegmentAngle;
824 aStart.
scale( fUnitRadius, fUnitRadius );
827 P0 = rTransformationFromUnitCircle*(aStart*
P0);
828 P1 = rTransformationFromUnitCircle*(aStart*
P1);
829 P2 = rTransformationFromUnitCircle*(aStart*
P2);
830 P3 = rTransformationFromUnitCircle*(aStart*P3);
832 pPoints[nPoint].X =
static_cast< sal_Int32
>(
P0.getX());
833 pPoints[nPoint].Y =
static_cast< sal_Int32
>(
P0.getY());
834 pFlags [nPoint++] = drawing::PolygonFlags_NORMAL;
836 pPoints[nPoint].X =
static_cast< sal_Int32
>(
P1.getX());
837 pPoints[nPoint].Y =
static_cast< sal_Int32
>(
P1.getY());
838 pFlags[nPoint++] = drawing::PolygonFlags_CONTROL;
840 pPoints[nPoint].X =
static_cast< sal_Int32
>(
P2.getX());
841 pPoints[nPoint].Y =
static_cast< sal_Int32
>(
P2.getY());
842 pFlags [nPoint++] = drawing::PolygonFlags_CONTROL;
844 if(nSegment==(nSegmentCount-1))
846 pPoints[nPoint].X =
static_cast< sal_Int32
>( P3.getX());
847 pPoints[nPoint].Y =
static_cast< sal_Int32
>( P3.getY());
848 pFlags [nPoint++] = drawing::PolygonFlags_NORMAL;
852 aReturn.Coordinates = { aPoints };
853 aReturn.Flags = { aFlags };
859 double fUnitCircleInnerRadius
860 ,
double fUnitCircleOuterRadius
861 ,
double fStartAngleRadian,
double fWidthAngleRadian
862 , const ::basegfx::B2DHomMatrix& aTransformationFromUnitCircle
863 ,
const double fAngleSubdivisionRadian )
865 drawing::PolyPolygonBezierCoords aReturn;
868 fStartAngleRadian, fWidthAngleRadian, fUnitCircleOuterRadius, aTransformationFromUnitCircle, fAngleSubdivisionRadian );
869 aReturn.Coordinates = { aOuterArc.Coordinates[0] };
870 aReturn.Flags = { aOuterArc.Flags[0] };
873 fStartAngleRadian, fWidthAngleRadian, fUnitCircleInnerRadius, aTransformationFromUnitCircle, fAngleSubdivisionRadian );
882 ,
double fUnitCircleStartAngleDegree,
double fUnitCircleWidthAngleDegree
883 ,
double fUnitCircleInnerRadius,
double fUnitCircleOuterRadius
884 ,
const drawing::Direction3D& rOffset
885 ,
const drawing::HomogenMatrix& rUnitCircleToScene )
891 while (fUnitCircleWidthAngleDegree > 360)
892 fUnitCircleWidthAngleDegree -= 360.0;
893 while (fUnitCircleWidthAngleDegree < 0)
894 fUnitCircleWidthAngleDegree += 360.0;
898 xShape->setShapeKind(SdrObjKind::PathFill);
905 aTransformationFromUnitCircle.
translate(rOffset.DirectionX,rOffset.DirectionY);
907 const double fAngleSubdivisionRadian = M_PI/10.0;
909 drawing::PolyPolygonBezierCoords aCoords
913 aTransformationFromUnitCircle, fAngleSubdivisionRadian);
915 xShape->SvxShape::setPropertyValue(
"PolyPolygonBezier",
uno::Any( aCoords ) );
917 catch(
const uno::Exception& )
928 ,
double fUnitCircleStartAngleDegree,
double fUnitCircleWidthAngleDegree
929 ,
double fUnitCircleInnerRadius,
double fUnitCircleOuterRadius
930 ,
const drawing::Direction3D& rOffset
931 ,
const drawing::HomogenMatrix& rUnitCircleToScene
938 while (fUnitCircleWidthAngleDegree > 360)
939 fUnitCircleWidthAngleDegree -= 360.0;
940 while (fUnitCircleWidthAngleDegree < 0)
941 fUnitCircleWidthAngleDegree += 360.0;
945 xShape->setShapeKind(SdrObjKind::E3D_Extrusion);
952 aTransformationFromUnitCircle.
translate(rOffset.DirectionX,rOffset.DirectionY);
954 const double fAngleSubdivisionRadian = M_PI/32.0;
956 drawing::PolyPolygonBezierCoords aCoords
960 aTransformationFromUnitCircle, fAngleSubdivisionRadian);
964 ,
uno::Any(
static_cast<sal_Int32
>(fDepth)) );
971 drawing::PolyPolygonShape3D aPoly(
BezierToPoly(aCoords) );
986 ,
uno::Any( drawing::TextureProjectionMode_OBJECTSPECIFIC ) );
990 ,
uno::Any( drawing::TextureProjectionMode_PARALLEL ) );
992 ,
uno::Any( drawing::TextureProjectionMode_OBJECTSPECIFIC ) );
994 catch(
const uno::Exception& )
1007 ,
short nRotatedTexture
1008 ,
bool bFlatNormals )
1015 xShape->setShapeKind(SdrObjKind::E3D_Polygon);
1049 catch(
const uno::Exception& )
1058 ,
const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon
1064 if( rPolyPolygon.empty() )
1069 xShape->setShapeKind(SdrObjKind::E3D_Extrusion);
1072 css::drawing::PolyPolygonShape3D aUnoPolyPolygon = toPolyPolygonShape3D(rPolyPolygon);
1095 if (!rPolyPolygon.empty() && !rPolyPolygon[0].empty())
1098 aM.
translate(0, 0, rPolyPolygon[0][0].PositionZ);
1104 catch(
const uno::Exception& )
1113 ,
const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon )
1120 xTarget->GetSdrObject()->GetSubList()->InsertObject(pPath.get());
1128 pPath->ForceMetricToItemPoolMetric(aNewPolyPolygon);
1129 pPath->SetPathPoly(aNewPolyPolygon);
1131 catch(
const uno::Exception& )
1139 ,
const drawing::Direction3D& rSize
1140 , sal_Int32 nStandardSymbol )
1142 if(nStandardSymbol<0)
1143 nStandardSymbol*=-1;
1147 const double& fX = rPos.PositionX;
1148 const double& fY = rPos.PositionY;
1150 const double fWidthH = rSize.DirectionX/2.0;
1151 const double fHeightH = rSize.DirectionY/2.0;
1153 const sal_Int32 nQuarterCount = 35;
1155 sal_Int32 nPointCount = 4;
1156 switch( eSymbolType )
1179 nPointCount = 5 + 4 * nQuarterCount;
1185 drawing::PointSequenceSequence aPP;
1191 pOuterSequence->realloc(nPointCount);
1193 awt::Point* pInnerSequence = pOuterSequence->getArray();
1195 auto toPoint = [](
double x,
double y) -> awt::Point
1197 return {
static_cast<sal_Int32
>(
x),
static_cast<sal_Int32
>(
y) };
1203 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1205 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1207 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fHeightH );
1209 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fHeightH );
1211 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1216 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1218 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fHeightH );
1220 *pInnerSequence++ =
toPoint( fX, fY-fHeightH );
1222 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1227 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1229 *pInnerSequence++ =
toPoint( fX, fY+fHeightH );
1231 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fHeightH );
1233 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1238 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1240 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1242 *pInnerSequence++ =
toPoint( fX+fWidthH, fY );
1244 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1249 *pInnerSequence++ =
toPoint( fX-fWidthH, fY );
1251 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fHeightH );
1253 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fHeightH );
1255 *pInnerSequence++ =
toPoint( fX-fWidthH, fY );
1260 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1262 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1264 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fHeightH );
1266 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fHeightH );
1268 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1273 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1275 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fHeightH );
1277 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1279 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fHeightH );
1281 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1286 *pInnerSequence++ =
toPoint( fX-fWidthH, fY );
1288 *pInnerSequence++ =
toPoint( fX, fY+fHeightH );
1290 *pInnerSequence++ =
toPoint( fX+fWidthH, fY );
1292 *pInnerSequence++ =
toPoint( fX, fY-fHeightH );
1294 *pInnerSequence++ =
toPoint( fX-fWidthH, fY );
1299 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-0.2*fHeightH );
1301 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-0.2*fHeightH );
1303 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+0.2*fHeightH );
1305 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+0.2*fHeightH );
1307 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-0.2*fHeightH );
1312 *pInnerSequence++ =
toPoint( fX-0.2*fWidthH, fY-fHeightH );
1314 *pInnerSequence++ =
toPoint( fX+0.2*fWidthH, fY-fHeightH );
1316 *pInnerSequence++ =
toPoint( fX+0.2*fWidthH, fY+fHeightH );
1318 *pInnerSequence++ =
toPoint( fX-0.2*fWidthH, fY+fHeightH );
1320 *pInnerSequence++ =
toPoint( fX-0.2*fWidthH, fY-fHeightH );
1326 double fOmega = M_PI_2 / (nQuarterCount + 1.0);
1328 *pInnerSequence++ =
toPoint( fX + fWidthH, fY );
1330 for (sal_Int32
i = 1;
i <= nQuarterCount; ++
i)
1332 *pInnerSequence++ =
toPoint( fX + fWidthH * cos(
i * fOmega ), fY - fHeightH * sin(
i * fOmega ) );
1335 *pInnerSequence++ =
toPoint( fX, fY - fHeightH );
1336 for (sal_Int32
i = 1;
i <= nQuarterCount; ++
i)
1338 *pInnerSequence++ =
toPoint( fX - fWidthH * sin(
i * fOmega), fY - fHeightH * cos(
i * fOmega) );
1341 *pInnerSequence++ =
toPoint( fX - fWidthH, fY );
1342 for (sal_Int32
i = 1;
i <= nQuarterCount; ++
i)
1344 *pInnerSequence++ =
toPoint( fX - fWidthH * cos(
i * fOmega), fY + fHeightH * sin(
i * fOmega) );
1347 *pInnerSequence++ =
toPoint( fX, fY + fHeightH );
1348 for (sal_Int32
i = 1;
i <= nQuarterCount; ++
i)
1350 *pInnerSequence++ =
toPoint( fX + fWidthH * sin(
i * fOmega), fY + fHeightH * cos(
i * fOmega) );
1353 *pInnerSequence++ =
toPoint( fX + fWidthH, fY );
1358 *pInnerSequence++ =
toPoint( fX, fY-fHeightH );
1360 *pInnerSequence++ =
toPoint( fX+0.2*fWidthH, fY-0.2*fHeightH );
1362 *pInnerSequence++ =
toPoint( fX+fWidthH, fY );
1364 *pInnerSequence++ =
toPoint( fX+0.2*fWidthH, fY+0.2*fHeightH );
1366 *pInnerSequence++ =
toPoint( fX, fY+fHeightH );
1368 *pInnerSequence++ =
toPoint( fX-0.2*fWidthH, fY+0.2*fHeightH );
1370 *pInnerSequence++ =
toPoint( fX-fWidthH, fY );
1372 *pInnerSequence++ =
toPoint( fX-0.2*fWidthH, fY-0.2*fHeightH );
1374 *pInnerSequence++ =
toPoint( fX, fY-fHeightH );
1379 const double fScaleX = fWidthH / 128.0;
1380 const double fScaleY = fHeightH / 128.0;
1381 const double fSmall = sqrt(200.0);
1382 const double fLarge = 128.0 - fSmall;
1384 *pInnerSequence++ =
toPoint( fX, fY - fScaleY * fSmall );
1386 *pInnerSequence++ =
toPoint( fX - fScaleX * fLarge, fY - fHeightH );
1388 *pInnerSequence++ =
toPoint( fX - fWidthH, fY - fScaleY * fLarge );
1390 *pInnerSequence++ =
toPoint( fX - fScaleX * fSmall, fY );
1392 *pInnerSequence++ =
toPoint( fX - fWidthH, fY + fScaleY * fLarge );
1394 *pInnerSequence++ =
toPoint( fX - fScaleX * fLarge, fY + fHeightH );
1396 *pInnerSequence++ =
toPoint( fX, fY + fScaleY * fSmall );
1398 *pInnerSequence++ =
toPoint( fX + fScaleX * fLarge, fY + fHeightH );
1400 *pInnerSequence++ =
toPoint( fX + fWidthH, fY + fScaleY * fLarge );
1402 *pInnerSequence++ =
toPoint( fX + fScaleX * fSmall, fY );
1404 *pInnerSequence++ =
toPoint( fX + fWidthH, fY - fScaleY * fLarge );
1406 *pInnerSequence++ =
toPoint( fX + fScaleX * fLarge, fY - fHeightH );
1408 *pInnerSequence++ =
toPoint( fX, fY - fScaleY * fSmall );
1414 const double fScaleX = fWidthH / 128.0;
1415 const double fScaleY = fHeightH / 128.0;
1416 const double fHalf = 10.0;
1417 const double fdX = fScaleX * fHalf;
1418 const double fdY = fScaleY * fHalf;
1420 *pInnerSequence++ =
toPoint( fX-fdX, fY-fHeightH );
1422 *pInnerSequence++ =
toPoint( fX-fdX, fY-fdY );
1424 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fdY );
1426 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fdY );
1428 *pInnerSequence++ =
toPoint( fX-fdX, fY+fdY );
1430 *pInnerSequence++ =
toPoint( fX-fdX, fY+fHeightH );
1432 *pInnerSequence++ =
toPoint( fX+fdX, fY+fHeightH );
1434 *pInnerSequence++ =
toPoint( fX+fdX, fY+fdY );
1436 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fdY );
1438 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fdY );
1440 *pInnerSequence++ =
toPoint( fX+fdX, fY-fdY );
1442 *pInnerSequence++ =
toPoint( fX+fdY, fY-fHeightH );
1444 *pInnerSequence++ =
toPoint( fX-fdX, fY-fHeightH );
1450 const double fHalf = 10.0;
1451 const double fTwoY = fHalf * sqrt(3.0);
1452 const double fFourY = (128.0 - 2.0 * fHalf ) / sqrt(3.0);
1453 const double fThreeX = 128.0 - fHalf;
1454 const double fThreeY = fHalf * sqrt(3.0) + fFourY;
1455 const double fFiveX = 2.0 * fHalf;
1457 const double fScaleX = fWidthH / 128.0;
1458 const double fScaleY = fHeightH / 128.0;
1461 *pInnerSequence++ =
toPoint( fX-fScaleX * fHalf, fY-fHeightH );
1463 *pInnerSequence++ =
toPoint( fX-fScaleX * fHalf, fY-fScaleY * fTwoY );
1465 *pInnerSequence++ =
toPoint( fX-fScaleX * fThreeX, fY-fScaleY * fThreeY );
1467 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fScaleY * fFourY );
1469 *pInnerSequence++ =
toPoint( fX-fScaleX * fFiveX, fY );
1471 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fScaleY * fFourY );
1473 *pInnerSequence++ =
toPoint( fX-fScaleX * fThreeX, fY+fScaleY * fThreeY );
1475 *pInnerSequence++ =
toPoint( fX-fScaleX * fHalf, fY+fScaleY * fTwoY );
1477 *pInnerSequence++ =
toPoint( fX-fScaleX * fHalf, fY+fHeightH );
1479 *pInnerSequence++ =
toPoint( fX+fScaleX * fHalf, fY+fHeightH );
1481 *pInnerSequence++ =
toPoint( fX+fScaleX * fHalf, fY+fScaleY * fTwoY );
1483 *pInnerSequence++ =
toPoint( fX+fScaleX * fThreeX, fY+fScaleY * fThreeY );
1485 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fScaleY * fFourY );
1487 *pInnerSequence++ =
toPoint( fX+fScaleX * fFiveX, fY );
1489 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fScaleY * fFourY );
1491 *pInnerSequence++ =
toPoint( fX+fScaleX * fThreeX, fY-fScaleY * fThreeY );
1493 *pInnerSequence++ =
toPoint( fX+fScaleX * fHalf, fY-fScaleY * fTwoY );
1495 *pInnerSequence++ =
toPoint( fX+fScaleX * fHalf, fY-fHeightH );
1497 *pInnerSequence++ =
toPoint( fX-fScaleX * fHalf, fY-fHeightH );
1502 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1504 *pInnerSequence++ =
toPoint( fX-fWidthH, fY+fHeightH );
1506 *pInnerSequence++ =
toPoint( fX+fWidthH, fY+fHeightH );
1508 *pInnerSequence++ =
toPoint( fX+fWidthH, fY-fHeightH );
1510 *pInnerSequence++ =
toPoint( fX-fWidthH, fY-fHeightH );
1521 ,
const drawing::Position3D& rPosition
1522 ,
const drawing::Direction3D& rSize
1523 , sal_Int32 nStandardSymbol
1524 , sal_Int32 nBorderColor
1525 , sal_Int32 nFillColor )
1532 xShape->setShapeKind(SdrObjKind::Polygon);
1538 drawing::PointSequenceSequence aPoints =
1553 catch(
const uno::Exception& )
1563 ,
const drawing::Position3D& rPosition
1564 ,
const drawing::Direction3D& rSize
1567 if( !
xTarget.is() || !xGraphic.is() )
1575 xShape->setShapeKind(SdrObjKind::Graphic);
1581 drawing::Position3D aCenterPosition(
1582 rPosition.PositionX - (rSize.DirectionX / 2.0),
1583 rPosition.PositionY - (rSize.DirectionY / 2.0),
1584 rPosition.PositionZ );
1588 catch(
const uno::Exception & )
1594 xShape->SvxShape::setPropertyValue(
"Graphic",
uno::Any( xGraphic ));
1596 catch(
const uno::Exception& )
1605 ,
const OUString& aName )
1613 xShapeGroup->setShapeKind(SdrObjKind::Group);
1615 xTarget->addShape(*xShapeGroup);
1618 if(!
aName.isEmpty())
1623 xShapeGroup->setSize(awt::Size(0,0));
1628 catch(
const uno::Exception& )
1637 ,
const OUString& aName )
1645 xShapeGroup->setShapeKind(SdrObjKind::Group);
1650 if(!
aName.isEmpty())
1655 xShapeGroup->setSize(awt::Size(0,0));
1660 catch(
const uno::Exception& )
1669 ,
const OUString& aName )
1677 xShape->setShapeKind(SdrObjKind::E3D_Scene);
1690 catch(
const uno::Exception& )
1696 if(!
aName.isEmpty())
1702 catch(
const uno::Exception& )
1711 ,
const drawing::Position3D& rPosition
1712 ,
const drawing::Direction3D& rSize )
1719 xShape->setShapeKind(SdrObjKind::CircleOrEllipse);
1724 drawing::Position3D aCenterPosition(
1725 rPosition.PositionX - (rSize.DirectionX / 2.0),
1726 rPosition.PositionY - (rSize.DirectionY / 2.0),
1727 rPosition.PositionZ );
1731 catch(
const uno::Exception & )
1741 catch(
const uno::Exception& )
1750 ,
const awt::Size& rSize
1751 ,
const awt::Point& rPosition )
1754 xShape->setShapeKind(SdrObjKind::CircleOrEllipse);
1756 xShape->setSize( rSize );
1757 xShape->setPosition( rPosition );
1764 ,
const std::vector<std::vector<css::drawing::Position3D>>& rPoints
1775 xShape->setShapeKind(SdrObjKind::E3D_Polygon);
1778 css::drawing::PolyPolygonShape3D aUnoPoly = toPolyPolygonShape3D(rPoints);
1802 if(rLineProperties.
LineStyle.hasValue())
1810 if(rLineProperties.
Width.hasValue())
1814 rLineProperties.
Width);
1818 if(rLineProperties.
Color.hasValue())
1822 rLineProperties.
Color);
1826 catch(
const uno::Exception& )
1835 ,
const drawing::PointSequenceSequence& rPoints
1841 if(!rPoints.hasElements())
1846 xShape->setShapeKind(SdrObjKind::PolyLine);
1853 xShape->SvxShape::setPropertyValue( UNO_NAME_POLYPOLYGON
1860 xShape->SvxShape::setPropertyValue( UNO_NAME_LINETRANSPARENCE
1864 if(pLineProperties->
LineStyle.hasValue())
1865 xShape->SvxShape::setPropertyValue( UNO_NAME_LINESTYLE
1869 if(pLineProperties->
Width.hasValue())
1870 xShape->SvxShape::setPropertyValue( UNO_NAME_LINEWIDTH
1871 , pLineProperties->
Width );
1874 if(pLineProperties->
Color.hasValue())
1875 xShape->SvxShape::setPropertyValue( UNO_NAME_LINECOLOR
1876 , pLineProperties->
Color );
1879 if(pLineProperties->
DashName.hasValue())
1880 xShape->SvxShape::setPropertyValue(
"LineDashName"
1884 if(pLineProperties->
LineCap.hasValue())
1885 xShape->SvxShape::setPropertyValue( UNO_NAME_LINECAP
1889 catch(
const uno::Exception& )
1898 ,
const std::vector<std::vector<css::drawing::Position3D>>& rPoints
1909 xShape->setShapeKind(SdrObjKind::PolyLine);
1929 if(pLineProperties->
LineStyle.hasValue())
1934 if(pLineProperties->
Width.hasValue())
1936 , pLineProperties->
Width );
1939 if(pLineProperties->
Color.hasValue())
1941 , pLineProperties->
Color );
1944 if(pLineProperties->
DashName.hasValue())
1945 xShape->SvxShape::setPropertyValue(
"LineDashName"
1949 if(pLineProperties->
LineCap.hasValue())
1954 catch(
const uno::Exception& )
1963 const awt::Size& rSize,
const awt::Point& rPosition )
1967 xShape->setShapeKind(SdrObjKind::Line);
1969 xShape->setSize( rSize );
1970 xShape->setPosition( rPosition );
1977 ,
const awt::Size& rSize )
1985 xShape->setShapeKind(SdrObjKind::Rectangle);
1988 xShape->setSize( rSize );
1991 catch(
const uno::Exception & )
2000 const awt::Size& rSize,
2001 const awt::Point& rPosition,
2004 StackPosition
ePos )
2007 xShape->setShapeKind(SdrObjKind::Rectangle);
2013 xTarget2->addBottom(xShape);
2018 xShape->setPosition( rPosition );
2019 xShape->setSize( rSize );
2030 xShape->setShapeKind(SdrObjKind::Rectangle);
2038 ,
const OUString& rText
2041 ,
const uno::Any& rATransformation )
2051 xShape->setShapeKind(SdrObjKind::Text);
2055 xShape->setString( rText );
2065 xShape->SvxShape::setPropertyValue(
"Transformation", rATransformation );
2067 SAL_INFO(
"chart2",
"No rATransformation value is given to ShapeFactory::createText()");
2070 catch(
const uno::Exception& )
2079 ,
const uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString
2082 ,
const uno::Any& rATransformation )
2087 if( !xFormattedString.hasElements() )
2090 sal_Int32 nNumberOfParagraphs = xFormattedString.getLength();
2092 bool bNotEmpty =
false;
2093 for( sal_Int32 nN = 0; nN < nNumberOfParagraphs; ++nN )
2095 if( !xFormattedString[nN]->
getString().isEmpty() )
2106 xShape->setShapeKind(SdrObjKind::Text);
2116 Reference< text::XTextCursor > xInsertCursor = xShape->createTextCursor();
2117 Reference< text::XTextCursor > xSelectionCursor = xShape->createTextCursor();
2118 if( xInsertCursor.is() && xSelectionCursor.is() )
2120 uno::Reference< beans::XPropertySet > xSelectionProp( xSelectionCursor, uno::UNO_QUERY );
2121 if( xSelectionProp.is() )
2123 for( sal_Int32 nN = 0; nN < nNumberOfParagraphs; ++nN )
2125 if( !xFormattedString[nN]->
getString().isEmpty() )
2127 xInsertCursor->gotoEnd(
false );
2128 xSelectionCursor->gotoEnd(
false );
2129 xShape->insertString( xInsertCursor, xFormattedString[nN]->
getString(),
false );
2131 xSelectionCursor->gotoEnd(
true );
2132 uno::Reference< beans::XPropertySet > xStringProperties( xFormattedString[nN], uno::UNO_QUERY );
2152 xShape->SvxShape::setPropertyValue(
"Transformation", rATransformation );
2154 catch(
const uno::Exception& )
2164 const awt::Size& rSize,
2165 const awt::Point& rPos,
2166 uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString,
2167 const uno::Reference<
2168 beans::XPropertySet > & xTextProperties,
2169 double nRotation,
const OUString& aName, sal_Int32 nTextMaxWidth )
2173 xShape->setShapeKind(SdrObjKind::Text);
2179 uno::Reference< text::XTextCursor > xTextCursor( xShape->createTextCursor() );
2180 if( !xTextCursor.is() )
2188 aNameMap.insert(add.begin(), add.end());
2195 aValueMap.insert( {
"TextHorizontalAdjust",
uno::Any(drawing::TextHorizontalAdjust_CENTER) } );
2196 aValueMap.insert( {
"TextVerticalAdjust",
uno::Any(drawing::TextVerticalAdjust_CENTER) } );
2197 aValueMap.insert( {
"TextAutoGrowHeight",
uno::Any(
true) } );
2198 aValueMap.insert( {
"TextAutoGrowWidth",
uno::Any(
true) } );
2199 aValueMap.insert( {
"TextMaximumFrameWidth",
uno::Any(nTextMaxWidth) } );
2202 if( !
aName.isEmpty() )
2203 aValueMap.emplace(
"Name",
uno::Any( aName ) );
2214 bool bStackCharacters(
false);
2217 xTextProperties->getPropertyValue(
"StackCharacters" ) >>= bStackCharacters;
2219 catch(
const uno::Exception& )
2224 if(bStackCharacters)
2227 if( xFormattedString.hasElements() )
2230 for(
const auto & i : std::as_const(xFormattedString) )
2234 xTextCursor->gotoEnd(
false);
2235 xShape->insertString( xTextCursor, aLabel,
false );
2236 xTextCursor->gotoEnd(
true);
2237 uno::Reference< beans::XPropertySet > xSourceProps( xFormattedString[0], uno::UNO_QUERY );
2243 awt::Size aOldRefSize;
2244 if( xTextProperties->getPropertyValue(
"ReferencePageSize") >>= aOldRefSize )
2252 for(
const uno::Reference< chart2::XFormattedString >& rxFS : std::as_const(xFormattedString) )
2254 xTextCursor->gotoEnd(
false);
2255 xShape->insertString( xTextCursor, rxFS->getString(),
false );
2256 xTextCursor->gotoEnd(
true);
2258 awt::Size aOldRefSize;
2259 bool bHasRefPageSize =
2260 ( xTextProperties->getPropertyValue(
"ReferencePageSize") >>= aOldRefSize );
2262 if( xFormattedString.hasElements() )
2264 uno::Reference< beans::XPropertySet > xSourceProps( xFormattedString[0], uno::UNO_QUERY );
2268 if( bHasRefPageSize )
2276 float fFontHeight = 0.0;
2277 if ( xShape->SvxShape::getPropertyValue(
"CharHeight" ) >>= fFontHeight )
2280 sal_Int32 nXDistance =
static_cast< sal_Int32
>( ::rtl::math::round( fFontHeight * 0.18f ) );
2281 sal_Int32 nYDistance =
static_cast< sal_Int32
>( ::rtl::math::round( fFontHeight * 0.30f ) );
2282 xShape->SvxShape::setPropertyValue(
"TextLeftDistance",
uno::Any( nXDistance ) );
2283 xShape->SvxShape::setPropertyValue(
"TextRightDistance",
uno::Any( nXDistance ) );
2284 xShape->SvxShape::setPropertyValue(
"TextUpperDistance",
uno::Any( nYDistance ) );
2285 xShape->SvxShape::setPropertyValue(
"TextLowerDistance",
uno::Any( nYDistance ) );
2287 sal_Int32 nXPos = rPos.X;
2288 sal_Int32 nYPos = rPos.Y;
2297 xShape->SvxShape::setPropertyValue(
"ParaAdjust",
uno::Any( style::ParagraphAdjust_CENTER ) );
2299 catch(
const uno::Exception& )
2313 sal_Int32
nCount = xShapes->getCount();
2315 for( sal_Int32 nN =
nCount; nN--; )
2317 if( xShapes->getByIndex( nN ) >>= xShape )
2335 xShape->setPropertyValue(
"LineStyle",
uno::Any( drawing::LineStyle_NONE ));
2336 xShape->setPropertyValue(
"FillStyle",
uno::Any( drawing::FillStyle_NONE ));
2338 catch(
const uno::Exception& )
2347 ,
const OUString& rName )
2356 catch(
const uno::Exception& )
2367 OSL_ENSURE(xProp.is(),
"shape offers no XPropertySet");
2374 catch(
const uno::Exception& )
2389 aM.
rotate( fRotationAnglePi );
2390 aM.
translate( rScreenPosition2D.X, rScreenPosition2D.Y );
2392 return aATransformation;
2397 sal_Int32 nLen = rString.getLength();
2398 if(!bStacked || !nLen)
2401 OUStringBuffer aStackStr;
2405 for( sal_Int32 nPosSrc=0; nPosSrc < nLen; nPosSrc++ )
2408 aStackStr.append(
'\r' );
2409 aStackStr.append(rString[nPosSrc]);
2411 return aStackStr.makeStringAndClear();
2417 for(
auto const &
i : rPoly )
2426 return !rPoly.SequenceX.hasElements() ||
2427 ((rPoly.SequenceX.getLength() == 1) && (rPoly.SequenceX[0].getLength() <= 1));
2433 return rPoly.empty() || ((rPoly.size() == 1) && (rPoly[0].
size() <= 1));
2438 OSL_ENSURE( rPoly.SequenceX.getLength() <= 1,
"ShapeFactory::closePolygon - single polygon expected" );
2442 drawing::Position3D aFirst(rPoly.SequenceX[0][0],rPoly.SequenceY[0][0],rPoly.SequenceZ[0][0]);
2448 OSL_ENSURE( rPoly.size() <= 1,
"ShapeFactory::closePolygon - single polygon expected" );
2452 drawing::Position3D aFirst(rPoly[0][0]);
2457 const awt::Size& rTargetSize
2458 ,
const awt::Size& rSourceSizeWithCorrectAspectRatio )
2462 double fFactorWidth = double(rTargetSize.Width)/double(rSourceSizeWithCorrectAspectRatio.Width);
2463 double fFactorHeight = double(rTargetSize.Height)/double(rSourceSizeWithCorrectAspectRatio.Height);
2464 double fFactor = std::min(fFactorWidth,fFactorHeight);
2465 aNewSize.Width=
static_cast<sal_Int32
>(fFactor*rSourceSizeWithCorrectAspectRatio.Width);
2466 aNewSize.Height=
static_cast<sal_Int32
>(fFactor*rSourceSizeWithCorrectAspectRatio.Height);
2472 const awt::Point& rTargetAreaPosition
2473 ,
const awt::Size& rTargetAreaSize
2474 ,
const awt::Size& rObjectSize )
2476 awt::Point aNewPosition(rTargetAreaPosition);
2477 aNewPosition.X +=
static_cast<sal_Int32
>(double(rTargetAreaSize.Width-rObjectSize.Width)/2.0);
2478 aNewPosition.Y +=
static_cast<sal_Int32
>(double(rTargetAreaSize.Height-rObjectSize.Height)/2.0);
2479 return aNewPosition;
2487 awt::Size aSize = rShape.
getSize();
2494 SvxShape& rShape,
double fRotationAngleDegree )
2496 awt::Size aRet(0,0);
2497 const awt::Size aSize( rShape.
getSize() );
2499 if( fRotationAngleDegree == 0.0 )
2503 fRotationAngleDegree =
NormAngle360(fRotationAngleDegree);
2504 if(fRotationAngleDegree>270.0)
2505 fRotationAngleDegree=360.0-fRotationAngleDegree;
2506 else if(fRotationAngleDegree>180.0)
2507 fRotationAngleDegree=fRotationAngleDegree-180.0;
2508 else if(fRotationAngleDegree>90.0)
2509 fRotationAngleDegree=180.0-fRotationAngleDegree;
2513 aRet.Height =
static_cast<sal_Int32
>(
2514 aSize.Width*std::sin( fAnglePi )
2515 + aSize.Height*std::cos( fAnglePi ));
2516 aRet.Width =
static_cast<sal_Int32
>(
2517 aSize.Width*std::cos( fAnglePi )
2518 + aSize.Height*std::sin( fAnglePi ));
2527 sal_Int32 nSubCount = xShapes->getCount();
2529 for( sal_Int32 nS = nSubCount; nS--; )
2531 if( xShapes->getByIndex( nS ) >>= xShape )
2532 xShapes->remove( xShape );
2545 xShape->setShapeKind(SdrObjKind::Table);
2547 if (!rName.isEmpty())
css::chart::ChartAxisLabelPosition ePos
PropertyValueVector_t aPropertyValues
constexpr auto convertPointToMm100(N n)
#define CHART_3DOBJECT_SEGMENTCOUNT
virtual css::awt::Point SAL_CALL getPosition() override
virtual css::awt::Size SAL_CALL getSize() override
void rotate(double fRadiant)
void translate(double fX, double fY)
void scale(double fX, double fY)
void rotate(double fAngleX, double fAngleY, double fAngleZ)
void translate(double fX, double fY, double fZ)
void scale(double fX, double fY, double fZ)
static const tPropertyNameMap & getPropertyNameMapForFillAndLineProperties()
static const tPropertyNameMap & getPropertyNameMapForTextShapeProperties()
static void setMultiProperties(const tNameSequence &rNames, const tAnySequence &rValues, SvxShape &xTarget)
static const tPropertyNameMap & getPropertyNameMapForCharacterProperties()
static void getMultiPropertyListsFromValueMap(tNameSequence &rNames, tAnySequence &rValues, const tPropertyNameValueMap &rValueMap)
static void getValueMap(tPropertyNameValueMap &rValueMap, const tPropertyNameMap &rNameMap, const css::uno::Reference< css::beans::XPropertySet > &xSourceProp)
Fetch property values from the source object and map it to the destination container.
static const tPropertyNameMap & getPropertyNameMapForParagraphProperties()
static void setMappedProperties(const css::uno::Reference< css::beans::XPropertySet > &xTarget, const css::uno::Reference< css::beans::XPropertySet > &xSource, const tPropertyNameMap &rMap)
static void adaptFontSizes(const css::uno::Reference< css::beans::XPropertySet > &xTargetProperties, const css::awt::Size &rOldReferenceSize, const css::awt::Size &rNewReferenceSize)
static rtl::Reference< SvxShapeCircle > createCircle2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPos, const css::drawing::Direction3D &rSize)
static void setShapeName(const rtl::Reference< SvxShape > &xShape, const OUString &rName)
static rtl::Reference< SvxShapePolyPolygon > createPieSegment2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree, double fUnitCircleInnerRadius, double fUnitCircleOuterRadius, const css::drawing::Direction3D &rOffset, const css::drawing::HomogenMatrix &rUnitCircleToScene)
static OUString getStackedString(const OUString &rString, bool bStacked)
static rtl::Reference< Svx3DPolygonObject > createLine3D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const std::vector< std::vector< css::drawing::Position3D > > &rPoints, const VLineProperties &rLineProperties)
static rtl::Reference< Svx3DExtrudeObject > createArea3D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const std::vector< std::vector< css::drawing::Position3D > > &rPolyPolygon, double fDepth)
static rtl::Reference< SvxTableShape > createTable(rtl::Reference< SvxShapeGroupAnyD > const &xTarget, OUString const &rName=OUString())
static rtl::Reference< SvxShapeGroupAnyD > getOrCreateChartRootShape(const rtl::Reference< SvxDrawPage > &xPage)
static rtl::Reference< Svx3DPolygonObject > createStripe(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const Stripe &rStripe, const css::uno::Reference< css::beans::XPropertySet > &xSourceProp, const tPropertyNameMap &rPropertyNameMap, bool bDoubleSided, short nRotatedTexture=0, bool bFlatNormals=true)
static void setPageSize(const rtl::Reference< SvxShapeGroupAnyD > &xChartShapes, const css::awt::Size &rSize)
static rtl::Reference< Svx3DLatheObject > impl_createConeOrCylinder(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPosition, const css::drawing::Direction3D &rSize, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree, bool bCylinder)
static rtl::Reference< SvxShapeRect > createRectangle(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::awt::Size &rSize, const css::awt::Point &rPosition, const tNameSequence &rPropNames, const tAnySequence &rPropValues, StackPosition ePos=StackPosition::Top)
static rtl::Reference< Svx3DExtrudeObject > createPieSegment(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree, double fUnitCircleInnerRadius, double fUnitCircleOuterRadius, const css::drawing::Direction3D &rOffset, const css::drawing::HomogenMatrix &rUnitCircleToScene, double fDepth)
static rtl::Reference< Svx3DSceneObject > createGroup3D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &aName=OUString())
static rtl::Reference< SvxShapePolyPolygon > createLine(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::awt::Size &rSize, const css::awt::Point &rPosition)
static void makeShapeInvisible(const rtl::Reference< SvxShape > &rShape)
static css::awt::Size getSizeAfterRotation(SvxShape &rShape, double fRotationAngleDegree)
static rtl::Reference< SvxShapeRect > createInvisibleRectangle(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::awt::Size &rSize)
static bool hasPolygonAnyLines(const std::vector< std::vector< css::drawing::Position3D > > &rPoly)
static rtl::Reference< SvxShapePolyPolygon > createArea2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const std::vector< std::vector< css::drawing::Position3D > > &rPolyPolygon)
static OUString getShapeName(const css::uno::Reference< css::drawing::XShape > &xShape)
static rtl::Reference< SvxShapeText > createText(const rtl::Reference< SvxShapeGroupAnyD > &xTarget2D, const OUString &rText, const tNameSequence &rPropNames, const tAnySequence &rPropValues, const css::uno::Any &rATransformation)
static rtl::Reference< Svx3DLatheObject > createCone(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPosition, const css::drawing::Direction3D &rSize, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree)
static sal_Int32 getSymbolCount()
static void closePolygon(css::drawing::PolyPolygonShape3D &rPoly)
static bool isPolygonEmptyOrSinglePoint(const css::drawing::PolyPolygonShape3D &rPoly)
static void removeSubShapes(const rtl::Reference< SvxShapeGroupAnyD > &xShapes)
static rtl::Reference< SvxShapePolyPolygon > createLine2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::PointSequenceSequence &rPoints, const VLineProperties *pLineProperties=nullptr)
static css::awt::Point calculateTopLeftPositionToCenterObject(const css::awt::Point &rTargetAreaPosition, const css::awt::Size &rTargetAreaSize, const css::awt::Size &rObjectSize)
static rtl::Reference< Svx3DExtrudeObject > impl_createCube(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPosition, const css::drawing::Direction3D &rSize, sal_Int32 nRotateZAngleHundredthDegree, bool bRounded)
static rtl::Reference< Svx3DLatheObject > createCylinder(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPosition, const css::drawing::Direction3D &rSize, sal_Int32 nRotateZAngleHundredthDegree)
static rtl::Reference< SvxGraphicObject > createGraphic2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPos, const css::drawing::Direction3D &rSize, const css::uno::Reference< css::graphic::XGraphic > &xGraphic)
static rtl::Reference< SvxShapeGroup > createGroup2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &aName=OUString())
static rtl::Reference< Svx3DExtrudeObject > createCube(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPosition, const css::drawing::Direction3D &rSize, sal_Int32 nRotateZAngleHundredthDegree, const css::uno::Reference< css::beans::XPropertySet > &xSourceProp, const tPropertyNameMap &rPropertyNameMap, bool bRounded=false)
::basegfx::B2IRectangle getRectangleOfShape(SvxShape &rShape)
static css::uno::Any makeTransformation(const css::awt::Point &rScreenPosition2D, double fRotationAnglePi=0.0)
static css::awt::Size calculateNewSizeRespectingAspectRatio(const css::awt::Size &rTargetSize, const css::awt::Size &rSourceSizeWithCorrectAspectRatio)
static rtl::Reference< Svx3DSceneObject > createPyramid(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPosition, const css::drawing::Direction3D &rSize, double fTopHeight, bool bRotateZ, const css::uno::Reference< css::beans::XPropertySet > &xSourceProp, const tPropertyNameMap &rPropertyNameMap)
static rtl::Reference< SvxShapeCircle > createCircle(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::awt::Size &rSize, const css::awt::Point &rPosition)
static rtl::Reference< SvxShapePolyPolygon > createSymbol2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::Position3D &rPos, const css::drawing::Direction3D &rSize, sal_Int32 nStandardSymbol, sal_Int32 nBorderColor, sal_Int32 nFillColor)
static rtl::Reference< SvxShapeGroupAnyD > getChartRootShape(const rtl::Reference< SvxDrawPage > &xPage)
A Stripe represents a 2 dimensional foursquare plane in a 3 dimensional room.
static css::uno::Any getTexturePolygon(short nRotatedTexture)
css::uno::Any getNormalsPolygon() const
css::uno::Any getPolyPolygonShape3D() const
void InvertNormal(bool bInvertNormal)
void SetManualNormal(const css::drawing::Direction3D &rNormal)
css::drawing::Direction3D getNormal() const
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
Reference< XInterface > xTarget
#define SAL_INFO(area, stream)
constexpr double deg2rad(double v)
OOO_DLLPUBLIC_CHARTTOOLS::basegfx::B2IRectangle makeRectangle(const css::awt::Point &rPosition, const css::awt::Size &rSize)
static drawing::PointSequenceSequence createPolyPolygon_Symbol(const drawing::Position3D &rPos, const drawing::Direction3D &rSize, sal_Int32 nStandardSymbol)
static drawing::PolyPolygonBezierCoords getCircularArcBezierCoords(double fStartAngleRadian, double fWidthAngleRadian, double fUnitRadius, const ::basegfx::B2DHomMatrix &rTransformationFromUnitCircle, const double fAngleSubdivisionRadian)
OOO_DLLPUBLIC_CHARTTOOLS css::awt::Point Position3DToAWTPoint(const css::drawing::Position3D &rPos)
Position3D --> awt::Point (2D)
static uno::Any createPolyPolygon_Cone(double fHeight, double fRadius, double fTopHeight, sal_Int32 &nVerticalSegmentCount)
OOO_DLLPUBLIC_CHARTTOOLS css::drawing::HomogenMatrix3 B2DHomMatrixToHomogenMatrix3(const ::basegfx::B2DHomMatrix &rM)
B2DHomMatrix <-> HomogenMatrix3.
OOO_DLLPUBLIC_CHARTTOOLS void AddPointToPoly(css::drawing::PolyPolygonShape3D &rPoly, const css::drawing::Position3D &rPos, sal_Int32 nSequenceIndex=0)
PolyPolygonShape3D + drawing::Position3D -> PolyPolygonShape3D.
css::uno::Sequence< OUString > tNameSequence
static uno::Any createPolyPolygon_Cube(const drawing::Direction3D &rSize, double fRoundedEdge, bool bRounded)
OOO_DLLPUBLIC_CHARTTOOLS basegfx::B2DPolyPolygon PolyToB2DPolyPolygon(const std::vector< std::vector< css::drawing::Position3D > > &rPolyPolygon)
PolyPolygonShape3D -> basegfx::B2DPolyPolygon (2D)
OOO_DLLPUBLIC_CHARTTOOLS css::drawing::PolyPolygonShape3D BezierToPoly(const css::drawing::PolyPolygonBezierCoords &rBezier)
PolyPolygonBezierCoords -> PolyPolygonShape3D.
std::unordered_map< OUString, OUString > tPropertyNameMap
static drawing::PolyPolygonBezierCoords getRingBezierCoords(double fUnitCircleInnerRadius, double fUnitCircleOuterRadius, double fStartAngleRadian, double fWidthAngleRadian, const ::basegfx::B2DHomMatrix &aTransformationFromUnitCircle, const double fAngleSubdivisionRadian)
css::uno::Sequence< css::uno::Any > tAnySequence
OOO_DLLPUBLIC_CHARTTOOLS css::drawing::HomogenMatrix B3DHomMatrixToHomogenMatrix(const ::basegfx::B3DHomMatrix &rM)
diverse methods for class conversions; e.g.
static void appendAndCloseBezierCoords(drawing::PolyPolygonBezierCoords &rReturn, const drawing::PolyPolygonBezierCoords &rAdd, bool bAppendInverse)
std::unordered_map< OUString, css::uno::Any > tPropertyNameValueMap
OOO_DLLPUBLIC_CHARTTOOLS css::awt::Size Direction3DToAWTSize(const css::drawing::Direction3D &rDirection)
Direction3D --> awt::Size (2D)
OOO_DLLPUBLIC_CHARTTOOLS::basegfx::B2DHomMatrix IgnoreZ(const ::basegfx::B3DHomMatrix &rM)
basegfx::B3DHomMatrix -> B2DHomMatrix
OOO_DLLPUBLIC_CHARTTOOLS css::drawing::PointSequenceSequence PolyToPointSequence(const css::drawing::PolyPolygonShape3D &rPolyPolygon)
PolyPolygonShape3D -> drawing::PointSequenceSequence (2D)
static uno::Any createPolyPolygon_Cylinder(double fHeight, double fRadius, sal_Int32 &nVerticalSegmentCount)
OOO_DLLPUBLIC_CHARTTOOLS::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix(const css::drawing::HomogenMatrix &rHM)
HomogenMatrix -> basegfx::B3DHomMatrix.
OUString getString(const Any &_rAny)
const PropertyStruct aPropNames[]
css::uno::Any Transparence
constexpr OUStringLiteral UNO_NAME_FILLCOLOR
constexpr OUStringLiteral UNO_NAME_3D_NORMALSPOLYGON3D
constexpr OUStringLiteral UNO_NAME_3D_TEXTURE_PROJ_X
constexpr OUStringLiteral UNO_NAME_3D_PERCENT_DIAGONAL
constexpr OUStringLiteral UNO_NAME_LINESTYLE
constexpr OUStringLiteral UNO_NAME_3D_NORMALS_KIND
constexpr OUStringLiteral UNO_NAME_LINECAP
constexpr OUStringLiteral UNO_NAME_LINETRANSPARENCE
constexpr OUStringLiteral UNO_NAME_LINEWIDTH
constexpr OUStringLiteral UNO_NAME_3D_LINEONLY
constexpr OUStringLiteral UNO_NAME_3D_TRANSFORM_MATRIX
constexpr OUStringLiteral UNO_NAME_3D_DOUBLE_SIDED
constexpr OUStringLiteral UNO_NAME_3D_POLYPOLYGON3D
constexpr OUStringLiteral UNO_NAME_3D_HORZ_SEGS
constexpr OUStringLiteral UNO_NAME_CIRCKIND
constexpr OUStringLiteral UNO_NAME_3D_VERT_SEGS
constexpr OUStringLiteral UNO_NAME_3D_EXTRUDE_DEPTH
constexpr OUStringLiteral UNO_NAME_3D_TEXTURE_PROJ_Y
constexpr OUStringLiteral UNO_NAME_3D_TEXTUREPOLYGON3D
constexpr OUStringLiteral UNO_NAME_3D_REDUCED_LINE_GEOMETRY
constexpr OUStringLiteral UNO_NAME_POLYPOLYGON
constexpr OUStringLiteral UNO_NAME_LINECOLOR
constexpr OUStringLiteral UNO_NAME_MISC_OBJ_NAME