[Libreoffice-commits] core.git: Branch 'private/kohei/xlsx-import-speedup' - sc/inc sc/qa sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Fri Nov 1 23:39:07 CET 2013
sc/inc/column.hxx | 2 +-
sc/qa/unit/ucalc_formula.cxx | 3 +--
sc/source/core/data/column.cxx | 14 +++++++-------
sc/source/core/data/column3.cxx | 8 ++++----
4 files changed, 13 insertions(+), 14 deletions(-)
New commits:
commit 017f5344cac2c34bc0c189a3d44d2712a758c33c
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Nov 1 18:36:42 2013 -0400
Fix multiple operations with formula cell with indirect dependency.
Now the unit test passes. Good.
Change-Id: I23fa8355805c192f43db0199f3628f2bf457a645
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index e1b4ec3..8e27b8a 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -491,7 +491,7 @@ public:
bool HasBroadcaster() const;
void Broadcast( SCROW nRow );
- void BroadcastCells( const std::vector<SCROW>& rRows );
+ void BroadcastCells( const std::vector<SCROW>& rRows, sal_uLong nHint );
// cell notes
ScPostIt* GetCellNote( SCROW nRow );
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 0e54fb0..cca7155 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1353,11 +1353,10 @@ void Test::testMultipleOperations()
aParam.aRefFormulaCell.Set(2,0,0,false,false,false);
aParam.aRefFormulaEnd = aParam.aRefFormulaCell;
m_pDoc->InsertTableOp(aParam, 0, 2, 1, 4, aMark);
-#if 0 // TODO: Make this pass.
CPPUNIT_ASSERT_EQUAL(30.0, m_pDoc->GetValue(1,2,0));
CPPUNIT_ASSERT_EQUAL(40.0, m_pDoc->GetValue(1,3,0));
CPPUNIT_ASSERT_EQUAL(50.0, m_pDoc->GetValue(1,4,0));
-#endif
+
m_pDoc->DeleteTab(0);
}
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 63433c5..9a5fac3 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -890,7 +890,7 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
SwapCellTextAttrs(nRow1, nRow2);
SwapCellNotes(nRow1, nRow2);
CellStorageModified();
- BroadcastCells(aRows);
+ BroadcastCells(aRows, SC_HINT_DATACHANGED);
return;
}
@@ -938,7 +938,7 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
SwapCellTextAttrs(nRow1, nRow2);
SwapCellNotes(nRow1, nRow2);
CellStorageModified();
- BroadcastCells(aRows);
+ BroadcastCells(aRows, SC_HINT_DATACHANGED);
return;
}
@@ -983,7 +983,7 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
SwapCellTextAttrs(nRow1, nRow2);
SwapCellNotes(nRow1, nRow2);
CellStorageModified();
- BroadcastCells(aRows);
+ BroadcastCells(aRows, SC_HINT_DATACHANGED);
return;
}
@@ -1117,7 +1117,7 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
SwapCellTextAttrs(nRow1, nRow2);
SwapCellNotes(nRow1, nRow2);
CellStorageModified();
- BroadcastCells(aRows);
+ BroadcastCells(aRows, SC_HINT_DATACHANGED);
}
namespace {
@@ -2760,7 +2760,7 @@ public:
{
std::vector<SCROW> aRows;
maValueRanges.getRows(aRows);
- mrColumn.BroadcastCells(aRows);
+ mrColumn.BroadcastCells(aRows, SC_HINT_DATACHANGED);
}
};
@@ -2792,7 +2792,7 @@ public:
{
std::vector<SCROW> aRows;
maValueRanges.getRows(aRows);
- mrColumn.BroadcastCells(aRows);
+ mrColumn.BroadcastCells(aRows, SC_HINT_TABLEOPDIRTY);
}
};
@@ -3171,7 +3171,7 @@ void ScColumn::BroadcastRecalcOnRefMove()
sc::AutoCalcSwitch aSwitch(*pDocument, false);
RecalcOnRefMoveCollector aFunc;
sc::ProcessFormula(maCells, aFunc);
- BroadcastCells(aFunc.getDirtyRows());
+ BroadcastCells(aFunc.getDirtyRows(), SC_HINT_DATACHANGED);
}
void ScColumn::CalcAll()
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 3b9475a..1909e81 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -74,13 +74,13 @@ void ScColumn::Broadcast( SCROW nRow )
pDocument->Broadcast(aHint);
}
-void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows )
+void ScColumn::BroadcastCells( const std::vector<SCROW>& rRows, sal_uLong nHint )
{
if (rRows.empty())
return;
// Broadcast the changes.
- ScHint aHint(SC_HINT_DATACHANGED, ScAddress(nCol, 0, nTab));
+ ScHint aHint(nHint, ScAddress(nCol, 0, nTab));
std::vector<SCROW>::const_iterator itRow = rRows.begin(), itRowEnd = rRows.end();
for (; itRow != itRowEnd; ++itRow)
{
@@ -285,7 +285,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
sc::SharedFormulaUtil::joinFormulaCellAbove(aPos);
// Single cell broadcasts on deleted cells.
- BroadcastCells(aDeleteRowsFunc.getNonEmptyRows());
+ BroadcastCells(aDeleteRowsFunc.getNonEmptyRows(), SC_HINT_DATACHANGED);
// Shift the text attribute array too (before the broadcast).
maCellTextAttrs.erase(nStartRow, nEndRow);
@@ -626,7 +626,7 @@ void ScColumn::DeleteArea(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nDelFlag)
// Broadcast on only cells that were deleted; no point broadcasting on
// cells that were already empty before the deletion.
- BroadcastCells(aDeletedRows);
+ BroadcastCells(aDeletedRows, SC_HINT_DATACHANGED);
}
bool ScColumn::InitBlockPosition( sc::ColumnBlockPosition& rBlockPos )
More information about the Libreoffice-commits
mailing list