summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx5
-rw-r--r--sw/source/uibase/shells/textsh1.cxx23
2 files changed, 25 insertions, 3 deletions
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index 9d1d42135357..0b444d8ea64e 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -717,9 +717,8 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
}
else if (nId == MN_IGNORE_SELECTION)
{
- SwPaM *pPaM = m_pSh->GetCursor();
- if (pPaM)
- SwEditShell::IgnoreGrammarErrorAt( *pPaM );
+ SfxStringItem aIgnoreString(FN_PARAM_1, "Ignore");
+ m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_APPLY_SPELLCHECKING, SfxCallMode::SYNCHRON, { &aIgnoreString });
}
else if (nId == m_nIgnoreWordId)
{
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index bbfbe00e6d40..f2c8b5a55fde 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1418,6 +1418,29 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
}
break;
+ case SID_APPLY_SPELLCHECKING:
+ {
+ OUString sApplyText;
+ const SfxStringItem* pItem2 = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
+ if (pItem2)
+ sApplyText = pItem2->GetValue();
+
+ const OUString sIgnoreString("Ignore");
+ //const OUString sIgnoreAllPrefix("IgnoreAll_");
+ //const OUString sSpellingRule("Spelling");
+ //const OUString sGrammarRule("Grammar");
+ //const OUString aReplacePrefix("Replace_");
+
+ // Ignore the word at the cursor pos
+ //sal_Int32 nPos = 0;
+ if (sApplyText == sIgnoreString)
+ {
+ SwPaM *pPaM = rWrtSh.GetCursor();
+ if (pPaM)
+ SwEditShell::IgnoreGrammarErrorAt( *pPaM );
+ }
+ }
+ break;
default:
OSL_ENSURE(false, "wrong dispatcher");
return;