diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-15 20:47:57 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-23 20:03:22 +0100 |
commit | 8400f8ef3b5dcaec4867c27bee7ad8f7820564ad (patch) | |
tree | 2badbfa249b2880d777a2aeaa5f0ca620678fac4 /sw | |
parent | 2c5b9eab220caf666d58e929eafbed568763b2a5 (diff) |
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.zolnai@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 21 |
1 files changed, 6 insertions, 15 deletions
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) { |