summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-11-15 20:47:57 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-11-23 15:38:42 +0100
commit99aca123223222580f3051d063c717074de60b28 (patch)
treed75354d6a1f4f439f371b475ee213ce055ca3d65
parent9003fd73410024a6a40c22cb61f0092341dd0aef (diff)
SpellingPopup: Convert selection language items to use slot id
Change-Id: I10a89d7efa957e6b94e793158983c5acf623e511
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx21
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)
{