sw/source/core/edit/edlingu.cxx | 4 ++-- sw/source/uibase/lingu/olmenu.cxx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 822181788ec011418ac0ce95c57ea70feb4769f1 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Sun Nov 24 11:59:31 2019 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Sun Nov 24 12:19:34 2019 +0100 Fix some loplugin error. Change-Id: I22c1efbacc5b2d35d49f8183929b6177bf91e93d Reviewed-on: https://gerrit.libreoffice.org/83602 Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> Tested-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index f0220a8e7ef2..e6866e842400 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -900,7 +900,7 @@ uno::Reference< XSpellAlternatives > SwCursorMoveState eTmpState( MV_SETONLYTEXT ); SwTextNode *pNode = nullptr; SwWrongList *pWrong = nullptr; - if (pPt && GetLayout()->GetCursorOfst( &aPos, *(const_cast<Point*>(pPt)), &eTmpState )) + if (pPt && GetLayout()->GetCursorOfst( &aPos, *const_cast<Point*>(pPt), &eTmpState )) pNode = aPos.nNode.GetNode().GetTextNode(); if (nullptr == pNode) pNode = pCursor->GetNode().GetTextNode(); @@ -967,7 +967,7 @@ bool SwEditShell::GetGrammarCorrection( SwCursorMoveState eTmpState( MV_SETONLYTEXT ); SwTextNode *pNode = nullptr; SwGrammarMarkUp *pWrong = nullptr; - if (pPt && GetLayout()->GetCursorOfst( &aPos, *(const_cast<Point*>(pPt)), &eTmpState )) + if (pPt && GetLayout()->GetCursorOfst( &aPos, *const_cast<Point*>(pPt), &eTmpState )) pNode = aPos.nNode.GetNode().GetTextNode(); if (nullptr == pNode) pNode = pCursor->GetNode().GetTextNode(); diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index ac0fad353974..f48e3568312b 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -614,7 +614,7 @@ void SwSpellPopup::InitItemCommands(const css::uno::Sequence< OUString >& aSugge for(int i = 0; i < aSuggestions.getLength(); ++i) { sal_uInt16 nItemId = MN_SUGGESTION_START + i; - OUString sCommandString = OUString(".uno:SpellCheckApplySuggestion?ApplyRule:string="); + OUString sCommandString = ".uno:SpellCheckApplySuggestion?ApplyRule:string="; if(m_bGrammarResults) sCommandString += "Grammar_"; else if (m_xSpellAlt.is()) @@ -626,9 +626,9 @@ void SwSpellPopup::InitItemCommands(const css::uno::Sequence< OUString >& aSugge PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nLangSelectionMenuId); if(pMenu) { - for (auto item : m_aLangTable_Text) + for (const auto& item : m_aLangTable_Text) { - OUString sCommandString = OUString(".uno:LanguageStatus?Language:string=Current_") + item.second; + OUString sCommandString = ".uno:LanguageStatus?Language:string=Current_" + item.second; pMenu->SetItemCommand(item.first, sCommandString); } @@ -640,9 +640,9 @@ void SwSpellPopup::InitItemCommands(const css::uno::Sequence< OUString >& aSugge pMenu = m_xPopupMenu->GetPopupMenu(m_nLangParaMenuId); if(pMenu) { - for (auto item : m_aLangTable_Paragraph) + for (const auto& item : m_aLangTable_Paragraph) { - OUString sCommandString = OUString(".uno:LanguageStatus?Language:string=Paragraph_") + item.second; + OUString sCommandString = ".uno:LanguageStatus?Language:string=Paragraph_" + item.second; pMenu->SetItemCommand(item.first, sCommandString); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits