diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 11:36:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 17:04:43 +0100 |
commit | cd468bdc757d310fb263749918dfd34e7c01b46c (patch) | |
tree | bef3632df0885e783a6bc50ce67fa656bf358162 /editeng/source/items | |
parent | 04edde93cb22da676cf2e8473012742b63cebe55 (diff) |
cid#1474210 silence Untrusted divisor
m_nWidth is set to nOut + nIn + nDist so use that to better
show that there won't be a divide by zero m_nWidth
Change-Id: I67b56f5a55966c89e6edfab821f12852ceaa6f6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112885
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/borderline.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 08261ed7165f..9037eeba9015 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -459,7 +459,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderLineStyle nStyle, sal_uInt16 nOut // fdo#38542: not a known double, default to something custom... SetBorderLineStyle(nStyle); m_nWidth = nOut + nIn + nDist; - if (nOut + nIn + nDist) + if (m_nWidth) { m_aWidthImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST, |