Hello,
this patch updates local db data when sheets are copied. We need to update
the table number set in ScDBData to point to the new table.
Patch should be safe, so review and sign-off appreciated. This patch may not
apply to master.
Regards,
Markus
From 3ad3174c10e07d3d45db71f011f31d08963dd512 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Wed, 3 Aug 2011 00:04:53 +0200
Subject: [PATCH] fix for fdo#39151: set correct table number in local db data
---
sc/source/core/data/table2.cxx | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 67d94bc..24fc269 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();
--
1.7.3.4
Context
- [Libreoffice] [REVIEW] fix for fdo#39151: local db data needs to be updated when copying sheets · Markus Mohrhard
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.