diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-10-16 10:14:56 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-10-16 18:11:52 +0200 |
commit | 881329a30612fb822d6c770efabc249bbefeb126 (patch) | |
tree | a2619614586380caa1137030b2c0d850a2055d1b /drawinglayer | |
parent | cd5ee8c7d3f06fe78e6b3993845a3c2abc7cb72a (diff) |
Simplify vector initialization in drawinglayer
Change-Id: Iee9c13149d3614ecd9f812cfbb85e4534c33c1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123684
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/qa/unit/border.cxx | 35 | ||||
-rw-r--r-- | drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx | 3 |
2 files changed, 19 insertions, 19 deletions
diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx index fdb3cc71a3a8..53bd420ee726 100644 --- a/drawinglayer/qa/unit/border.cxx +++ b/drawinglayer/qa/unit/border.cxx @@ -49,17 +49,18 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoubleDecompositionSolid) basegfx::BColor aColorLeft; std::vector<double> aDashing(svtools::GetLineDashing(SvxBorderLineStyle::DOUBLE, 10.0)); const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(std::move(aDashing)); - std::vector<drawinglayer::primitive2d::BorderLine> aBorderlines; + std::vector<drawinglayer::primitive2d::BorderLine> aBorderlines{ - aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute(aColorLeft, fLeftWidth), fExtendLeftStart, - fExtendLeftStart, fExtendLeftEnd, fExtendLeftEnd)); + drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorLeft, fLeftWidth), fExtendLeftStart, + fExtendLeftStart, fExtendLeftEnd, fExtendLeftEnd), - aBorderlines.push_back(drawinglayer::primitive2d::BorderLine(fDistance)); + drawinglayer::primitive2d::BorderLine(fDistance), - aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute(aColorRight, fRightWidth), fExtendRightStart, - fExtendRightStart, fExtendRightEnd, fExtendRightEnd)); + drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorRight, fRightWidth), fExtendRightStart, + fExtendRightStart, fExtendRightEnd, fExtendRightEnd) + }; rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> aBorder( new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, std::move(aBorderlines), @@ -113,17 +114,17 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing) basegfx::BColor aColorLeft; std::vector<double> aDashing(svtools::GetLineDashing(SvxBorderLineStyle::DOUBLE, 10.0)); const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(std::move(aDashing)); - std::vector<drawinglayer::primitive2d::BorderLine> aBorderlines; + std::vector<drawinglayer::primitive2d::BorderLine> aBorderlines{ + drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorLeft, fLeftWidth), fExtendLeftStart, + fExtendLeftStart, fExtendLeftEnd, fExtendLeftEnd), - aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute(aColorLeft, fLeftWidth), fExtendLeftStart, - fExtendLeftStart, fExtendLeftEnd, fExtendLeftEnd)); + drawinglayer::primitive2d::BorderLine(fDistance), - aBorderlines.push_back(drawinglayer::primitive2d::BorderLine(fDistance)); - - aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute(aColorRight, fRightWidth), fExtendRightStart, - fExtendRightStart, fExtendRightEnd, fExtendRightEnd)); + drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorRight, fRightWidth), fExtendRightStart, + fExtendRightStart, fExtendRightEnd, fExtendRightEnd) + }; rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> aBorder( new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, std::move(aBorderlines), diff --git a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx index 4887802e17a4..010083b42291 100644 --- a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx @@ -37,8 +37,7 @@ namespace drawinglayer::primitive3d if(getPolyPolygon3D().count()) { - std::vector< basegfx::B3DPolyPolygon > aFill; - aFill.push_back(getPolyPolygon3D()); + std::vector< basegfx::B3DPolyPolygon > aFill { getPolyPolygon3D() }; // get full range const basegfx::B3DRange aRange(getRangeFrom3DGeometry(aFill)); |