Kaydet (Commit) 6a71bea7 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

Revert "It seems lcl_ExtendLeftAndRight is just a workaround"

This reverts commit 9ece71a1.
I solved some bug which were hide by the usage of this method,
but there are other cases where it is neccessary.

Conflicts:
	sw/source/core/layout/paintfrm.cxx

Change-Id: I01f27c812890d7bc4d47e645f25213ba67a955d5
üst 96e4cc87
......@@ -1468,6 +1468,25 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
::SwAlignRect( rRect, pGlobalShell );
}
static void lcl_ExtendLeftAndRight( SwRect& _rRect,
const SwFrm& _rFrm,
const SwBorderAttrs& _rAttrs,
const SwRectFn& _rRectFn )
{
// Extend left/right border/shadow rectangle to bottom of previous frame/to
// top of next frame, if border/shadow is joined with previous/next frame.
if ( _rAttrs.JoinedWithPrev( _rFrm ) )
{
const SwFrm* pPrevFrm = _rFrm.GetPrev();
(_rRect.*_rRectFn->fnSetTop)( (pPrevFrm->*_rRectFn->fnGetPrtBottom)() );
}
if ( _rAttrs.JoinedWithNext( _rFrm ) )
{
const SwFrm* pNextFrm = _rFrm.GetNext();
(_rRect.*_rRectFn->fnSetBottom)( (pNextFrm->*_rRectFn->fnGetPrtTop)() );
}
}
static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
const SwRect &rRect, SwRegionRects &rRegion )
{
......@@ -4474,7 +4493,10 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
(static_cast<const SwLayoutFrm*>(this))->GetFmt()->IsBackgroundTransparent()
);
lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, bBottom, true, true);
SWRECTFN( this );
::lcl_ExtendLeftAndRight( rOutRect, *(this), rAttrs, fnRect );
lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, bBottom, true, true);
}
/*************************************************************************
......@@ -4795,6 +4817,8 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
if ( _rFrm.IsCntntFrm() )
{
::lcl_ExtendLeftAndRight( aRect, _rFrm, _rAttrs, _rRectFn );
// No Top / bottom borders for joint borders
if ( _rAttrs.JoinedWithPrev( _rFrm ) ) pTopBorder = NULL;
if ( _rAttrs.JoinedWithNext( _rFrm ) ) pBottomBorder = NULL;
......
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