summaryrefslogtreecommitdiff
path: root/cppcanvas/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-19 09:54:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-19 14:11:49 +0100
commitd531ef63a40c2cbfb02ae7c344bb292ddc7a02eb (patch)
tree9894432605763cf8062c9edce867d4cbad94adcb /cppcanvas/source
parent1a2549dcdd541cb40c30621faaaba2f69ff7efc3 (diff)
if the string is created from 4 sal_Unicodes then it cannot be of 0 len
Change-Id: I14695ec0871e186266770d7cfe90f532de31ea57
Diffstat (limited to 'cppcanvas/source')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 028aa0c7d33c..db41506aa80f 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1055,14 +1055,11 @@ namespace cppcanvas
long nStrikeoutWidth = nWidth;
String aStrikeoutTest( pChars, 4 );
- if( aStrikeoutTest.Len() )
- {
- nStrikeoutWidth = ( rParms.mrVDev.GetTextWidth( aStrikeoutTest ) + 2 ) / 4;
- aStrikeoutTest.Erase();
+ nStrikeoutWidth = ( rParms.mrVDev.GetTextWidth( aStrikeoutTest ) + 2 ) / 4;
+ aStrikeoutTest.Erase();
- if( nStrikeoutWidth <= 0 )
- nStrikeoutWidth = 1;
- }
+ if( nStrikeoutWidth <= 0 )
+ nStrikeoutWidth = 1;
long nMaxWidth = nStrikeoutWidth/2;
if ( nMaxWidth < 2 )