diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-24 11:59:31 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-26 18:40:28 +0100 |
commit | 16a0e85c9277665b3e74754fff7c690d83a97754 (patch) | |
tree | 0c7da500ad4822db6236a0840561bdbe0d5bd60f /sw | |
parent | 712f3b1bfdc882813656e19d47d2b867170aecc3 (diff) |
Fix some loplugin error.
Change-Id: I22c1efbacc5b2d35d49f8183929b6177bf91e93d
Reviewed-on: https://gerrit.libreoffice.org/83602
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit 822181788ec011418ac0ce95c57ea70feb4769f1)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 8d5b0b16641a..5db809e961e0 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -893,7 +893,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(); @@ -960,7 +960,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 d2a3666c8a05..0f4b1c32e742 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -619,7 +619,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()) @@ -631,9 +631,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); } @@ -645,9 +645,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); } |