diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-24 13:08:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-27 10:44:25 +0100 |
commit | 2e5508a17660401e1b4b489dbc9f70b978745b75 (patch) | |
tree | 881afcf9d8b9f0a653df0c94a8a2deefdf85670e /sw | |
parent | 470682b3abf0622f5e9663d62d8641f63ceb6f30 (diff) |
loplugin:unnecessaryparen check for (f1()).f2
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3
Reviewed-on: https://gerrit.libreoffice.org/45218
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/accpara.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/crsr/crbm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/CntntIdxStore.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentFieldsManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/doccomp.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/ftnfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/frmpaint.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/fmtatr2.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoparagraph.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unosect.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/lingu/hhcwrp.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/gloslst.cxx | 4 |
18 files changed, 29 insertions, 29 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 0d60a9d09af3..6a9d33767e35 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1409,7 +1409,7 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex) } if (pTextField) { - const SwField* pField = (pTextField->GetFormatField()).GetField(); + const SwField* pField = pTextField->GetFormatField().GetField(); if (pField) { strTypeName = SwFieldType::GetTypeStr(pField->GetTypeId()); diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx index 18c4c857f7d4..cae3a0b17fca 100644 --- a/sw/source/core/crsr/crbm.cxx +++ b/sw/source/core/crsr/crbm.cxx @@ -103,9 +103,9 @@ bool SwCursorShell::GotoMark(const ::sw::mark::IMark* const pMark, bool bAtStart // watch Cursor-Moves CursorStateHelper aCursorSt(*this); if ( bAtStart ) - *(aCursorSt.m_pCursor)->GetPoint() = pMark->GetMarkStart(); + *aCursorSt.m_pCursor->GetPoint() = pMark->GetMarkStart(); else - *(aCursorSt.m_pCursor)->GetPoint() = pMark->GetMarkEnd(); + *aCursorSt.m_pCursor->GetPoint() = pMark->GetMarkEnd(); if(aCursorSt.RollbackIfIllegal()) return false; diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 4c824c2198da..7f97c0c83250 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -434,7 +434,7 @@ void ContentIdxStoreImpl::SaveShellCursors(SwDoc* pDoc, sal_uLong nNode, sal_Int } while ( (_pStackCursor != nullptr ) && ((_pStackCursor = _pStackCursor->GetNext()) != static_cast<SwCursorShell*>(&rCurShell)->GetStackCursor()) ); - for(SwPaM& rPaM : (static_cast<SwCursorShell*>(&rCurShell)->GetCursor_())->GetRingContainer()) + for(SwPaM& rPaM : static_cast<SwCursorShell*>(&rCurShell)->GetCursor_()->GetRingContainer()) { lcl_ChkPaMBoth( m_aShellCursorEntries, nNode, nContent, rPaM); } diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index f0e1609c115f..414433ababd7 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -524,7 +524,7 @@ bool DocumentFieldsManager::UpdateField(SwTextField * pDstTextField, SwField & r case SwFieldIds::Macro: if( bUpdateFields && pDstTextField->GetpTextNode() ) - (pDstTextField->GetpTextNode())-> + pDstTextField->GetpTextNode()-> ModifyNotification( nullptr, pDstFormatField ); break; diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 158e5dd30ac6..d27b15468de6 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1722,7 +1722,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) { do { SwPosition& rSttEnd = *pTmp->End(), - & rEndStt = *(pTmp->GetNext())->Start(); + & rEndStt = *pTmp->GetNext()->Start(); const SwContentNode* pCNd; if( rSttEnd == rEndStt || (!rEndStt.nContent.GetIndex() && @@ -1740,7 +1740,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) else { // are consecutive, so combine - rSttEnd = *(pTmp->GetNext())->End(); + rSttEnd = *pTmp->GetNext()->End(); delete pTmp->GetNext(); } } diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index de694019e1bd..00703c236c16 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -306,7 +306,7 @@ void SwFrame::PrepareMake(vcl::RenderContext* pRenderContext) // me when formatting. This as you can see could easily become a // confusing situation that we want to avoid. if ( bFoll && pFrame->IsFlowFrame() && - (SwFlowFrame::CastFlowFrame(pFrame))->IsAnFollow( pThis ) ) + SwFlowFrame::CastFlowFrame(pFrame)->IsAnFollow( pThis ) ) break; pFrame->MakeAll(pRenderContext); @@ -417,7 +417,7 @@ void SwFrame::PrepareCursor() // me when formatting. This as you can see could easily become a // confusing situation that we want to avoid. if ( bFoll && pFrame->IsFlowFrame() && - (SwFlowFrame::CastFlowFrame(pFrame))->IsAnFollow( pThis ) ) + SwFlowFrame::CastFlowFrame(pFrame)->IsAnFollow( pThis ) ) break; pFrame->MakeAll(getRootFrame()->GetCurrShell()->GetOut()); diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index d49eac75c66c..23fd2a19c624 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -550,7 +550,7 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) if ( GetPrev() && GetPrev() == GetMaster() ) { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetPrev()->GetLower() ), "Footnote without content?" ); - (SwFlowFrame::CastFlowFrame( GetPrev()->GetLower()))-> + SwFlowFrame::CastFlowFrame( GetPrev()->GetLower())-> MoveSubTree( this, GetLower() ); SwFrame *pDel = GetPrev(); pDel->Cut(); @@ -559,7 +559,7 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling ) if ( GetNext() && GetNext() == GetFollow() ) { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetNext()->GetLower() ), "Footnote without content?" ); - (SwFlowFrame::CastFlowFrame( GetNext()->GetLower()))->MoveSubTree( this ); + SwFlowFrame::CastFlowFrame( GetNext()->GetLower() )->MoveSubTree( this ); SwFrame *pDel = GetNext(); pDel->Cut(); SwFrame::DestroyFrame(pDel); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 51370b19b021..8d41f27b870b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2212,22 +2212,22 @@ static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const vcl::RenderCont aSizedRect.Bottom() += (aTwipToPxSize.Height()/2 + 1); // adjust left() - while ( (aOut.LogicToPixel(aSizedRect)).Left() < aOrgPxRect.Left() ) + while ( aOut.LogicToPixel(aSizedRect).Left() < aOrgPxRect.Left() ) { ++aSizedRect.Left(); } // adjust right() - while ( (aOut.LogicToPixel(aSizedRect)).Right() > aOrgPxRect.Right() ) + while ( aOut.LogicToPixel(aSizedRect).Right() > aOrgPxRect.Right() ) { --aSizedRect.Right(); } // adjust top() - while ( (aOut.LogicToPixel(aSizedRect)).Top() < aOrgPxRect.Top() ) + while ( aOut.LogicToPixel(aSizedRect).Top() < aOrgPxRect.Top() ) { ++aSizedRect.Top(); } // adjust bottom() - while ( (aOut.LogicToPixel(aSizedRect)).Bottom() > aOrgPxRect.Bottom() ) + while ( aOut.LogicToPixel(aSizedRect).Bottom() > aOrgPxRect.Bottom() ) { --aSizedRect.Bottom(); } diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 491c3f3b2e52..2e39abf3c40e 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2320,7 +2320,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) // section which has a height of 0, because this is not growable and thus // all kinds of unexpected things could happen. if ( !bEmulateTableKeepFwdMoveAllowed || - ( IsInSct() && (FindSctFrame())->Lower()->IsColumnFrame() && + ( IsInSct() && FindSctFrame()->Lower()->IsColumnFrame() && 0 == aRectFnSet.GetHeight(GetUpper()->getFrameArea()) ) ) { diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index ad35d18daf01..d4f4a9097b9c 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -420,7 +420,7 @@ SwRect SwTextFrame::Paint() long l; if ( IsVertLR() ) // mba: the following line was added, but we don't need it for the existing directions; kept for IsVertLR(), but should be checked - rRepaint.Chg( ( GetUpper()->getFrameArea() ).Pos() + ( GetUpper()->getFramePrintArea() ).Pos(), ( GetUpper()->getFramePrintArea() ).SSize() ); + rRepaint.Chg( GetUpper()->getFrameArea().Pos() + GetUpper()->getFramePrintArea().Pos(), GetUpper()->getFramePrintArea().SSize() ); if( rRepaint.GetOfst() ) rRepaint.Left( rRepaint.GetOfst() ); diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 55275b0e8c80..383362f87f5b 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -559,7 +559,7 @@ bool SwFormatMeta::operator==( const SfxPoolItem & i_rOther ) const SfxPoolItem * SwFormatMeta::Clone( SfxItemPool * /*pPool*/ ) const { // if this is indeed a copy, then DoCopy must be called later! - return (m_pMeta) // #i105148# pool default may be cloned also! + return m_pMeta // #i105148# pool default may be cloned also! ? new SwFormatMeta( m_pMeta, Which() ) : new SwFormatMeta( Which() ); } diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 60d24750cd51..424564b72450 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1048,7 +1048,7 @@ bool SwTextNode::Spell(SwSpellArgs* pArgs) pArgs->xSpellAlt = pArgs->xSpeller->spell( rWord, (sal_uInt16)eActLang, Sequence< PropertyValue >() ); } - if( (pArgs->xSpellAlt).is() ) + if( pArgs->xSpellAlt.is() ) { if( IsSymbol( aScanner.GetBegin() ) ) { diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 6eb73d3c0147..1d07c320bb12 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -343,7 +343,7 @@ SwXParagraph::attachToText(SwXText & rParent, SwTextNode & rTextNode) { try { setString(m_pImpl->m_sText); } catch(...){} - (m_pImpl->m_sText).clear(); + m_pImpl->m_sText.clear(); } } } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index b8c32ae13f78..0a587b80f129 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1459,7 +1459,7 @@ SwXTextSection::setPropertyToDefault(const OUString& rPropertyName) { if (m_pImpl->m_bIsDescriptor) { - (m_pImpl->m_pProps->m_sCondition).clear(); + m_pImpl->m_pProps->m_sCondition.clear(); } else { @@ -1475,9 +1475,9 @@ SwXTextSection::setPropertyToDefault(const OUString& rPropertyName) if (m_pImpl->m_bIsDescriptor) { m_pImpl->m_pProps->m_bDDE = false; - (m_pImpl->m_pProps->m_sLinkFileName).clear(); - (m_pImpl->m_pProps->m_sSectionRegion).clear(); - (m_pImpl->m_pProps->m_sSectionFilter).clear(); + m_pImpl->m_pProps->m_sLinkFileName.clear(); + m_pImpl->m_pProps->m_sSectionRegion.clear(); + m_pImpl->m_pProps->m_sSectionFilter.clear(); } else { diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 431d9a42f73c..9e82fb933a85 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -693,7 +693,7 @@ void SwHHCWrapper::ConvEnd_impl( SwConversionArgs const *pConversionArgs ) bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs ) { bool bProgress = !m_bIsDrawObj && !m_bIsSelection; - (pConversionArgs->aConvText).clear(); + pConversionArgs->aConvText.clear(); pConversionArgs->nConvTextLang = LANGUAGE_NONE; m_pView->GetWrtShell().SpellContinue( &m_nPageCount, bProgress ? &m_nPageStart : nullptr, pConversionArgs ); return !pConversionArgs->aConvText.isEmpty(); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 4ac8be850663..5a7aa7de520b 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1175,7 +1175,7 @@ void SwPagePreview::Init() SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): SfxViewShell( pViewFrame, SWVIEWFLAGS ), - m_pViewWin( VclPtr<SwPagePreviewWin>::Create(&(GetViewFrame())->GetWindow(), *this ) ), + m_pViewWin( VclPtr<SwPagePreviewWin>::Create(&GetViewFrame()->GetWindow(), *this ) ), m_nNewPage(USHRT_MAX), m_sPageStr(SwResId(STR_PAGE)), m_pHScrollbar(nullptr), diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 2e10acd8b45e..357ec98cc461 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1253,7 +1253,7 @@ void SwLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderCont { SwGlblDocContent* pCont = static_cast<SwGlblDocContent*>(rEntry.GetUserData()); if (pCont->GetType() == GLBLDOC_SECTION && - !(pCont->GetSection())->IsConnectFlag()) + !pCont->GetSection()->IsConnectFlag()) { rRenderContext.Push(PushFlags::FONT); vcl::Font aOldFont(rRenderContext.GetFont()); diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 96d7212643a1..785b0fbfd59b 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -370,8 +370,8 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) { SwTextBlocks* pBlock = pGlossaries->GetGroupDoc(pGroup->sName); pGroup->nCount = pBlock ? pBlock->GetCount() : 0; - (pGroup->sLongNames).clear(); - (pGroup->sShortNames).clear(); + pGroup->sLongNames.clear(); + pGroup->sShortNames.clear(); if(pBlock) pGroup->sTitle = pBlock->GetName(); |