diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-06-27 15:58:16 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-28 14:15:14 +0200 |
commit | aa8240e80394887a4af45710de69aacacec66d25 (patch) | |
tree | 89f8c8608af39bf46cfdcd768f59c94911706bed | |
parent | 30f76f083a6b587d0069f175fa24f3c0dafb051c (diff) |
fdo#39415: sw: fix collapsing border painting:
In a table with collapsing borders, the horizontal borders need to be
painted "below" the reference line, and not "centered" on the line like
the vertical borders.
a0486f02433703744f487e599422714d03937956 was apparently an attempt to
fix this, but unfortunately it adjusted both top and bottom borders
with the top border width, which has horrible results if the top and
bottom borders have different widths.
Change-Id: I7605eda6ef8111612ceb1ded79c0811de9ca7b25
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 5f8ee137dc88..ca3d76156d28 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2701,6 +2701,7 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem ) svx::frame::Style aB( rBoxItem.GetBottom() ); const SwTwips nHalfTopWidth = aT.GetWidth() / 2; + const SwTwips nHalfBottomWidth = aB.GetWidth() / 2; aR.MirrorSelf(); aB.MirrorSelf(); @@ -2713,10 +2714,14 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem ) aT.SetRefMode( !bVert ? svx::frame::REFMODE_BEGIN : svx::frame::REFMODE_END ); aB.SetRefMode( !bVert ? svx::frame::REFMODE_BEGIN : svx::frame::REFMODE_END ); - SwLineEntry aLeft ( nLeft, nTop + nHalfTopWidth, nBottom + nHalfTopWidth, bVert ? aB : ( bR2L ? aR : aL ) ); - SwLineEntry aRight ( nRight, nTop + nHalfTopWidth, nBottom + nHalfTopWidth, bVert ? aT : ( bR2L ? aL : aR ) ); - SwLineEntry aTop ( nTop + nHalfTopWidth, nLeft, nRight, bVert ? aL : aT ); - SwLineEntry aBottom( nBottom + nHalfTopWidth, nLeft, nRight, bVert ? aR : aB ); + SwLineEntry aLeft ( nLeft, nTop + nHalfTopWidth, + nBottom + nHalfBottomWidth, bVert ? aB : ( bR2L ? aR : aL ) ); + SwLineEntry aRight ( nRight, nTop + nHalfTopWidth, + nBottom + nHalfBottomWidth, bVert ? aT : ( bR2L ? aL : aR ) ); + SwLineEntry aTop ( nTop + nHalfTopWidth, + nLeft, nRight, bVert ? aL : aT ); + SwLineEntry aBottom( nBottom + nHalfBottomWidth, + nLeft, nRight, bVert ? aR : aB ); Insert( aLeft, false ); Insert( aRight, false ); |