summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun3.cxx
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-10-04 12:47:46 +0530
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-28 08:39:25 +0100
commitbdd149b1ff3d43b94cadc0d43365100c287c7639 (patch)
treea23299569c37922d7f531076d750e517ff01bb3a /sc/source/ui/view/viewfun3.cxx
parent2beecc277959051026d7d1303e3c3ad7922c326c (diff)
Improve spell checking performance and impl. in several ways:
* do synchronous spell checking, avoiding an idle handler * avoid continuous invalidations caused per-cell by spell-checking * cache spell-checking information for a given SharedString to avoid repeated checking of frequently recurring strings. Change-Id: Ie251f263a8932465297dd8bd66dfc4aa10984947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104705 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r--sc/source/ui/view/viewfun3.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 50b73566b1a7..5354391fcaa1 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -955,6 +955,9 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
ScDrawLayer::SetGlobalDrawPersist(nullptr);
}
+ // TODO: position this call better for performance.
+ ResetAutoSpellForContentChange();
+
SCCOL nStartCol;
SCROW nStartRow;
SCTAB nStartTab;
@@ -1446,7 +1449,6 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
nPaint, nExtFlags);
// AdjustBlockHeight has already been called above
- ResetAutoSpell();
aModificator.SetDocumentModified();
PostPasteFromClip(aUserRange, rMark);
@@ -1544,6 +1546,9 @@ bool ScViewFunc::PasteMultiRangesFromClip(
return false;
}
+ // TODO: position this call better for performance.
+ ResetAutoSpellForContentChange();
+
bool bRowInfo = ( aMarkedRange.aStart.Col()==0 && aMarkedRange.aEnd.Col()==pClipDoc->MaxCol() );
ScDocumentUniquePtr pUndoDoc;
if (rDoc.IsUndoEnabled())
@@ -1624,7 +1629,6 @@ bool ScViewFunc::PasteMultiRangesFromClip(
pUndoMgr->LeaveListAction();
}
- ResetAutoSpell();
aModificator.SetDocumentModified();
PostPasteFromClip(aMarkedRange, aMark);
return true;
@@ -1696,6 +1700,9 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
return false;
}
+ // TODO: position this call better for performance.
+ ResetAutoSpellForContentChange();
+
ScDocumentUniquePtr pUndoDoc;
if (rDoc.IsUndoEnabled())
{
@@ -1784,7 +1791,6 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
pUndoMgr->LeaveListAction();
}
- ResetAutoSpell();
aModificator.SetDocumentModified();
PostPasteFromClip(aRanges, aMark);
@@ -1828,6 +1834,8 @@ bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
ScDocShell* pDocSh = GetViewData().GetDocShell();
HideAllCursors();
+ ResetAutoSpellForContentChange();
+
bool bSuccess = true;
SCTAB nDestTab = rDestPos.Tab();
const ScMarkData& rMark = GetViewData().GetMarkData();
@@ -1899,7 +1907,6 @@ bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
pDocSh->UpdateOle(GetViewData());
SelectionChanged();
- ResetAutoSpell();
}
return bSuccess;
}