[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu May 25 12:05:09 UTC 2017


 sw/source/core/layout/paintfrm.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit e6bdcfb8e0bdd456f81d4391df355a76be13afd3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu May 25 10:27:47 2017 +0200

    tdf#108056 sw SubtractFlys: fix off-by-one error in clip rectangle calculation
    
    See commit c5cf8824a619401627f18abc7b3049551c71ac2a (tdf#86578: sw: fix
    rendering of legacy documents with fly anchored at fly, 2015-04-10) for
    the context, this fixes the vertical unexpected thin white lines of the
    bugdoc.
    
    Change-Id: I5bb0536e84a8486440748ac9ebb24b22344cc03f
    Reviewed-on: https://gerrit.libreoffice.org/38015
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 1dca9545f9d6..1cd629dacba3 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1919,7 +1919,12 @@ bool DrawFillAttributes(
                     tools::PolyPolygon tempRegion;
                     for (size_t i = 0; i < rPaintRegion.size(); ++i)
                     {
-                        tempRegion.Insert( tools::Polygon(rPaintRegion[i].SVRect()));
+                        // Don't use SwRect::SvRect() here, as the clip
+                        // rectangle is supposed to cover everything outside
+                        // the flys, so the Width() - 1 isn't correct.
+                        const SwRect& rRect = rPaintRegion[i];
+                        tools::Rectangle aRectangle(rRect.Pos().getX(), rRect.Pos().getY(), rRect.Pos().getX() + rRect.SSize().getWidth(), rRect.Pos().getY() + rRect.SSize().getHeight());
+                        tempRegion.Insert(tools::Polygon(aRectangle));
                     }
                     basegfx::B2DPolyPolygon const maskRegion( tempRegion.getB2DPolyPolygon());
 


More information about the Libreoffice-commits mailing list