diff options
-rw-r--r-- | sc/sdi/docsh.sdi | 1 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 24 |
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 |