diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/cell.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index c4846c092d25..6ab3d2d1c01a 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -1099,6 +1099,10 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress ) // (for macro warning, CompileXML is called at the end of loading XML file) if ( !pDocument->GetHasMacroFunc() && pCode->HasOpCodeRPN( ocMacro ) ) pDocument->SetHasMacroFunc( true ); + + //volatile cells must be added here for import + if( pCode->IsRecalcModeAlways() ) + pDocument->PutInFormulaTree(this); } diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index c1b7a8516c35..e3ab4167e652 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -749,8 +749,7 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const pFCell->SetHybridString( *pOUTextValue ); else pFCell->SetHybridDouble( fValue ); - if( !pFCell->GetCode()->IsRecalcModeAlways() ) - pFCell->ResetDirty(); + pFCell->ResetDirty(); } } @@ -773,8 +772,7 @@ void ScXMLTableRowCellContext::AddTextCellToDoc( const ScAddress& rCurrentPos, pFCell->SetHybridString( *pOUText ); else bDoIncrement = false; - if( !pFCell->GetCode()->IsRecalcModeAlways() ) - pFCell->ResetDirty(); + pFCell->ResetDirty(); } } else diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 752367c2ce3f..5f7b82864006 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -437,6 +437,8 @@ sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::un rtl::OUString sGenerator(xDocProps->getGenerator()); if(sGenerator.indexOf(SC_LIBO_PROD_NAME) == -1) DoHardRecalc(false); + else //still need to recalc volatile formula cells + DoRecalc(false); aDocument.SetXMLFromWrapper( false ); AfterXMLLoading(bRet); |