binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx | 1 - binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx | 6 +++--- binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx | 2 +- binfilter/bf_sch/source/core/sch_memchrt.cxx | 8 ++++---- binfilter/bf_svtools/source/filter.vcl/filter/svt_filter.cxx | 2 +- binfilter/bf_svx/source/unodraw/svx_unoprov.cxx | 4 ++-- binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx | 2 +- binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx | 2 +- binfilter/bf_sw/source/ui/uno/sw_unomod.cxx | 1 - binfilter/bf_xmloff/source/chart/MultiPropertySetHandler.hxx | 8 ++++---- binfilter/bf_xmloff/source/chart/xmloff_PropertyMaps.cxx | 2 +- binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx | 6 +++--- binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx | 4 ++-- 13 files changed, 23 insertions(+), 25 deletions(-)
New commits: commit 1dbdf3726bd22e7e40d24eb2e4732865f4334a41 Author: Julien Nabet <serval2...@yahoo.fr> Date: Sat May 5 23:36:05 2012 +0200 Some cppcheck cleaning Change-Id: Id3e1da2b80c87b22eeb5da696b0ba8ef88061817 diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx index 0c5c78a..2f7dbb8 100644 --- a/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx +++ b/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx @@ -744,7 +744,6 @@ SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( USHORT nInPrefix, if (GetScImport().getImportFlags() & IMPORT_AUTOSTYLES) pContext = GetScImport().CreateStylesContext( rLocalName, xAttrList, sal_True); break; - break; case XML_TOK_DOC_MASTERSTYLES: if (GetScImport().getImportFlags() & IMPORT_MASTERSTYLES) pContext = new ScXMLMasterStylesContext( GetImport(), nInPrefix, rLocalName, diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx index 3c88c16..b7af6dc 100644 --- a/binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx +++ b/binfilter/bf_sc/source/filter/xml/sc_xmlstyle.cxx @@ -375,7 +375,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes( if (nFamily == XML_STYLE_FAMILY_TABLE_CELL) { ::std::vector< XMLPropertyState >::const_iterator i = rProperties.begin(); - for (; (i != rProperties.end()); i++) + for (; (i != rProperties.end()); ++i) { UniReference< XMLPropertySetMapper > aPropMapper = rScXMLExport.GetCellStylesPropertySetMapper(); @@ -404,7 +404,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes( else if (nFamily == XML_STYLE_FAMILY_TABLE_TABLE) { ::std::vector< XMLPropertyState >::const_iterator i = rProperties.begin(); - for (; (i != rProperties.end()); i++) + for (; (i != rProperties.end()); ++i) { UniReference< XMLPropertySetMapper > aPropMapper = rScXMLExport.GetTableStylesPropertySetMapper(); @@ -442,7 +442,7 @@ void ScXMLAutoStylePoolP::exportStyleContent( { sal_Bool bNotFound = sal_True; ::std::vector< XMLPropertyState >::const_iterator i = rProperties.begin(); - for (; (i != rProperties.end()) && bNotFound; i++) + for (; (i != rProperties.end()) && bNotFound; ++i) { sal_Int16 nContextID = rScXMLExport.GetCellStylesPropertySetMapper()->GetEntryContextId(i->mnIndex); switch (nContextID) diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx index 96a6d50..082a72f 100644 --- a/binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx +++ b/binfilter/bf_sc/source/filter/xml/sc_xmlstyli.cxx @@ -376,7 +376,7 @@ void XMLTableStyleContext::GetConditionalFormat(uno::Any& aAny, SetBaseCellAddress(aProps, sBaseCell); SetStyle(aProps, sApplyStyle); sal_Int32 i = 0; - while (sCondition[i] != '(' && i < sCondition.getLength()) + while (i < sCondition.getLength() && sCondition[i] != '(') i++; if (sCondition[i] == '(') { diff --git a/binfilter/bf_sch/source/core/sch_memchrt.cxx b/binfilter/bf_sch/source/core/sch_memchrt.cxx index 32af806..e054360 100644 --- a/binfilter/bf_sch/source/core/sch_memchrt.cxx +++ b/binfilter/bf_sch/source/core/sch_memchrt.cxx @@ -671,7 +671,7 @@ using namespace ::com::sun::star; /*N*/ ::std::vector< SchSingleCell >::const_iterator aIter; /*N*/ const ::std::vector< SchSingleCell >::const_iterator aEndIter = rCell.maCells.end(); /*N*/ -/*N*/ for( aIter = rCell.maCells.begin(); aIter != aEndIter; aIter++ ) +/*N*/ for( aIter = rCell.maCells.begin(); aIter != aEndIter; ++aIter ) /*N*/ { /*N*/ sal_Int32 nCol = aIter->mnColumn; /*N*/ output->append( (sal_Unicode)'.' ); @@ -905,7 +905,7 @@ using namespace ::com::sun::star; /*?*/ getXMLStringForCellAddress( aIter->maLowerRight, &aBuffer ); /*?*/ } /*?*/ -/*?*/ aIter++; +/*?*/ ++aIter; /*?*/ // separator for more than one range /*?*/ if( aIter != aEndIter ) /*?*/ aBuffer.append( sal_Unicode( ' ' )); @@ -1022,7 +1022,7 @@ using namespace ::com::sun::star; /*N*/ const ::std::vector< SchCellRangeAddress >::iterator aEndIter = maChartRange.maRanges.end(); /*N*/ sal_Bool bStarted = sal_False; /*N*/ -/*N*/ for( aIter = maChartRange.maRanges.begin(); aIter != aEndIter; aIter++ ) +/*N*/ for( aIter = maChartRange.maRanges.begin(); aIter != aEndIter; ++aIter ) /*N*/ { /*N*/ if( aIter->mnTableNumber != -1 ) /*N*/ { @@ -1134,7 +1134,7 @@ using namespace ::com::sun::star; /*N*/ ::std::vector< SchSingleCell >::const_iterator aIter = rCell.maCells.begin(); /*N*/ const ::std::vector< SchSingleCell >::const_iterator aEnd = rCell.maCells.end(); /*N*/ BOOL bFirst = TRUE; -/*N*/ for( ; aIter != aEnd; aIter++ ) +/*N*/ for( ; aIter != aEnd; ++aIter ) /*N*/ { /*N*/ String sTmp( String::CreateFromInt32( aIter->mnRow )); /*N*/ if( sNm.Len() ) diff --git a/binfilter/bf_svtools/source/filter.vcl/filter/svt_filter.cxx b/binfilter/bf_svtools/source/filter.vcl/filter/svt_filter.cxx index fcba625..d5c9368 100644 --- a/binfilter/bf_svtools/source/filter.vcl/filter/svt_filter.cxx +++ b/binfilter/bf_svtools/source/filter.vcl/filter/svt_filter.cxx @@ -1844,7 +1844,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat if ( aAdditionalChunkSequence[ j ].Value >>= aByteSeq ) { std::vector< vcl::PNGWriter::ChunkData >& rChunkData = aPNGWriter.GetChunks(); - if ( rChunkData.size() ) + if ( !rChunkData.empty() ) { sal_uInt32 nChunkLen = aByteSeq.getLength(); diff --git a/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx b/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx index 58b5937..5d3d498 100644 --- a/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx +++ b/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx @@ -718,7 +718,7 @@ rtl::OUString UHashMap::getNameFromId(sal_uInt32 nId) { const UHashMapImpl &rMap = GetUHashImpl(); - for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); it++) + for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it) { if (it->second == nId) return it->first; @@ -735,7 +735,7 @@ uno::Sequence< OUString > UHashMap::getServiceNames() uno::Sequence< OUString > aSeq( rMap.size() ); OUString* pStrings = aSeq.getArray(); - for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); it++) + for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it) pStrings[i++] = it->first; return aSeq; diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx index 0debb1c..36c334c 100644 --- a/binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx +++ b/binfilter/bf_sw/source/filter/xml/sw_xmlfmte.cxx @@ -307,7 +307,7 @@ void SwXMLAutoStylePoolP::exportStyleAttributes( for( ::std::vector< XMLPropertyState >::const_iterator aProperty = rProperties.begin(); aProperty != rProperties.end(); - aProperty++ ) + ++aProperty ) { switch( rPropExp.getPropertySetMapper()-> GetEntryContextId( aProperty->mnIndex ) ) diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx index b848865..efea4af 100644 --- a/binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx +++ b/binfilter/bf_sw/source/filter/xml/sw_xmltexti.cxx @@ -679,7 +679,7 @@ void SwXMLTextImportHelper::endAppletOrPlugin( while (aIter != aEnd ) { aCommandList.Append( (*aIter).first, (*aIter).second); - aIter++; + ++aIter; } if (xApplet.Is()) diff --git a/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx b/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx index ec8a7cd..fe84ebc 100644 --- a/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx +++ b/binfilter/bf_sw/source/ui/uno/sw_unomod.cxx @@ -594,7 +594,6 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c case HANDLE_VIEWSET_TEXT_BOUNDARIES : break; case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break; case HANDLE_VIEWSET_PREVENT_TIPS : mpViewOption->SetPreventTips(bVal); break; - break; case HANDLE_VIEWSET_ZOOM : { sal_Int16 nZoom(0); diff --git a/binfilter/bf_xmloff/source/chart/MultiPropertySetHandler.hxx b/binfilter/bf_xmloff/source/chart/MultiPropertySetHandler.hxx index 85d2275..8bfe6a8 100644 --- a/binfilter/bf_xmloff/source/chart/MultiPropertySetHandler.hxx +++ b/binfilter/bf_xmloff/source/chart/MultiPropertySetHandler.hxx @@ -213,7 +213,7 @@ MultiPropertySetHandler::MultiPropertySetHandler (::com::sun::star::uno::Referen MultiPropertySetHandler::~MultiPropertySetHandler (void) { ::std::map< ::rtl::OUString, PropertyWrapperBase*, OUStringComparison>::iterator I; - for (I=aPropertyList.begin(); I!=aPropertyList.end(); I++) + for (I=aPropertyList.begin(); I!=aPropertyList.end(); ++I) delete I->second; } @@ -232,7 +232,7 @@ BOOL MultiPropertySetHandler::GetProperties (void) ::std::map< ::rtl::OUString, PropertyWrapperBase*, OUStringComparison>::iterator I; ::com::sun::star::uno::Sequence< ::rtl::OUString> aNameList (aPropertyList.size()); int i; - for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++) + for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); ++I) aNameList[i++] = I->second->msName; if ( ! MultiGet(aNameList)) if ( ! SingleGet(aNameList)) @@ -255,7 +255,7 @@ BOOL MultiPropertySetHandler::MultiGet (const ::com::sun::star::uno::Sequen int i; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> aValueList = xMultiSet->getPropertyValues (rNameList); - for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++) + for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); ++I) I->second->SetValue (aValueList[i++]); } catch (::com::sun::star::beans::UnknownPropertyException e) @@ -281,7 +281,7 @@ BOOL MultiPropertySetHandler::SingleGet (const ::com::sun::star::uno::Sequen { ::std::map< ::rtl::OUString, PropertyWrapperBase*, OUStringComparison>::iterator I; int i; - for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++) + for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); ++I) I->second->SetValue (xSingleSet->getPropertyValue (rNameList[i++])); } catch (::com::sun::star::beans::UnknownPropertyException e) diff --git a/binfilter/bf_xmloff/source/chart/xmloff_PropertyMaps.cxx b/binfilter/bf_xmloff/source/chart/xmloff_PropertyMaps.cxx index 747ecf0..ff342e7 100644 --- a/binfilter/bf_xmloff/source/chart/xmloff_PropertyMaps.cxx +++ b/binfilter/bf_xmloff/source/chart/xmloff_PropertyMaps.cxx @@ -160,7 +160,7 @@ void XMLChartExportPropertyMapper::ContextFilter( // filter properties for( ::std::vector< XMLPropertyState >::iterator property = rProperties.begin(); property != rProperties.end(); - property++ ) + ++property ) { // find properties with context // to prevent writing this property set mnIndex member to -1 diff --git a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx index faa370d..ea24944 100644 --- a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx +++ b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx @@ -1238,7 +1238,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag { aPropertyStates = mxExpPropMapper->Filter( xStatProp ); - if( aPropertyStates.size() > 0 ) + if( !aPropertyStates.empty() ) { // write element if( bExportContent ) @@ -1567,7 +1567,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag { aPropertyStates = mxExpPropMapper->Filter( xWallPropSet ); - if( !aPropertyStates.size() ) + if( aPropertyStates.empty() ) { // write element if( bExportContent ) @@ -1595,7 +1595,7 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag { aPropertyStates = mxExpPropMapper->Filter( xFloorPropSet ); - if( !aPropertyStates.size() ) + if( aPropertyStates.empty() ) { // write element if( bExportContent ) diff --git a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx index 2d7576c..bf94ca5 100644 --- a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx +++ b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx @@ -409,7 +409,7 @@ void SchXMLPlotAreaContext::EndElement() { ::std::list< chartxml::DataRowPointStyle >::iterator iStyle; // iterate over series attributes first ... - for( iStyle = maSeriesStyleList.begin(); iStyle != maSeriesStyleList.end(); iStyle++ ) + for( iStyle = maSeriesStyleList.begin(); iStyle != maSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType != chartxml::DataRowPointStyle::DATA_POINT ) { @@ -487,7 +487,7 @@ void SchXMLPlotAreaContext::EndElement() } // ... then iterate over data-point attributes, so the latter are not overwritten - for( iStyle = maSeriesStyleList.begin(); iStyle != maSeriesStyleList.end(); iStyle++ ) + for( iStyle = maSeriesStyleList.begin(); iStyle != maSeriesStyleList.end(); ++iStyle ) { if( iStyle->mnIndex != -1 ) { _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits