Kaydet (Commit) 4d9bf254 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

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
üst f1fcf028
......@@ -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.
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment