summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-12-16 01:37:31 +0100
committerEike Rathke <erack@redhat.com>2014-12-16 02:02:14 +0100
commit994607b55104b9ae4554554c13b001b8d5d513b6 (patch)
tree850c532517c348dbcb4d0edf0be2f8d8f1c97032
parent3e17677f705d004ebb87d1268d640da1a1c8cdf4 (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
-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));