summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-11-15 20:42:53 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-11-23 15:38:42 +0100
commit9003fd73410024a6a40c22cb61f0092341dd0aef (patch)
tree788bff84a4d92945b3498733b8eb4ed12346c5ab
parent463d52dfdd8d31a40a8d6867ac2171819cccb635 (diff)
SpellingPopup: Convert paragraph language items to use slot id
Change-Id: I36df4777b408f9defd883d49413847152f6b496f
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx22
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)
{