diff options
-rw-r--r-- | chart2/source/view/charttypes/NetChart.cxx | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx index 76672e19bdf6..a9709eb0b45f 100644 --- a/chart2/source/view/charttypes/NetChart.cxx +++ b/chart2/source/view/charttypes/NetChart.cxx @@ -126,88 +126,6 @@ void NetChart::addSeries( VDataSeries* pSeries, sal_Int32 zSlot, sal_Int32 xSlot VSeriesPlotter::addSeries( pSeries, zSlot, xSlot, ySlot ); } -namespace { - -void lcl_removeDuplicatePoints( drawing::PolyPolygonShape3D& rPolyPoly, PlottingPositionHelper& rPosHelper ) -{ - sal_Int32 nPolyCount = rPolyPoly.SequenceX.getLength(); - if(!nPolyCount) - return; - - drawing::PolyPolygonShape3D aTmp; - aTmp.SequenceX.realloc(nPolyCount); - aTmp.SequenceY.realloc(nPolyCount); - aTmp.SequenceZ.realloc(nPolyCount); - - for( sal_Int32 nPolygonIndex = 0; nPolygonIndex<nPolyCount; nPolygonIndex++ ) - { - drawing::DoubleSequence* pOuterSourceX = &rPolyPoly.SequenceX.getArray()[nPolygonIndex]; - drawing::DoubleSequence* pOuterSourceY = &rPolyPoly.SequenceY.getArray()[nPolygonIndex]; - drawing::DoubleSequence* pOuterSourceZ = &rPolyPoly.SequenceZ.getArray()[nPolygonIndex]; - - drawing::DoubleSequence* pOuterTargetX = &aTmp.SequenceX.getArray()[nPolygonIndex]; - drawing::DoubleSequence* pOuterTargetY = &aTmp.SequenceY.getArray()[nPolygonIndex]; - drawing::DoubleSequence* pOuterTargetZ = &aTmp.SequenceZ.getArray()[nPolygonIndex]; - - sal_Int32 nPointCount = pOuterSourceX->getLength(); - if( !nPointCount ) - continue; - - pOuterTargetX->realloc(nPointCount); - pOuterTargetY->realloc(nPointCount); - pOuterTargetZ->realloc(nPointCount); - - double* pSourceX = pOuterSourceX->getArray(); - double* pSourceY = pOuterSourceY->getArray(); - double* pSourceZ = pOuterSourceZ->getArray(); - - double* pTargetX = pOuterTargetX->getArray(); - double* pTargetY = pOuterTargetY->getArray(); - double* pTargetZ = pOuterTargetZ->getArray(); - - //copy first point - *pTargetX=*pSourceX++; - *pTargetY=*pSourceY++; - *pTargetZ=*pSourceZ++; - sal_Int32 nTargetPointCount=1; - - for( sal_Int32 nSource=1; nSource<nPointCount; nSource++ ) - { - if( !rPosHelper.isSameForGivenResolution( *pTargetX, *pTargetY, *pTargetZ - , *pSourceX, *pSourceY, *pSourceZ ) ) - { - pTargetX++; pTargetY++; pTargetZ++; - *pTargetX=*pSourceX; - *pTargetY=*pSourceY; - *pTargetZ=*pSourceZ; - nTargetPointCount++; - } - pSourceX++; pSourceY++; pSourceZ++; - } - - //free unused space - if( nTargetPointCount<nPointCount ) - { - pOuterTargetX->realloc(nTargetPointCount); - pOuterTargetY->realloc(nTargetPointCount); - pOuterTargetZ->realloc(nTargetPointCount); - } - - pOuterSourceX->realloc(0); - pOuterSourceY->realloc(0); - pOuterSourceZ->realloc(0); - } - - //free space - rPolyPoly.SequenceX.realloc(nPolyCount); - rPolyPoly.SequenceY.realloc(nPolyCount); - rPolyPoly.SequenceZ.realloc(nPolyCount); - - rPolyPoly=aTmp; -} - -} - bool NetChart::impl_createLine( VDataSeries* pSeries , drawing::PolyPolygonShape3D* pSeriesPoly , PlottingPositionHelper* pPosHelper ) |