From 0d5645f4fa069677b404899f126bd57e3035fd9b Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 4 Sep 2015 20:07:16 +0200 Subject: TableRef: add an initial dirty range for newly inserted ScDBData ... so table column names get updated in the next run. Change-Id: I998d610a3df14fb80b6222fd1a5b61847810a722 --- sc/source/core/tool/dbdata.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sc') diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 1b98b0050884..252f5c571177 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -1042,6 +1042,13 @@ ScDBCollection::NamedDBs::NamedDBs(const NamedDBs& r) { p->SetContainer( this); p->StartTableColumnNamesListener(); // needs the container be set already + if (p->AreTableColumnNamesDirty()) + { + // Refresh table column names in next round. + ScRange aHeader( p->GetHeaderArea()); + if (aHeader.IsValid()) + maDirtyTableColumnNames.Join( aHeader); + } } } } @@ -1102,6 +1109,13 @@ bool ScDBCollection::NamedDBs::insert(ScDBData* p) { p->SetContainer( this); p->StartTableColumnNamesListener(); // needs the container be set already + if (p->AreTableColumnNamesDirty()) + { + // Refresh table column names in next round. + ScRange aHeader( p->GetHeaderArea()); + if (aHeader.IsValid()) + maDirtyTableColumnNames.Join( aHeader); + } /* TODO: shouldn't the import refresh not be setup for * clipboard/undo documents? It was already like this before.. */ -- cgit