[Libreoffice-commits] .: editeng/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Sat Jul 30 13:37:49 PDT 2011
editeng/source/editeng/impedit2.cxx | 2 +-
editeng/source/editeng/impedit4.cxx | 2 +-
editeng/source/items/paraitem.cxx | 2 +-
editeng/source/misc/txtrange.cxx | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit e3731f712d8055d905646b53fff2a02075dd46d1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jul 30 22:28:07 2011 +0200
Some cppcheck cleaning
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index b5abb91..de4296c 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 bc0b332..ca3aa57 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 bcc453e..0ee0c2b 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 44257ff..51634f1 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);
More information about the Libreoffice-commits
mailing list