diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-12-20 15:29:45 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-12-20 15:35:28 -0500 |
commit | 564b2831090cf997b47e7df2e4bd1b0068fade97 (patch) | |
tree | 2dbd77b9d16a4a6a06b3c001f1eacebdbe5d6336 /sc/source/ui/docshell/datastream.cxx | |
parent | e33d8796086a56a7e3face18016d731b1d0fad6f (diff) |
Put all these back in...
Change-Id: If2168a57e0c77cf7fe85d66a6c6fd6a810d45035
(cherry picked from commit f2a3848bee3f3deeb9dde43de51737cbdde84018)
Diffstat (limited to 'sc/source/ui/docshell/datastream.cxx')
-rw-r--r-- | sc/source/ui/docshell/datastream.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 8f78c9c7386a..c7f52e5e16fc 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -65,11 +65,15 @@ private: { while (!mbTerminate) { + // wait for a small amount of time, so that + // painting methods have a chance to be called. + // And also to make UI more responsive. + TimeValue const aTime = {0, 1000}; maStart.wait(); maStart.reset(); if (!mbTerminate) while (mpDataStream->ImportData()) - ; + wait(aTime); }; } }; @@ -347,8 +351,9 @@ void DataStream::SetRefreshOnEmptyLine( bool bVal ) void DataStream::Refresh() { - // Hard recalc will repaint the grid area. Application::Yield(); + + // Hard recalc will repaint the grid area. mpDocShell->DoHardRecalc(true); mpDocShell->SetDocumentModified(true); @@ -509,10 +514,14 @@ void DataStream::Text2Doc() {} bool DataStream::ImportData() { + SolarMutexGuard aGuard; if (!mbValuesInLine) // We no longer support this mode. To be deleted later. return false; + if (ScDocShell::GetViewData()->GetViewShell()->NeedsRepaint()) + return mbRunning; + Text2Doc(); return mbRunning; } |