summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-09 11:13:10 +0100
committerAndras Timar <andras.timar@collabora.com>2014-10-15 08:22:43 +0000
commit33028a6362527537899f92eb5f1ca77ea2198544 (patch)
tree6f5d55d05de4164b99db5b164421c6056c89cb3b
parent46243f91d867708b69b8106ef51c9991f0228e6b (diff)
Resolves: fdo#84809 crash when button is too short for text
regression from 4c539fac018dfd44cd8db52161a8cb930c627da7 commit 4c539fac018dfd44cd8db52161a8cb930c627da7 Date: Tue Dec 17 05:18:35 2013 -0600 vcl get rid of xub_StrLen and STRING_LEN in outdev3 before this there was a dubious cast which hid the problem Change-Id: I7c01c0f0ac211196a62acaf02297f29ae829403d (cherry picked from commit 3144b8deaf8397d719b7ad7a56b309655a53d90a) Reviewed-on: https://gerrit.libreoffice.org/11871 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit b3e96abc32623891a7147c9f8fa6477ffcddd643) Reviewed-on: https://gerrit.libreoffice.org/11943 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--vcl/source/outdev/text.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index b7bb028d2963..e426368a5bb7 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1496,7 +1496,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
long nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout );
nLines = (sal_Int32)(nHeight/nTextHeight);
nFormatLines = aMultiLineInfo.Count();
- if ( !nLines )
+ if (nLines <= 0)
nLines = 1;
if ( nFormatLines > nLines )
{