summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-09-07 12:31:09 +0200
committerEike Rathke <erack@redhat.com>2015-09-07 14:23:13 +0200
commit8e230d5d874cfe4f9def61b67b4b24ab2389bc01 (patch)
tree5d690a1de17e2a18080330940d372b1d80d7d09c /sc
parentbe1585dd847cf377da14b29be81934464ea6c403 (diff)
TableRef: introduce InvalidateTableColumnNames()
Change-Id: I3dcefc3ba55c33f9cfef6ff4bf9aa2242a866c14
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/dbdata.hxx1
-rw-r--r--sc/source/core/tool/dbdata.cxx17
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 9785873db257..5812365a7eb9 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -221,6 +221,7 @@ private:
void AdjustTableColumnNames( UpdateRefMode eUpdateRefMode, SCCOL nDx, SCCOL nCol1,
SCCOL nOldCol1, SCCOL nOldCol2, SCCOL nNewCol1, SCCOL nNewCol2 );
+ void InvalidateTableColumnNames();
};
class SC_DLLPUBLIC ScDBCollection
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 50626bdfee3f..95439efdfdfc 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -719,6 +719,23 @@ void ScDBData::AdjustTableColumnNames( UpdateRefMode eUpdateRefMode, SCCOL nDx,
mbTableColumnNamesDirty = true;
}
+void ScDBData::InvalidateTableColumnNames()
+{
+ mbTableColumnNamesDirty = true;
+ if (mpContainer)
+ {
+ // Add header range to dirty list.
+ if (HasHeader())
+ mpContainer->GetDirtyTableColumnNames().Join( GetHeaderArea());
+ else
+ {
+ // We need *some* range in the dirty list even without header area,
+ // otherwise the container would not attempt to call a refresh.
+ mpContainer->GetDirtyTableColumnNames().Join( ScRange( nStartCol, nStartRow, nTable));
+ }
+ }
+}
+
namespace {
class TableColumnNameSearch : public unary_function<ScDBData, bool>
{