diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2020-03-16 17:14:33 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2020-03-17 11:17:09 +0100 |
commit | 268327c2fb37ff553a2c348a6beca4e309b0653f (patch) | |
tree | f10481ce8a115cbb8472866d1dc3d339b4b4239a /sd/source/ui/docshell | |
parent | 103d65b733e099764fdf8aa3f4889dbc6ca49ff6 (diff) |
sd lok: Implement execution of SID_SPELLCHECK_IGNORE_ALL
Used by online spellchecking context menu.
Change-Id: Iad3dafedbfed1605ba06f7f87ed91117c9b1a8e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90597
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r-- | sd/source/ui/docshell/docshel3.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 8f1c597328a2..66b0daaa0736 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -360,6 +360,27 @@ void DrawDocShell::Execute( SfxRequest& rReq ) Broadcast(SfxHint(SfxHintId::LanguageChanged)); } break; + case SID_SPELLCHECK_IGNORE_ALL: + { + SdrView* pSdrView = mpViewShell->GetDrawView(); + if (!pSdrView) + return; + + EditView& rEditView = pSdrView->GetTextEditOutlinerView()->GetEditView(); + 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 = rEditView.GetSelection(); + rEditView.SpellIgnoreWord(); + rEditView.SetSelection( aOldSel ); + } + } + break; case SID_NOTEBOOKBAR: { |