summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-08-03 00:04:53 +0200
committerKohei Yoshida <kohei.yoshida@suse.com>2011-08-02 23:22:27 -0400
commit9ba41955da1064c44cf0cecef9d444bcbacf3aee (patch)
treea88c5ca1189d3fe2b979c38d26f92e6d7df94e60
parent57918a52375a9a7c6ee42072783cb2e29db8e609 (diff)
fix for fdo#39151: set correct table number in local db data
Signed-off-by: Kohei Yoshida <kohei.yoshida@suse.com>
-rw-r--r--sc/source/core/data/table2.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 67d94bc4f..24fc26924 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -768,7 +768,15 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
return;
if (pDBDataNoName)
- pDestTab->SetAnonymousDBData(new ScDBData(*pDBDataNoName));
+ {
+ ScDBData* pNewDBData = new ScDBData(*pDBDataNoName);
+ SCCOL aCol1, aCol2;
+ SCROW aRow1, aRow2;
+ SCTAB aTab;
+ pNewDBData->GetArea(aTab, aCol1, aRow1, aCol2, aRow2);
+ pNewDBData->MoveTo(pDestTab->nTab, aCol1, aRow1, aCol2, aRow2);
+ pDestTab->SetAnonymousDBData(pNewDBData);
+ }
// Charts muessen beim Ein-/Ausblenden angepasst werden
ScChartListenerCollection* pCharts = pDestTab->pDocument->GetChartListenerCollection();