diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-30 00:00:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-30 00:05:59 +0000 |
commit | 4a11a47103fcbd7646234fc9565a409b8055507e (patch) | |
tree | 126503725e0272c5e2eba7556887576629035577 /xmloff | |
parent | ce26903f7037c44a723716dfb38766ab9611c224 (diff) |
trivial empty-init String::Fill -> comphelper::padToLength
Change-Id: I6c41b8f4d3ad739eff545063bd1f8fe8f4fba65e
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 6 |
2 files changed, 8 insertions, 8 deletions
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; } |