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-28 08:35:58 +0100 |
commit | e89e8941e114d4d1adf76df995a3f1a8d1bff4b1 (patch) | |
tree | ca5d7579d6a9b29cde47cfebdeeb7feb5558ff3f | |
parent | 36880d76299e913761f03bbde1b6ca6bea393b5a (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>
-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 cd65f907d42f..9f9f8f4166ae 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5071,14 +5071,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; } } |