From 8f30759a540c0b323b2fb6d873abd67f37da2ca2 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 2 Oct 2018 21:32:56 +0300 Subject: tdf#41542 sw cleanup: m_bBorderDist was always true This was forced to True in LO 5.4, leaving the variable intact in case any problems arose that would make it easier to revert. But now it is time to clean it up and remove the unnecessary logic. I didn't change the indenting because I don't like obscuring the significant changes. I can do that in a followup commit. Change-Id: Iab04a6a8f4ba8ff7151cf7941f655173136258eb Reviewed-on: https://gerrit.libreoffice.org/61270 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/core/layout/ssfrm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/core/layout/ssfrm.cxx') diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 99d187faa571..8550f4a7f4f6 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -691,11 +691,11 @@ const SwRect SwFrame::UnionFrame( bool bBorder ) const const SvxBoxItem &rBox = rAttrs.GetBox(); if ( rBox.GetLeft() ) nLeft -= rBox.CalcLineSpace( SvxBoxItemLine::LEFT ); - else if ( rAttrs.IsBorderDist() ) + else nLeft -= rBox.GetDistance( SvxBoxItemLine::LEFT ) + 1; if ( rBox.GetRight() ) nAdd += rBox.CalcLineSpace( SvxBoxItemLine::RIGHT ); - else if ( rAttrs.IsBorderDist() ) + else nAdd += rBox.GetDistance( SvxBoxItemLine::RIGHT ) + 1; if( rAttrs.GetShadow().GetLocation() != SvxShadowLocation::NONE ) { -- cgit v1.2.3