sc/source/core/tool/dbdata.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 7ab9a047fc478bcd547259f1bed05dbb3a28d654 Author: Eike Rathke <er...@redhat.com> Date: Wed Jul 29 13:35:56 2015 +0200 TableRef: restoring column names in UpdateMoveTab() is now unnecessary Change-Id: I2cd444370613e8c890126df41ecfd69e110a555e diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 5573fa7..955a265 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -497,11 +497,9 @@ void ScDBData::UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos) bool bChanged = ( nTab != aRange.aStart.Tab() ); if (bChanged) { - // Save and restore column names, as SetArea() invalidates them. - ::std::vector<OUString> aNames( maTableColumnNames); + // Same column range, SetArea() does not invalidate column names. SetArea( nTab, aRange.aStart.Col(), aRange.aStart.Row(), - aRange.aEnd.Col(),aRange.aEnd .Row() ); - maTableColumnNames = aNames; + aRange.aEnd.Col(),aRange.aEnd.Row() ); } // MoveTo ist nicht noetig, wenn nur die Tabelle geaendert ist commit d55a6d6d1f9be6b33541d82e57d2397a367c1c43 Author: Eike Rathke <er...@redhat.com> Date: Wed Jul 29 13:25:57 2015 +0200 TableRef: invalidate column names/offsets only if column span differs Change-Id: I210323612e2aece7cc0bb8705396e3e6503c1260 diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 92c47e5..5573fa7 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -276,7 +276,8 @@ void ScDBData::GetArea(ScRange& rRange) const void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) { - ::std::vector<OUString>().swap( maTableColumnNames); // invalidate column names/offsets + if (nCol2 - nCol1 != nEndCol - nStartCol) + ::std::vector<OUString>().swap( maTableColumnNames); // invalidate column names/offsets nTable = nTab; nStartCol = nCol1; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits