diff options
author | Justin Luth <justin_luth@sil.org> | 2016-12-17 08:55:34 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2016-12-17 10:08:12 +0000 |
commit | d253963f460e5600eb886480306b01a6fbc27ee6 (patch) | |
tree | 19a9dc5650d423b6e1e89590a518393fdc817f95 | |
parent | 0d0507ad622516fdc03d994ba3136cebd058a301 (diff) |
tdf#104613 revert there is a function for that: CalcLineSpace
it should have been ,m_bBorderDist instead of ,true.
In 5.3, m_bBorderDist is always true, but not in 5.2
Just revert back to the original code, since this was just
supposed to be a readability change anyway.
reverts commit feacae8571d003c60960d852e835a17ef722265c
Change-Id: I2cb16e3c05d3c028eb3f8dcecfcf112524385780
Reviewed-on: https://gerrit.libreoffice.org/32110
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index a490ba7ba0fe..70c1409a0dc0 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1985,28 +1985,36 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const void SwBorderAttrs::CalcTopLine_() { - m_nTopLine = m_rBox.CalcLineSpace( SvxBoxItemLine::TOP, /*bEvenIfNoLine*/true ); + m_nTopLine = (m_bBorderDist && !m_rBox.GetTop()) + ? m_rBox.GetDistance (SvxBoxItemLine::TOP) + : m_rBox.CalcLineSpace(SvxBoxItemLine::TOP); m_nTopLine = m_nTopLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::TOP); m_bTopLine = false; } void SwBorderAttrs::CalcBottomLine_() { - m_nBottomLine = m_rBox.CalcLineSpace( SvxBoxItemLine::BOTTOM, true ); + m_nBottomLine = (m_bBorderDist && !m_rBox.GetBottom()) + ? m_rBox.GetDistance (SvxBoxItemLine::BOTTOM) + : m_rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM); m_nBottomLine = m_nBottomLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM); m_bBottomLine = false; } void SwBorderAttrs::CalcLeftLine_() { - m_nLeftLine = m_rBox.CalcLineSpace( SvxBoxItemLine::LEFT, true ); + m_nLeftLine = (m_bBorderDist && !m_rBox.GetLeft()) + ? m_rBox.GetDistance (SvxBoxItemLine::LEFT) + : m_rBox.CalcLineSpace(SvxBoxItemLine::LEFT); m_nLeftLine = m_nLeftLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT); m_bLeftLine = false; } void SwBorderAttrs::CalcRightLine_() { - m_nRightLine = m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT, true ); + m_nRightLine = (m_bBorderDist && !m_rBox.GetRight()) + ? m_rBox.GetDistance (SvxBoxItemLine::RIGHT) + : m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT); m_nRightLine = m_nRightLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::RIGHT); m_bRightLine = false; } |