[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 22 09:38:32 UTC 2019


 sw/source/ui/vba/vbatablehelper.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 424021d16470905ac3af204841e7276c30db5fa3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 22 08:39:44 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 22 11:37:45 2019 +0200

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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 );


More information about the Libreoffice-commits mailing list