summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/sheetdatabuffer.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-12-16 01:37:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-07 13:21:38 +0000
commit1fc1d0d7d38bb16832d0d78d78682ed2d5f8716f (patch)
treea5f132f34c03ca47d4fc2ec58bd01cfdeba92fb7 /sc/source/filter/oox/sheetdatabuffer.cxx
parentf303896706144cd25aa907805db6ca8bf338bb13 (diff)
fdo#79249 call formula compiler with error string libreoffice-4-2
... instead of attempting to stringize a NaN coded error value. Regression introduced with 30a20743ae17e6e02183a65603d38968253b3ffb (cherry picked from commit 994607b55104b9ae4554554c13b001b8d5d513b6) construct grouped ScFormulaCell with bDirty=true, fdo#79249 related Noticed when loading https://bugs.freedesktop.org/attachment.cgi?id=99844 with fdo#79249 fix where oox::xls::applyCellFormulas() groups the consecutive =#N/A formulas. Only A1 result was displayed, other cells were displayed empty. (cherry picked from commit a1dc5e97da273bf35d58d54e625149022569a993) correct error string, #N/A instead of #NA (cherry picked from commit 758755e31b3d9e1ed2eab522d4794282178346ac) implement an actually working setErrorCell() from BIFF error codes (cherry picked from commit ca9a81b2ca858b82e863e1e6f917928916fea79e) Change-Id: Ia7a8ca39938820ac75db169404446fa696c6ee1b 3a541f74d3d25e1515a1c6d47f02ec6a8e817c93 15019072b6e812b9ffe29d3ee6afacd9ab526948 67b8fc324779875ba14e2d69204c40fe27cc180e Reviewed-on: https://gerrit.libreoffice.org/13492 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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 )