sc/source/ui/docshell/datastream.cxx | 6 ++++++ sc/source/ui/inc/gridwin.hxx | 2 +- sc/source/ui/inc/tabview.hxx | 1 + sc/source/ui/view/tabview3.cxx | 10 +++++++--- 4 files changed, 15 insertions(+), 4 deletions(-)
New commits: commit dbbcdd877b1644d9a7b1bb013460681428a00855 Author: Matúš Kukan <[email protected]> Date: Thu Dec 12 14:53:27 2013 +0100 CheckInverted() is not used anywhere. Change-Id: I5d22948314a16370d7ac75bfd25151cfa04a2491 diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 0a499c7..d5311da 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -376,7 +376,6 @@ public: void StopMarking(); void UpdateInputContext(); - void CheckInverted() { if (nPaintCount) bNeedsRepaint = true; } bool NeedsRepaint() { return bNeedsRepaint; } void DoInvertRect( const Rectangle& rPixel ); commit 29533e1871ea161bf6b919abed95d908c035c250 Author: Matúš Kukan <[email protected]> Date: Thu Dec 12 14:46:34 2013 +0100 datastreams: Wait with import if we need to repaint. Change-Id: I31e8371999afafeeaad201496becf1f2f9d8d276 diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index db974c7..7f529dd 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 7818cc7..0a499c7 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 8832da4..0c1c7a1 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 e258761..cedb9ba 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: */ commit 78e4da913c12867ce6f2607a4a05bda66e73a213 Author: Matúš Kukan <[email protected]> Date: Thu Dec 12 10:49:07 2013 +0100 datastreams: Broadcast data changes. Change-Id: Iedf07a9ef59a695cb56c2e160f269cd5d542735b diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 1d99af2..db974c7 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -378,6 +378,7 @@ void DataStream::Text2Doc() aDocImport.setNumericCell(aAddress, aCell.toDouble()); else aDocImport.setStringCell(aAddress, aCell); + mpScDocument->Broadcast(ScHint(SC_HINT_DATACHANGED, aAddress)); } ++nCol; } @@ -418,10 +419,12 @@ bool DataStream::ImportData() else aDocImport.setStringCell(aAddress, sValue); aRangeList.Join(aAddress); + mpScDocument->Broadcast(ScHint(SC_HINT_DATACHANGED, aAddress)); } aDocImport.finalize(); mpScDocShell->PostPaint( aRangeList, PAINT_GRID ); } + mpScDocShell->SetDocumentModified(); if (meMove == NO_MOVE) return mbRunning;
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
