summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-19 10:01:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-19 14:11:49 +0100
commit16bf6e9c5f82127a4e9201c39edc8925d8b4a235 (patch)
tree13628dc38f15f8ae0a1513b06c86288c077346e5 /cppcanvas
parent67d0936315837eca82b2e530cb7ea8ba833d7308 (diff)
use a temporary rather than calling Erase
Change-Id: I77c80d332e4bef34c31accf6e2ab77e59f9bf93e
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 0425189be46b..8c25ee505913 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -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 )