diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-21 15:07:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-21 17:05:31 +0000 |
commit | bbe3053d4bf867f4f3a12f1a3efdb8df8520078d (patch) | |
tree | de384decb3693b07a2564f311ef907c104e60b36 /sc/source/ui/view/output2.cxx | |
parent | d420d9afb4527fd22dd0ae286b615beaddfc853f (diff) |
coverity#1399019 Division or modulo by zero
Change-Id: I0f21612effa91a6c9e7e0a48c46dde88c4b34b94
Diffstat (limited to 'sc/source/ui/view/output2.cxx')
-rw-r--r-- | sc/source/ui/view/output2.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index ce51ee47bf0f..3f20cd191c65 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -621,6 +621,9 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth return; long nMaxDigit = GetMaxDigitWidth(); + if (!nMaxDigit) + return; + sal_uInt16 nNumDigits = static_cast<sal_uInt16>(nWidth / nMaxDigit); { OUString sTempOut(aString); |