sw/source/uibase/lingu/olmenu.cxx |   21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

New commits:
commit 8400f8ef3b5dcaec4867c27bee7ad8f7820564ad
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Fri Nov 15 20:47:57 2019 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Sat Nov 23 20:03:22 2019 +0100

    SpellingPopup: Convert selection language items to use slot id
    
    Change-Id: I10a89d7efa957e6b94e793158983c5acf623e511
    Reviewed-on: https://gerrit.libreoffice.org/83575
    Tested-by: Jenkins
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/sw/source/uibase/lingu/olmenu.cxx 
b/sw/source/uibase/lingu/olmenu.cxx
index 81f336ea0339..5be1f29b859c 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -817,29 +817,20 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
     }
     else
     {
-        // Set language for selection or for paragraph...
-
-        SfxItemSet aCoreSet( m_pSh->GetView().GetPool(),
-                    svl::Items<RES_CHRATR_LANGUAGE,        RES_CHRATR_LANGUAGE,
-                    RES_CHRATR_CJK_LANGUAGE,    RES_CHRATR_CJK_LANGUAGE,
-                    RES_CHRATR_CTL_LANGUAGE,    RES_CHRATR_CTL_LANGUAGE>{} );
-        OUString aNewLangText;
-
         if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= 
MN_SET_LANGUAGE_SELECTION_END)
         {
-            //Set language for current selection
-            aNewLangText = m_aLangTable_Text[nId];
-            SwLangHelper::SetLanguage( *m_pSh, aNewLangText, true, aCoreSet );
+            SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Current_" + 
m_aLangTable_Text[nId]);
+            
m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS,
 SfxCallMode::SYNCHRON, { &aLangString });
         }
         else if (nId == MN_SET_SELECTION_NONE)
         {
-            //Set Language_None for current selection
-            SwLangHelper::SetLanguage_None( *m_pSh, true, aCoreSet );
+            SfxStringItem aLangString(SID_LANGUAGE_STATUS, 
"Current_LANGUAGE_NONE");
+            
m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS,
 SfxCallMode::SYNCHRON, { &aLangString });
         }
         else if (nId == MN_SET_SELECTION_RESET)
         {
-            //reset languages for current selection
-            SwLangHelper::ResetLanguages( *m_pSh );
+            SfxStringItem aLangString(SID_LANGUAGE_STATUS, 
"Current_RESET_LANGUAGES");
+            
m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS,
 SfxCallMode::SYNCHRON, { &aLangString });
         }
         else if (nId == MN_SET_SELECTION_MORE)
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to