[Libreoffice] cppcheck detects division by 0 in sw/source/ui/vba/vbarows.cxx

Julien Nabet serval2412 at yahoo.fr
Sat Aug 13 01:38:36 PDT 2011


Hello,

cppcheck detects division by 0 in sw/source/ui/vba/vbarows.cxx, line 266
I discussed this with Norbert on IRC, here what we propose to add before 
this line :

if ((nNewWidth <= 0) || (nWidth <= 0))
{
OSL_ASSERT(!((nNewWidth <= 0) || (nWidth <= 0)));
        return;
}

(we supposed "indent" could be negative).

Is this add ok ? (if yes, I can commit and push it on master).

Julien


More information about the LibreOffice mailing list