summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/editeng/editview.cxx5
-rw-r--r--include/editeng/editview.hxx1
-rw-r--r--sd/sdi/_docsh.sdi6
-rw-r--r--sd/source/ui/docshell/docshel3.cxx21
4 files changed, 33 insertions, 0 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 621a7d3bcfff..24d0947d7de5 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1199,6 +1199,11 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
}
}
+OUString EditView::SpellIgnoreWord()
+{
+ return pImpEditView->SpellIgnoreWord();
+}
+
void EditView::SelectCurrentWord( sal_Int16 nWordType )
{
EditSelection aCurSel( pImpEditView->GetEditSelection() );
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 8d2a5ef2853d..b516e4484eb1 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -260,6 +260,7 @@ public:
bool IsCursorAtWrongSpelledWord();
bool IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false );
void ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void> const * pCallBack );
+ OUString SpellIgnoreWord();
void InsertField( const SvxFieldItem& rFld );
const SvxFieldItem* GetFieldUnderMousePointer() const;
diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi
index 29db81db02d2..8644b752702c 100644
--- a/sd/sdi/_docsh.sdi
+++ b/sd/sdi/_docsh.sdi
@@ -77,5 +77,11 @@ interface DrawDocument
ExecMethod = Execute;
StateMethod = GetState;
]
+
+ SID_SPELLCHECK_IGNORE_ALL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
}
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 212ca38c27eb..15a54620d071 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -373,6 +373,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:
{