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, ...@@ -135,6 +135,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
bSolarMutexLocked(false), bSolarMutexLocked(false),
bFormulaTextResult(false) bFormulaTextResult(false)
{ {
rtl::math::setNan(&fValue); // NaN by default
rXMLImport.SetRemoveLastChar(false); rXMLImport.SetRemoveLastChar(false);
rXMLImport.GetTables().AddColumn(bTempIsCovered); rXMLImport.GetTables().AddColumn(bTempIsCovered);
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
...@@ -732,11 +734,18 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const ...@@ -732,11 +734,18 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const
if(pFCell) if(pFCell)
{ {
if( bFormulaTextResult && pOUTextValue ) if( bFormulaTextResult && pOUTextValue )
{
pFCell->SetHybridString( *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.
}
} }
void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos, void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos,
......
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