diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-07-30 22:28:07 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-07-30 22:36:30 +0200 |
commit | 958409d82091d7706d7aa045829a149728ba7a5e (patch) | |
tree | c06c1d6da94abe3ff44fca7733ebf05e6f4c13d3 /editeng | |
parent | 4122c3b9d58b0df701b903f8bf9dc6e843aeba1b (diff) |
Some cppcheck cleaning
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/misc/txtrange.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 06b166a81777..fd4f9c795ec3 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1037,7 +1037,7 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, sal_True ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); - sal_Bool bPortionRTL = nRTLLevel%2 ? sal_True : sal_False; + sal_Bool bPortionRTL = (nRTLLevel%2) ? sal_True : sal_False; if ( bStart ) { diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 6df195de51a8..9b86411d8cf1 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -2919,7 +2919,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, } while( nCurrentEnd < nEndPos ); } - if (aChanges.size() > 0) + if (!aChanges.empty()) { // Create a single UndoAction on Demand for all the changes ... if ( !pUndo && IsUndoEnabled() && !IsInUndo() ) diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 066d2da7667d..9c60edfb2eb5 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -1010,7 +1010,7 @@ bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const case MID_STD_TAB: { const SvxTabStop &rTab = *(GetStart()); - rVal <<= static_cast<sal_Int32>(bConvert ? TWIP_TO_MM100(rTab.GetTabPos()) : rTab.GetTabPos()); + rVal <<= (static_cast<sal_Int32>(bConvert ? TWIP_TO_MM100(rTab.GetTabPos()) : rTab.GetTabPos())); break; } } diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index fae50995f2f4..0c16dd5fb46e 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -258,7 +258,7 @@ void SvxBoundArgs::NoteRange( sal_Bool bToggle ) DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" ); while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin ) ++nIdx; - sal_Bool bOdd = nIdx % 2 ? sal_True : sal_False; + sal_Bool bOdd = (nIdx % 2) ? sal_True : sal_False; // No overlap with existing intervals? if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) ) { // Then a new one is inserted ... @@ -643,7 +643,7 @@ LongDqPtr TextRanger::GetTextRanges( const Range& rRange ) { DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" ); //Can we find the result we need in the cache? - for (std::deque<RangeCache>::iterator it = mRangeCache.begin(); it < mRangeCache.end(); ++it) + for (std::deque<RangeCache>::iterator it = mRangeCache.begin(); it != mRangeCache.end(); ++it) { if (it->range == rRange) return &(it->results); |