summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-06-03 20:30:50 +0200
committerJulien Nabet <serval2412@yahoo.fr>2016-06-04 07:41:42 +0000
commite95be04a73e977022455335d7cbf56804638f761 (patch)
tree70e5207fea27b3f6e5c5400523f2a313411e9ae4 /chart2
parent21e0900061262ddc0eb4f91a23016af244848310 (diff)
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 <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 6d2ed91eddb5..a8561dc8bb1f 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 );
}