summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-05 08:32:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-05 11:08:48 +0200
commit4b2262ab5b10f334f1984fec84d2978db81c58f1 (patch)
treede56663eba6ed2edf7a26127339dd8563fdf47be /editeng
parentec1de6895d84fbe4f2d5fb7135a59a918138d970 (diff)
new loplugin unnecessaryparen
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit.cxx5
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx6
-rw-r--r--editeng/source/items/frmitems.cxx2
-rw-r--r--editeng/source/items/numitem.cxx2
-rw-r--r--editeng/source/rtf/svxrtf.cxx10
7 files changed, 13 insertions, 16 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index bc0cfe7f2450..7bfc830731e8 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -980,11 +980,10 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
long nOnePixel = pOutWin->PixelToLogic( Size( 1, 0 ) ).Width();
- if ( /* pEditEngine->pImpEditEngine->GetStatus().AutoPageSize() || */
- ( ( aEditCursor.Top() + nOnePixel >= GetVisDocTop() ) &&
+ if ( ( aEditCursor.Top() + nOnePixel >= GetVisDocTop() ) &&
( aEditCursor.Bottom() - nOnePixel <= GetVisDocBottom() ) &&
( aEditCursor.Left() + nOnePixel >= GetVisDocLeft() ) &&
- ( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) ) )
+ ( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) )
{
tools::Rectangle aCursorRect = GetWindowPos( aEditCursor );
GetCursor()->SetPos( aCursorRect.TopLeft() );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index c9da3379184b..695bc15af8fc 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4133,7 +4133,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
pPortion->nFirstLineOffset = nUpper;
}
- if ( ( nPortion != (GetParaPortions().Count()-1) ) )
+ if ( nPortion != (GetParaPortions().Count()-1) )
{
pPortion->nHeight += GetYValue( rULItem.GetLower() ); // not in the last
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 0ce4ef391aba..4862863ebb94 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3471,7 +3471,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
if ( nOrientation || ( !IsVertical() && ( ( aTmpPos.X() + nTxtWidth ) >= nFirstVisXPos ) )
|| ( IsVertical() && ( ( aTmpPos.Y() + nTxtWidth ) >= nFirstVisYPos ) ) )
{
- if ( nEsc && ( ( aTmpFont.GetUnderline() != LINESTYLE_NONE ) ) )
+ if ( nEsc && ( aTmpFont.GetUnderline() != LINESTYLE_NONE ) )
{
// Paint the high/low without underline,
// Display the Underline on the
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index b31de7889ac3..4e284d35e82f 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1490,7 +1490,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
bool bIsStart = false;
if ( bMultipleDoc )
bIsStart = true; // Accessible from the front or from behind ...
- else if ( ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart ) )
+ else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
bIsStart = true;
EditSpellWrapper* pWrp = new EditSpellWrapper( Application::GetDefDialogParent(),
@@ -1857,7 +1857,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
{
if ( aCurSel.Max().GetNode() == pLastNode )
{
- if ( ( aCurSel.Max().GetIndex() >= pLastNode->Len() ) )
+ if ( aCurSel.Max().GetIndex() >= pLastNode->Len() )
break;
}
}
@@ -2363,7 +2363,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
EditPaM aLastEnd( aSel.Max() );
aSel = WordRight( aSel.Max(), i18n::WordType::DICTIONARY_WORD );
if ( bChanged && ( aSel.Min().GetNode() == pNode ) &&
- ( ( aSel.Min().GetIndex()-aLastEnd.GetIndex() > 1 ) ) )
+ ( aSel.Min().GetIndex()-aLastEnd.GetIndex() > 1 ) )
{
// If two words are separated by more than one blank, it
// can happen that when splitting a Wrongs the start of
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 28c56dcd3bf6..a18747e067d6 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1800,7 +1800,7 @@ SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& r
rSvxLine.SetWidth( bConvert? convertMm100ToTwip( rLine.LineWidth ) : rLine.LineWidth );
// fdo#46112: double does not necessarily mean symmetric
// for backwards compatibility
- bGuessWidth = ((SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle)) &&
+ bGuessWidth = (SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle) &&
(rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 681eee47f567..56cdfe8fb73b 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -783,7 +783,7 @@ void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, bool bI
{
DBG_ASSERT(i < SVX_MAX_NUM, "Wrong Level" );
- if( (i < SVX_MAX_NUM) )
+ if( i < SVX_MAX_NUM )
{
bool bReplace = !aFmtsSet[i];
if (!bReplace)
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index bc3f25ff9fca..c93841466570 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -279,9 +279,8 @@ INSINGLECHAR:
break;
default:
{
- if( /*( '{' == GetStackPtr( -1 )->nTokenId ) ||*/
- ( RTF_IGNOREFLAG == GetStackPtr( -1 )->nTokenId &&
- '{' == GetStackPtr( -2 )->nTokenId ) )
+ if( RTF_IGNOREFLAG == GetStackPtr( -1 )->nTokenId &&
+ '{' == GetStackPtr( -2 )->nTokenId )
SkipGroup();
}
break;
@@ -890,10 +889,9 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
bCrsrBack = nNd != pInsPos->GetNodeIdx();
}
- if( ( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() ||
+ if( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() ||
( pOld->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
- pOld->nSttCnt <= pInsPos->GetCntIdx() ))
- )
+ pOld->nSttCnt <= pInsPos->GetCntIdx() ) )
{
if( !bCrsrBack )
{