use a temporary rather than calling Erase
Change-Id: I77c80d332e4bef34c31accf6e2ab77e59f9bf93e
This commit is contained in:
parent
67d0936315
commit
16bf6e9c5f
1 changed files with 2 additions and 6 deletions
|
@ -1052,11 +1052,8 @@ namespace cppcanvas
|
|||
pChars[0] = '/';
|
||||
pChars[3]=pChars[2]=pChars[1]=pChars[0];
|
||||
|
||||
long nStrikeoutWidth = nWidth;
|
||||
String aStrikeoutTest(pChars, SAL_N_ELEMENTS(pChars));
|
||||
|
||||
nStrikeoutWidth = ( rParms.mrVDev.GetTextWidth( aStrikeoutTest ) + 2 ) / 4;
|
||||
aStrikeoutTest.Erase();
|
||||
long nStrikeoutWidth = (rParms.mrVDev.GetTextWidth(
|
||||
rtl::OUString(pChars, SAL_N_ELEMENTS(pChars))) + 2) / 4;
|
||||
|
||||
if( nStrikeoutWidth <= 0 )
|
||||
nStrikeoutWidth = 1;
|
||||
|
@ -1071,7 +1068,6 @@ namespace cppcanvas
|
|||
while( (nFullStrikeoutWidth+=nStrikeoutWidth ) < nMaxWidth+1 )
|
||||
aStrikeoutText += pChars[0];
|
||||
|
||||
|
||||
xub_StrLen nLen = aStrikeoutText.Len();
|
||||
|
||||
if( nLen )
|
||||
|
|
Loading…
Reference in a new issue