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
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index b684c5a..b684232 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;
}
}