[Libreoffice-commits] .: 5 commits - binfilter/bf_sc lotuswordpro/source writerperfect/source
Caolán McNamara
caolan at kemper.freedesktop.org
Sun Nov 28 05:04:32 PST 2010
binfilter/bf_sc/source/core/tool/sc_addincol.cxx | 3
binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx | 1
binfilter/bf_sc/source/ui/docshell/sc_arealink.cxx | 3
lotuswordpro/source/filter/xfilter/xflist.cxx | 1
writerperfect/source/filter/DocumentCollector.cxx | 50 +++++-----
5 files changed, 28 insertions(+), 30 deletions(-)
New commits:
commit 3d1e8c4bfe0cb4105bdce4e5d2ff4d1cd53ffce2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 28 12:45:23 2010 +0000
cppcheck: unused variables
diff --git a/binfilter/bf_sc/source/core/tool/sc_addincol.cxx b/binfilter/bf_sc/source/core/tool/sc_addincol.cxx
index 04024e3..4545b9b 100644
--- a/binfilter/bf_sc/source/core/tool/sc_addincol.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_addincol.cxx
@@ -696,13 +696,12 @@ public:
/*N*/ {
/*N*/ long nDescCount = pFuncData->GetArgumentCount();
/*N*/ const ScAddInArgDesc* pArgs = pFuncData->GetArguments();
-/*N*/ long nVarCount = 0;
/*N*/
/*N*/ // is aVarArg sequence needed?
/*N*/ if ( nParamCount >= nDescCount && nDescCount > 0 &&
/*N*/ pArgs[nDescCount-1].eType == SC_ADDINARG_VARARGS )
/*N*/ {
-/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 long nVarCount = nParamCount - ( nDescCount - 1 ); // size of last argument
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");}
/*N*/ }
/*N*/ else if ( nParamCount <= nDescCount )
/*N*/ {
commit 22d409951d3dfdb7ba4b7996302de12c2f8affb7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 28 12:43:54 2010 +0000
cppcheck: use prefix variant
diff --git a/writerperfect/source/filter/DocumentCollector.cxx b/writerperfect/source/filter/DocumentCollector.cxx
index 5db1900..4286f8a 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -119,51 +119,51 @@ bool DocumentCollector::filter()
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
}
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++) {
+ for (std::map<WPXString, ParagraphStyle *, ltstr>::iterator iterTextStyle = mTextStyleHash.begin(); iterTextStyle != mTextStyleHash.end(); ++iterTextStyle) {
delete (iterTextStyle->second);
}
- for (std::map<WPXString, SpanStyle *, ltstr>::iterator iterSpanStyle = mSpanStyleHash.begin(); iterSpanStyle != mSpanStyleHash.end(); iterSpanStyle++) {
+ for (std::map<WPXString, SpanStyle *, ltstr>::iterator iterSpanStyle = mSpanStyleHash.begin(); iterSpanStyle != mSpanStyleHash.end(); ++iterSpanStyle) {
delete(iterSpanStyle->second);
}
- 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) {
delete(iterFont->second);
}
- for (std::vector<ListStyle *>::iterator iterListStyles = mListStyles.begin(); iterListStyles != mListStyles.end(); iterListStyles++) {
+ for (std::vector<ListStyle *>::iterator iterListStyles = mListStyles.begin(); iterListStyles != mListStyles.end(); ++iterListStyles) {
delete (*iterListStyles);
}
- for (std::vector<SectionStyle *>::iterator iterSectionStyles = mSectionStyles.begin(); iterSectionStyles != mSectionStyles.end(); iterSectionStyles++) {
+ for (std::vector<SectionStyle *>::iterator iterSectionStyles = mSectionStyles.begin(); iterSectionStyles != mSectionStyles.end(); ++iterSectionStyles) {
delete (*iterSectionStyles);
}
- for (std::vector<TableStyle *>::iterator iterTableStyles = mTableStyles.begin(); iterTableStyles != mTableStyles.end(); iterTableStyles++) {
+ for (std::vector<TableStyle *>::iterator iterTableStyles = mTableStyles.begin(); iterTableStyles != mTableStyles.end(); ++iterTableStyles) {
delete((*iterTableStyles));
}
- for (std::vector<PageSpan *>::iterator iterPageSpans = mPageSpans.begin(); iterPageSpans != mPageSpans.end(); iterPageSpans++) {
+ for (std::vector<PageSpan *>::iterator iterPageSpans = mPageSpans.begin(); iterPageSpans != mPageSpans.end(); ++iterPageSpans) {
delete (*iterPageSpans);
}
- for (std::vector<DocumentElement *>::iterator iterFrameStyles = mFrameStyles.begin(); iterFrameStyles != mFrameStyles.end(); iterFrameStyles++) {
+ for (std::vector<DocumentElement *>::iterator iterFrameStyles = mFrameStyles.begin(); 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++) {
+ for (std::vector<DocumentElement *>::iterator iterMetaData = mMetaData.begin(); iterMetaData != mMetaData.end(); ++iterMetaData) {
delete(*iterMetaData);
}
@@ -236,7 +236,7 @@ void DocumentCollector::_writeDefaultStyles(DocumentHandlerInterface *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");
@@ -296,14 +296,14 @@ bool DocumentCollector::_writeTargetDocument(DocumentHandlerInterface *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");
@@ -323,13 +323,13 @@ bool DocumentCollector::_writeTargetDocument(DocumentHandlerInterface *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"))
@@ -341,23 +341,23 @@ bool DocumentCollector::_writeTargetDocument(DocumentHandlerInterface *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);
}
@@ -374,7 +374,7 @@ bool DocumentCollector::_writeTargetDocument(DocumentHandlerInterface *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"));
@@ -673,7 +673,7 @@ void DocumentCollector::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 = mListStyles.begin(); iterOrderedListStyles != mListStyles.end(); iterOrderedListStyles++)
+ for (std::vector<ListStyle *>::iterator iterOrderedListStyles = mListStyles.begin(); iterOrderedListStyles != mListStyles.end(); ++iterOrderedListStyles)
{
if ((* iterOrderedListStyles)->getListID() == id)
(* iterOrderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 1), propList);
@@ -701,7 +701,7 @@ void DocumentCollector::defineUnorderedListLevel(const WPXPropertyList &propList
}
// See comment in DocumentCollector::defineOrderedListLevel
- for (std::vector<ListStyle *>::iterator iterUnorderedListStyles = mListStyles.begin(); iterUnorderedListStyles != mListStyles.end(); iterUnorderedListStyles++)
+ for (std::vector<ListStyle *>::iterator iterUnorderedListStyles = mListStyles.begin(); iterUnorderedListStyles != mListStyles.end(); ++iterUnorderedListStyles)
{
if ((* iterUnorderedListStyles)->getListID() == id)
(* iterUnorderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 1), propList);
@@ -1264,7 +1264,7 @@ void DocumentCollector::insertBinaryObject(const WPXPropertyList &propList, cons
if (libwpg::WPGraphics::parse(const_cast<WPXInputStream *>(data.getDataStream()), &exporter, fileFormat) && !tmpContentElements.empty())
{
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)
mpCurrentContentElements->push_back(*iter);
mpCurrentContentElements->push_back(new TagCloseElement("draw:object"));
}
commit e2e528dbeb6e921bf40d4639585bb55b49427721
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 28 12:38:21 2010 +0000
cppcheck: pRedoDoc unused
diff --git a/binfilter/bf_sc/source/ui/docshell/sc_arealink.cxx b/binfilter/bf_sc/source/ui/docshell/sc_arealink.cxx
index fd886ef..61b375b 100644
--- a/binfilter/bf_sc/source/ui/docshell/sc_arealink.cxx
+++ b/binfilter/bf_sc/source/ui/docshell/sc_arealink.cxx
@@ -233,7 +233,6 @@ namespace binfilter {
/*N*/ // Undo initialisieren
/*N*/
/*N*/ ScDocument* pUndoDoc = NULL;
-/*N*/ ScDocument* pRedoDoc = NULL;
/*N*/ if ( bAddUndo && bUndo )
/*N*/ {
/*N*/ pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -317,7 +316,7 @@ namespace binfilter {
/*N*/
/*N*/ if ( bAddUndo && bUndo)
/*N*/ {
-/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
+/*?*/ DBG_BF_ASSERT(0, "STRIP");
/*N*/ }
/*N*/
/*N*/ // neue Einstellungen merken
commit 6c682f676ea92ac906732e1376e6b2a2c910d8aa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 28 12:13:06 2010 +0000
cppcheck: uninit member variable
diff --git a/lotuswordpro/source/filter/xfilter/xflist.cxx b/lotuswordpro/source/filter/xfilter/xflist.cxx
index 211c432..5e4c123 100644
--- a/lotuswordpro/source/filter/xfilter/xflist.cxx
+++ b/lotuswordpro/source/filter/xfilter/xflist.cxx
@@ -77,6 +77,7 @@ XFList::XFList(sal_Bool ordered)
{
m_bOrdered = ordered;
m_bContinueNumber = sal_False;
+ m_pHeader = NULL;
}
XFList::~XFList()
commit 0a2494322688b6da2077c5685da02df1bbb69024
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Nov 28 12:00:47 2010 +0000
cppcheck: pRect is unused
diff --git a/binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx b/binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx
index 16aeb70..6961023 100644
--- a/binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx
+++ b/binfilter/bf_sc/source/filter/xml/sc_XMLTableShapeImportHelper.cxx
@@ -78,7 +78,6 @@ void XMLTableShapeImportHelper::finishShape(
static_cast<ScXMLImport&>(mrImporter).LockSolarMutex();
if (rShapes == static_cast<ScXMLImport&>(mrImporter).GetTables().GetCurrentXShapes())
{
- Rectangle* pRect = NULL;
sal_Int32 nEndX(-1);
sal_Int32 nEndY(-1);
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
More information about the Libreoffice-commits
mailing list