summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 7cdf6279a8e5..1e66c879864f 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -197,11 +197,16 @@ 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 )
{
+ assert(!"stringizing any NaN will only give 'nan'");
+ /* FIXME: map nErrorCode to error string and call setErrorCell() above. */
+
OUStringBuffer aBuf;
aBuf.append('{');
aBuf.append(BiffHelper::calcDoubleFromError(nErrorCode));