sw/source/uibase/lingu/olmenu.cxx | 5 +++++ sw/source/uibase/lingu/olmenu.hrc | 1 + sw/source/uibase/lingu/olmenu.src | 12 ++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-)
New commits: commit 837c50d3d8390da359c5f07da3fdd87fc60d9158 Author: Yousuf Philips <philip...@hotmail.com> Date: Thu Sep 24 19:38:28 2015 +0200 tdf#92341 Add AutoCorrect entry in spellcheck context menu Change-Id: I081f5e1cea39ce833254336286e10558ca75a466 Reviewed-on: https://gerrit.libreoffice.org/18828 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index d5c6c50..18b49fa 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -326,6 +326,7 @@ SwSpellPopup::SwSpellPopup( OUString aIgnoreSelection( SW_RES( STR_IGNORE_SELECTION ) ); OUString aSpellingAndGrammar = RetrieveLabelFromCommand( ".uno:SpellingAndGrammarDialog" ); SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar ); + SetItemText(MN_AUTO_CORRECT_DLG, RetrieveLabelFromCommand(".uno:AutoCorrectDlg")); sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD ); InsertItem(MN_IGNORE_SELECTION, aIgnoreSelection, MenuItemBits::NONE, OString(), nItemPos); SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); @@ -721,6 +722,10 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON ); } } + else if (nId == MN_AUTO_CORRECT_DLG) + { + m_pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON ); + } else if (nId == MN_IGNORE_SELECTION) { SwPaM *pPaM = m_pSh->GetCrsr(); diff --git a/sw/source/uibase/lingu/olmenu.hrc b/sw/source/uibase/lingu/olmenu.hrc index fe6cbd8..e2851a9 100644 --- a/sw/source/uibase/lingu/olmenu.hrc +++ b/sw/source/uibase/lingu/olmenu.hrc @@ -46,6 +46,7 @@ #define MN_SHORT_COMMENT 208 #define MN_EXPLANATION_LINK 209 #define MN_ADD_TO_DIC_SINGLE 210 +#define MN_AUTO_CORRECT_DLG 211 // id range for dictionaries sub menu #define MN_DICTIONARIES_START 300 diff --git a/sw/source/uibase/lingu/olmenu.src b/sw/source/uibase/lingu/olmenu.src index 6d7947b..e60e5ab 100644 --- a/sw/source/uibase/lingu/olmenu.src +++ b/sw/source/uibase/lingu/olmenu.src @@ -52,18 +52,22 @@ Menu MN_SPELL_POPUP }; MenuItem { + Identifier = MN_SPELLING_DLG ; + HelpID = HID_LINGU_SPELLING_DLG ; + }; + SEPARATOR + MenuItem + { Identifier = MN_AUTOCORR ; HelpID = HID_LINGU_AUTOCORR ; SubMenu = Menu { }; - Text [ en-US ] = "Always correct to" ; + Text [ en-US ] = "Always correct ~to" ; }; MenuItem { - Identifier = MN_SPELLING_DLG ; - HelpID = HID_LINGU_SPELLING_DLG ; - Text [ en-US ] = "~Spellcheck..." ; + Identifier = MN_AUTO_CORRECT_DLG ; }; SEPARATOR MenuItem _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits