sc/sdi/docsh.sdi | 1 + sc/source/ui/docshell/docsh4.cxx | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+)
New commits: commit 103d65b733e099764fdf8aa3f4889dbc6ca49ff6 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Mon Mar 16 19:16:19 2020 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Tue Mar 17 11:13:53 2020 +0100 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.zol...@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi index fdb22acf3e0c..364bd3adaa69 100644 --- a/sc/sdi/docsh.sdi +++ b/sc/sdi/docsh.sdi @@ -75,6 +75,7 @@ interface TableDocument SID_SHARE_DOC [ ExecMethod = Execute; StateMethod = GetState; ] SID_NOTEBOOKBAR [ ExecMethod = Execute; StateMethod = GetState; ] SID_LANGUAGE_STATUS [ ExecMethod = Execute; StateMethod = GetState; ] + SID_SPELLCHECK_IGNORE_ALL [ ExecMethod = Execute; StateMethod = GetState; ] } 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits