summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/sbx/sbxdate.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx3
-rw-r--r--editeng/source/items/flditem.cxx2
-rw-r--r--sc/source/core/data/table4.cxx8
-rw-r--r--sc/source/core/data/validat.cxx4
-rw-r--r--sc/source/core/tool/cellform.cxx8
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx4
-rw-r--r--sc/source/ui/formdlg/formula.cxx12
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx4
-rw-r--r--svl/source/numbers/numfmuno.cxx6
-rw-r--r--svtools/source/control/fmtfield.cxx15
-rw-r--r--svx/source/items/numfmtsh.cxx31
-rw-r--r--sw/source/core/fields/fldbas.cxx4
-rw-r--r--sw/source/core/table/swtable.cxx9
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx5
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx8
16 files changed, 40 insertions, 87 deletions
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 65d4940c7058..0ed08e79ef0a 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -313,9 +313,7 @@ start:
nIndex,
LANGUAGE_GERMAN,
eLangType );
- OUString aTmpString;
- pFormatter->GetOutputString( n, nIndex, aTmpString, &pColor );
- *p->pOUString = aTmpString;
+ pFormatter->GetOutputString( n, nIndex, *p->pOUString, &pColor );
delete pFormatter;
break;
}
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index c3b52f04eae7..7ec18a7dce6f 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -799,8 +799,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
aFormatter.PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType );
OUString aTime;
aFormatter.GetOutputString( nNumber, nIndex, aTime, &pCol );
- rRes += " ";
- rRes += aTime;
+ rRes += " " + aTime;
}
}
else
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 99f05750bb56..03fc0dae51b7 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -502,7 +502,7 @@ OUString SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumbe
double fDiffDate = aDate - *(rFormatter.GetNullDate());
OUString aStr;
- Color* pColor = NULL;
+ Color* pColor = NULL;
rFormatter.GetOutputString( fDiffDate, nFormatKey, aStr, &pColor );
return aStr;
}
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index d37620a91066..e44d3f276617 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -911,9 +911,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW
Color* pColor;
sal_uLong nNumFmt = GetNumberFormat( nSrcX, nSrcY );
- OUString sTmp(aValue);
- pDocument->GetFormatTable()->GetOutputString( nVal, nNumFmt, sTmp, &pColor );
- aValue = sTmp;
+ pDocument->GetFormatTable()->GetOutputString( nVal, nNumFmt, aValue, &pColor );
}
break;
// not for formulas
@@ -997,9 +995,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW
//! Zahlformat je nach Index holen?
Color* pColor;
sal_uLong nNumFmt = GetNumberFormat( nCol1, nRow1 );
- OUString sTmp(aValue);
- pDocument->GetFormatTable()->GetOutputString( nStart, nNumFmt, sTmp, &pColor );
- aValue = sTmp;
+ pDocument->GetFormatTable()->GetOutputString( nStart, nNumFmt, aValue, &pColor );
}
}
}
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 67de694e7778..5e684d2f787c 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -764,9 +764,7 @@ bool ScValidationData::GetSelectionFromFormula(
}
else
{
- OUString sTmp(aValStr);
- pFormatter->GetInputLineString( nMatVal.fVal, 0, sTmp );
- aValStr = sTmp;
+ pFormatter->GetInputLineString( nMatVal.fVal, 0, aValStr );
}
}
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 6a23ba238f05..7e9b2dc772f7 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -118,8 +118,8 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString
}
else
{
- OUString aCellString = pFCell->GetString().getString();
- rFormatter.GetOutputString( aCellString, nFormat, rString, ppColor, bUseStarFormat );
+ rFormatter.GetOutputString( pFCell->GetString().getString(),
+ nFormat, rString, ppColor, bUseStarFormat );
}
}
}
@@ -212,8 +212,8 @@ OUString ScCellFormat::GetString(
}
else
{
- OUString aCellString = pFCell->GetString().getString();
- rFormatter.GetOutputString(aCellString, nFormat, aString, ppColor, bUseStarFormat);
+ rFormatter.GetOutputString(pFCell->GetString().getString(),
+ nFormat, aString, ppColor, bUseStarFormat);
}
}
}
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 20595e6dc1f9..199772b66cdd 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -372,9 +372,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
pFormatter->GetFormatForLanguageIfBuiltIn(
nIndex, LANGUAGE_SYSTEM);
OSL_ENSURE( nNewIndex != nIndex, "ScEEImport::WriteToDocument: NumbersEnglishUS not a built-in format?");
- OUString sTemp(aStr);
- pFormatter->GetInputLineString( fEnVal, nNewIndex, sTemp);
- aStr = sTemp;
+ pFormatter->GetInputLineString( fEnVal, nNewIndex, aStr);
}
else
bTextFormat = true;
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 38b9f5bfe45d..fda461cd58fd 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -341,23 +341,17 @@ bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult
if ( pFCell->IsValue() )
{
double n = pFCell->GetValue();
- OUString sTempOut(rStrResult);
sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0,
pFCell->GetFormatType(), ScGlobal::eLnge );
-
aFormatter.GetOutputString( n, nFormat,
- sTempOut, &pColor );
- rStrResult = sTempOut;
+ rStrResult, &pColor );
}
else
{
- OUString aStr = pFCell->GetString().getString();
- OUString sTempOut(rStrResult);
sal_uLong nFormat = aFormatter.GetStandardFormat(
pFCell->GetFormatType(), ScGlobal::eLnge);
- aFormatter.GetOutputString( aStr, nFormat,
- sTempOut, &pColor );
- rStrResult = sTempOut;
+ aFormatter.GetOutputString( pFCell->GetString().getString(), nFormat,
+ rStrResult, &pColor );
}
ScRange aTestRange;
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 795cfdfc06ba..009b860ddd4c 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2731,7 +2731,6 @@ sal_Int32 ScChart2DataSequence::FillCacheFromExternalRef(const ScTokenRef& pToke
SvNumberFormatter* pFormatter = m_pDocument->GetFormatTable();
if (pFormatter)
{
- OUString aStr;
const double fVal = rItem.mfValue;
Color* pColor = NULL;
sal_uInt32 nFmt = 0;
@@ -2742,8 +2741,7 @@ sal_Int32 ScChart2DataSequence::FillCacheFromExternalRef(const ScTokenRef& pToke
SCROW nRow = aRange.aStart.Row() + static_cast<SCROW>(nR);
pTable->getCell(nCol, nRow, &nFmt);
}
- pFormatter->GetOutputString(fVal, nFmt, aStr, &pColor);
- rItem.maString = aStr;
+ pFormatter->GetOutputString(fVal, nFmt, rItem.maString, &pColor);
}
}
else if (pMat->IsString(nC, nR))
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 3b36695b18db..066ae284412e 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -243,9 +243,8 @@ OUString SAL_CALL SvNumberFormatterServiceObj::formatString( sal_Int32 nKey,
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
- OUString aTemp = aString;
Color* pColor = NULL;
- pFormatter->GetOutputString(aTemp, nKey, aRet, &pColor);
+ pFormatter->GetOutputString(aString, nKey, aRet, &pColor);
}
else
{
@@ -265,10 +264,9 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
- OUString aTemp = aString;
OUString aStr;
Color* pColor = NULL;
- pFormatter->GetOutputString(aTemp, nKey, aStr, &pColor);
+ pFormatter->GetOutputString(aString, nKey, aStr, &pColor);
if (pColor)
{
nRet = pColor->GetColor();
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index b422d0c13080..67049c804bd5 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -382,11 +382,10 @@ void FormattedField::SetTextFormatted(const OUString& rStr)
}
else
{
- OUString sTempIn(m_sCurrentTextValue);
- OUString sTempOut(sFormatted);
- ImplGetFormatter()->GetOutputString(sTempIn, m_nFormatKey, sTempOut, &m_pLastOutputColor);
- m_sCurrentTextValue = sTempIn;
- sFormatted = sTempOut;
+ ImplGetFormatter()->GetOutputString(m_sCurrentTextValue,
+ m_nFormatKey,
+ sFormatted,
+ &m_pLastOutputColor);
}
// calculate the new selection
@@ -913,10 +912,8 @@ void FormattedField::ImplSetValue(double dVal, sal_Bool bForce)
// first convert the number as string in standard format
OUString sTemp;
ImplGetFormatter()->GetOutputString(dVal, 0, sTemp, &m_pLastOutputColor);
- // than encode the string in the corresponding text format
- {
- ImplGetFormatter()->GetOutputString(sTemp, m_nFormatKey, sNewText, &m_pLastOutputColor);
- }
+ // then encode the string in the corresponding text format
+ ImplGetFormatter()->GetOutputString(sTemp, m_nFormatKey, sNewText, &m_pLastOutputColor);
}
else
{
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 7fbaae33a857..402f03fb0cab 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -429,11 +429,8 @@ void SvxNumberFormatShell::MakePreviewString( const OUString& rFormatStr,
if ( nExistingFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
{
// real preview - not implemented in NumberFormatter for text formats
- OUString sTempOut(rPreviewStr);
-
- pFormatter->GetPreviewString( rFormatStr, nValNum, sTempOut,
+ pFormatter->GetPreviewString( rFormatStr, nValNum, rPreviewStr,
&rpFontColor, eCurLanguage, bUseStarFormat );
- rPreviewStr = sTempOut;
}
else
{
@@ -444,19 +441,13 @@ void SvxNumberFormatShell::MakePreviewString( const OUString& rFormatStr,
( !aValStr.isEmpty() && ( pFormatter->GetType(nExistingFormat) & NUMBERFORMAT_TEXT ) ) );
if ( bUseText )
{
- OUString sTempIn(aValStr);
- OUString sTempOut(rPreviewStr);
- pFormatter->GetOutputString( sTempIn, nExistingFormat,
- sTempOut, &rpFontColor );
- aValStr = sTempIn;
- rPreviewStr = sTempOut;
+ pFormatter->GetOutputString( aValStr, nExistingFormat,
+ rPreviewStr, &rpFontColor );
}
else
{
- OUString sTemp(rPreviewStr);
pFormatter->GetOutputString( nValNum, nExistingFormat,
- sTemp, &rpFontColor, bUseStarFormat );
- rPreviewStr = sTemp;
+ rPreviewStr, &rpFontColor, bUseStarFormat );
}
}
}
@@ -1134,17 +1125,11 @@ void SvxNumberFormatShell::GetPreviewString_Impl( OUString& rString, Color*& rpC
if ( bUseText )
{
- OUString sTempIn(aValStr);
- OUString sTempOut(rString);
- pFormatter->GetOutputString( sTempIn, nCurFormatKey, sTempOut, &rpColor );
- aValStr = sTempIn;
- rString = sTempOut;
+ pFormatter->GetOutputString( aValStr, nCurFormatKey, rString, &rpColor );
}
else
{
- OUString sTemp(rString);
- pFormatter->GetOutputString( nValNum, nCurFormatKey, sTemp, &rpColor, bUseStarFormat );
- rString = sTemp;
+ pFormatter->GetOutputString( nValNum, nCurFormatKey, rString, &rpColor, bUseStarFormat );
}
}
@@ -1246,9 +1231,7 @@ void SvxNumberFormatShell::MakePrevStringFromVal(
double nValue)
{
rpFontColor = NULL;
- OUString sTempOut(rPreviewStr);
- pFormatter->GetPreviewString( rFormatStr, nValue, sTempOut, &rpFontColor, eCurLanguage );
- rPreviewStr = sTempOut;
+ pFormatter->GetPreviewString( rFormatStr, nValue, rPreviewStr, &rpFontColor, eCurLanguage );
}
/*************************************************************************
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 553b1eca375f..1931d821c4ac 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -478,8 +478,8 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
if( pFormatter->IsTextFormat( nFmt ) )
{
- OUString sTempIn(DoubleToString(rVal, nFmtLng));
- pFormatter->GetOutputString(sTempIn, nFmt, sExpand, &pCol);
+ pFormatter->GetOutputString(DoubleToString(rVal, nFmtLng), nFmt,
+ sExpand, &pCol);
}
else
{
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 25ed11ef4de2..11c316152743 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2142,12 +2142,9 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
if( NUMBERFORMAT_TEXT != nFmt )
{
// special text format:
- OUString sTmp, sTxt( pTNd->GetTxt() );
- OUString sTempIn(sTxt);
- OUString sTempOut;
- pDoc->GetNumberFormatter()->GetOutputString( sTempIn, nFmt, sTempOut, &pCol );
- sTxt = sTempIn;
- sTmp = sTempOut;
+ OUString sTmp;
+ const OUString sTxt( pTNd->GetTxt() );
+ pDoc->GetNumberFormatter()->GetOutputString( sTxt, nFmt, sTmp, &pCol );
if( sTxt != sTmp )
{
// exchange text
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 42ebd324a9eb..3460d3362b1a 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1634,10 +1634,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
pNumFormatter->GetOutputString( aDateDiff.GetDate(), nFormat, sDate, &pColor );
// The title should consist of the author and the date:
- OUString sTitle( pField->GetPar1() );
- sTitle += ", ";
- sTitle += sDate;
- aNote.Title = sTitle;
+ aNote.Title = pField->GetPar1() + ", " + sDate;
// Guess what the contents contains...
aNote.Contents = pField->GetTxt();
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index 6ec8700f3999..99427622e656 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -234,8 +234,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
else if( nFormatType == NUMBERFORMAT_TEXT )
{
- OUString sTxt("\"ABC\"");
- pFormatter->GetOutputString( sTxt, nFormat, sValue, &pCol);
+ pFormatter->GetOutputString( "\"ABC\"", nFormat, sValue, &pCol);
}
if (nFormat != nSysNumFmt &&
@@ -309,11 +308,12 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
if (nType == NUMBERFORMAT_TEXT)
{
- OUString sTxt("\"ABC\"");
- pFormatter->GetOutputString(sTxt, nDefFmt, sValue, &pCol);
+ pFormatter->GetOutputString("\"ABC\"", nDefFmt, sValue, &pCol);
}
else
+ {
pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol);
+ }
sal_uInt16 nPos = 0;
while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)