From e95b80d9916b8eaf012c23b7f1abbc40e99e64fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 25 Apr 2014 12:47:50 +0100 Subject: [PATCH] coverity#735656 Division or modulo by zero Change-Id: I846f5f10649e2f12bac763c87e88cd55135f3d00 --- vcl/source/control/lstbox.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index a166de61837c..27e5d5e00feb 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -1347,7 +1347,7 @@ Size ListBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const void ListBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const { - long nCharWidth = GetTextWidth( OUString(static_cast('x')) ); + float nCharWidth = approximate_char_width(); if ( !IsDropDownBox() ) { Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel();