summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column4.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-12-05 22:01:29 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-12-05 22:45:40 -0500
commit68fd7b7adc3021d30460a2c80d6876df239fd490 (patch)
tree36ba2c8efa323a3cc1ae1bdb62f3d65df90cb2a3 /sc/source/core/data/column4.cxx
parentd0894ff58fbdd823273bc91939801971b7a03182 (diff)
Fix incorrect adjustment of range references during sort.
... as a result of the introduction of range-based area listeners. With this change, the insertRangeData() function for ucalc no longer needs the additional bGroupListening flag. All tests pass with group listening enabled at all times. Change-Id: I9b9fb9443c727ff62badbd60ec9cd94094eb5a45
Diffstat (limited to 'sc/source/core/data/column4.cxx')
-rw-r--r--sc/source/core/data/column4.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index ab804ddf4340..2291d3810827 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1107,6 +1107,18 @@ public:
}
};
+class FormulaCellCollector
+{
+ std::vector<ScFormulaCell*>& mrCells;
+public:
+ FormulaCellCollector( std::vector<ScFormulaCell*>& rCells ) : mrCells(rCells) {}
+
+ void operator() ( size_t /*nRow*/, ScFormulaCell* p )
+ {
+ mrCells.push_back(p);
+ }
+};
+
}
void ScColumn::CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 )
@@ -1118,6 +1130,15 @@ void ScColumn::CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nR
sc::ProcessBroadcaster(maBroadcasters.begin(), maBroadcasters, nRow1, nRow2, aFunc);
}
+void ScColumn::CollectFormulaCells( std::vector<ScFormulaCell*>& rCells, SCROW nRow1, SCROW nRow2 )
+{
+ if (nRow2 < nRow1 || !ValidRow(nRow1) || !ValidRow(nRow2))
+ return;
+
+ FormulaCellCollector aFunc(rCells);
+ sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aFunc);
+}
+
namespace {
struct FindAnyFormula