diff options
author | Mattias Johnsson <m.t.johnsson@gmail.com> | 2010-11-06 10:30:17 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-11-06 10:30:17 -0500 |
commit | 7325aa38bdb81fede27f62f9253854308175bfd8 (patch) | |
tree | de0bcda5c4336c170ba58729b3408047271403db | |
parent | 95148eb30805e495dce0cd369cfa01662233a63b (diff) |
Clean up compiler warnings
-rw-r--r-- | sw/source/core/edit/edsect.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ascii/ascatr.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmlctxt.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/parcss1.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/glosdoc.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/shells/txtattr.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/utlui/content.cxx | 11 |
18 files changed, 40 insertions, 42 deletions
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 3a80c7075be0..91f4d5a2429b 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -144,8 +144,8 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC const SwSectionFmt* pFmt = rFmts[ n ]; if( pFmt->IsInNodesArr() && (bChkTOX || - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION - && TOX_HEADER_SECTION != eTmpType )) + ((eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + && TOX_HEADER_SECTION != eTmpType ))) { const SwSection& rSect = *rFmts[ n ]->GetSection(); if( (!bChkReadOnly && !bChkHidden ) || diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 64af948a4472..c030c83db8ee 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -1748,8 +1748,8 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, (!pTmp->IsCellFrm() || ( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX && (pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) || - bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && - (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) + (bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && + (pTmp->Frm().*fnRect->fnGetRight)()> nSX2) ) ) ) pTmp = pTmp->GetNextLayoutLeaf(); if ( pTmp ) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 2a2fcd78658c..2657e775b76a 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -530,7 +530,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut ) if ( rL2.GetTab() != rL1.GetTab() || rL2.IsPainted() || rL2.IsLocked() || - bVert == rL2.Height() > rL2.Width() ) + bVert == (rL2.Height() > rL2.Width()) ) continue; long nL2a, nL2b, nL2c, nL2d; @@ -704,12 +704,12 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects ) if ( rLine.IsLocked () ) continue; - if ( !bVerticalSubs == rLine.Height() > rLine.Width() ) //gleiche Ausrichtung? + if ( !bVerticalSubs == (rLine.Height() > rLine.Width()) ) // same direction? continue; if ( aSubsRect.IsOver( rLine ) ) { - if ( bVerticalSubs ) //Vertikal? + if ( bVerticalSubs ) // Vertical? { if ( aSubsRect.Left() <= rLine.Right() && aSubsRect.Right() >= rLine.Left() ) @@ -949,7 +949,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, SwLineRect &rLk = operator[](k); if ( rLi.SSize() == rLk.SSize() ) { - if ( bVerticalSubs == rLk.Height() > rLk.Width() ) + if ( bVerticalSubs == (rLk.Height() > rLk.Width()) ) { if ( bVerticalSubs ) { @@ -6305,7 +6305,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const { const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo(); - BOOL bLineInFly = rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys() + BOOL bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys()) || (sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE; SwRect aRect( rRect ); diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index a0bb16e01af5..9be5c568c09d 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -580,10 +580,10 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt, while ( pCell && !pCell->IsCellFrm() ) pCell = pCell->GetUpper(); if ( !pCell || - ( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) && + (( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) && ( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) && ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) ) && - !pCell->IsCoveredCell() ) + !pCell->IsCoveredCell()) ) bProtect = FALSE; else pCnt = (*fnNxtPrv)( pCnt ); @@ -702,14 +702,14 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart, const long nPrtLeft = bRTL ? (pTable->*fnRect->fnGetPrtRight)() : (pTable->*fnRect->fnGetPrtLeft)(); - if ( bRTL != nX < nPrtLeft ) + if ( bRTL != (nX < nPrtLeft) ) nX = nPrtLeft; else { const long nPrtRight = bRTL ? (pTable->*fnRect->fnGetPrtLeft)() : (pTable->*fnRect->fnGetPrtRight)(); - if ( bRTL != nX > nPrtRight ) + if ( bRTL != (nX > nPrtRight) ) nX = nPrtRight; } } diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index dff9c796032f..018ee76aaef6 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -3126,7 +3126,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) // Finally adjust the columns if width is set to auto // Possible optimisation: execute this code earlier in this function and // return??? - if ( ( bVert && bHeightChgd || ! bVert && bWidthChgd ) && + if ( ( (bVert && bHeightChgd) || (!bVert && bWidthChgd) ) && Lower()->IsColumnFrm() ) { // get column attribute diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 845a41684cb0..83fd55e1d90a 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -145,7 +145,7 @@ public: // need to find the page ( and index ) for this control uno::Reference< drawing::XDrawPageSupplier > xSupplier( mpDocShell->GetModel(), uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xIndex( xSupplier->getDrawPage(), uno::UNO_QUERY_THROW ); - sal_Int32 nLen = xIndex->getCount(); + bool bMatched = false; uno::Sequence< script::ScriptEventDescriptor > aFakeEvents; try diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 35599daecf94..7df6c801624d 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -964,7 +964,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: throw beans::PropertyVetoException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pFmt->GetDoc(); - if ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID) || + if ( ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID)) || (FN_PARAM_COUNTOUR_PP == pEntry->nWID) || (FN_UNO_IS_AUTOMATIC_CONTOUR == pEntry->nWID) || (FN_UNO_IS_PIXEL_CONTOUR == pEntry->nWID) ) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index e64397faa3dc..84f3b7c23c0c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1775,8 +1775,8 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, if( pCharStyleNames[i] != SwXNumberingRules::GetInvalidStyle() && ((pCharStyleNames[i].Len() && !pFmt->GetCharFmt()) || - pCharStyleNames[i].Len() && - pFmt->GetCharFmt()->GetName() != pCharStyleNames[i] )) + (pCharStyleNames[i].Len() && + pFmt->GetCharFmt()->GetName() != pCharStyleNames[i]) )) { SwCharFmt* pCharFmt = 0; @@ -1808,8 +1808,8 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, //jetzt nochmal fuer Fonts if(pBulletFontNames[i] != SwXNumberingRules::GetInvalidStyle() && ((pBulletFontNames[i].Len() && !pFmt->GetBulletFont()) || - pBulletFontNames[i].Len() && - pFmt->GetBulletFont()->GetName() != pBulletFontNames[i] )) + (pBulletFontNames[i].Len() && + pFmt->GetBulletFont()->GetName() != pBulletFontNames[i]) )) { const SvxFontListItem* pFontListItem = (const SvxFontListItem* )pDoc->GetDocShell() @@ -3440,8 +3440,8 @@ MakeObject: { const SwPageDesc& rDesc = aBase.GetOldPageDesc(); const SwFrmFmt* pFrmFmt = 0; - sal_Bool bShare = bHeader && rDesc.IsHeaderShared()|| - !bHeader && rDesc.IsFooterShared(); + sal_Bool bShare = (bHeader && rDesc.IsHeaderShared()) || + (!bHeader && rDesc.IsFooterShared()); // TextLeft returns the left content if there is one, // Text and TextRight return the master content. // TextRight does the same as Text and is for diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 0c1601abcd28..2a21ee899db5 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -206,8 +206,8 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) } while( nStrPos < nEnde ); if( !bLastNd || - ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) - && !nStrPos && nEnde == nNodeEnde ) + (( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) + && !nStrPos && nEnde == nNodeEnde )) rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd()); return rWrt; diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index 1cb1ca15255f..cd58fc9a594e 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -193,7 +193,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) nOldEndCnt = pPam->GetPoint()->nContent.GetIndex(); } - if( RES_PARATR_BEGIN <= nWhich && bMoveBack || + if( (RES_PARATR_BEGIN <= nWhich && bMoveBack) || pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() || (pAttr->GetSttPara() == *pOldEndPara && pAttr->GetSttCnt() != nOldEndCnt) ) diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx index ab9f16c36cc7..f31c1fe37fa9 100644 --- a/sw/source/filter/html/parcss1.cxx +++ b/sw/source/filter/html/parcss1.cxx @@ -174,7 +174,7 @@ CSS1Token CSS1Parser::GetNextToken() } while( ('A' <= cNextCh && cNextCh <= 'Z') || ('a' <= cNextCh && cNextCh <= 'z') || ('0' <= cNextCh && cNextCh <= '9') || - '-'==cNextCh && !IsEOF() ); + ('-'==cNextCh && !IsEOF()) ); aToken += String(sTmpBuffer.makeStringAndClear()); @@ -272,7 +272,7 @@ CSS1Token CSS1Parser::GetNextToken() } while( ('A' <= cNextCh && cNextCh <= 'Z') || ('a' <= cNextCh && cNextCh <= 'z') || ('0' <= cNextCh && cNextCh <= '9') || - '-' == cNextCh && !IsEOF() ); + ('-' == cNextCh && !IsEOF()) ); aToken += String(sTmpBuffer.makeStringAndClear()); diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx index b669440a1ba4..808628d2d27d 100644 --- a/sw/source/ui/misc/glosdoc.cxx +++ b/sw/source/ui/misc/glosdoc.cxx @@ -498,7 +498,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull) aDirArr.DeleteAndDestroy(0, aDirArr.Count()); if(!nTokenCount || - m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath) ) + (m_sErrPath.Len() && (bPathChanged || m_sOldErrPath != m_sErrPath)) ) { m_sOldErrPath = m_sErrPath; // Falscher Pfad, d.h. AutoText-Verzeichnis existiert nicht diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 0a21d2ae19b3..9c85ad6b0f68 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -549,8 +549,8 @@ void SwOutlineSettingsTabPage::Update() bSameSuffix &= aNumFmtArr[i]->GetSuffix() == aNumFmtArr[0]->GetSuffix(); bSameComplete &= aNumFmtArr[i]->GetIncludeUpperLevels() == aNumFmtArr[0]->GetIncludeUpperLevels(); const SwCharFmt* pFmt = aNumFmtArr[i]->GetCharFmt(); - bSameCharFmt &= !pFirstFmt && !pFmt - || pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName(); + bSameCharFmt &= (!pFirstFmt && !pFmt) + || (pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName()); } } CheckForStartValue_Impl(aNumFmtArr[0]->GetNumberingType()); diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index b936ebb5b265..6e69cd11099d 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -455,7 +455,6 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField) { if (&aTextSizeMF == pField) { - sal_Int32 nTextSize = static_cast< sal_Int32 >(aTextSizeMF.Denormalize(aTextSizeMF.GetValue(FUNIT_TWIP))); m_bRubyUserValue = sal_False; } //set maximum line per page diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index f385b53e8b14..91278df13286 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -923,7 +923,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) } break; case FN_INSERT_HRULER : - if(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() || bCrsrInHidden ) + if ( (rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()) || bCrsrInHidden ) rSet.DisableItem(nWhich); break; case FN_FORMAT_COLUMN : diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 53076e7aed5f..9ce1454febd1 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -1748,8 +1748,8 @@ void SwTextShell::ChangeHeaderOrFooter( String sTmp(aDesc.GetName()); if( !rStyleName.Len() || rStyleName == sTmp ) { - if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && - (bHeader && aDesc.GetMaster().GetHeader().IsActive()) || + if( (bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && + (bHeader && aDesc.GetMaster().GetHeader().IsActive())) || (!bHeader && aDesc.GetMaster().GetFooter().IsActive())) { bShowWarning = FALSE; diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 43ee2df4305f..f5b8e7ae4d49 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -108,8 +108,8 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) eEscape = nWhich == FN_SET_SUPER_SCRIPT ? SVX_ESCAPEMENT_SUPERSCRIPT: SVX_ESCAPEMENT_SUBSCRIPT; - if( nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0 || - nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0 ) + if( (nWhich == FN_SET_SUB_SCRIPT && nTmpEsc < 0) || + (nWhich == FN_SET_SUPER_SCRIPT && nTmpEsc > 0) ) eEscape = SVX_ESCAPEMENT_OFF; SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 1beea561d3fd..30461dd66965 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -1545,7 +1545,6 @@ void SwContentTree::Display( sal_Bool bActive ) if(nRootType != CONTENT_TYPE_OUTLINE) { - SvLBoxEntry* pEntry; for(sal_uInt16 i = 0; i < (*ppRootContentT)->GetMemberCount(); i++ ) { const SwContent* pCnt = (*ppRootContentT)->GetMember(i); @@ -2138,7 +2137,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) SvLBoxEntry* pFirstEntry = FirstSelected(); if (pFirstEntry && lcl_IsContent(pFirstEntry)) { - if(bIsRoot && nRootType == CONTENT_TYPE_OUTLINE || + if ( (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE) || ((SwContent*)pFirstEntry->GetUserData())->GetParent()->GetType() == CONTENT_TYPE_OUTLINE) { @@ -2156,8 +2155,8 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier) if( nMove ) { short nDir = nCmd == FN_ITEM_UP ? -1 : 1; - if( !bModifier && (nDir == -1 && nActPos > 0 || - nDir == 1 && nActPos < GetEntryCount() - 2 ) ) + if( !bModifier && ( (nDir == -1 && nActPos > 0) || + (nDir == 1 && nActPos < GetEntryCount() - 2) ) ) { pShell->MoveOutlinePara( nDir ); //Cursor wieder an die aktuelle Position setzen @@ -2787,8 +2786,8 @@ sal_Bool SwContentTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect ) pParentEntry = GetParent(pParentEntry); } if(!bIsLastReadOnly && (!IsVisible() || - (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry || - lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE))) + ( (bIsRoot && nRootType == CONTENT_TYPE_OUTLINE && pParentEntry) || + (lcl_IsContent(pEntry) && ((SwContentType*)pParentEntry->GetUserData())->GetType() == CONTENT_TYPE_OUTLINE)) )) bEnable = sal_True; SwNavigationPI* pNavi = GetParentWindow(); pNavi->aContentToolBox.EnableItem(FN_ITEM_UP , bEnable); |