summaryrefslogtreecommitdiff
path: root/drawinglayer/qa
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-16 10:14:56 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-16 18:11:52 +0200
commit881329a30612fb822d6c770efabc249bbefeb126 (patch)
treea2619614586380caa1137030b2c0d850a2055d1b /drawinglayer/qa
parentcd5ee8c7d3f06fe78e6b3993845a3c2abc7cb72a (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/qa')
-rw-r--r--drawinglayer/qa/unit/border.cxx35
1 files changed, 18 insertions, 17 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),