sc/qa/unit/ucalc.cxx           |    1 +
 sc/source/core/data/column.cxx |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 17ff1e0caceb20b90c780e4b45314e1ca5a18bb9
Author: Kohei Yoshida <kohei.yosh...@gmail.com>
Date:   Wed May 22 11:17:52 2013 -0400

    Use the block position of the destination, not of the source.
    
    And a test to catch this.
    
    Change-Id: Ia73be239b4be96cbe029390efbbec5f49e429652

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index dcce938..6053039 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4494,6 +4494,7 @@ void Test::testPivotTableDocFunc()
 void Test::testSheetCopy()
 {
     m_pDoc->InsertTab(0, "TestTab");
+    m_pDoc->SetString(ScAddress(0,0,0), "copy me");
     CPPUNIT_ASSERT_MESSAGE("document should have one sheet to begin with.", 
m_pDoc->GetTableCount() == 1);
     SCROW nRow1, nRow2;
     bool bHidden = m_pDoc->RowHidden(0, 0, &nRow1, &nRow2);
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 10d36b6..dfbc21d 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1444,7 +1444,7 @@ void ScColumn::CopyToColumn(
                     // Special case to allow removing of cell instances.  A
                     // string cell with empty content is used to indicate an
                     // empty cell.
-                    sc::ColumnBlockPosition* p = rCxt.getBlockPosition(nTab, 
nCol);
+                    sc::ColumnBlockPosition* p = 
rCxt.getBlockPosition(rColumn.nTab, rColumn.nCol);
                     if (pNew->GetCellType() == CELLTYPE_STRING)
                     {
                         OUString aStr = 
static_cast<ScStringCell*>(pNew)->GetString();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to