chart2/source/view/axes/VCartesianAxis.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
New commits: commit e95be04a73e977022455335d7cbf56804638f761 Author: Jochen Nitschke <j.nitschke+loger...@ok.de> Date: Fri Jun 3 20:30:50 2016 +0200 initialise PointSequenceSequence directly this list initialisation is short enough to remove the local helper function Change-Id: I17fab47e51fc0b1a0aa0462d517d7861f8a278e0 Reviewed-on: https://gerrit.libreoffice.org/25884 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 6d2ed91..a8561dc 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -1021,17 +1021,6 @@ bool VCartesianAxis::createTextShapesSimple( return true; } -drawing::PointSequenceSequence lcl_makePointSequence( B2DVector& rStart, B2DVector& rEnd ) -{ - drawing::PointSequenceSequence aPoints(1); - aPoints[0].realloc(2); - aPoints[0][0].X = static_cast<sal_Int32>(rStart.getX()); - aPoints[0][0].Y = static_cast<sal_Int32>(rStart.getY()); - aPoints[0][1].X = static_cast<sal_Int32>(rEnd.getX()); - aPoints[0][1].Y = static_cast<sal_Int32>(rEnd.getY()); - return aPoints; -} - double VCartesianAxis::getAxisIntersectionValue() const { if (m_aAxisProperties.m_pfMainLinePositionAtOtherAxis) @@ -1860,7 +1849,9 @@ void VCartesianAxis::createShapes() AxisLabelAlignment aLabelAlign = m_aAxisProperties.maLabelAlignment; get2DAxisMainLine(aStart, aEnd, aLabelAlign, fExtraLineCrossesOtherAxis); m_aAxisProperties.maLabelAlignment = aLabelAlign; - drawing::PointSequenceSequence aPoints( lcl_makePointSequence(aStart,aEnd) ); + drawing::PointSequenceSequence aPoints{{ + {static_cast<sal_Int32>(aStart.getX()), static_cast<sal_Int32>(aStart.getY())}, + {static_cast<sal_Int32>(aEnd.getX()), static_cast<sal_Int32>(aEnd.getY())} }}; Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D( m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits