diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-02 10:19:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-02 12:45:13 +0100 |
commit | 857a26eb173f9e0a2ac550da14812ba80500f114 (patch) | |
tree | a67413a880275a360a9d1ac693465c1d0e4163dd /sc | |
parent | 741dd512af5bd448c231cbd945e545cd79377858 (diff) |
XubString->OUString
Change-Id: I49d2d41ad4d5ee4ececf5a57eae070898e33075f
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/lotus/tool.cxx | 42 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 5 |
4 files changed, 25 insertions, 31 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index dfbf8da01dbe..db4d30e0673a 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -7639,8 +7639,7 @@ void ScInterpreter::ScCurrency() ScGlobal::eLnge); if ( (sal_uInt16) fDec != pFormatter->GetFormatPrecision( nIndex ) ) { - String sFormatString; - pFormatter->GenerateFormat(sFormatString, + String sFormatString = pFormatter->GenerateFormat( nIndex, ScGlobal::eLnge, true, // mit Tausenderpunkt @@ -7728,13 +7727,12 @@ void ScInterpreter::ScFixed() else fVal = floor(fVal*fFac+0.5)/fFac; Color* pColor = NULL; - String sFormatString; if (fDec < 0.0) fDec = 0.0; sal_uLong nIndex = pFormatter->GetStandardFormat( NUMBERFORMAT_NUMBER, ScGlobal::eLnge); - pFormatter->GenerateFormat(sFormatString, + String sFormatString = pFormatter->GenerateFormat( nIndex, ScGlobal::eLnge, bThousand, // mit Tausenderpunkt diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index 44bf49140a86..b1b3b2da5b89 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -209,8 +209,6 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) sal_uInt32 nHandle; NfIndexTableOffset eIndexTableOffset = NF_NUMERIC_START; sal_Bool bDefault = false; - //void GenerateFormat( aFormString, eType, COUNTRY_SYSTEM, LANGUAGE_SYSTEM, - // sal_Bool bThousand, sal_Bool IsRed, sal_uInt16 nPrecision, sal_uInt16 nAnzLeading ); if( nForm == 0xFF ) // Default-Format? nForm = nDefaultFormat; @@ -226,50 +224,50 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nL, 1); break; case 0x01: // Exponentdarstellung (scientific notation) //fExponent;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_SCIENTIFIC, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nL, 1); break; case 0x02: // Waehrungsdarstellung (currency) //fMoney;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_CURRENCY, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nL, 1); break; case 0x03: // Prozent //fPercent;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_PERCENT, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nL, 1); break; case 0x04: // Komma //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, sal_True, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, sal_True, false, nL, 1); break; case 0x05: // frei //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nL, 1); break; case 0x06: // frei //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nL, 1); nIndex1 = 0; break; case 0x07: // Spezialformat @@ -279,15 +277,15 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) //fStandard;nSt; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, sal_True, nSt, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, sal_True, nSt, 1); break; case 0x01: // generelles Format //fStandard;nSt; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nSt, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nSt, 1); break; case 0x02: // Datum: Tag, Monat, Jahr //fDate;dfDayMonthYearLong; @@ -362,8 +360,8 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); - pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, false, false, nL, 1 ); + aFormString = pFormTable->GenerateFormat(nIndex1, + eLanguage, false, false, nL, 1); nIndex1 = 0; break; } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 63330ba9e907..6453631f570a 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -282,8 +282,7 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales pOldEntry->GetFormatSpecialInfo(bThousand, bNegRed, nPrecision, nLeading); nPrecision = static_cast<sal_uInt16>(rScales[i]); - String aNewPicture; - pFormatter->GenerateFormat(aNewPicture, nOldFormat, eLang, + String aNewPicture = pFormatter->GenerateFormat(nOldFormat, eLang, bThousand, bNegRed, nPrecision, nLeading); sal_uInt32 nNewFormat = pFormatter->GetEntryKey(aNewPicture, eLang); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index f999b52d1a1e..b302d2ba9c66 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2724,9 +2724,8 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) if (!bError) { - String aNewPicture; - pFormatter->GenerateFormat( aNewPicture, nOldFormat, eLanguage, - bThousand, bNegRed, nPrecision, nLeading ); + String aNewPicture = pFormatter->GenerateFormat(nOldFormat, eLanguage, + bThousand, bNegRed, nPrecision, nLeading); nNewFormat = pFormatter->GetEntryKey( aNewPicture, eLanguage ); if ( nNewFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) |