summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-12-18 13:26:48 +0100
committerAndras Timar <andras.timar@collabora.com>2015-01-08 15:09:36 +0100
commitb12c388492b9e69f7a9606e30b3a2232c5deb5ff (patch)
tree0573a7537155c6f774e47eedf79c4a169968d2c5 /sc
parente0504b17b930d8056820b14d469fee1d82b60a3f (diff)
Resolves: fdo#86978 append formula cells to track instead of tree
Cells in FormulaTree are assumed to be tracked already and their dependents be notified. Also postpone tracking until all listeners are established. (cherry picked from commit 573f5dfba805b733dd2da62bde3cd5d9d25879d9) Conflicts: sc/source/core/data/formulacell.cxx Change-Id: I7f27fba979fe231e3d3cd071fcc8a273142cb3f3 Reviewed-on: https://gerrit.libreoffice.org/13523 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit d210265a1b6c4d7b405ef6e79fd30395ca1bc0aa)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/core/data/formulacell.cxx9
2 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index f53426a0c979..af7d98f6c49f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3735,6 +3735,10 @@ void ScDocument::CompileXML()
if ( pValidationList )
pValidationList->CompileXML();
+ // Track all formula cells that were appended to the FormulaTrack during
+ // import or CompileXML().
+ TrackFormulas();
+
SetAutoCalc( bOldAutoCalc );
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 48e6760cae8f..da68f6832c75 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2033,7 +2033,14 @@ void ScFormulaCell::SetDirty( bool bDirtyFlag )
if( bDirtyFlag )
SetDirtyVar();
pDocument->AppendToFormulaTrack( this );
- pDocument->TrackFormulas();
+
+ // While loading a document listeners have not been established yet.
+ // Tracking would remove this cell from the FormulaTrack and add it to
+ // 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 (!pDocument->IsImportingXML())
+ pDocument->TrackFormulas();
}
}