summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorMike Kaganski <mikekaganski@hotmail.com>2015-06-04 06:47:38 +1000
committerMichael Meeks <michael.meeks@collabora.com>2015-06-11 20:02:50 +0000
commitbc00e475d45c0e0cf44dc46c67308c152a2b3f70 (patch)
tree67a6d177e9d88fb492ad50c0650de20a4f51c1f0 /sc/inc
parent55e214ebe1a20e36a58cb7b0ea99f1e0ed83ee33 (diff)
tdf#89972: also copy external reference status
fixes regression from commit 4467c67dc8bf17c67c70985c0d0ea64636884f9f, where the new optimized code path failed to properly register ScFormulaCell with ScExternalRefManager. Introduces a new public method in ScExternalRefManager: insertRefCellAsTmpl that registers a formula cell to listen to the same external references as template cell Introduces new property to ScFormulaCell: mbIsExtRef that indicates that some external references are referenced by this cell Change-Id: Iee07d7b51949fd31953b5fa662a213052eb85181 Reviewed-on: https://gerrit.libreoffice.org/16066 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 17282387d650e843e0f5a28611d91597ccd09970) Reviewed-on: https://gerrit.libreoffice.org/16219 Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/externalrefmgr.hxx7
-rw-r--r--sc/inc/formulacell.hxx3
2 files changed, 10 insertions, 0 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 9af6eef3765d..1105136a4c04 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -701,6 +701,12 @@ public:
bool containsUnsavedReferences() const { return !maUnsavedDocShells.empty(); }
void insertRefCell(sal_uInt16 nFileId, const ScAddress& rCell);
+ /**
+ * Add a cell to reference the same files as the template cell.
+ */
+ void insertRefCellFromTemplate( ScFormulaCell* pTemplateCell, ScFormulaCell* pCell );
+
+ bool hasCellExternalReference(const ScAddress& rCell);
void enableDocTimer( bool bEnable );
@@ -790,6 +796,7 @@ private:
*/
void transformUnsavedRefToSavedRef( SfxObjectShell* pShell );
+ void insertRefCell(RefCellMap::iterator& itr, ScFormulaCell* pCell);
private:
ScDocument* mpDoc;
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 8e84e00e4898..66f4c9b03cc5 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -143,6 +143,7 @@ private:
bool bNeedListening : 1; // Listeners need to be re-established after UpdateReference
bool mbNeedsNumberFormat : 1; // set the calculated number format as hard number format
bool mbPostponedDirty : 1; // if cell needs to be set dirty later
+ bool mbIsExtRef : 1; // has references in ScExternalRefManager; never cleared after set
enum ScInterpretTailParameter
{
@@ -426,6 +427,8 @@ public:
void SyncSharedCode();
bool IsPostponedDirty() const { return mbPostponedDirty;}
+
+ void SetIsExtRef() { mbIsExtRef = true; }
};
#endif