From 67d0936315837eca82b2e530cb7ea8ba833d7308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 19 Jun 2012 09:59:34 +0100 Subject: [PATCH] where is the logic of having 5 pChars if we only need 4 Change-Id: I16c1f5ee7a05aa011d00e6f1de86e1aa5d9621b8 --- cppcanvas/source/mtfrenderer/implrenderer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index bf2c0d58dee3..0425189be46b 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -1045,7 +1045,7 @@ namespace cppcanvas { long nWidth = rParms.mrVDev.GetTextWidth( rString,nIndex,nLength ); - xub_Unicode pChars[5]; + xub_Unicode pChars[4]; if ( rState.textStrikeoutStyle == STRIKEOUT_X ) pChars[0] = 'X'; else @@ -1053,7 +1053,7 @@ namespace cppcanvas pChars[3]=pChars[2]=pChars[1]=pChars[0]; long nStrikeoutWidth = nWidth; - String aStrikeoutTest( pChars, 4 ); + String aStrikeoutTest(pChars, SAL_N_ELEMENTS(pChars)); nStrikeoutWidth = ( rParms.mrVDev.GetTextWidth( aStrikeoutTest ) + 2 ) / 4; aStrikeoutTest.Erase();