target cppcheck index incrementing revert

Change-Id: I890dfe9fbd7b5a850daaa0d2b4d5040a5ddbefd7
This commit is contained in:
Michael Meeks
2012-05-31 14:30:02 +01:00
parent a49cd8632e
commit 4139e6a208
4 changed files with 6 additions and 10 deletions

View File

@@ -296,7 +296,7 @@ public:
rVector.resize( m_nLevel );
vector< uno::Any >::iterator aIt( rVector.begin() );
for( sal_Int32 nN=0; aIt<rVector.end(); ++aIt, ++nN)
for( sal_Int32 nN=0; aIt<rVector.end(); aIt++, nN++)
{
if( nN==m_nLevel )
break;
@@ -318,7 +318,7 @@ public:
void operator() ( vector< uno::Any >& rVector )
{
vector< uno::Any >::iterator aIt( rVector.begin() );
for( sal_Int32 nN=0; aIt<rVector.end(); ++aIt, ++nN)
for( sal_Int32 nN=0; aIt<rVector.end(); aIt++, nN++)
{
if( nN==m_nLevel )
{

View File

@@ -94,7 +94,7 @@ void PageCollector::CollectNonCustomShowPages( const com::sun::star::uno::Refere
{
std::vector< Reference< XDrawPage > > vUsedPageList;
PageCollector::CollectCustomShowPages( rxModel, rCustomShowName, vUsedPageList );
if ( !vUsedPageList.empty() )
if ( vUsedPageList.size() )
{
Reference< XDrawPagesSupplier > xDrawPagesSupplier( rxModel, UNO_QUERY_THROW );
Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );

View File

@@ -219,7 +219,7 @@ sal_Int32 PDFIProcessor::getFontId( const FontAttributes& rAttr ) const
// line diagnose block - start
void PDFIProcessor::processGlyphLine()
{
if( m_GlyphsList.empty() )
if( m_GlyphsList.size()<1 )
return;
double fPreAvarageSpaceValue= 0.0;
@@ -315,21 +315,17 @@ void PDFIProcessor::processGlyphLine()
ParagraphElement* pPara= NULL ;
FrameElement* pFrame= NULL ;
if(!m_GlyphsList.empty())
if(m_GlyphsList.size()>0)
{
pFrame = m_pElFactory->createFrameElement( m_GlyphsList[0].getCurElement(), getGCId( getTransformGlyphContext( m_GlyphsList[0])) );
pFrame->ZOrder = m_nNextZOrder++;
pPara = m_pElFactory->createParagraphElement( pFrame );
processGlyph( 0,
m_GlyphsList[0],
pPara,
pFrame,
m_bIsWhiteSpaceInLine );
}

View File

@@ -2378,7 +2378,7 @@ SwXDocumentIndexes::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
return ::sw::SupportsServiceImpl(
SAL_N_ELEMENTS(g_ServicesDocumentIndexes)
SAL_N_ELEMENTS(g_ServicesDocumentIndexes),
g_ServicesDocumentIndexes, rServiceName);
}