diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-10-17 08:40:10 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-10-17 08:40:10 +0000 |
commit | 0ec586304e906c6e19a244a1303df1d86213d0b4 (patch) | |
tree | e5d866619d25c3cde1f5810de649f66cca245707 /chart2/source/tools | |
parent | a258b8caf67655ba2394bb1d343e67b77c3e4f93 (diff) |
CWS-TOOLING: integrate CWS aw057
Diffstat (limited to 'chart2/source/tools')
-rw-r--r-- | chart2/source/tools/CommonConverters.cxx | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx index b85cb717bff6..787d79668ca3 100644 --- a/chart2/source/tools/CommonConverters.cxx +++ b/chart2/source/tools/CommonConverters.cxx @@ -164,6 +164,48 @@ drawing::Position3D B3DPointToPosition3D( const ::basegfx::B3DPoint& rPoint) ); } +::basegfx::B3DVector Direction3DToB3DVector( const drawing::Direction3D& rDirection) +{ + return ::basegfx::B3DVector( + rDirection.DirectionX + , rDirection.DirectionY + , rDirection.DirectionZ + ); +} + +drawing::PolyPolygonShape3D MakeLine3D( + const drawing::Position3D & rStart, + const drawing::Position3D & rEnd ) +{ + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(2); + pOuterSequenceY->realloc(2); + pOuterSequenceZ->realloc(2); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + *pInnerSequenceX++ = rStart.PositionX; + *pInnerSequenceY++ = rStart.PositionY; + *pInnerSequenceZ++ = rStart.PositionZ; + + *pInnerSequenceX++ = rEnd.PositionX; + *pInnerSequenceY++ = rEnd.PositionY; + *pInnerSequenceZ++ = rEnd.PositionZ; + + return aPP; +} + void AddPointToPoly( drawing::PolyPolygonShape3D& rPoly, const drawing::Position3D& rPos, sal_Int32 nPolygonIndex ) { if(nPolygonIndex<0) |