Kaydet (Commit) aa8240e8 authored tarafından Michael Stahl's avatar Michael Stahl

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.
a0486f02 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
üst 30f76f08
...@@ -2701,6 +2701,7 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem ) ...@@ -2701,6 +2701,7 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem )
svx::frame::Style aB( rBoxItem.GetBottom() ); svx::frame::Style aB( rBoxItem.GetBottom() );
const SwTwips nHalfTopWidth = aT.GetWidth() / 2; const SwTwips nHalfTopWidth = aT.GetWidth() / 2;
const SwTwips nHalfBottomWidth = aB.GetWidth() / 2;
aR.MirrorSelf(); aR.MirrorSelf();
aB.MirrorSelf(); aB.MirrorSelf();
...@@ -2713,10 +2714,14 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem ) ...@@ -2713,10 +2714,14 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem )
aT.SetRefMode( !bVert ? svx::frame::REFMODE_BEGIN : svx::frame::REFMODE_END ); aT.SetRefMode( !bVert ? svx::frame::REFMODE_BEGIN : svx::frame::REFMODE_END );
aB.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 aLeft ( nLeft, nTop + nHalfTopWidth,
SwLineEntry aRight ( nRight, nTop + nHalfTopWidth, nBottom + nHalfTopWidth, bVert ? aT : ( bR2L ? aL : aR ) ); nBottom + nHalfBottomWidth, bVert ? aB : ( bR2L ? aR : aL ) );
SwLineEntry aTop ( nTop + nHalfTopWidth, nLeft, nRight, bVert ? aL : aT ); SwLineEntry aRight ( nRight, nTop + nHalfTopWidth,
SwLineEntry aBottom( nBottom + nHalfTopWidth, nLeft, nRight, bVert ? aR : aB ); 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( aLeft, false );
Insert( aRight, false ); Insert( aRight, false );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment