summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-12-18 14:15:29 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-12-18 18:15:32 -0500
commitb9524c17b56e4bdecb76880582853fdeb3380013 (patch)
treebbb99a7bd3948cb90de8ed377e7544e8f3b05e7b
parent8f73c7615ebe60ef71d6e8b49a0f19ddac6f03a0 (diff)
Just do hard-recalc on stream refresh. That takes care of all our needs.
Change-Id: I9a454089843d1373153988a29843b95db22ee284
-rw-r--r--sc/source/ui/docshell/datastream.cxx14
-rw-r--r--sc/source/ui/inc/datastream.hxx4
2 files changed, 6 insertions, 12 deletions
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 9121d488e631..cbf8957ce223 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -370,23 +370,19 @@ void DataStream::StopImport()
return;
mbRunning = false;
- Repaint();
+ Refresh();
}
-void DataStream::Repaint()
+void DataStream::Refresh()
{
SCROW nEndRow = mpEndRange ? mpEndRange->aEnd.Row() : MAXROW;
ScRange aRange(maStartRange.aStart);
aRange.aEnd = ScAddress(maStartRange.aEnd.Col(), nEndRow, maStartRange.aStart.Tab());
- mpDocShell->PostPaint(aRange, PAINT_GRID);
mnRepaintCounter = 0;
-}
-void DataStream::Broadcast()
-{
- mpDoc->BroadcastCells(maBroadcastRanges, SC_HINT_DATACHANGED);
- maBroadcastRanges.RemoveAll();
+ // Hard recalc will repaint the grid area.
+ mpDocShell->DoHardRecalc(true);
}
void DataStream::MoveData()
@@ -541,7 +537,7 @@ bool DataStream::ImportData()
}
if (mnRepaintCounter > 200)
- Repaint();
+ Refresh();
return mbRunning;
}
diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx
index 494a73e3f095..86be03b0964b 100644
--- a/sc/source/ui/inc/datastream.hxx
+++ b/sc/source/ui/inc/datastream.hxx
@@ -79,8 +79,7 @@ public:
void StopImport();
private:
- void Repaint();
- void Broadcast();
+ void Refresh();
private:
ScDocShell* mpDocShell;
@@ -97,7 +96,6 @@ private:
size_t mnRepaintCounter;
SCROW mnCurRow;
ScRange maStartRange;
- ScRangeList maBroadcastRanges;
boost::scoped_ptr<ScRange> mpEndRange;
rtl::Reference<datastreams::CallerThread> mxThread;
rtl::Reference<datastreams::ReaderThread> mxReaderThread;