diff options
author | Eike Rathke <erack@redhat.com> | 2014-12-16 01:37:31 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-12-16 02:29:11 +0100 |
commit | ce2c2affdff3eb2616638eddae7334eba43d5b4a (patch) | |
tree | 2d7ef9df2bb3978e4763d060dfb42844cd997901 | |
parent | 9e1ce14754939800d15f3510ebb12342d1da9936 (diff) |
fdo#79249 call formula compiler with error string
... instead of attempting to stringize a NaN coded error value.
Regression introduced with 30a20743ae17e6e02183a65603d38968253b3ffb
Change-Id: Ia7a8ca39938820ac75db169404446fa696c6ee1b
(cherry picked from commit 994607b55104b9ae4554554c13b001b8d5d513b6)
-rw-r--r-- | sc/source/filter/oox/sheetdatabuffer.cxx | 7 |
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)); |