summaryrefslogtreecommitdiff
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
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>
-rw-r--r--sc/sdi/docsh.sdi1
-rw-r--r--sc/source/ui/docshell/docsh4.cxx24
2 files changed, 25 insertions, 0 deletions
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