From 4a11a47103fcbd7646234fc9565a409b8055507e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 30 Oct 2012 00:00:51 +0000 Subject: trivial empty-init String::Fill -> comphelper::padToLength Change-Id: I6c41b8f4d3ad739eff545063bd1f8fe8f4fba65e --- xmloff/source/style/xmlnumfe.cxx | 10 +++++----- xmloff/source/style/xmlnumfi.cxx | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'xmloff/source') diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index aef97f500b51..d2c1782890fa 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1396,12 +1396,12 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt // string for decimal replacement // has to be taken from nPrecision // (positive number even for automatic decimals) - String sDashStr; - if ( bDecDashes && nPrecision > 0 ) - sDashStr.Fill( nPrecision, '-' ); + OUStringBuffer sDashStr; + if (bDecDashes && nPrecision > 0) + comphelper::string::padToLength(sDashStr, nPrecision, '-'); - WriteNumberElement_Impl( nDecimals, nInteger, sDashStr, bVarDecimals, - bThousand, nTrailingThousands, aEmbeddedEntries ); + WriteNumberElement_Impl(nDecimals, nInteger, sDashStr.makeStringAndClear(), + bVarDecimals, bThousand, nTrailingThousands, aEmbeddedEntries); bAnyContent = sal_True; } break; diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index fb126139fa8e..db08434b6e7a 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1795,9 +1795,9 @@ void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo ) // (there always has to be a digit before the leftmost embedded text) xub_StrLen nAddCount = (xub_StrLen)nLastFormatPos + 1 - nZeroPos; - String aDigitStr; - aDigitStr.Fill( nAddCount, (sal_Unicode)'#' ); - aNumStr.Insert( aDigitStr, 0 ); + OUStringBuffer aDigitStr; + comphelper::string::padToLength(aDigitStr, nAddCount, (sal_Unicode)'#'); + aNumStr.Insert(aDigitStr.makeStringAndClear(), 0); nZeroPos = nZeroPos + nAddCount; } -- cgit