summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 839d77640da6..d41a9cf07e46 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -978,7 +978,7 @@ void ScFormulaCell::GetFormula( OUStringBuffer& rBuffer,
{
if( pCode->GetCodeError() != FormulaError::NONE && !pCode->GetLen() )
{
- rBuffer = OUStringBuffer( ScGlobal::GetErrorString( pCode->GetCodeError()));
+ rBuffer = ScGlobal::GetErrorString(pCode->GetCodeError());
return;
}
else if( cMatrixFlag == MM_REFERENCE )
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 94cbd8e844ff..64d2ff96ee02 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4449,7 +4449,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
::sax::Converter::convertColor(aBuffer, pFormatData->maPositiveColor.GetColor());
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_POSITIVE_COLOR, aBuffer.makeStringAndClear());
- aBuffer = OUStringBuffer();
+ aBuffer.truncate();
::sax::Converter::convertColor(aBuffer, pFormatData->maAxisColor.GetColor());
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_AXIS_COLOR, aBuffer.makeStringAndClear());
SvXMLElementExport aElementDataBar(*this, XML_NAMESPACE_CALC_EXT, XML_DATA_BAR, true, true);