summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-05-18 15:01:28 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-05-18 22:51:45 +0200
commit6cc4aa93baed7916705b43ddce5dbb7c031e9997 (patch)
tree3488dcb8a5adde086a09d2060f598752d025a7b4 /drawinglayer
parentacc8ff577b2087fa2734b569a9606d9acac09c2e (diff)
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 <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/qa/unit/border.cxx98
1 files changed, 34 insertions, 64 deletions
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<double> 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<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));
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> 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<std::size_t>(2), aContainer.size());
// Get the inside line, now a PolygonStrokePrimitive2D
- auto pInside = dynamic_cast<const drawinglayer::primitive2d::PolygonStrokePrimitive2D*>(aContainer[0].get());
+ auto pInside = dynamic_cast<const drawinglayer::primitive2d::PolygonStrokePrimitive2D*>(
+ 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<VirtualDevice> pDev;
drawinglayer::geometry::ViewInformation2D aView;
- std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(*pDev, aView));
+ std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> 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<double> 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<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));
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> 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<MetaPolyLineAction*>(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();