summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-11-02 15:15:55 +0300
committerJustin Luth <justin_luth@sil.org>2016-11-03 19:02:41 +0000
commit5d9d0f3c979732ade57b9c4c4960dd030ffdc9f9 (patch)
tree5fec72a40be7dbf15f208498494213cd6f59c114
parent2a818a0aafac218ca09bb079d7f2cf0879385e4a (diff)
there is a function for that: CalcLineSpace(xx, bEvenIfNoLine)
Change-Id: Ideeb031f20611bd9d2a01343bc75e1d0510ad6e9 Reviewed-on: https://gerrit.libreoffice.org/30513 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
-rw-r--r--sw/source/core/layout/frmtool.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index a3635bc95209..5149cb671841 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1961,36 +1961,28 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const
void SwBorderAttrs::CalcTopLine_()
{
- m_nTopLine = (m_bBorderDist && !m_rBox.GetTop())
- ? m_rBox.GetDistance (SvxBoxItemLine::TOP)
- : m_rBox.CalcLineSpace(SvxBoxItemLine::TOP);
+ m_nTopLine = m_rBox.CalcLineSpace( SvxBoxItemLine::TOP, /*bEvenIfNoLine*/true );
m_nTopLine = m_nTopLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::TOP);
m_bTopLine = false;
}
void SwBorderAttrs::CalcBottomLine_()
{
- m_nBottomLine = (m_bBorderDist && !m_rBox.GetBottom())
- ? m_rBox.GetDistance (SvxBoxItemLine::BOTTOM)
- : m_rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM);
+ m_nBottomLine = m_rBox.CalcLineSpace( SvxBoxItemLine::BOTTOM, true );
m_nBottomLine = m_nBottomLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM);
m_bBottomLine = false;
}
void SwBorderAttrs::CalcLeftLine_()
{
- m_nLeftLine = (m_bBorderDist && !m_rBox.GetLeft())
- ? m_rBox.GetDistance (SvxBoxItemLine::LEFT)
- : m_rBox.CalcLineSpace(SvxBoxItemLine::LEFT);
+ m_nLeftLine = m_rBox.CalcLineSpace( SvxBoxItemLine::LEFT, true );
m_nLeftLine = m_nLeftLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT);
m_bLeftLine = false;
}
void SwBorderAttrs::CalcRightLine_()
{
- m_nRightLine = (m_bBorderDist && !m_rBox.GetRight())
- ? m_rBox.GetDistance (SvxBoxItemLine::RIGHT)
- : m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT);
+ m_nRightLine = m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT, true );
m_nRightLine = m_nRightLine + m_rShadow.CalcShadowSpace(SvxShadowItemSide::RIGHT);
m_bRightLine = false;
}