diff --git a/0001-Resolves-tdf-105998-distort-hairline-borders-to-fall.patch b/0001-Resolves-tdf-105998-distort-hairline-borders-to-fall.patch new file mode 100644 index 0000000..16e9cac --- /dev/null +++ b/0001-Resolves-tdf-105998-distort-hairline-borders-to-fall.patch @@ -0,0 +1,50 @@ +From 2e5d1e032d353884a1f391d9e55ca1be3f7a0b9d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 14 Feb 2017 08:57:50 +0000 +Subject: [PATCH] Resolves: tdf#105998 distort hairline borders to fall inside + the canvas + +if we are a hairline along the very right/bottom edge +of the canvas then distory the polygon inwards one pixel right/bottom so that +the hairline falls inside the paintable area and becomes visible + +Change-Id: Ie5713f6916cf5b47fdf14f86f034e38cda9900fd +--- + .../source/processor2d/vclpixelprocessor2d.cxx | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +index b8e9795..216be6b 100644 +--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx ++++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +@@ -165,6 +165,27 @@ namespace drawinglayer + return true; + } + ++ //Resolves: tdf#105998 if we are a hairline along the very right/bottom edge ++ //of the canvas then distory the polygon inwards one pixel right/bottom so that ++ //the hairline falls inside the paintable area and becomes visible ++ Size aSize = mpOutputDevice->GetOutputSize(); ++ basegfx::B2DRange aRange = aLocalPolygon.getB2DRange(); ++ basegfx::B2DRange aOutputRange = aRange; ++ aOutputRange.transform(maCurrentTransformation); ++ if (std::round(aOutputRange.getMaxX()) == aSize.Width() || std::round(aOutputRange.getMaxY()) == aSize.Height()) ++ { ++ basegfx::B2DRange aOnePixel(0, 0, 1, 1); ++ aOnePixel.transform(maCurrentTransformation); ++ double fXOnePixel = 1.0 / aOnePixel.getMaxX(); ++ double fYOnePixel = 1.0 / aOnePixel.getMaxY(); ++ ++ basegfx::B2DPoint aTopLeft(aRange.getMinX(), aRange.getMinY()); ++ basegfx::B2DPoint aTopRight(aRange.getMaxX() - fXOnePixel, aRange.getMinY()); ++ basegfx::B2DPoint aBottomLeft(aRange.getMinX(), aRange.getMaxY() - fYOnePixel); ++ basegfx::B2DPoint aBottomRight(aRange.getMaxX() - fXOnePixel, aRange.getMaxY() - fYOnePixel); ++ aLocalPolygon = basegfx::tools::distort(aLocalPolygon, aRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight); ++ } ++ + const basegfx::BColor aLineColor(maBColorModifierStack.getModifiedColor(rSource.getBColor())); + + mpOutputDevice->SetFillColor(); +-- +2.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index cdca212..149ca40 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -241,6 +241,7 @@ Patch4: 0001-rhbz-1353069-don-t-record-undo-information-in-the-cl.patch Patch5: 0001-change-from-glew-to-epoxy.patch Patch6: 0001-gtk3-implement-opengl-support-for-slideshow.patch Patch7: 0001-lower-the-system-epoxy-requirement.patch +Patch8: 0001-Resolves-tdf-105998-distort-hairline-borders-to-fall.patch %if 0%{?rhel} # not upstreamed