summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-09-04 14:15:06 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-09-08 11:23:45 +0200
commit6a71bea7cf19c7b6a5031734354073d82ae8916e (patch)
tree354fc0d05411c5ded27d6f45983aa6be5d46ec6a /sw
parent96e4cc87513c170c73121b4cdd8365bf56b8a3af (diff)
Revert "It seems lcl_ExtendLeftAndRight is just a workaround"
This reverts commit 9ece71a185c93845e38c25eae91bc1955d60bfed. 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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/paintfrm.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 9209f7fda3cf..3f9ca4adea09 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -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;