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:20:56 +0200 |
commit | 426dec966e09c0a43d00b80a4bd262d64ea208ee (patch) | |
tree | 5c8312b059f12b7b25c3e2796bf9a547328efffd | |
parent | 4afe38c435cf1a2a1248977003aba0e9a7912bbd (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
(cherry picked from commit aa8240e80394887a4af45710de69aacacec66d25)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
-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 2510c45b507e..36e4d8b035af 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2707,6 +2707,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(); @@ -2719,10 +2720,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 ); |