diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-25 14:57:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-27 09:04:51 +0000 |
commit | 0107e13069f12cb8a27353e2028bb7513da524e8 (patch) | |
tree | dea3e5a636bcca63e3f7370aa177fbe661994119 | |
parent | e577882476f141d94cede91224805d7a6b009cf7 (diff) |
convert spell menu to .ui
This reverts commit 73f2944618e637762125fabd214b09b4fa50fb90.
Change-Id: Idddd89869d1670cf71e932ccd4dbface30c730d9
-rw-r--r-- | sw/CppunitTest_sw_odfimport.mk | 2 | ||||
-rw-r--r-- | sw/UIConfig_swriter.mk | 3 | ||||
-rw-r--r-- | sw/inc/helpid.h | 3 | ||||
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/olmenu.hxx | 16 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 113 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.hrc | 9 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.src | 90 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/spellmenu.ui | 142 |
9 files changed, 240 insertions, 142 deletions
diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk index 4c249d5d6168..36a16db9bdf6 100644 --- a/sw/CppunitTest_sw_odfimport.mk +++ b/sw/CppunitTest_sw_odfimport.mk @@ -85,6 +85,6 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfimport,\ xmloff/util/xo \ )) -$(eval $(call gb_CppunitTest_use_configuration,sw_odfimport)) +$(eval $(call gb_CppunitTest_use_instdir_configuration,sw_odfimport)) # vim: set noet sw=4 ts=4: diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 95495a2038d0..8d51e8c4bc55 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -242,8 +242,9 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/pagefooterpanel \ sw/uiconfig/swriter/ui/sidebarwrap \ sw/uiconfig/swriter/ui/sidebarstylepresets \ - sw/uiconfig/swriter/ui/sidebartheme \ + sw/uiconfig/swriter/ui/sidebartheme \ sw/uiconfig/swriter/ui/sortdialog \ + sw/uiconfig/swriter/ui/spellmenu \ sw/uiconfig/swriter/ui/splittable \ sw/uiconfig/swriter/ui/statisticsinfopage \ sw/uiconfig/swriter/ui/stringinput \ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 559d40cfc83a..f06dac6c83ae 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -99,9 +99,6 @@ #define HID_MN_READONLY_LOADGRAPHIC "SW_HID_MN_READONLY_LOADGRAPHIC" #define HID_MN_READONLY_GRAPHICOFF "SW_HID_MN_READONLY_GRAPHICOFF" -#define HID_LINGU_ADD_WORD "SW_HID_LINGU_ADD_WORD" -#define HID_LINGU_IGNORE_WORD "SW_HID_LINGU_IGNORE_WORD" -#define HID_LINGU_SPELLING_DLG "SW_HID_LINGU_SPELLING_DLG" #define HID_LINGU_AUTOCORR "SW_HID_LINGU_AUTOCORR" #define HID_LINGU_REPLACE "SW_HID_LINGU_REPLACE" #define HID_SMARTTAG_MAIN "SW_HID_SMARTTAG_MAIN" // SMARTTAGS diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 3aae77683b84..9572e7f4dba4 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -663,8 +663,8 @@ DECLARE_ODFIMPORT_TEST(testSpellmenuRedline, "spellmenu-redline.odt") // Make sure that if we show the spellcheck popup menu (for the current // document, which contains redlines), then the last two entries will be // always 'go to next/previous change'. - CPPUNIT_ASSERT_EQUAL(sal_uInt16(FN_REDLINE_NEXT_CHANGE), rMenu.GetItemId(rMenu.GetItemCount() - 2)); - CPPUNIT_ASSERT_EQUAL(sal_uInt16(FN_REDLINE_PREV_CHANGE), rMenu.GetItemId(rMenu.GetItemCount() - 1)); + CPPUNIT_ASSERT_EQUAL(OString("next"), rMenu.GetItemIdent(rMenu.GetItemId(rMenu.GetItemCount() - 2))); + CPPUNIT_ASSERT_EQUAL(OString("prev"), rMenu.GetItemIdent(rMenu.GetItemId(rMenu.GetItemCount() - 1))); } DECLARE_ODFIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.odt") diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index af1156b2eb4b..a2077cd3baf8 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/uno/Sequence.h> #include <rtl/ustring.hxx> +#include <vcl/builder.hxx> #include <vcl/image.hxx> #include <vcl/menu.hxx> @@ -35,7 +36,20 @@ class SwWrtShell; class SW_DLLPUBLIC SwSpellPopup { - ScopedVclPtrInstance<PopupMenu> m_xPopupMenu; + VclBuilder m_aBuilder; + VclPtr<PopupMenu> m_xPopupMenu; + sal_uInt16 m_nIgnoreWordId; + sal_uInt16 m_nAddMenuId; + sal_uInt16 m_nAddId; + sal_uInt16 m_nSpellDialogId; + sal_uInt16 m_nCorrectMenuId; + sal_uInt16 m_nCorrectDialogId; + sal_uInt16 m_nLangSelectionMenuId; + sal_uInt16 m_nLangParaMenuId; + sal_uInt16 m_nRedlineAcceptId; + sal_uInt16 m_nRedlineRejectId; + sal_uInt16 m_nRedlineNextId; + sal_uInt16 m_nRedlinePrevId; SwWrtShell* m_pSh; css::uno::Sequence< css::uno::Reference< css::linguistic2::XDictionary > > m_aDics; css::uno::Reference< css::linguistic2::XSpellAlternatives > m_xSpellAlt; diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 2932585ab6c3..39a52d85399b 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -259,7 +259,20 @@ SwSpellPopup::SwSpellPopup( SwWrtShell* pWrtSh, const uno::Reference< linguistic2::XSpellAlternatives > &xAlt, const OUString &rParaText) - : m_xPopupMenu( SW_RES(MN_SPELL_POPUP) ) + : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") + , m_xPopupMenu(m_aBuilder.get_menu("menu")) + , m_nIgnoreWordId(m_xPopupMenu->GetItemId("ignoreall")) + , m_nAddMenuId(m_xPopupMenu->GetItemId("addmenu")) + , m_nAddId(m_xPopupMenu->GetItemId("add")) + , m_nSpellDialogId(m_xPopupMenu->GetItemId("spelldialog")) + , m_nCorrectMenuId(m_xPopupMenu->GetItemId("correctmenu")) + , m_nCorrectDialogId(m_xPopupMenu->GetItemId("correctdialog")) + , m_nLangSelectionMenuId(m_xPopupMenu->GetItemId("langselection")) + , m_nLangParaMenuId(m_xPopupMenu->GetItemId("langpara")) + , m_nRedlineAcceptId(m_xPopupMenu->GetItemId("accept")) + , m_nRedlineRejectId(m_xPopupMenu->GetItemId("reject")) + , m_nRedlineNextId(m_xPopupMenu->GetItemId("next")) + , m_nRedlinePrevId(m_xPopupMenu->GetItemId("prev")) , m_pSh( pWrtSh ) , m_xSpellAlt(xAlt) , m_nGrammarError(0) @@ -280,7 +293,7 @@ SwSpellPopup::SwSpellPopup( SvtLinguConfig aCfg; - PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(MN_AUTOCORR); + PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nCorrectMenuId); pMenu->SetMenuFlags(MenuFlags::NoAutoMnemonics); bool bEnable = false; if( nStringCount ) @@ -320,13 +333,13 @@ SwSpellPopup::SwSpellPopup( OUString aIgnoreSelection( SW_RES( STR_IGNORE_SELECTION ) ); OUString aSpellingAndGrammar = RetrieveLabelFromCommand( ".uno:SpellingAndGrammarDialog" ); - m_xPopupMenu->SetItemText(MN_SPELLING_DLG, aSpellingAndGrammar); - m_xPopupMenu->SetItemText(MN_AUTO_CORRECT_DLG, RetrieveLabelFromCommand(".uno:AutoCorrectDlg")); - sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos( MN_IGNORE_WORD ); + m_xPopupMenu->SetItemText(m_nSpellDialogId, aSpellingAndGrammar); + m_xPopupMenu->SetItemText(m_nCorrectDialogId, RetrieveLabelFromCommand(".uno:AutoCorrectDlg")); + sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId); m_xPopupMenu->InsertItem(MN_IGNORE_SELECTION, aIgnoreSelection, MenuItemBits::NONE, OString(), nItemPos); m_xPopupMenu->SetHelpId(MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); - m_xPopupMenu->EnableItem(MN_AUTOCORR, bEnable); + m_xPopupMenu->EnableItem(m_nCorrectMenuId, bEnable); uno::Reference< linguistic2::XLanguageGuessing > xLG = SW_MOD()->GetLanguageGuesser(); m_nGuessLangWord = LANGUAGE_NONE; @@ -345,7 +358,7 @@ SwSpellPopup::SwSpellPopup( m_nGuessLangPara = m_nGuessLangWord; } - pMenu = m_xPopupMenu->GetPopupMenu(MN_ADD_TO_DIC); + pMenu = m_xPopupMenu->GetPopupMenu(m_nAddMenuId); pMenu->SetMenuFlags(MenuFlags::NoAutoMnemonics); //! necessary to retrieve the correct dictionary name in 'Execute' below uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); sal_uInt16 nItemId = MN_DICTIONARIES_START; @@ -399,8 +412,8 @@ SwSpellPopup::SwSpellPopup( } } } - m_xPopupMenu->EnableItem(MN_ADD_TO_DIC, (nItemId - MN_DICTIONARIES_START) > 1); - m_xPopupMenu->EnableItem(MN_ADD_TO_DIC_SINGLE, (nItemId - MN_DICTIONARIES_START) == 1); + m_xPopupMenu->EnableItem(m_nAddMenuId, (nItemId - MN_DICTIONARIES_START) > 1); + m_xPopupMenu->EnableItem(m_nAddId, (nItemId - MN_DICTIONARIES_START) == 1); //ADD NEW LANGUAGE MENU ITEM @@ -426,19 +439,19 @@ SwSpellPopup::SwSpellPopup( aSeq[2] = aKeyboardLang; aSeq[3] = SvtLanguageTable::GetLanguageString(m_nGuessLangWord); - pMenu = m_xPopupMenu->GetPopupMenu(MN_SET_LANGUAGE_SELECTION); + pMenu = m_xPopupMenu->GetPopupMenu(m_nLangSelectionMenuId); fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, m_aLangTable_Text ); - m_xPopupMenu->EnableItem(MN_SET_LANGUAGE_SELECTION); + m_xPopupMenu->EnableItem(m_nLangSelectionMenuId); - pMenu = m_xPopupMenu->GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH); + pMenu = m_xPopupMenu->GetPopupMenu(m_nLangParaMenuId); fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, m_aLangTable_Paragraph ); - m_xPopupMenu->EnableItem(MN_SET_LANGUAGE_PARAGRAPH); + m_xPopupMenu->EnableItem(m_nLangParaMenuId); if (bUseImagesInMenus) { uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ".uno:SpellingAndGrammarDialog", false ); - m_xPopupMenu->SetItemImage( MN_SPELLING_DLG, rImg ); + m_xPopupMenu->SetItemImage(m_nSpellDialogId, rImg); } checkRedline(); @@ -451,7 +464,20 @@ SwSpellPopup::SwSpellPopup( sal_Int32 nErrorInResult, const uno::Sequence< OUString > &rSuggestions, const OUString &rParaText ) - : m_xPopupMenu(SW_RES(MN_SPELL_POPUP)) + : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") + , m_xPopupMenu(m_aBuilder.get_menu("menu")) + , m_nIgnoreWordId(m_xPopupMenu->GetItemId("ignoreall")) + , m_nAddMenuId(m_xPopupMenu->GetItemId("addmenu")) + , m_nAddId(m_xPopupMenu->GetItemId("add")) + , m_nSpellDialogId(m_xPopupMenu->GetItemId("spelldialog")) + , m_nCorrectMenuId(m_xPopupMenu->GetItemId("correctmenu")) + , m_nCorrectDialogId(m_xPopupMenu->GetItemId("correctdialog")) + , m_nLangSelectionMenuId(m_xPopupMenu->GetItemId("langselection")) + , m_nLangParaMenuId(m_xPopupMenu->GetItemId("langpara")) + , m_nRedlineAcceptId(m_xPopupMenu->GetItemId("accept")) + , m_nRedlineRejectId(m_xPopupMenu->GetItemId("reject")) + , m_nRedlineNextId(m_xPopupMenu->GetItemId("next")) + , m_nRedlinePrevId(m_xPopupMenu->GetItemId("prev")) , m_pSh(pWrtSh) , m_xGrammarResult(rResult) , m_aSuggestions(rSuggestions) @@ -524,13 +550,13 @@ SwSpellPopup::SwSpellPopup( OUString aIgnoreSelection( SW_RES( STR_IGNORE_SELECTION ) ); OUString aSpellingAndGrammar = RetrieveLabelFromCommand( ".uno:SpellingAndGrammarDialog" ); - m_xPopupMenu->SetItemText(MN_SPELLING_DLG, aSpellingAndGrammar); - sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(MN_IGNORE_WORD); + m_xPopupMenu->SetItemText(m_nSpellDialogId, aSpellingAndGrammar); + sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId); m_xPopupMenu->InsertItem(MN_IGNORE_SELECTION, aIgnoreSelection, MenuItemBits::NONE, OString(), nItemPos); m_xPopupMenu->SetHelpId(MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION); - m_xPopupMenu->EnableItem(MN_AUTOCORR, false); - m_xPopupMenu->EnableItem(MN_AUTO_CORRECT_DLG, false); + m_xPopupMenu->EnableItem(m_nCorrectMenuId, false); + m_xPopupMenu->EnableItem(m_nCorrectDialogId, false); uno::Reference< linguistic2::XLanguageGuessing > xLG = SW_MOD()->GetLanguageGuesser(); m_nGuessLangWord = LANGUAGE_NONE; @@ -548,8 +574,8 @@ SwSpellPopup::SwSpellPopup( m_nGuessLangPara = m_nGuessLangWord; } - m_xPopupMenu->EnableItem(MN_ADD_TO_DIC, false); - m_xPopupMenu->EnableItem(MN_ADD_TO_DIC_SINGLE, false); + m_xPopupMenu->EnableItem(m_nAddMenuId, false); + m_xPopupMenu->EnableItem(m_nAddId, false); //ADD NEW LANGUAGE MENU ITEM @@ -575,19 +601,19 @@ SwSpellPopup::SwSpellPopup( aSeq[2] = aKeyboardLang; aSeq[3] = SvtLanguageTable::GetLanguageString(m_nGuessLangWord); - PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(MN_SET_LANGUAGE_SELECTION); + PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nLangSelectionMenuId); fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, m_aLangTable_Text ); - m_xPopupMenu->EnableItem( MN_SET_LANGUAGE_SELECTION ); + m_xPopupMenu->EnableItem(m_nLangSelectionMenuId); - pMenu = m_xPopupMenu->GetPopupMenu(MN_SET_LANGUAGE_PARAGRAPH); + pMenu = m_xPopupMenu->GetPopupMenu(m_nLangParaMenuId); fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, m_aLangTable_Paragraph ); - m_xPopupMenu->EnableItem(MN_SET_LANGUAGE_PARAGRAPH); + m_xPopupMenu->EnableItem(m_nLangParaMenuId); if (bUseImagesInMenus) { uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ".uno:SpellingAndGrammarDialog", false ); - m_xPopupMenu->SetItemImage(MN_SPELLING_DLG, rImg); + m_xPopupMenu->SetItemImage(m_nSpellDialogId, rImg); } checkRedline(); @@ -621,11 +647,20 @@ void SwSpellPopup::checkRedline() // cleared or not. for (sal_uInt16 nWhich : pRedlineIds) { - m_xPopupMenu->EnableItem(nWhich, aSet.Get(nWhich).Which()); + sal_uInt16 nId(0); + if (nWhich == FN_REDLINE_ACCEPT_DIRECT) + nId = m_nRedlineAcceptId; + else if (nWhich == FN_REDLINE_REJECT_DIRECT) + nId = m_nRedlineRejectId; + else if (nWhich == FN_REDLINE_NEXT_CHANGE) + nId = m_nRedlineNextId; + else if (nWhich == FN_REDLINE_PREV_CHANGE) + nId = m_nRedlinePrevId; + m_xPopupMenu->EnableItem(nId, aSet.Get(nWhich).Which()); } } -void SwSpellPopup::Execute( const Rectangle& rWordPos, vcl::Window* pWin ) +void SwSpellPopup::Execute( const Rectangle& rWordPos, vcl::Window* pWin ) { sal_uInt16 nRet = m_xPopupMenu->Execute(pWin, pWin->LogicToPixel(rWordPos)); Execute( nRet ); @@ -701,7 +736,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) m_pSh->SetInsMode( bOldIns ); } } - else if (nId == MN_SPELLING_DLG) + else if (nId == m_nSpellDialogId) { if (m_bGrammarResults) { @@ -715,7 +750,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON ); } } - else if (nId == MN_AUTO_CORRECT_DLG) + else if (nId == m_nCorrectDialogId) { m_pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON ); } @@ -725,7 +760,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) if (pPaM) SwEditShell::IgnoreGrammarErrorAt( *pPaM ); } - else if (nId == MN_IGNORE_WORD) + else if (nId == m_nIgnoreWordId) { uno::Reference< linguistic2::XDictionary > xDictionary( LinguMgr::GetIgnoreAllList(), uno::UNO_QUERY ); if (m_bGrammarResults) { @@ -755,14 +790,14 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } } } - else if ((MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) || nId == MN_ADD_TO_DIC_SINGLE) + else if ((MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) || nId == m_nAddId) { OUString sWord( m_xSpellAlt->getWord() ); OUString aDicName; if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { - PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(MN_ADD_TO_DIC); + PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nAddMenuId); aDicName = pMenu->GetItemText(nId); } else @@ -806,9 +841,17 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) aErrorBox->Execute(); } } - else if (nId == FN_REDLINE_ACCEPT_DIRECT || nId == FN_REDLINE_REJECT_DIRECT - || nId == FN_REDLINE_NEXT_CHANGE || nId == FN_REDLINE_PREV_CHANGE) + else if (nId == m_nRedlineAcceptId || nId == m_nRedlineRejectId + || nId == m_nRedlineNextId || nId == m_nRedlinePrevId) { + if (nId == m_nRedlineAcceptId) + nId = FN_REDLINE_ACCEPT_DIRECT; + else if (nId == m_nRedlineRejectId) + nId = FN_REDLINE_REJECT_DIRECT; + else if (nId == m_nRedlineNextId) + nId = FN_REDLINE_NEXT_CHANGE; + else if (nId == m_nRedlinePrevId) + nId = FN_REDLINE_PREV_CHANGE; // Let SwView::Execute() handle the redline actions. SfxRequest aReq(m_pSh->GetView().GetViewFrame(), nId); m_pSh->GetView().Execute(aReq); diff --git a/sw/source/uibase/lingu/olmenu.hrc b/sw/source/uibase/lingu/olmenu.hrc index a0cd367a54cf..e10626918d07 100644 --- a/sw/source/uibase/lingu/olmenu.hrc +++ b/sw/source/uibase/lingu/olmenu.hrc @@ -22,7 +22,6 @@ #include "rcid.hrc" -#define MN_SPELL_POPUP (RC_LINGU_BEGIN + 1) #define STR_SPELL_OK (RC_LINGU_BEGIN + 2) #define STR_HYP_OK (RC_LINGU_BEGIN + 3) #define STR_WORD (RC_LINGU_BEGIN + 4) @@ -36,17 +35,9 @@ #define BMP_INFO_16 (RC_LINGU_BEGIN + 100) //! Don't change these values. You may break context menu modifying extensions! -#define MN_SPELLING_DLG 200 #define MN_IGNORE_SELECTION 201 -#define MN_IGNORE_WORD 202 -#define MN_ADD_TO_DIC 203 -#define MN_AUTOCORR 204 -#define MN_SET_LANGUAGE_SELECTION 205 -#define MN_SET_LANGUAGE_PARAGRAPH 206 #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 53ec2b402398..9dc16ca78b1f 100644 --- a/sw/source/uibase/lingu/olmenu.src +++ b/sw/source/uibase/lingu/olmenu.src @@ -22,96 +22,6 @@ #include "cmdid.h" #include "helpid.h" -#define SEPARATOR MenuItem { Separator = TRUE; }; - -Menu MN_SPELL_POPUP -{ - ItemList = - { - MenuItem - { - Identifier = MN_IGNORE_WORD ; - HelpID = HID_LINGU_IGNORE_WORD ; - Text [ en-US ] = "I~gnore All" ; - }; - MenuItem - { - Identifier = MN_ADD_TO_DIC ; - HelpID = HID_LINGU_ADD_WORD ; - SubMenu = Menu - { - }; - Text [ en-US ] = "~Add to Dictionary" ; - }; - MenuItem - { - Identifier = MN_ADD_TO_DIC_SINGLE ; - HelpID = HID_LINGU_ADD_WORD ; - Text [ en-US ] = "~Add to Dictionary" ; - }; - 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" ; - }; - MenuItem - { - Identifier = MN_AUTO_CORRECT_DLG ; - }; - SEPARATOR - MenuItem - { - Identifier = MN_SET_LANGUAGE_SELECTION ; - SubMenu = Menu - { - }; - Text [ en-US ] = "Set Language for Selection" ; - }; - MenuItem - { - Identifier = MN_SET_LANGUAGE_PARAGRAPH ; - SubMenu = Menu - { - }; - Text [ en-US ] = "Set Language for Paragraph" ; - }; - SEPARATOR - MenuItem - { - Identifier = FN_REDLINE_ACCEPT_DIRECT; - HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; - Text [ en-US ] = "Accept Change" ; - }; - MenuItem - { - Identifier = FN_REDLINE_REJECT_DIRECT ; - HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; - Text [ en-US ] = "Reject Change" ; - }; - MenuItem - { - Identifier = FN_REDLINE_NEXT_CHANGE; - HelpId = CMD_FN_REDLINE_NEXT_CHANGE ; - Text [ en-US ] = "Next Change" ; - }; - MenuItem - { - Identifier = FN_REDLINE_PREV_CHANGE; - HelpId = CMD_FN_REDLINE_PREV_CHANGE ; - Text [ en-US ] = "Previous Change" ; - }; - }; -}; String STR_WORD { Text [ en-US ] = "Word is " ; diff --git a/sw/uiconfig/swriter/ui/spellmenu.ui b/sw/uiconfig/swriter/ui/spellmenu.ui new file mode 100644 index 000000000000..91c09f776374 --- /dev/null +++ b/sw/uiconfig/swriter/ui/spellmenu.ui @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.0 --> +<interface> + <requires lib="gtk+" version="3.10"/> + <object class="GtkMenu" id="menu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuItem" id="ignoreall"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">I_gnore All</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="addmenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Add to Dictionary</property> + <property name="use_underline">True</property> + <child type="submenu"> + <object class="GtkMenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + <child> + <object class="GtkMenuItem" id="add"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Add to Dictionary</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="spelldialog"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkSeparatorMenuItem" id="separator1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="correctmenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Always correct _to</property> + <child type="submenu"> + <object class="GtkMenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + <child> + <object class="GtkMenuItem" id="correctdialog"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkSeparatorMenuItem" id="separator2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="langselection"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Set Language for Selection</property> + <child type="submenu"> + <object class="GtkMenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + <child> + <object class="GtkMenuItem" id="langpara"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Set Language for Paragraph</property> + <child type="submenu"> + <object class="GtkMenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + <child> + <object class="GtkSeparatorMenuItem" id="separator3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="accept"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Accept Change</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="reject"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Reject Change</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="next"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Next Change</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="prev"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Previous Change</property> + <property name="use_underline">True</property> + </object> + </child> + </object> +</interface> |