summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/sheetdatabuffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/oox/sheetdatabuffer.cxx')
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index b3963df1ec09..eaab100ed52d 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -209,18 +209,14 @@ void SheetDataBuffer::setBooleanCell( const CellModel& rModel, bool bValue )
void SheetDataBuffer::setErrorCell( const CellModel& rModel, const OUString& rErrorCode )
{
- setErrorCell( rModel, getUnitConverter().calcBiffErrorCode( rErrorCode ) );
+ // Using the formula compiler now we can simply pass on the error string.
+ getFormulaBuffer().setCellFormula( rModel.maCellAddr, rErrorCode);
+ setCellFormat( rModel );
}
void SheetDataBuffer::setErrorCell( const CellModel& rModel, sal_uInt8 nErrorCode )
{
- OUStringBuffer aBuf;
- aBuf.append('{');
- aBuf.append(BiffHelper::calcDoubleFromError(nErrorCode));
- aBuf.append('}');
-
- getFormulaBuffer().setCellFormula(rModel.maCellAddr, aBuf.makeStringAndClear());
- setCellFormat( rModel );
+ setErrorCell( rModel, getUnitConverter().calcErrorString( nErrorCode));
}
void SheetDataBuffer::setDateCell( const CellModel& rModel, const OUString& rDateString )