summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/column.hxx3
-rw-r--r--sc/inc/document.hxx8
-rw-r--r--sc/inc/refupdatecontext.hxx14
-rw-r--r--sc/inc/table.hxx3
-rw-r--r--sc/inc/tokenarray.hxx12
5 files changed, 35 insertions, 5 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 0e4c1d72abb1..de2821451499 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -60,6 +60,7 @@ class CellValues;
struct RowSpan;
class RowHeightContext;
class CompileFormulaContext;
+struct SetFormulaDirtyContext;
}
@@ -330,7 +331,7 @@ public:
bool IsFormulaDirty( SCROW nRow ) const;
- void SetDirty();
+ void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
void SetDirty( SCROW nRow1, SCROW nRow2 );
void SetDirtyVar();
void SetDirtyAfterLoad();
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 82b4d2386dad..d8b4d7cdf7c6 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -75,6 +75,7 @@ class DocumentStreamAccess;
class DocumentLinkManager;
class CellValues;
class RowHeightContext;
+struct SetFormulaDirtyContext;
}
@@ -618,8 +619,9 @@ public:
void SetTabNameOnLoad(SCTAB nTab, const OUString& rName);
void InvalidateStreamOnSave();
- SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName,
- bool bExternalDocument = false );
+ SC_DLLPUBLIC bool InsertTab(
+ SCTAB nPos, const OUString& rName, bool bExternalDocument = false, bool bUndoDeleteTab = false );
+
SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
bool bExternalDocument = false, bool bNamesValid = false );
SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
@@ -977,7 +979,7 @@ public:
void ResetChanged( const ScRange& rRange );
- void SetDirty();
+ void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
void SetDirty( const ScRange& );
void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
void InterpretDirtyCells( const ScRangeList& rRanges );
diff --git a/sc/inc/refupdatecontext.hxx b/sc/inc/refupdatecontext.hxx
index c8e52d8acdf0..bd87792114ff 100644
--- a/sc/inc/refupdatecontext.hxx
+++ b/sc/inc/refupdatecontext.hxx
@@ -130,6 +130,20 @@ struct RefUpdateMoveTabContext
SCTAB getNewTab(SCTAB nOldTab) const;
};
+struct SetFormulaDirtyContext
+{
+ SCTAB mnTabDeletedStart;
+ SCTAB mnTabDeletedEnd;
+
+ /**
+ * When true, go through all reference tokens and clears "sheet deleted"
+ * flag if its corresponding index falls within specified sheet range.
+ */
+ bool mbClearTabDeletedFlag;
+
+ SetFormulaDirtyContext();
+};
+
}
#endif
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index fd8fbdd18253..8cf0fb1d6815 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -71,6 +71,7 @@ class DocumentStreamAccess;
class CellValues;
class RowHeightContext;
class CompileFormulaContext;
+struct SetFormulaDirtyContext;
}
@@ -512,7 +513,7 @@ public:
void ResetChanged( const ScRange& rRange );
- void SetDirty();
+ void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
void SetDirty( const ScRange& );
void SetDirtyAfterLoad();
void SetDirtyVar();
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index c151cdb906fa..312e63a5584a 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -168,6 +168,18 @@ public:
sc::RefUpdateResult AdjustReferenceOnMovedTab( sc::RefUpdateMoveTabContext& rCxt, const ScAddress& rOldPos );
+ /**
+ * Clear sheet deleted flag from internal reference tokens if the sheet
+ * index falls within specified range. Note that when a reference is on a
+ * sheet that's been deleted, its referenced sheet index retains the
+ * original index of the deleted sheet.
+ *
+ * @param rPos position of formula cell
+ * @param nStartTab index of first sheet, inclusive.
+ * @param nEndTab index of last sheet, inclusive.
+ */
+ void ClearTabDeleted( const ScAddress& rPos, SCTAB nStartTab, SCTAB nEndTab );
+
void CheckRelativeReferenceBounds(
const sc::RefUpdateContext& rCxt, const ScAddress& rPos, SCROW nGroupLen, std::vector<SCROW>& rBounds ) const;