summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-11 10:36:15 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-11 10:42:10 -0400
commit2b9e7a0cb2492f19745f61a4829ff3802b25291f (patch)
tree7978dc67c23509880b8b3f6380b21d0ede9bb956 /sw
parentd47ca30f1c9add3969e12ec7b855e68a848a679e (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/paintfrm.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 179330712889..120634e351a8 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();
}