summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-03-18 12:27:09 +0100
committerEike Rathke <erack@redhat.com>2016-03-18 12:29:52 +0100
commit090de0e963fd3b0c7c4f8db4124b71b0fd92f61f (patch)
tree05d2eb87dc4e8e31bad43e9f6cd90e5d52ed09b4 /sc/inc
parent9ebe054ddb2d938b24ca4688be9bcbc62745f67f (diff)
let FindRangeNamesInUse() collect also sheet-local names, tdf#96915 related
... though CopyRangeNamesToClip()/copyUsedNamesToClip() don't handle them yet. Change-Id: I570c13725ed6448688d1a2ce877f8bc1d1ff9916
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/column.hxx2
-rw-r--r--sc/inc/formulacell.hxx3
-rw-r--r--sc/inc/refupdatecontext.hxx13
-rw-r--r--sc/inc/table.hxx2
4 files changed, 13 insertions, 7 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 62009ca46d4a..38e49b64b006 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -418,7 +418,7 @@ public:
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
void SetTabNo(SCTAB nNewTab);
- void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, std::set<sal_uInt16>& rIndexes) const;
+ void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames& rIndexes) const;
void PreprocessRangeNameUpdate(
sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index d2c8c70d19fb..2d4c0476d230 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -46,6 +46,7 @@ struct RefUpdateDeleteTabContext;
struct RefUpdateMoveTabContext;
class CompileFormulaContext;
class FormulaGroupAreaListener;
+class UpdatedRangeNames;
}
@@ -276,7 +277,7 @@ public:
void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo );
bool TestTabRefAbs(SCTAB nTable);
void UpdateCompile( bool bForceIfNameInUse = false );
- void FindRangeNamesInUse(std::set<sal_uInt16>& rIndexes) const;
+ void FindRangeNamesInUse(sc::UpdatedRangeNames& rIndexes) const;
bool IsSubTotal() const { return bSubTotal;}
bool IsChanged() const { return bChanged;}
void SetChanged(bool b);
diff --git a/sc/inc/refupdatecontext.hxx b/sc/inc/refupdatecontext.hxx
index bee194c457e8..272c3a23e4a2 100644
--- a/sc/inc/refupdatecontext.hxx
+++ b/sc/inc/refupdatecontext.hxx
@@ -24,17 +24,22 @@ namespace sc {
/**
* Keep track of all named expressions that have been updated during
* reference update.
+ *
+ * Can also be used to collect any set of named expressions / ranges.
*/
class UpdatedRangeNames
{
+public:
typedef std::unordered_set<sal_uInt16> NameIndicesType;
- typedef std::unordered_map<SCTAB, NameIndicesType> UpdatedNamesType;
-
- UpdatedNamesType maUpdatedNames;
-public:
void setUpdatedName(SCTAB nTab, sal_uInt16 nIndex);
bool isNameUpdated(SCTAB nTab, sal_uInt16 nIndex) const;
+ NameIndicesType getUpdatedNames(SCTAB nTab) const;
+
+private:
+ typedef std::unordered_map<SCTAB, NameIndicesType> UpdatedNamesType;
+
+ UpdatedNamesType maUpdatedNames;
};
/**
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 95d3225c985e..31b277f9e2d8 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -565,7 +565,7 @@ public:
void UpdateCompile( bool bForceIfNameInUse = false );
void SetTabNo(SCTAB nNewTab);
void FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- std::set<sal_uInt16>& rIndexes) const;
+ sc::UpdatedRangeNames& rIndexes) const;
void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
double nStepValue, double nMaxValue, ScProgress* pProgress);