[Libreoffice-commits] core.git: sw/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 23 17:31:13 UTC 2019
sw/source/uibase/lingu/olmenu.cxx | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
New commits:
commit 2c5b9eab220caf666d58e929eafbed568763b2a5
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Nov 15 20:42:53 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Nov 23 18:29:45 2019 +0100
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 at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
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)
{
More information about the Libreoffice-commits
mailing list