diff options
author | Yousuf Philips <philipz85@hotmail.com> | 2015-09-24 19:38:28 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2015-09-24 17:40:36 +0000 |
commit | 837c50d3d8390da359c5f07da3fdd87fc60d9158 (patch) | |
tree | 3f8261360f7fefa80405818d50eef89d668d3d1b /sw | |
parent | b71ba617e5c55ef4e98443fa10990b85665801fc (diff) |
tdf#92341 Add AutoCorrect entry in spellcheck context menu
Change-Id: I081f5e1cea39ce833254336286e10558ca75a466
Reviewed-on: https://gerrit.libreoffice.org/18828
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.hrc | 1 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.src | 12 |
3 files changed, 14 insertions, 4 deletions
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index d5c6c50915d8..18b49fafee90 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 fe6cbd803194..e2851a9d3357 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 6d7947b31d16..e60e5ab0e013 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 |