sc/source/filter/xml/xmlcelli.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
New commits: commit 4d9bf254804138424421744edc5cf308cfb97042 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Tue Sep 25 19:53:26 2012 -0400 Leave the formula cell dirty when a cached result is not given. This sometimes is the case especially with hand-crafted flat ODS. Change-Id: I0db374e424b250bcded526149ed2c27aabc3d722 diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 3b6ca50..f82738c 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -135,6 +135,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, bSolarMutexLocked(false), bFormulaTextResult(false) { + rtl::math::setNan(&fValue); // NaN by default + rXMLImport.SetRemoveLastChar(false); rXMLImport.GetTables().AddColumn(bTempIsCovered); const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -732,10 +734,17 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const if(pFCell) { if( bFormulaTextResult && pOUTextValue ) + { pFCell->SetHybridString( *pOUTextValue ); - else - pFCell->SetHybridDouble( fValue ); - pFCell->ResetDirty(); + pFCell->ResetDirty(); + } + else if (!rtl::math::isNan(fValue)) + { + pFCell->SetHybridDouble(fValue); + pFCell->ResetDirty(); + } + + // Leave the cell dirty when the cached result is not given. } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits