basic/source/uno/dlgcont.cxx | 2 +- chart2/source/view/main/ChartView.cxx | 2 +- chart2/source/view/main/VDataSeries.cxx | 2 +- extensions/source/bibliography/general.cxx | 4 ++-- hwpfilter/source/hwpfile.cxx | 6 +++--- sc/source/filter/xml/XMLStylesExportHelper.cxx | 2 +- sc/source/ui/unoobj/chart2uno.cxx | 2 +- sc/source/ui/vba/vbarange.cxx | 2 +- sdext/source/minimizer/pagecollector.cxx | 2 +- sdext/source/pdfimport/tree/pdfiprocessor.cxx | 2 +- sw/source/core/access/accportions.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 2 +- sw/source/core/crsr/viscrs.cxx | 2 +- sw/source/core/doc/docnum.cxx | 2 +- sw/source/filter/html/swhtml.hxx | 2 +- sw/source/filter/ww8/rtfstringbuffer.cxx | 2 +- sw/source/filter/ww8/wrtw8nds.cxx | 2 +- ucb/source/ucp/cmis/cmis_content.cxx | 8 ++++---- ucb/source/ucp/cmis/cmis_datasupplier.cxx | 2 +- ucb/source/ucp/ftp/ftpurl.cxx | 2 +- ucb/source/ucp/webdav/webdavcontent.cxx | 2 +- ucbhelper/source/client/proxydecider.cxx | 2 +- 22 files changed, 28 insertions(+), 28 deletions(-)
New commits: commit 6b11a18071254a443c8fe7e7b0b1c95b0f9fd35e Author: Julien Nabet <serval2...@yahoo.fr> Date: Sat Jun 30 18:20:20 2012 +0200 Some cppcheck cleaning Change-Id: I14cab3dfd26ac1568feef902b566873cecf049b9 diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index c2a65ac..034d4b1 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -283,7 +283,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, mxOwnerDocument ); std::vector< rtl::OUString > vEmbeddedImageURLs; GraphicObject::InspectForGraphicObjectImageURL( Reference< XInterface >( xDialogModel, UNO_QUERY ), vEmbeddedImageURLs ); - if ( vEmbeddedImageURLs.size() ) + if ( !vEmbeddedImageURLs.empty() ) { // Export the images to the storage Sequence< Any > aArgs( 1 ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 0d21ebe..8714040 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -763,7 +763,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter( } //transport seriesnames to the coordinatesystems if needed - if( m_aSeriesPlotterList.size() ) + if( !m_aSeriesPlotterList.empty() ) { uno::Sequence< rtl::OUString > aSeriesNames; bool bSeriesNamesInitialized = false; diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index 9fc7695..25420ad 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -110,7 +110,7 @@ struct lcl_LessXOfPoint inline bool operator() ( const std::vector< double >& first, const std::vector< double >& second ) { - if( first.size() > 0 && second.size() > 0 ) + if( !first.empty() && !second.empty() ) { return first[0]<second[0]; } diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 6eabac4..ca25076 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -844,7 +844,7 @@ sal_Bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) if( pWindow->HasChildPathFocus() ) { // save focused control DBG_ASSERT( nFocused == 0xFFFF, "+BibGeneralPage::HandleShortCutKey(): more than one with focus?!" ); - DBG_ASSERT( aMatchList.size() > 0, "+BibGeneralPage::HandleShortCutKey(): push_back and no content?!" ); + DBG_ASSERT( !aMatchList.empty(), "+BibGeneralPage::HandleShortCutKey(): push_back and no content?!" ); nFocused = aMatchList.size() - 1; } } @@ -854,7 +854,7 @@ sal_Bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) if( bHandled ) { - DBG_ASSERT( aMatchList.size() > 0, "*BibGeneralPage::HandleShortCutKey(): be prepared to crash..." ); + DBG_ASSERT( !aMatchList.empty(), "*BibGeneralPage::HandleShortCutKey(): be prepared to crash..." ); if( nFocused >= ( aMatchList.size() - 1 ) ) // >=... includes 0xFFFF diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index f1dc426..8cc1f48 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -255,7 +255,7 @@ bool HWPFile::ReadParaList(std::list < HWPPara* > &aplist, unsigned char flag) } if (spNode->nch && spNode->reuse_shape) { - if (aplist.size()){ + if (!aplist.empty()){ spNode->pshape = aplist.back()->pshape; } else{ @@ -267,7 +267,7 @@ bool HWPFile::ReadParaList(std::list < HWPPara* > &aplist, unsigned char flag) if( spNode->nch ) AddParaShape( &spNode->pshape ); - if (aplist.size()) + if (!aplist.empty()) aplist.back()->SetNext(spNode); aplist.push_back(spNode); spNode = new HWPPara; @@ -441,7 +441,7 @@ void HWPFile::AddBox(FBox * box) { // LATER if we don't use box->next(), // AddBox() and GetBoxHead() are useless; - if (blist.size()) + if (!blist.empty()) { box->prev = blist.back(); box->prev->next = box; diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index 2c5b43b..3a459ae 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -350,7 +350,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport, void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport) { - if (aValidationVec.size()) + if (!aValidationVec.empty()) { SvXMLElementExport aElemVs(rExport, XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATIONS, true, true); ScMyValidationVec::iterator aItr(aValidationVec.begin()); diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 7f17f84..fa95350 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2030,7 +2030,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum } } - if( bDifferentIndexes && aSequenceMappingVector.size() ) + if( bDifferentIndexes && !aSequenceMappingVector.empty() ) { aResult.push_back( beans::PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SequenceMapping")), -1, diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a10ded4..61435d4 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -1163,7 +1163,7 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S vNames.push_back( aToken ); } while ( nIndex >= 0 ); - if ( !vNames.size() ) + if ( vNames.empty() ) vNames.push_back( sName ); std::vector< rtl::OUString >::iterator it = vNames.begin(); diff --git a/sdext/source/minimizer/pagecollector.cxx b/sdext/source/minimizer/pagecollector.cxx index 511299b..668ce5f 100644 --- a/sdext/source/minimizer/pagecollector.cxx +++ b/sdext/source/minimizer/pagecollector.cxx @@ -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.size() ) + if ( !vUsedPageList.empty() ) { Reference< XDrawPagesSupplier > xDrawPagesSupplier( rxModel, UNO_QUERY_THROW ); Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 1024803..c14e489 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -316,7 +316,7 @@ void PDFIProcessor::processGlyphLine() ParagraphElement* pPara= NULL ; FrameElement* pFrame= NULL ; - if(m_GlyphsList.size()>0) + if(!m_GlyphsList.empty()) { pFrame = m_pElFactory->createFrameElement( m_GlyphsList[0].getCurElement(), getGCId( getTransformGlyphContext( m_GlyphsList[0])) ); pFrame->ZOrder = m_nNextZOrder++; diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 03ee5a1..0da4e0a 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -224,7 +224,7 @@ void SwAccessiblePortionData::LineBreak() void SwAccessiblePortionData::Skip(sal_uInt16 nLength) { OSL_ENSURE( !bFinished, "We are already done!" ); - OSL_ENSURE( aModelPositions.size() == 0, "Never Skip() after portions" ); + OSL_ENSURE( aModelPositions.empty(), "Never Skip() after portions" ); OSL_ENSURE( nLength <= pTxtNode->GetTxt().Len(), "skip exceeds model string!" ); nModelPosition += nLength; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 310e271..779670b 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3293,7 +3293,7 @@ void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes, } } - if ( aSmartTagTypes.size() ) + if ( !aSmartTagTypes.empty() ) { rSmartTagTypes.realloc( aSmartTagTypes.size() ); rStringKeyMaps.realloc( aSmartTagTypes.size() ); diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 91613c6..6386760 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -330,7 +330,7 @@ void SwSelPaintRects::Show() if(mpCursorOverlay) { - if(aNewRanges.size()) + if(!aNewRanges.empty()) { static_cast< sdr::overlay::OverlaySelection* >(mpCursorOverlay)->setRanges(aNewRanges); } diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 5ba43b4..dcb9b1a 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1052,7 +1052,7 @@ sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast ) ++aListIter; } - while ( aListsForDeletion.size() > 0 ) + while ( !aListsForDeletion.empty() ) { SwList* pList = aListsForDeletion.back(); aListsForDeletion.pop_back(); diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 0a34e6f..30a7713 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -298,7 +298,7 @@ public: inline sal_Bool IsULSpaceChanged() const { return bULSpaceChanged; } inline void GetULSpace( sal_uInt16& rUpper, sal_uInt16& rLower ) const; - sal_Bool HasAttrs() const { return aAttrs.size() != 0; } + sal_Bool HasAttrs() const { return !aAttrs.empty(); } const _HTMLAttrs& GetAttrs() const { return aAttrs; } _HTMLAttrs& GetAttrs() { return aAttrs; } diff --git a/sw/source/filter/ww8/rtfstringbuffer.cxx b/sw/source/filter/ww8/rtfstringbuffer.cxx index 554adb1..13546db 100644 --- a/sw/source/filter/ww8/rtfstringbuffer.cxx +++ b/sw/source/filter/ww8/rtfstringbuffer.cxx @@ -91,7 +91,7 @@ rtl::OString RtfStringBuffer::makeStringAndClear() rtl::OStringBuffer& RtfStringBuffer::getLastBuffer() { - if (!m_aValues.size() || m_aValues.back().isGraphic()) + if (m_aValues.empty() || m_aValues.back().isGraphic()) m_aValues.push_back(RtfStringBufferValue()); return m_aValues.back().m_aBuffer; } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 477e2b0..bf1b193 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -600,7 +600,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const const SfxPoolItem* pRet = 0; const SwpHints* pTxtAttrs = rNd.GetpSwpHints(); - if (pTxtAttrs && m_rExport.m_aCurrentCharPropStarts.size()) + if (pTxtAttrs && !m_rExport.m_aCurrentCharPropStarts.empty()) { xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top(); for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i) diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 43cb682..0391813 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -317,13 +317,13 @@ namespace cmis } catch ( const libcmis::Exception& ) { - if ( m_pObjectProps.size() > 0 ) + if ( !m_pObjectProps.empty() ) { map< string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" ); if ( it != m_pObjectProps.end( ) ) { vector< string > values = it->second->getStrings( ); - if ( values.size() > 0 ) + if ( !values.empty() ) sTitle = STD_TO_OUSTR( values.front( ) ); } } @@ -355,7 +355,7 @@ namespace cmis try { vector< string > paths = getObject( )->getPaths( ); - if ( paths.size( ) > 0 ) + if ( !paths.empty( ) ) path = paths.front( ); else path = getObject()->getName( ); @@ -921,7 +921,7 @@ namespace cmis if ( NULL != document ) { vector< boost::shared_ptr< libcmis::Folder > > parents = document->getParents( ); - if ( parents.size( ) > 0 ) + if ( !parents.empty( ) ) parentPath = parents.front( )->getPath( ); } else diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx index edddc9e..710f82a 100644 --- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx +++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx @@ -94,7 +94,7 @@ namespace cmis { string sObjectPath; vector< string > paths = maResults[nIndex]->pObject->getPaths( ); - if ( paths.size( ) > 0 ) + if ( !paths.empty( ) ) sObjectPath = paths.front( ); // TODO Handle the unfiled objects with their id... but can they manage to come here? diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 39f2a65..9840fa4 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -215,7 +215,7 @@ void FTPURL::parse(const rtl::OUString& url) *p1 = 0; if(buffer[0]) { - if( strcmp(buffer,"..") == 0 && m_aPathSegmentVec.size() && m_aPathSegmentVec.back() != ".." ) + if( strcmp(buffer,"..") == 0 && !m_aPathSegmentVec.empty() && m_aPathSegmentVec.back() != ".." ) m_aPathSegmentVec.pop_back(); else if(strcmp(buffer,".") == 0) ; // Ignore diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 88e2d9b..64a369a 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1715,7 +1715,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( } } // for - if ( !bTransient && aProppatchValues.size() ) + if ( !bTransient && !aProppatchValues.empty() ) { try { diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx index 41217ee..b67e109 100644 --- a/ucbhelper/source/client/proxydecider.cxx +++ b/ucbhelper/source/client/proxydecider.cxx @@ -483,7 +483,7 @@ const InternetProxyServer & InternetProxyDecider_Impl::getProxy( return m_aEmptyProxy; } - if ( !rHost.isEmpty() && m_aNoProxyList.size() ) + if ( !rHost.isEmpty() && !m_aNoProxyList.empty() ) { ////////////////////////////////////////////////////////////////// // First, try direct hostname match - #110515# _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits