diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-07-30 23:51:40 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-07-30 23:51:40 +0200 |
commit | 386c28330ea590eb42877af1c807973e8fb29be0 (patch) | |
tree | f1b4cf16b7e240e6af62ef550c4cd5c816d57e4c /xmloff | |
parent | Some cppcheck cleaning (diff) | |
download | core-386c28330ea590eb42877af1c807973e8fb29be0.tar.gz core-386c28330ea590eb42877af1c807973e8fb29be0.zip |
Some cppcheck cleaning
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLAutoStylePoolP.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.cxx | 16 | ||||
-rw-r--r-- | xmloff/source/draw/XMLShapeStyleContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/ximpstyl.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/XMLPageExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/chrhghdl.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlprmap.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexMarkExport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextNumRuleInfo.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtlists.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 2 |
13 files changed, 23 insertions, 24 deletions
diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx index 9f6f10a8886b..c798eb0463e8 100644 --- a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx +++ b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx @@ -63,7 +63,7 @@ void SchXMLAutoStylePoolP::exportStyleAttributes( if( nFamily == XML_STYLE_FAMILY_SCH_CHART_ID ) { for( ::std::vector< XMLPropertyState >::const_iterator iter = rProperties.begin(); - (iter != rProperties.end()); iter++ ) + (iter != rProperties.end()); ++iter ) { if( iter->mnIndex == -1 ) continue; diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index eef2f7b972ff..80a627493cfb 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -131,10 +131,10 @@ void lcl_setAutomaticSymbolSize( const uno::Reference< beans::XPropertySet >& xS { awt::Size aSymbolSize(140,140);//old default for standard sized charts 7cm height - double fScale = 1; uno::Reference< chart::XChartDocument > xChartDoc( rImport.GetModel(), uno::UNO_QUERY ); if( xChartDoc.is() ) { + double fScale = 1; uno::Reference< beans::XPropertySet > xLegendProp( xChartDoc->getLegend(), uno::UNO_QUERY ); chart::ChartLegendPosition aLegendPosition = chart::ChartLegendPosition_NONE; if( xLegendProp.is() && (xLegendProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" ))) >>= aLegendPosition) @@ -705,7 +705,7 @@ void SchXMLSeries2Context::initSeriesPropertySets( SeriesDefaultsAndStyles& rSer // iterate over series first and remind propertysets in map // new api <-> old api wrapper ::std::map< Reference< chart2::XDataSeries >, Reference< beans::XPropertySet > > aSeriesMap; - for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); iStyle++ ) + for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType != DataRowPointStyle::DATA_SERIES ) continue; @@ -718,7 +718,7 @@ void SchXMLSeries2Context::initSeriesPropertySets( SeriesDefaultsAndStyles& rSer } //initialize m_xOldAPISeries for all other styles also - for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); iStyle++ ) + for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType == DataRowPointStyle::DATA_SERIES ) continue; @@ -733,7 +733,7 @@ void SchXMLSeries2Context::setDefaultsToSeries( SeriesDefaultsAndStyles& rSeries // iterate over series // call initSeriesPropertySets first - for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); iStyle++ ) + for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType != DataRowPointStyle::DATA_SERIES ) continue; @@ -787,7 +787,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe ::std::list< DataRowPointStyle >::iterator iStyle; // iterate over series - for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); iStyle++ ) + for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType == DataRowPointStyle::DATA_SERIES ) { @@ -876,7 +876,7 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles ::std::list< DataRowPointStyle >::iterator iStyle; // iterate over regession etc - for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); iStyle++ ) + for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType == DataRowPointStyle::REGRESSION || iStyle->meType == DataRowPointStyle::ERROR_INDICATOR || @@ -961,7 +961,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri , bool bIsStockChart, bool bIsDonutChart, bool bSwitchOffLinesForScatter ) { ::std::list< DataRowPointStyle >::iterator iStyle; - for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); iStyle++ ) + for( iStyle = rSeriesDefaultsAndStyles.maSeriesStyleList.begin(); iStyle != rSeriesDefaultsAndStyles.maSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType != DataRowPointStyle::DATA_POINT ) continue; @@ -1056,7 +1056,7 @@ void SchXMLSeries2Context::switchSeriesLinesOff( ::std::list< DataRowPointStyle ::std::list< DataRowPointStyle >::iterator iStyle; // iterate over series - for( iStyle = rSeriesStyleList.begin(); iStyle != rSeriesStyleList.end(); iStyle++ ) + for( iStyle = rSeriesStyleList.begin(); iStyle != rSeriesStyleList.end(); ++iStyle ) { if( iStyle->meType != DataRowPointStyle::DATA_SERIES ) continue; diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index 313691dd31f6..b01cd390ff04 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -154,7 +154,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet // first, look for the old format, where we had a text:list-style-name // attribute in the style:properties element - for( property = rProperties.begin(); property != end; property++ ) + for( property = rProperties.begin(); property != end; ++property ) { // find properties with context if( (property->mnIndex != -1) && (rMapper->GetEntryContextId( property->mnIndex ) == CTF_SD_NUMBERINGRULES_NAME) ) diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index dad2aa296dee..6ffd56c55805 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -227,7 +227,7 @@ void SdXMLDrawingPageStyleContext::Finish( sal_Bool bOverwrite ) const UniReference< XMLPropertySetMapper >& rImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() )->getPropertySetMapper(); ::std::vector< XMLPropertyState >::iterator property = rProperties.begin(); - for(; property != rProperties.end(); property++) + for(; property != rProperties.end(); ++property) { if( property->mnIndex == -1 ) continue; diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 7def49621b27..a154c06e0f90 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -61,7 +61,7 @@ using namespace ::xmloff::token; sal_Bool XMLPageExport::findPageMasterName( const OUString& rStyleName, OUString& rPMName ) const { for( ::std::vector< XMLPageExportNameEntry >::const_iterator pEntry = aNameVector.begin(); - pEntry != aNameVector.end(); pEntry++ ) + pEntry != aNameVector.end(); ++pEntry ) { if( pEntry->sStyleName == rStyleName ) { diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx index d805d9a1274b..7581029c3bb2 100644 --- a/xmloff/source/style/chrhghdl.cxx +++ b/xmloff/source/style/chrhghdl.cxx @@ -58,10 +58,9 @@ XMLCharHeightHdl::~XMLCharHeightHdl() sal_Bool XMLCharHeightHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const { - double fSize; - if( rStrImpValue.indexOf( sal_Unicode('%') ) == -1 ) { + double fSize; MapUnit eSrcUnit = SvXMLExportHelper::GetUnitFromString( rStrImpValue, MAP_POINT ); if( SvXMLUnitConverter::convertDouble( fSize, rStrImpValue, eSrcUnit, MAP_POINT )) { @@ -101,10 +100,9 @@ XMLCharHeightPropHdl::~XMLCharHeightPropHdl() sal_Bool XMLCharHeightPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const { - sal_Int32 nPrc = 100; - if( rStrImpValue.indexOf( sal_Unicode('%') ) != -1 ) { + sal_Int32 nPrc = 100; if( SvXMLUnitConverter::convertPercent( nPrc, rStrImpValue ) ) { rValue <<= (sal_Int16)nPrc; diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 1d6d5a518249..eaa7e8cd76fd 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -858,7 +858,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( OUString sTmp; sal_Int16 nTmp = 0; ::std::vector< XMLPropertyState >::iterator i; - for( i = aProps.begin(); i != aProps.end(); i++ ) + for( i = aProps.begin(); i != aProps.end(); ++i ) { switch( i->mnIndex ) { diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx index 766f25bfa426..181cdac7ed77 100644 --- a/xmloff/source/style/xmlprmap.cxx +++ b/xmloff/source/style/xmlprmap.cxx @@ -222,11 +222,11 @@ sal_Int32 XMLPropertySetMapper::FindEntryIndex( sal_Int32 XMLPropertySetMapper::FindEntryIndex( const sal_Int16 nContextId ) const { - sal_Int32 nIndex = 0; const sal_Int32 nEntries = GetEntryCount(); if ( nEntries ) { + sal_Int32 nIndex = 0; do { const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex]; diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx index e84282b83589..55f925733429 100644 --- a/xmloff/source/text/XMLIndexMarkExport.cxx +++ b/xmloff/source/text/XMLIndexMarkExport.cxx @@ -196,7 +196,7 @@ void XMLIndexMarkExport::ExportTOCMarkAttributes( void lcl_ExportPropertyString( SvXMLExport& rExport, const Reference<XPropertySet> & rPropSet, - const OUString sProperty, + const OUString & sProperty, XMLTokenEnum eToken, Any& rAny ) { @@ -214,7 +214,7 @@ void lcl_ExportPropertyString( SvXMLExport& rExport, void lcl_ExportPropertyBool( SvXMLExport& rExport, const Reference<XPropertySet> & rPropSet, - const OUString sProperty, + const OUString & sProperty, XMLTokenEnum eToken, Any& rAny ) { diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx index d03370eb6feb..66c5f666a25e 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.hxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.hxx @@ -159,6 +159,7 @@ inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( msListId = rInfo.msListId; mnListStartValue = rInfo.mnListStartValue; mnListLevel = rInfo.mnListLevel; + mnListLevelStartValue = rInfo.mnListLevelStartValue; mbIsNumbered = rInfo.mbIsNumbered; mbIsRestart = rInfo.mbIsRestart; // Written OpenDocument file format doesn't fit to the created text document (#i69627#) diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index a925649ba5f8..d5faddd88f64 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -2617,7 +2617,7 @@ SvI18NMap& XMLTextImportHelper::GetRenameMap() } void XMLTextImportHelper::InsertBookmarkStartRange( - const OUString sName, + const OUString & sName, const Reference<XTextRange> & rRange, OUString const& i_rXmlId, ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & i_rpRDFaAttributes) @@ -2628,7 +2628,7 @@ void XMLTextImportHelper::InsertBookmarkStartRange( } sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( - const OUString sName, + const OUString & sName, Reference<XTextRange> & o_rRange, OUString & o_rXmlId, ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & o_rpRDFaAttributes) diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 58bedf74ee81..4f4aceea53c5 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -246,10 +246,10 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con // Value of xml:id in element <text:list> has to be a valid ID type (#i92478#) sTmpStr += ::rtl::OUString::valueOf( n ); - long nHitCount = 0; ::rtl::OUString sNewListId( sTmpStr ); if ( mpProcessedLists != 0 ) { + long nHitCount = 0; while ( mpProcessedLists->find( sNewListId ) != mpProcessedLists->end() ) { ++nHitCount; diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 7d402c935ee8..33317285505d 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -768,7 +768,7 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink( for( ::std::vector< XMLPropertyState >::iterator i = xPropStates.begin(); nIgnoreProps < 2 && i != xPropStates.end(); - i++ ) + ++i ) { if( i->mnIndex == -1 ) continue; |