summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-10-30 00:00:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-10-30 00:05:59 +0000
commit4a11a47103fcbd7646234fc9565a409b8055507e (patch)
tree126503725e0272c5e2eba7556887576629035577 /editeng
parentce26903f7037c44a723716dfb38766ab9611c224 (diff)
trivial empty-init String::Fill -> comphelper::padToLength
Change-Id: I6c41b8f4d3ad739eff545063bd1f8fe8f4fba65e
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 854c4da9c941..8f20f76e4be2 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3487,7 +3487,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
aTmpFont.SetPhysFont( pOutDev );
long nCharWidth = aTmpFont.QuickGetTextSize( pOutDev,
rtl::OUString(pTextPortion->GetExtraValue()), 0, 1, NULL ).Width();
- long nChars = 2;
+ sal_Int32 nChars = 2;
if( nCharWidth )
nChars = pTextPortion->GetSize().Width() / nCharWidth;
if ( nChars < 2 )
@@ -3495,8 +3495,9 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
else if ( nChars == 2 )
nChars = 3; // looks better
- String aText;
- aText.Fill( (sal_uInt16)nChars, pTextPortion->GetExtraValue() );
+ rtl::OUStringBuffer aBuf;
+ comphelper::string::padToLength(aBuf, nChars, pTextPortion->GetExtraValue());
+ String aText(aBuf.makeStringAndClear());
aTmpFont.QuickDrawText( pOutDev, aTmpPos, aText, 0, aText.Len(), NULL );
pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText );