diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-10 04:28:44 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-10 04:31:11 -0500 |
commit | a6aea52f0d4e2b0fbd4a5f662bf9383c0fb9b737 (patch) | |
tree | 61db825baa72596af6f2546d7b3f8b7190d30ba5 /sw | |
parent | 0bbc4c2f7f49e6ee82e4e5c323c3056127fd35fc (diff) |
squash some warning: suggest parentheses around && within ||
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/shells/frmsh.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewtab.cxx | 53 |
3 files changed, 34 insertions, 32 deletions
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 5d972af52f72..7c229f696df7 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -710,8 +710,9 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_HORZ_RIGHT: case FN_FRAME_ALIGN_HORZ_LEFT: if ( (eFrmType & FRMTYPE_FLY_INCNT) || - bProtect || - (nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER)&& bHtmlMode ) + bProtect || + ((nWhich == FN_FRAME_ALIGN_HORZ_CENTER || nWhich == SID_OBJECT_ALIGN_CENTER) && + bHtmlMode )) rSet.DisableItem( nWhich ); break; case FN_FRAME_ALIGN_VERT_ROW_TOP: @@ -721,7 +722,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_CHAR_CENTER: case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: if ( !(eFrmType & FRMTYPE_FLY_INCNT) || bProtect - || bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich ) + || (bHtmlMode && FN_FRAME_ALIGN_VERT_CHAR_BOTTOM == nWhich) ) rSet.DisableItem( nWhich ); break; @@ -732,7 +733,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) case FN_FRAME_ALIGN_VERT_TOP: case FN_FRAME_ALIGN_VERT_CENTER: case FN_FRAME_ALIGN_VERT_BOTTOM: - if ( bProtect || bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT) + if ( bProtect || (bHtmlMode && eFrmType & FRMTYPE_FLY_ATCNT)) rSet.DisableItem( nWhich ); else { diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 3c774d615a89..936db05bbe2b 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1225,8 +1225,8 @@ bool lcl_IsOwnDocument( SwView& rView ) String Created = xDocProps->getAuthor(); String Changed = xDocProps->getModifiedBy(); String FullName = SW_MOD()->GetUserOptions().GetFullName(); - return FullName.Len() && - (Changed.Len() && Changed == FullName ) || + return (FullName.Len() && + (Changed.Len() && Changed == FullName )) || (!Changed.Len() && Created.Len() && Created == FullName ); } diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 44e314a7475b..9e806f5b5159 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -529,7 +529,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) aUL.SetLower( (USHORT)aLongULSpace.GetLower() ); aDesc.GetMaster().SetFmtAttr( aUL ); - if( bHead && pHeaderFmt || !bHead && pFooterFmt ) + if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt )) { SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() : pFooterFmt->GetFrmSize() ); @@ -694,7 +694,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt())) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -826,7 +826,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) SvxColumnItem aColItem((const SvxColumnItem&)rReq. GetArgs()->Get(nSlot)); - if( bSetTabColFromDoc || !bSect && rSh.GetTableFmt() ) + if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) ) { ASSERT(aColItem.Count(), "ColDesc ist leer!!"); @@ -1074,13 +1074,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) if ( ISA( SwWebView ) || IsTabColFromDoc() || IsTabRowFromDoc() || - ( nSelType & nsSelectionType::SEL_GRF) || - (nSelType & nsSelectionType::SEL_FRM) || - (nSelType & nsSelectionType::SEL_OLE) || - SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE)|| - !bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich)|| - bVerticalWriting && (RES_PARATR_TABSTOP == nWhich) - ) + ( nSelType & nsSelectionType::SEL_GRF ) || + ( nSelType & nsSelectionType::SEL_FRM ) || + ( nSelType & nsSelectionType::SEL_OLE ) || + ( SFX_ITEM_AVAILABLE > aCoreSet.GetItemState(RES_LR_SPACE) ) || + (!bVerticalWriting && (SID_ATTR_TABSTOP_VERTICAL == nWhich) ) || + ( bVerticalWriting && (RES_PARATR_TABSTOP == nWhich)) + ) rSet.DisableItem( nWhich ); else { @@ -1103,12 +1103,12 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_ATTR_PARA_LRSPACE: { if ( nSelType & nsSelectionType::SEL_GRF || - nSelType & nsSelectionType::SEL_FRM || - nSelType & nsSelectionType::SEL_OLE || - nFrmType == FRMTYPE_DRAWOBJ || - !bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)|| - bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich) - ) + nSelType & nsSelectionType::SEL_FRM || + nSelType & nsSelectionType::SEL_OLE || + nFrmType == FRMTYPE_DRAWOBJ || + (!bVerticalWriting && (SID_ATTR_PARA_LRSPACE_VERTICAL == nWhich)) || + ( bVerticalWriting && (SID_ATTR_PARA_LRSPACE == nWhich)) + ) { rSet.DisableItem(nWhich); } @@ -1282,12 +1282,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bTableVertical = bHasTable && rSh.IsTableVertical(); - if((SID_RULER_BORDERS_VERTICAL == nWhich) && - ((bHasTable && !bTableVertical)|| - (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) || - ((SID_RULER_BORDERS == nWhich) && - ((bHasTable && bTableVertical)|| - (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) + if(((SID_RULER_BORDERS_VERTICAL == nWhich) && + ((bHasTable && !bTableVertical) || + (!bVerticalWriting && !bFrmSelection && !bHasTable ) || + ( bFrmSelection && !bFrameHasVerticalColumns))) || + ((SID_RULER_BORDERS == nWhich) && + ((bHasTable && bTableVertical) || + (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); else if ( bHasTable ) { @@ -1501,10 +1502,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) BOOL bFrameRTL; BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection; - if((SID_RULER_ROWS == nWhich) && - ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) || - ((SID_RULER_ROWS_VERTICAL == nWhich) && - ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) + if(((SID_RULER_ROWS == nWhich) && + ((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) || + ((SID_RULER_ROWS_VERTICAL == nWhich) && + ((bVerticalWriting && !bFrmSelection) || bFrameHasVerticalColumns))) rSet.DisableItem(nWhich); else if ( IsTabRowFromDoc() || ( rSh.GetTableFmt() && !bFrmSelection && |