diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-22 08:39:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-22 11:37:45 +0200 |
commit | 424021d16470905ac3af204841e7276c30db5fa3 (patch) | |
tree | 180ac464a27810c524d33b451c64eab64108390d /sw/source/ui/vba | |
parent | d96b67bb33ee5736e298dd708dd5d96f83f646e4 (diff) |
cid#1448270 Division or modulo by float zero
Change-Id: I51941c60fca8d9d989fd414bff917504896f7451
Reviewed-on: https://gerrit.libreoffice.org/76094
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/vba')
-rw-r--r-- | sw/source/ui/vba/vbatablehelper.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 1533f3fb3949..406e92cc536c 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -234,6 +234,8 @@ void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 { double dAbsWidth = Millimeter::getInHundredthsOfOneMillimeter( _width ); sal_Int32 nTableWidth = getTableWidth( ); + if (!nTableWidth) + throw uno::RuntimeException(); sal_Int32 nNewWidth = dAbsWidth/nTableWidth * UNO_TABLE_COLUMN_SUM; SwTableBox* pStart = GetTabBox( nCol, nRow ); |