sw/source/core/layout/paintfrm.cxx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
New commits: commit 2b9e7a0cb2492f19745f61a4829ff3802b25291f Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Tue Mar 11 10:36:15 2014 -0400 fdo#76030: Use the table boundaries view option to toggle border drawing. Unless I'm missing something, fixing the problem reported in fdo#75118 this way is more reliable, and certainly avoids the problem reported in fdo#76030. Change-Id: Ife524d9db12e9fa4528c2232e619bfacde367659 diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 1793307..120634e 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2641,12 +2641,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const 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) { @@ -4252,7 +4246,8 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { - if ( pGlobalShell->GetViewOptions()->IsTable() ) + const SwViewOption* pViewOption = pGlobalShell->GetViewOptions(); + if (pViewOption->IsTable()) { // #i29550# if ( IsCollapsingBorders() ) @@ -4268,9 +4263,12 @@ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const PaintShadow( rRect, aRect, rAttrs ); } - // paint lines - SwTabFrmPainter aHelper( *this ); - aHelper.PaintLines( *pGlobalShell->GetOut(), rRect ); + if (pViewOption->IsTableBoundaries()) + { + // fdo#75118 Paint border lines only when it's enabled. + SwTabFrmPainter aHelper(*this); + aHelper.PaintLines(*pGlobalShell->GetOut(), rRect); + } } SwLayoutFrm::Paint( rRect ); @@ -4283,8 +4281,7 @@ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const aTabRect.Pos() += Frm().Pos(); SwRect aTabOutRect( rRect ); aTabOutRect.Intersection( aTabRect ); - pGlobalShell->GetViewOptions()-> - DrawRect( pGlobalShell->GetOut(), aTabOutRect, COL_LIGHTGRAY ); + pViewOption->DrawRect( pGlobalShell->GetOut(), aTabOutRect, COL_LIGHTGRAY ); } ((SwTabFrm*)this)->ResetComplete(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits