diff options
author | Eike Rathke <erack@redhat.com> | 2023-02-23 01:22:16 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2023-02-23 01:33:48 +0000 |
commit | 05ac57f85eb622b798719db03bbdd07b79e1703a (patch) | |
tree | 3b1c11568d722d0aefd98a3e47d94be04b06abbd /sc/source/core | |
parent | e5a744851cb58da1ceeef623799274d73b60b030 (diff) |
Resolves: tdf#153767 Try harder to import OOXML bool shared formula result
... by setting the result value or if necessary recalculating even if
AutoCalc is turned off for the document. Similar for other implicitly
recalculating formula types.
Also set a boolean number format if none.
Change-Id: I2f75735707180eccf4b2c525738ac0b763901230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147425
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 143b27579a83..0e2840284ec5 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2331,6 +2331,8 @@ void ScFormulaCell::InterpretTail( ScInterpreterContext& rContext, ScInterpretTa OSL_ENSURE( pCode->GetCodeError() != FormulaError::NONE, "no RPN code and no errors ?!?!" ); ResetDirty(); } + + pCode->ClearRecalcModeMustAfterImport(); } void ScFormulaCell::HandleStuffAfterParallelCalculation(ScInterpreter* pInterpreter) @@ -2546,7 +2548,7 @@ void ScFormulaCell::SetDirty( bool bDirtyFlag ) // the FormulaTree, once in there it would be assumed that its // dependents already had been tracked and it would be skipped on a // subsequent notify. Postpone tracking until all listeners are set. - if (!rDocument.IsImportingXML()) + if (!rDocument.IsImportingXML() && !rDocument.IsInsertingFromOtherDoc()) rDocument.TrackFormulas(); } @@ -2647,10 +2649,6 @@ void ScFormulaCell::AddRecalcMode( ScRecalcMode nBits ) { if ( (nBits & ScRecalcMode::EMask) != ScRecalcMode::NORMAL ) SetDirtyVar(); - if ( nBits & ScRecalcMode::ONLOAD_ONCE ) - { // OnLoadOnce is used only to set Dirty after filter import. - nBits = (nBits & ~ScRecalcMode::EMask) | ScRecalcMode::NORMAL; - } pCode->AddRecalcMode( nBits ); } |