diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-10-27 23:20:06 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-10-29 11:02:28 +0100 |
commit | ea7d9105456537d2e0a6b7dcf051fee1fa259954 (patch) | |
tree | 5e6a66da57ede2aae3d07778269a9b07078f7bd1 /sw | |
parent | 8bef4f3033fff8eb12a58d3fa4cdd49076e18cf2 (diff) |
tdf#115296 extend vertical FrameBorders for joined Frames
This feature was lost on my changes for FrameBorder primitive
creation. It was calculated/applied formally in
lcl_PaintLeftRightLine
Change-Id: Ie44619a4c4e44ff4584533685cb21882c323742e
Reviewed-on: https://gerrit.libreoffice.org/62451
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
(cherry picked from commit e89e8941e114d4d1adf76df995a3f1a8d1bff4b1)
Reviewed-on: https://gerrit.libreoffice.org/62475
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b684c5ac1b2c..b684232ba78d 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5103,14 +5103,30 @@ void SwFrame::PaintSwFrameShadowAndBorder( // if ContentFrame and joined Prev/Next, reset top/bottom as needed if(IsContentFrame()) { + const SwFrame* pDirRefFrame(IsCellFrame() ? FindTabFrame() : this); + const SwRectFnSet aRectFnSet(pDirRefFrame); + const SwRectFn& _rRectFn(aRectFnSet.FnRect()); + if(rAttrs.JoinedWithPrev(*this)) { - pTopBorder = nullptr; + // tdf#115296 re-add adaption of vert distance to clos ethe evtl. + // existing gap to previous frame + const SwFrame* pPrevFrame(GetPrev()); + (aRect.*_rRectFn->fnSetTop)( (pPrevFrame->*_rRectFn->fnGetPrtBottom)() ); + + // ...and disable top border paint/creation + pTopBorder = nullptr; } if(rAttrs.JoinedWithNext(*this)) { - pBottomBorder = nullptr; + // tdf#115296 re-add adaption of vert distance to clos ethe evtl. + // existing gap to next frame + const SwFrame* pNextFrame(GetNext()); + (aRect.*_rRectFn->fnSetBottom)( (pNextFrame->*_rRectFn->fnGetPrtTop)() ); + + // ...and disable bottom border paint/creation + pBottomBorder = nullptr; } } |