summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2013-12-12 14:46:34 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2013-12-12 14:47:57 +0100
commit29533e1871ea161bf6b919abed95d908c035c250 (patch)
tree87619eeb521c63a10e0a55785eeb2dd49e0b7fb7
parent78e4da913c12867ce6f2607a4a05bda66e73a213 (diff)
datastreams: Wait with import if we need to repaint.
Change-Id: I31e8371999afafeeaad201496becf1f2f9d8d276
-rw-r--r--sc/source/ui/docshell/datastream.cxx3
-rw-r--r--sc/source/ui/inc/gridwin.hxx1
-rw-r--r--sc/source/ui/inc/tabview.hxx1
-rw-r--r--sc/source/ui/view/tabview3.cxx10
4 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index db974c72e645..7f529dd1b852 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -390,6 +390,9 @@ void DataStream::Text2Doc()
bool DataStream::ImportData()
{
+ if (ScDocShell::GetViewData()->GetViewShell()->NeedsRepaint())
+ return mbRunning;
+
MoveData();
if (mbValuesInLine)
{
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 7818cc7318b7..0a499c72712d 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -377,6 +377,7 @@ public:
void UpdateInputContext();
void CheckInverted() { if (nPaintCount) bNeedsRepaint = true; }
+ bool NeedsRepaint() { return bNeedsRepaint; }
void DoInvertRect( const Rectangle& rPixel );
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 8832da4aeeed..0c1c7a1ee046 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -437,6 +437,7 @@ public:
void UpdateFormulas();
void InterpretVisible();
void CheckNeedsRepaint();
+ bool NeedsRepaint();
void PaintRangeFinder( long nNumber = -1 );
void AddHighlightRange( const ScRange& rRange, const Color& rColor );
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index e258761fc948..cedb9bab0194 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2634,8 +2634,12 @@ void ScTabView::CheckNeedsRepaint()
pGridWin[i]->CheckNeedsRepaint();
}
-
-
-
+bool ScTabView::NeedsRepaint()
+{
+ for (size_t i = 0; i < 4; i++)
+ if (pGridWin[i] && pGridWin[i]->IsVisible() && pGridWin[i]->NeedsRepaint())
+ return true;
+ return false;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */