Kaydet (Commit) e95be04a authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Julien Nabet

initialise PointSequenceSequence directly

this list initialisation is short enough
to remove the local helper function

Change-Id: I17fab47e51fc0b1a0aa0462d517d7861f8a278e0
Reviewed-on: https://gerrit.libreoffice.org/25884Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 21e09000
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment