diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-19 15:40:40 +0200 |
commit | 2155e04d6343638ca9815d394cbc4f78c2b17c3a (patch) | |
tree | 0378142f6ce9edb63074291aed45527568e7b254 /sw/source/uibase/lingu | |
parent | cee02e81cd3b55fb46eacf5db5713e8bf4363bcd (diff) |
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/lingu')
-rw-r--r-- | sw/source/uibase/lingu/hyp.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx index 8f96c7fa9481..a86628f57d44 100644 --- a/sw/source/uibase/lingu/hyp.cxx +++ b/sw/source/uibase/lingu/hyp.cxx @@ -119,7 +119,7 @@ SwHyphWrapper::~SwHyphWrapper() if( nPageCount ) ::EndProgress( pView->GetDocShell() ); if( bInfoBox && !Application::IsHeadlessModeEnabled() ) - ScopedVclPtrInstance<InfoBox>(&pView->GetEditWin(), SW_RESSTR(STR_HYP_OK))->Execute(); + ScopedVclPtrInstance<InfoBox>(&pView->GetEditWin(), SwResId(STR_HYP_OK))->Execute(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index a00ddc42404e..dc336015eb51 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -207,12 +207,12 @@ void SwSpellPopup::fillLangPopupMenu( } } - pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, OUString(SW_RES( STR_LANGSTATUS_NONE )), MenuItemBits::RADIOCHECK ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, SwResId( STR_LANGSTATUS_NONE ), MenuItemBits::RADIOCHECK ); if ( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ) == aCurLang ) pPopupMenu->CheckItem( nLangItemIdStart + MN_NONE_OFFSET ); - pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, OUString(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )) ); - pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, OUString(SW_RES( STR_LANGSTATUS_MORE )) ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, SwResId( STR_RESET_TO_DEFAULT_LANGUAGE ) ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, SwResId( STR_LANGSTATUS_MORE ) ); } SwSpellPopup::SwSpellPopup( @@ -294,7 +294,7 @@ SwSpellPopup::SwSpellPopup( uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); - OUString aIgnoreSelection( SW_RES( STR_IGNORE_SELECTION ) ); + OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) ); m_xPopupMenu->SetItemText(m_nSpellDialogId, vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:SpellingAndGrammarDialog", aModuleName)); m_xPopupMenu->SetItemText(m_nCorrectDialogId, @@ -473,7 +473,7 @@ SwSpellPopup::SwSpellPopup( if ( !m_sExplanationLink.isEmpty( ) ) { - m_xPopupMenu->InsertItem(MN_EXPLANATION_LINK, SW_RESSTR(STR_EXPLANATION_LINK), MenuItemBits::TEXT | MenuItemBits::HELP, OString(), nPos++); + m_xPopupMenu->InsertItem(MN_EXPLANATION_LINK, SwResId(STR_EXPLANATION_LINK), MenuItemBits::TEXT | MenuItemBits::HELP, OString(), nPos++); } m_xPopupMenu->SetMenuFlags(MenuFlags::NoAutoMnemonics); @@ -512,7 +512,7 @@ SwSpellPopup::SwSpellPopup( uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); - OUString aIgnoreSelection( SW_RES( STR_IGNORE_SELECTION ) ); + OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) ); m_xPopupMenu->SetItemText(m_nSpellDialogId, vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:SpellingAndGrammarDialog", aModuleName)); sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId); @@ -661,11 +661,11 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, m_pSh->GetCursorDescr()); - aRewriter.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); + aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS)); - OUString aTmpStr( SW_RES(STR_START_QUOTE) ); + OUString aTmpStr( SwResId(STR_START_QUOTE) ); aTmpStr += aTmp; - aTmpStr += OUString(SW_RES(STR_END_QUOTE)); + aTmpStr += SwResId(STR_END_QUOTE); aRewriter.AddRule(UndoArg3, aTmpStr); m_pSh->StartUndo(SwUndoId::UI_REPLACE, &aRewriter); |