diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-02-19 21:46:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-21 15:37:06 +0000 |
commit | 7d8e24dc4c3dd63977970fd0b4856ab81aee6305 (patch) | |
tree | aac90005e2d780d231d11a92e8a965b4de909921 | |
parent | e285e059b6a03b426a0f64ff3686966802d040c3 (diff) |
fdo#75118: sw: do not paint zero-width lines
Since commit 6a3fb868b2b8af21f7b6140424b6f8377599a786 zero-width
BorderLinePrimitive2D will actually be painted as hairlines by
VclPixelProcessor2D::tryDrawBorderLinePrimitive2DDirect(), so don't
create such pointless primitives.
(cherry picked from commit 128d3d51c208ec5c37a105ea5c751530bd017d4b)
fdo#75118: actually these are floats, compare with approxEqual
(cherry picked from commit 9fb9fc301502c2762ad4a8059d8d1c818d2843db)
Change-Id: I4c2404b73f106156b83a6d72efa3c8991e5d659e
Reviewed-on: https://gerrit.libreoffice.org/8144
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 1639e174ebb3945f4fda08c30f535f98d3e54d7e)
Reviewed-on: https://gerrit.libreoffice.org/8148
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ba577975cc0b..54de39725e2c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2474,8 +2474,8 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons break; const SwLineEntrySet& rEntrySet = (*aIter).second; - SwLineEntrySetConstIter aSetIter = rEntrySet.begin(); - while ( aSetIter != rEntrySet.end() ) + for (SwLineEntrySetConstIter aSetIter = rEntrySet.begin(); + aSetIter != rEntrySet.end(); ++aSetIter) { const SwLineEntry& rEntry = *aSetIter; const svx::frame::Style& rEntryStyle( (*aSetIter).maAttribute ); @@ -2608,6 +2608,12 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons aPaintStart.Y() -= nTwipYCorr; aPaintEnd.Y() -= nTwipYCorr; + if (::rtl::math::approxEqual(aStyles[0].Prim(), 0.0) && + ::rtl::math::approxEqual(aStyles[0].Secn(), 0.0)) + { + continue; // fdo#75118 do not paint zero-width lines + } + // Here comes the painting stuff: Thank you, DR, great job!!! if ( bHori ) { @@ -2642,8 +2648,6 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons ); } } - - ++aSetIter; } ++aIter; |