summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2020-03-16 19:16:19 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2020-03-17 11:13:53 +0100
commit103d65b733e099764fdf8aa3f4889dbc6ca49ff6 (patch)
tree1fe5d183d20afe0cb3807784c8a1156035267906 /sc/source
parent6167264dace8e10fe66537bcf64eaa5904232786 (diff)
sc lok: Implement execution of SID_SPELLCHECK_IGNORE_ALL
Used by online spellchecking context menu. Change-Id: I31779a38f467838d3719a0d32cbf37e335432d38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90600 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index ff70cfcec1ac..e07000300000 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1230,6 +1230,30 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
}
break;
+ case SID_SPELLCHECK_IGNORE_ALL:
+ {
+ ScViewData* pViewData = GetViewData();
+ if (!pViewData)
+ return;
+
+ EditView* pEditView = pViewData->GetEditView(pViewData->GetActivePart());
+ if (!pEditView)
+ return;
+
+ OUString sIgnoreText;
+ const SfxStringItem* pItem2 = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
+ if (pItem2)
+ sIgnoreText = pItem2->GetValue();
+
+ const OUString sSpellingType("Spelling");
+ if(sIgnoreText == sSpellingType)
+ {
+ ESelection aOldSel = pEditView->GetSelection();
+ pEditView->SpellIgnoreWord();
+ pEditView->SetSelection( aOldSel );
+ }
+ }
+ break;
default:
{
// small (?) hack -> forwarding of the slots to TabViewShell