From 6cc4aa93baed7916705b43ddce5dbb7c031e9997 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 18 May 2020 15:01:28 +0200 Subject: comphelper, drawinglayer, framework, starmath: clang-format these files I added these files more or less recently and they have long lines. Use clang-format to break at a sane column limit. Change-Id: Id608fffbbc0673c9bc350dd696cb0a31906840d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94423 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- drawinglayer/qa/unit/border.cxx | 98 ++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 64 deletions(-) (limited to 'drawinglayer') diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx index 8209d5172926..8c4e6e08419b 100644 --- a/drawinglayer/qa/unit/border.cxx +++ b/drawinglayer/qa/unit/border.cxx @@ -28,7 +28,6 @@ using namespace com::sun::star; namespace { - class DrawinglayerBorderTest : public test::BootstrapFixture { }; @@ -50,37 +49,21 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoubleDecompositionSolid) basegfx::BColor aColorLeft; const std::vector aDashing(svtools::GetLineDashing(SvxBorderLineStyle::DOUBLE, 10.0)); const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(aDashing); - std::vector< drawinglayer::primitive2d::BorderLine > aBorderlines; - - aBorderlines.push_back( - drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute( - aColorLeft, - fLeftWidth), - fExtendLeftStart, - fExtendLeftStart, - fExtendLeftEnd, - fExtendLeftEnd)); - - aBorderlines.push_back( - drawinglayer::primitive2d::BorderLine(fDistance)); - - aBorderlines.push_back( - drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute( - aColorRight, - fRightWidth), - fExtendRightStart, - fExtendRightStart, - fExtendRightEnd, - fExtendRightEnd)); + std::vector aBorderlines; + + aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorLeft, fLeftWidth), fExtendLeftStart, + fExtendLeftStart, fExtendLeftEnd, fExtendLeftEnd)); + + aBorderlines.push_back(drawinglayer::primitive2d::BorderLine(fDistance)); + + aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorRight, fRightWidth), fExtendRightStart, + fExtendRightStart, fExtendRightEnd, fExtendRightEnd)); rtl::Reference aBorder( - new drawinglayer::primitive2d::BorderLinePrimitive2D( - aStart, - aEnd, - aBorderlines, - aStrokeAttribute)); + new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, aBorderlines, + aStrokeAttribute)); // Decompose it into polygons. drawinglayer::geometry::ViewInformation2D aView; @@ -91,14 +74,16 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoubleDecompositionSolid) CPPUNIT_ASSERT_EQUAL(static_cast(2), aContainer.size()); // Get the inside line, now a PolygonStrokePrimitive2D - auto pInside = dynamic_cast(aContainer[0].get()); + auto pInside = dynamic_cast( + aContainer[0].get()); CPPUNIT_ASSERT(pInside); // Make sure the inside line's height is fLeftWidth. const double fLineWidthFromDecompose = pInside->getLineAttribute().getWidth(); // This was 2.47, i.e. the width of the inner line was 1 unit (in the bugdoc's case: 1 pixel) wider than expected. - CPPUNIT_ASSERT_DOUBLES_EQUAL(fLeftWidth, fLineWidthFromDecompose, basegfx::fTools::getSmallValue()); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fLeftWidth, fLineWidthFromDecompose, + basegfx::fTools::getSmallValue()); } CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing) @@ -106,7 +91,8 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing) // Create a pixel processor. ScopedVclPtrInstance pDev; drawinglayer::geometry::ViewInformation2D aView; - std::unique_ptr pProcessor(drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(*pDev, aView)); + std::unique_ptr pProcessor( + drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(*pDev, aView)); CPPUNIT_ASSERT(pProcessor); GDIMetaFile aMetaFile; // Start recording after the processor is created, so we can test the pixel processor. @@ -127,37 +113,21 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing) basegfx::BColor aColorLeft; const std::vector aDashing(svtools::GetLineDashing(SvxBorderLineStyle::DOUBLE, 10.0)); const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(aDashing); - std::vector< drawinglayer::primitive2d::BorderLine > aBorderlines; - - aBorderlines.push_back( - drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute( - aColorLeft, - fLeftWidth), - fExtendLeftStart, - fExtendLeftStart, - fExtendLeftEnd, - fExtendLeftEnd)); - - aBorderlines.push_back( - drawinglayer::primitive2d::BorderLine(fDistance)); - - aBorderlines.push_back( - drawinglayer::primitive2d::BorderLine( - drawinglayer::attribute::LineAttribute( - aColorRight, - fRightWidth), - fExtendRightStart, - fExtendRightStart, - fExtendRightEnd, - fExtendRightEnd)); + std::vector aBorderlines; + + aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorLeft, fLeftWidth), fExtendLeftStart, + fExtendLeftStart, fExtendLeftEnd, fExtendLeftEnd)); + + aBorderlines.push_back(drawinglayer::primitive2d::BorderLine(fDistance)); + + aBorderlines.push_back(drawinglayer::primitive2d::BorderLine( + drawinglayer::attribute::LineAttribute(aColorRight, fRightWidth), fExtendRightStart, + fExtendRightStart, fExtendRightEnd, fExtendRightEnd)); rtl::Reference aBorder( - new drawinglayer::primitive2d::BorderLinePrimitive2D( - aStart, - aEnd, - aBorderlines, - aStrokeAttribute)); + new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, aBorderlines, + aStrokeAttribute)); drawinglayer::primitive2d::Primitive2DContainer aPrimitives; aPrimitives.push_back(drawinglayer::primitive2d::Primitive2DReference(aBorder.get())); @@ -180,7 +150,8 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing) { auto pMPLAction = static_cast(pAction); - if (0 != pMPLAction->GetLineInfo().GetWidth() && LineStyle::Solid == pMPLAction->GetLineInfo().GetStyle()) + if (0 != pMPLAction->GetLineInfo().GetWidth() + && LineStyle::Solid == pMPLAction->GetLineInfo().GetStyle()) { nPolyLineActionCount++; } @@ -202,7 +173,6 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing) CPPUNIT_ASSERT_EQUAL(nExpectedNumPolyLineActions, nPolyLineActionCount); } - } CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3