diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-06-11 12:48:21 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-06-11 12:48:21 +0200 |
commit | f36245ea5100242a767473eb9aee850fa714d4d5 (patch) | |
tree | 7e40ebe99f92d6437f93ed3917ea349d984b6dea /writerperfect | |
parent | Replace List with vector< BUndle* > (diff) | |
download | core-f36245ea5100242a767473eb9aee850fa714d4d5.tar.gz core-f36245ea5100242a767473eb9aee850fa714d4d5.zip |
Some cppcheck cleaning
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/source/filter/OdgGenerator.cxx | 22 | ||||
-rw-r--r-- | writerperfect/source/filter/OdtGenerator.cxx | 52 | ||||
-rw-r--r-- | writerperfect/source/filter/PageSpan.cxx | 2 | ||||
-rw-r--r-- | writerperfect/source/filter/TableStyle.cxx | 8 |
4 files changed, 42 insertions, 42 deletions
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx index 5a61fd85b52f..aa9c7856cce6 100644 --- a/writerperfect/source/filter/OdgGenerator.cxx +++ b/writerperfect/source/filter/OdgGenerator.cxx @@ -108,38 +108,38 @@ OdgGeneratorPrivate::OdgGeneratorPrivate(OdfDocumentHandler *pHandler, const Odf OdgGeneratorPrivate::~OdgGeneratorPrivate() { - for (std::vector<DocumentElement *>::iterator iterBody = mBodyElements.begin(); iterBody != mBodyElements.end(); iterBody++) + for (std::vector<DocumentElement *>::iterator iterBody = mBodyElements.begin(); iterBody != mBodyElements.end(); ++iterBody) { delete (*iterBody); (*iterBody) = NULL; } for (std::vector<DocumentElement *>::iterator iterGraphicsAutomaticStyles = mGraphicsAutomaticStyles.begin(); - iterGraphicsAutomaticStyles != mGraphicsAutomaticStyles.end(); iterGraphicsAutomaticStyles++) + iterGraphicsAutomaticStyles != mGraphicsAutomaticStyles.end(); ++iterGraphicsAutomaticStyles) { delete((*iterGraphicsAutomaticStyles)); } for (std::vector<DocumentElement *>::iterator iterGraphicsStrokeDashStyles = mGraphicsStrokeDashStyles.begin(); - iterGraphicsStrokeDashStyles != mGraphicsStrokeDashStyles.end(); iterGraphicsStrokeDashStyles++) + iterGraphicsStrokeDashStyles != mGraphicsStrokeDashStyles.end(); ++iterGraphicsStrokeDashStyles) { delete((*iterGraphicsStrokeDashStyles)); } for (std::vector<DocumentElement *>::iterator iterGraphicsGradientStyles = mGraphicsGradientStyles.begin(); - iterGraphicsGradientStyles != mGraphicsGradientStyles.end(); iterGraphicsGradientStyles++) + iterGraphicsGradientStyles != mGraphicsGradientStyles.end(); ++iterGraphicsGradientStyles) { delete((*iterGraphicsGradientStyles)); } for (std::vector<DocumentElement *>::iterator iterPageAutomaticStyles = mPageAutomaticStyles.begin(); - iterPageAutomaticStyles != mPageAutomaticStyles.end(); iterPageAutomaticStyles++) + iterPageAutomaticStyles != mPageAutomaticStyles.end(); ++iterPageAutomaticStyles) { delete((*iterPageAutomaticStyles)); } for (std::vector<DocumentElement *>::iterator iterPageMasterStyles = mPageMasterStyles.begin(); - iterPageMasterStyles != mPageMasterStyles.end(); iterPageMasterStyles++) + iterPageMasterStyles != mPageMasterStyles.end(); ++iterPageMasterStyles) { delete((*iterPageMasterStyles)); } @@ -219,13 +219,13 @@ OdgGenerator::~OdgGenerator() TagOpenElement("office:styles").write(mpImpl->mpHandler); for (std::vector<DocumentElement *>::const_iterator iterGraphicsStrokeDashStyles = mpImpl->mGraphicsStrokeDashStyles.begin(); - iterGraphicsStrokeDashStyles != mpImpl->mGraphicsStrokeDashStyles.end(); iterGraphicsStrokeDashStyles++) + iterGraphicsStrokeDashStyles != mpImpl->mGraphicsStrokeDashStyles.end(); ++iterGraphicsStrokeDashStyles) { (*iterGraphicsStrokeDashStyles)->write(mpImpl->mpHandler); } for (std::vector<DocumentElement *>::const_iterator iterGraphicsGradientStyles = mpImpl->mGraphicsGradientStyles.begin(); - iterGraphicsGradientStyles != mpImpl->mGraphicsGradientStyles.end(); iterGraphicsGradientStyles++) + iterGraphicsGradientStyles != mpImpl->mGraphicsGradientStyles.end(); ++iterGraphicsGradientStyles) { (*iterGraphicsGradientStyles)->write(mpImpl->mpHandler); } @@ -243,7 +243,7 @@ OdgGenerator::~OdgGenerator() { // writing out the graphics automatic styles for (std::vector<DocumentElement *>::iterator iterGraphicsAutomaticStyles = mpImpl->mGraphicsAutomaticStyles.begin(); - iterGraphicsAutomaticStyles != mpImpl->mGraphicsAutomaticStyles.end(); iterGraphicsAutomaticStyles++) + iterGraphicsAutomaticStyles != mpImpl->mGraphicsAutomaticStyles.end(); ++iterGraphicsAutomaticStyles) { (*iterGraphicsAutomaticStyles)->write(mpImpl->mpHandler); } @@ -307,7 +307,7 @@ OdgGenerator::~OdgGenerator() TagOpenElement("office:master-styles").write(mpImpl->mpHandler); for (std::vector<DocumentElement *>::const_iterator pageMasterIter = mpImpl->mPageMasterStyles.begin(); - pageMasterIter != mpImpl->mPageMasterStyles.end(); pageMasterIter++) + pageMasterIter != mpImpl->mPageMasterStyles.end(); ++pageMasterIter) { (*pageMasterIter)->write(mpImpl->mpHandler); } @@ -321,7 +321,7 @@ OdgGenerator::~OdgGenerator() TagOpenElement("office:drawing").write(mpImpl->mpHandler); for (std::vector<DocumentElement *>::const_iterator bodyIter = mpImpl->mBodyElements.begin(); - bodyIter != mpImpl->mBodyElements.end(); bodyIter++) + bodyIter != mpImpl->mBodyElements.end(); ++bodyIter) { (*bodyIter)->write(mpImpl->mpHandler); } diff --git a/writerperfect/source/filter/OdtGenerator.cxx b/writerperfect/source/filter/OdtGenerator.cxx index a3298ca9d83c..ab7f634af660 100644 --- a/writerperfect/source/filter/OdtGenerator.cxx +++ b/writerperfect/source/filter/OdtGenerator.cxx @@ -220,13 +220,13 @@ OdtGeneratorPrivate::~OdtGeneratorPrivate() WRITER_DEBUG_MSG(("WriterWordPerfect: Cleaning up our mess..\n")); WRITER_DEBUG_MSG(("Destroying the body elements\n")); - for (std::vector<DocumentElement *>::iterator iterBody = mBodyElements.begin(); iterBody != mBodyElements.end(); iterBody++) { + for (std::vector<DocumentElement *>::iterator iterBody = mBodyElements.begin(); iterBody != mBodyElements.end(); ++iterBody) { delete (*iterBody); (*iterBody) = NULL; } WRITER_DEBUG_MSG(("Destroying the styles elements\n")); - for (std::vector<DocumentElement *>::iterator iterStyles = mStylesElements.begin(); iterStyles != mStylesElements.end(); iterStyles++) { + for (std::vector<DocumentElement *>::iterator iterStyles = mStylesElements.begin(); iterStyles != mStylesElements.end(); ++iterStyles) { delete (*iterStyles); (*iterStyles) = NULL; // we may pass over the same element again (in the case of headers/footers spanning multiple pages) // so make sure we don't do a double del @@ -234,47 +234,47 @@ OdtGeneratorPrivate::~OdtGeneratorPrivate() WRITER_DEBUG_MSG(("Destroying the rest of the styles elements\n")); for (std::map<WPXString, ParagraphStyle *, ltstr>::iterator iterTextStyle = mTextStyleHash.begin(); - iterTextStyle != mTextStyleHash.end(); iterTextStyle++) { + iterTextStyle != mTextStyleHash.end(); ++iterTextStyle) { delete (iterTextStyle->second); } for (std::map<WPXString, SpanStyle *, ltstr>::iterator iterSpanStyle = mSpanStyleHash.begin(); - iterSpanStyle != mSpanStyleHash.end(); iterSpanStyle++) { + iterSpanStyle != mSpanStyleHash.end(); ++iterSpanStyle) { delete(iterSpanStyle->second); } for (std::map<WPXString, FontStyle *, ltstr>::iterator iterFont = mFontHash.begin(); - iterFont != mFontHash.end(); iterFont++) { + iterFont != mFontHash.end(); ++iterFont) { delete(iterFont->second); } for (std::vector<ListStyle *>::iterator iterListStyles = mListStyles.begin(); - iterListStyles != mListStyles.end(); iterListStyles++) { + iterListStyles != mListStyles.end(); ++iterListStyles) { delete(*iterListStyles); } for (std::vector<SectionStyle *>::iterator iterSectionStyles = mSectionStyles.begin(); - iterSectionStyles != mSectionStyles.end(); iterSectionStyles++) { + iterSectionStyles != mSectionStyles.end(); ++iterSectionStyles) { delete(*iterSectionStyles); } for (std::vector<TableStyle *>::iterator iterTableStyles = mTableStyles.begin(); - iterTableStyles != mTableStyles.end(); iterTableStyles++) { + iterTableStyles != mTableStyles.end(); ++iterTableStyles) { delete((*iterTableStyles)); } for (std::vector<PageSpan *>::iterator iterPageSpans = mPageSpans.begin(); - iterPageSpans != mPageSpans.end(); iterPageSpans++) { + iterPageSpans != mPageSpans.end(); ++iterPageSpans) { delete(*iterPageSpans); } for (std::vector<DocumentElement *>::iterator iterFrameStyles = mFrameStyles.begin(); - iterFrameStyles != mFrameStyles.end(); iterFrameStyles++) { + iterFrameStyles != mFrameStyles.end(); ++iterFrameStyles) { delete(*iterFrameStyles); } for (std::vector<DocumentElement *>::iterator iterFrameAutomaticStyles = mFrameAutomaticStyles.begin(); - iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); iterFrameAutomaticStyles++) { + iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); ++iterFrameAutomaticStyles) { delete(*iterFrameAutomaticStyles); } for (std::vector<DocumentElement *>::iterator iterMetaData = mMetaData.begin(); - iterMetaData != mMetaData.end(); iterMetaData++) { + iterMetaData != mMetaData.end(); ++iterMetaData) { delete(*iterMetaData); } } @@ -365,7 +365,7 @@ void OdtGeneratorPrivate::_writeDefaultStyles(OdfDocumentHandler *pHandler) pHandler->endElement("style:style"); for (std::vector<DocumentElement *>::const_iterator iter = mFrameStyles.begin(); - iter != mFrameStyles.end(); iter++) + iter != mFrameStyles.end(); ++iter) (*iter)->write(pHandler); pHandler->endElement("office:styles"); @@ -380,7 +380,7 @@ void OdtGeneratorPrivate::_writeMasterPages(OdfDocumentHandler *pHandler) { TagOpenElement("office:master-styles").write(mpHandler); int pageNumber = 1; - for (unsigned int i=0; i<mPageSpans.size(); i++) + for (unsigned int i=0; i<mPageSpans.size(); ++i) { bool bLastPage; (i == (mPageSpans.size() - 1)) ? bLastPage = true : bLastPage = false; @@ -435,14 +435,14 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler) // write out the metadata TagOpenElement("office:meta").write(mpHandler); - for (std::vector<DocumentElement *>::const_iterator iterMetaData = mMetaData.begin(); iterMetaData != mMetaData.end(); iterMetaData++) { + for (std::vector<DocumentElement *>::const_iterator iterMetaData = mMetaData.begin(); iterMetaData != mMetaData.end(); ++iterMetaData) { (*iterMetaData)->write(mpHandler); } mpHandler->endElement("office:meta"); // write out the font styles TagOpenElement("office:font-face-decls").write(mpHandler); - for (std::map<WPXString, FontStyle *, ltstr>::iterator iterFont = mFontHash.begin(); iterFont != mFontHash.end(); iterFont++) { + for (std::map<WPXString, FontStyle *, ltstr>::iterator iterFont = mFontHash.begin(); iterFont != mFontHash.end(); ++iterFont) { iterFont->second->write(mpHandler); } TagOpenElement symbolFontOpen("style:font-face"); @@ -462,13 +462,13 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler) TagOpenElement("office:automatic-styles").write(mpHandler); for (std::vector<DocumentElement *>::const_iterator iterFrameAutomaticStyles = mFrameAutomaticStyles.begin(); - iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); iterFrameAutomaticStyles++) + iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); ++iterFrameAutomaticStyles) { (*iterFrameAutomaticStyles)->write(pHandler); } for (std::map<WPXString, ParagraphStyle *, ltstr>::const_iterator iterTextStyle = mTextStyleHash.begin(); - iterTextStyle != mTextStyleHash.end(); iterTextStyle++) + iterTextStyle != mTextStyleHash.end(); ++iterTextStyle) { // writing out the paragraph styles if (strcmp((iterTextStyle->second)->getName().cstr(), "Standard")) @@ -480,23 +480,23 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler) // span styles.. for (std::map<WPXString, SpanStyle *, ltstr>::const_iterator iterSpanStyle = mSpanStyleHash.begin(); - iterSpanStyle != mSpanStyleHash.end(); iterSpanStyle++) + iterSpanStyle != mSpanStyleHash.end(); ++iterSpanStyle) { (iterSpanStyle->second)->write(pHandler); } // writing out the sections styles - for (std::vector<SectionStyle *>::const_iterator iterSectionStyles = mSectionStyles.begin(); iterSectionStyles != mSectionStyles.end(); iterSectionStyles++) { + for (std::vector<SectionStyle *>::const_iterator iterSectionStyles = mSectionStyles.begin(); iterSectionStyles != mSectionStyles.end(); ++iterSectionStyles) { (*iterSectionStyles)->write(pHandler); } // writing out the lists styles - for (std::vector<ListStyle *>::const_iterator iterListStyles = mListStyles.begin(); iterListStyles != mListStyles.end(); iterListStyles++) { + for (std::vector<ListStyle *>::const_iterator iterListStyles = mListStyles.begin(); iterListStyles != mListStyles.end(); ++iterListStyles) { (*iterListStyles)->write(pHandler); } // writing out the table styles - for (std::vector<TableStyle *>::const_iterator iterTableStyles = mTableStyles.begin(); iterTableStyles != mTableStyles.end(); iterTableStyles++) { + for (std::vector<TableStyle *>::const_iterator iterTableStyles = mTableStyles.begin(); iterTableStyles != mTableStyles.end(); ++iterTableStyles) { (*iterTableStyles)->write(pHandler); } @@ -513,7 +513,7 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler) TagOpenElement("office:body").write(mpHandler); TagOpenElement("office:text").write(mpHandler); - for (std::vector<DocumentElement *>::const_iterator iterBodyElements = mBodyElements.begin(); iterBodyElements != mBodyElements.end(); iterBodyElements++) { + for (std::vector<DocumentElement *>::const_iterator iterBodyElements = mBodyElements.begin(); iterBodyElements != mBodyElements.end(); ++iterBodyElements) { (*iterBodyElements)->write(pHandler); } WRITER_DEBUG_MSG(("WriterWordPerfect: Document Body: Finished writing all doc els..\n")); @@ -815,7 +815,7 @@ void OdtGenerator::defineOrderedListLevel(const WPXPropertyList &propList) // Iterate through ALL list styles with the same WordPerfect list id and define a level if it is not already defined // This solves certain problems with lists that start and finish without reaching certain levels and then begin again // and reach those levels. See gradguide0405_PC.wpd in the regression suite - for (std::vector<ListStyle *>::iterator iterOrderedListStyles = mpImpl->mListStyles.begin(); iterOrderedListStyles != mpImpl->mListStyles.end(); iterOrderedListStyles++) + for (std::vector<ListStyle *>::iterator iterOrderedListStyles = mpImpl->mListStyles.begin(); iterOrderedListStyles != mpImpl->mListStyles.end(); ++iterOrderedListStyles) { if ((* iterOrderedListStyles)->getListID() == id) (* iterOrderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 1), propList); @@ -843,7 +843,7 @@ void OdtGenerator::defineUnorderedListLevel(const WPXPropertyList &propList) } // See comment in OdtGenerator::defineOrderedListLevel - for (std::vector<ListStyle *>::iterator iterUnorderedListStyles = mpImpl->mListStyles.begin(); iterUnorderedListStyles != mpImpl->mListStyles.end(); iterUnorderedListStyles++) + for (std::vector<ListStyle *>::iterator iterUnorderedListStyles = mpImpl->mListStyles.begin(); iterUnorderedListStyles != mpImpl->mListStyles.end(); ++iterUnorderedListStyles) { if ((* iterUnorderedListStyles)->getListID() == id) (* iterUnorderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 1), propList); @@ -1402,7 +1402,7 @@ void OdtGenerator::insertBinaryObject(const WPXPropertyList &propList, const WPX if (tmpObjectHandler(data, &tmpHandler, ODF_FLAT_XML) && !tmpContentElements.empty()) { mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("draw:object")); - for (std::vector<DocumentElement *>::const_iterator iter = tmpContentElements.begin(); iter != tmpContentElements.end(); iter++) + for (std::vector<DocumentElement *>::const_iterator iter = tmpContentElements.begin(); iter != tmpContentElements.end(); ++iter) mpImpl->mpCurrentContentElements->push_back(*iter); mpImpl->mpCurrentContentElements->push_back(new TagCloseElement("draw:object")); } diff --git a/writerperfect/source/filter/PageSpan.cxx b/writerperfect/source/filter/PageSpan.cxx index 69a2747ddcba..277537e57450 100644 --- a/writerperfect/source/filter/PageSpan.cxx +++ b/writerperfect/source/filter/PageSpan.cxx @@ -268,7 +268,7 @@ void PageSpan::_writeHeaderFooter(const char *headerFooterTagName, headerFooterOpen.write(pHandler); for (std::vector<DocumentElement *>::const_iterator iter = headerFooterContent.begin(); iter != headerFooterContent.end(); - iter++) { + ++iter) { (*iter)->write(pHandler); } } diff --git a/writerperfect/source/filter/TableStyle.cxx b/writerperfect/source/filter/TableStyle.cxx index 9429acfbf9b2..6bb4bb95a7c4 100644 --- a/writerperfect/source/filter/TableStyle.cxx +++ b/writerperfect/source/filter/TableStyle.cxx @@ -103,9 +103,9 @@ TableStyle::~TableStyle() { typedef std::vector<TableCellStyle *>::iterator TCSVIter; typedef std::vector<TableRowStyle *>::iterator TRSVIter; - for (TCSVIter iterTableCellStyles = mTableCellStyles.begin() ; iterTableCellStyles != mTableCellStyles.end(); iterTableCellStyles++) + for (TCSVIter iterTableCellStyles = mTableCellStyles.begin() ; iterTableCellStyles != mTableCellStyles.end(); ++iterTableCellStyles) delete(*iterTableCellStyles); - for (TRSVIter iterTableRowStyles = mTableRowStyles.begin() ; iterTableRowStyles != mTableRowStyles.end(); iterTableRowStyles++) + for (TRSVIter iterTableRowStyles = mTableRowStyles.begin() ; iterTableRowStyles != mTableRowStyles.end(); ++iterTableRowStyles) delete(*iterTableRowStyles); } @@ -155,10 +155,10 @@ void TableStyle::write(OdfDocumentHandler *pHandler) const } typedef std::vector<TableRowStyle *>::const_iterator TRSVIter; - for (TRSVIter iterTableRow = mTableRowStyles.begin() ; iterTableRow != mTableRowStyles.end(); iterTableRow++) + for (TRSVIter iterTableRow = mTableRowStyles.begin() ; iterTableRow != mTableRowStyles.end(); ++iterTableRow) (*iterTableRow)->write(pHandler); typedef std::vector<TableCellStyle *>::const_iterator TCSVIter; - for (TCSVIter iterTableCell = mTableCellStyles.begin() ; iterTableCell != mTableCellStyles.end(); iterTableCell++) + for (TCSVIter iterTableCell = mTableCellStyles.begin() ; iterTableCell != mTableCellStyles.end(); ++iterTableCell) (*iterTableCell)->write(pHandler); } |