summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/datastream.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-12-20 12:56:17 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-12-20 13:17:33 -0500
commite33d8796086a56a7e3face18016d731b1d0fad6f (patch)
tree7621f5bec22371cb90d983965ab07f17e855a5b4 /sc/source/ui/docshell/datastream.cxx
parentc3d1e74fa1de47805ee37748bf3bce1fd2594772 (diff)
Call Yield() to unblock the main thread when refreshing.
Also, we don't seem to need this solar mutex locking and checking for needs repaint flag here anymore, and not having these make the streaming much faster esp on Windows. Change-Id: I6e8ae82e5d986492ac576d28f11e2afffe954bc2 (cherry picked from commit c3bd435387ffbc6ae3c5a4861ac419d0a7092807)
Diffstat (limited to 'sc/source/ui/docshell/datastream.cxx')
-rw-r--r--sc/source/ui/docshell/datastream.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 931395d5615c..8f78c9c7386a 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -65,15 +65,11 @@ 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, 100000};
maStart.wait();
maStart.reset();
if (!mbTerminate)
while (mpDataStream->ImportData())
- wait(aTime);
+ ;
};
}
};
@@ -352,6 +348,7 @@ void DataStream::SetRefreshOnEmptyLine( bool bVal )
void DataStream::Refresh()
{
// Hard recalc will repaint the grid area.
+ Application::Yield();
mpDocShell->DoHardRecalc(true);
mpDocShell->SetDocumentModified(true);
@@ -512,14 +509,10 @@ 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;
}