diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-15 20:42:53 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-23 18:29:45 +0100 |
commit | 2c5b9eab220caf666d58e929eafbed568763b2a5 (patch) | |
tree | 66e52ef32be44c26675756ef1eaad1f3a74682a2 | |
parent | 2f815d3092e8ba15c7f03f789b962569944f1d8a (diff) |
SpellingPopup: Convert paragraph language items to use slot id
Change-Id: I36df4777b408f9defd883d49413847152f6b496f
Reviewed-on: https://gerrit.libreoffice.org/83573
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index e4dbe6ed9b76..81f336ea0339 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -848,28 +848,18 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END) { - //Set language for current paragraph - aNewLangText = m_aLangTable_Paragraph[nId]; - m_pSh->Push(); // save cursor - SwLangHelper::SelectCurrentPara( *m_pSh ); - SwLangHelper::SetLanguage( *m_pSh, aNewLangText, true, aCoreSet ); - m_pSh->Pop(SwCursorShell::PopMode::DeleteCurrent); // restore cursor + SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_" + m_aLangTable_Paragraph[nId]); + m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString }); } else if (nId == MN_SET_PARA_NONE) { - //Set Language_None for current paragraph - m_pSh->Push(); // save cursor - SwLangHelper::SelectCurrentPara( *m_pSh ); - SwLangHelper::SetLanguage_None( *m_pSh, true, aCoreSet ); - m_pSh->Pop(SwCursorShell::PopMode::DeleteCurrent); // restore cursor + SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_LANGUAGE_NONE"); + m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString }); } else if (nId == MN_SET_PARA_RESET) { - //reset languages for current paragraph - m_pSh->Push(); // save cursor - SwLangHelper::SelectCurrentPara( *m_pSh ); - SwLangHelper::ResetLanguages( *m_pSh ); - m_pSh->Pop(SwCursorShell::PopMode::DeleteCurrent); // restore cursor + SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Paragraph_RESET_LANGUAGES"); + m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, { &aLangString }); } else if (nId == MN_SET_PARA_MORE) { |