editeng/source/editeng/editview.cxx |    5 +++++
 include/editeng/editview.hxx        |    1 +
 sd/sdi/_docsh.sdi                   |    6 ++++++
 sd/source/ui/docshell/docshel3.cxx  |   21 +++++++++++++++++++++
 4 files changed, 33 insertions(+)

New commits:
commit 268327c2fb37ff553a2c348a6beca4e309b0653f
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Mon Mar 16 17:14:33 2020 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Tue Mar 17 11:17:09 2020 +0100

    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.zol...@collabora.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 655a0ec370db..e8a2b3dce0d0 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1198,6 +1198,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 6fb972182357..fdbfd8a08fff 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -270,6 +270,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 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:
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to