diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-25 10:27:47 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-25 15:58:19 +0200 |
commit | 8383ccd816de250b5031fe254780d9b6c14f657f (patch) | |
tree | a2868ecd47e6524b539b35934bd7dcbb7f6e4f53 /sw | |
parent | f5ef5770db408d19025f494ec7c3d8d09cbed1dd (diff) |
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.
(cherry picked from commit e6bdcfb8e0bdd456f81d4391df355a76be13afd3)
Change-Id: I5bb0536e84a8486440748ac9ebb24b22344cc03f
Reviewed-on: https://gerrit.libreoffice.org/38026
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
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()); |