Kaydet (Commit) 1c6fb266 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#75260: These old hacks no longer make sense.

The clip region in fact cuts off the lower part of the bottom border, both
on screen and when printing / exporting to PDF.

Change-Id: Id350531f09b3ded66fd05ea7ebeefe8771260b62
üst 374efa72
...@@ -2420,9 +2420,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const ...@@ -2420,9 +2420,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
// #i16816# tagged pdf support // #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, rDev ); SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, rDev );
const SwFrm* pTmpFrm = &mrTabFrm;
const bool bVert = pTmpFrm->IsVertical();
SwLineEntryMapConstIter aIter = maHoriLines.begin(); SwLineEntryMapConstIter aIter = maHoriLines.begin();
bool bHori = true; bool bHori = true;
...@@ -2440,17 +2437,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const ...@@ -2440,17 +2437,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
rDev.SetDrawMode( 0 ); rDev.SetDrawMode( 0 );
} }
// set clip region:
rDev.Push( PUSH_CLIPREGION );
Size aSize( rRect.SSize() );
// Hack! Necessary, because the layout is not pixel aligned!
aSize.Width() += nPixelSzW; aSize.Height() += nPixelSzH;
rDev.SetClipRegion(Region(Rectangle(rRect.Pos(), aSize)));
// The following stuff is necessary to have the new table borders fit
// into a ::SwAlignRect adjusted world.
const SwTwips nTwipXCorr = bVert ? 0 : std::max( 0L, nHalfPixelSzW - 2 ); // 1 < 2 < 3 ;-)
const SwTwips nTwipYCorr = !bVert ? 0 : std::max( 0L, nHalfPixelSzW - 2 ); // 1 < 2 < 3 ;-)
const SwFrm* pUpper = mrTabFrm.GetUpper(); const SwFrm* pUpper = mrTabFrm.GetUpper();
SwRect aUpper( pUpper->Prt() ); SwRect aUpper( pUpper->Prt() );
aUpper.Pos() += pUpper->Frm().Pos(); aUpper.Pos() += pUpper->Frm().Pos();
...@@ -2636,12 +2622,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const ...@@ -2636,12 +2622,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
aPaintEnd.Y() += static_cast<long>(offsetEnd + 0.5); aPaintEnd.Y() += static_cast<long>(offsetEnd + 0.5);
} }
aPaintStart.X() -= nTwipXCorr; // nHalfPixelSzW - 2 to assure that we do not leave the pixel
aPaintEnd.X() -= nTwipXCorr;
aPaintStart.Y() -= nTwipYCorr;
aPaintEnd.Y() -= nTwipYCorr;
// Here comes the painting stuff: Thank you, DR, great job!!!
if (bHori) if (bHori)
{ {
mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives( mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
...@@ -2678,7 +2658,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const ...@@ -2678,7 +2658,6 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
} }
// restore output device: // restore output device:
rDev.Pop();
rDev.SetDrawMode( nOldDrawMode ); rDev.SetDrawMode( nOldDrawMode );
} }
......
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