[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Aug 2 20:23:06 PDT 2011


 sc/source/core/data/table2.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 9ba41955da1064c44cf0cecef9d444bcbacf3aee
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 3 00:04:53 2011 +0200

    fix for fdo#39151: set correct table number in local db data
    
    Signed-off-by: Kohei Yoshida <kohei.yoshida at suse.com>

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();
 


More information about the Libreoffice-commits mailing list