summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-25 12:47:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-25 20:19:10 +0100
commite95b80d9916b8eaf012c23b7f1abbc40e99e64fb (patch)
tree352353c9ce83776a1628f50085df70f2451d4bb7 /vcl
parent13ae10691d1362cc9a7b3438b1fa392f6e5517eb (diff)
coverity#735656 Division or modulo by zero
Change-Id: I846f5f10649e2f12bac763c87e88cd55135f3d00
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/lstbox.cxx2
1 files changed, 1 insertions, 1 deletions
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<sal_Unicode>('x')) );
+ float nCharWidth = approximate_char_width();
if ( !IsDropDownBox() )
{
Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel();