[poppler] 4 commits - poppler/CachedFile.cc poppler/Catalog.cc qt4/src utils/HtmlFonts.cc utils/HtmlLinks.cc utils/HtmlOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Jun 9 03:20:04 PDT 2013


 poppler/CachedFile.cc     |    3 ++-
 poppler/Catalog.cc        |    5 +++--
 qt4/src/poppler-private.h |    3 ++-
 utils/HtmlFonts.cc        |    3 ++-
 utils/HtmlLinks.cc        |    3 ++-
 utils/HtmlOutputDev.cc    |    3 ++-
 6 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 07992075a6d1d29db57f997f67d5a4a6deacbbb4
Merge: 4a0bd6f 25f453e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Jun 9 12:17:53 2013 +0200

    Merge remote-tracking branch 'origin/poppler-0.22'
    
    Conflicts:
    	poppler/Catalog.cc
    	qt4/src/poppler-private.h
    	utils/HtmlOutputDev.cc

diff --cc poppler/Catalog.cc
index f49049a,9b4f3a3..6bd511a
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@@ -25,7 -25,7 +25,8 @@@
  // Copyright (C) 2009 Ilya Gorenbein <igorenbein at finjan.com>
  // Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
  // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
 +// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
+ // Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
  //
  // To see a description of the changes please see the Changelog file that
  // came with your tarball or type make ChangeLog if you are building from git
diff --cc qt4/src/poppler-private.h
index 5759a4e,9748ebb..0d11e83
--- a/qt4/src/poppler-private.h
+++ b/qt4/src/poppler-private.h
@@@ -5,7 -5,8 +5,8 @@@
   * Copyright (C) 2007-2009, 2011 by Pino Toscano <pino at kde.org>
   * Copyright (C) 2011 Andreas Hartmetz <ahartmetz at gmail.com>
   * Copyright (C) 2011 Hib Eris <hib at hiberis.nl>
 - * Copyright (C) 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
 + * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
+  * Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
   * Inspired on code by
   * Copyright (C) 2004 by Albert Astals Cid <tsdgeos at terra.es>
   * Copyright (C) 2004 by Enrico Ros <eros.kde at email.it>
diff --cc utils/HtmlOutputDev.cc
index 03864b5,39069fe..23d8b6e
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@@ -34,7 -34,7 +34,8 @@@
  // Copyright (C) 2012 Ihar Filipau <thephilips at gmail.com>
  // Copyright (C) 2012 Gerald Schmidt <solahcin at gmail.com>
  // Copyright (C) 2012 Pino Toscano <pino at kde.org>
 +// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
+ // Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
  //
  // To see a description of the changes please see the Changelog file that
  // came with your tarball or type make ChangeLog if you are building from git
commit 25f453ef49004452ac4c201d59d9ce2ef52ffeee
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jun 9 12:12:06 2013 +0200

    Prefer prefix ++/-- operators for non-primitive types
    
    Part of bug #80537

diff --git a/poppler/CachedFile.cc b/poppler/CachedFile.cc
index 4c20dae..b0ae838 100644
--- a/poppler/CachedFile.cc
+++ b/poppler/CachedFile.cc
@@ -7,6 +7,7 @@
 // Copyright 2009 Stefan Thomas <thomas at eload24.com>
 // Copyright 2010, 2011 Hib Eris <hib at hiberis.nl>
 // Copyright 2010 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
 //
 //========================================================================
 
@@ -213,7 +214,7 @@ size_t CachedFileWriter::write(const char *ptr, size_t size)
   while (len) {
     if (chunks) {
       if (offset == CachedFileChunkSize) {
-         it++;
+         ++it;
          if (it == (*chunks).end()) return written;
          offset = 0;
       }
diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
index cf6dff0..9b4f3a3 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -25,6 +25,7 @@
 // Copyright (C) 2009 Ilya Gorenbein <igorenbein at finjan.com>
 // Copyright (C) 2010 Hib Eris <hib at hiberis.nl>
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
+// Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -129,7 +130,7 @@ Catalog::~Catalog() {
   delete kidsIdxList;
   if (attrsList) {
     std::vector<PageAttrs *>::iterator it;
-    for (it = attrsList->begin() ; it < attrsList->end(); it++ ) {
+    for (it = attrsList->begin() ; it != attrsList->end(); ++it ) {
       delete *it;
     }
     delete attrsList;
@@ -137,7 +138,7 @@ Catalog::~Catalog() {
   delete pagesRefList;
   if (pagesList) {
     std::vector<Dict *>::iterator it;
-    for (it = pagesList->begin() ; it < pagesList->end(); it++ ) {
+    for (it = pagesList->begin() ; it != pagesList->end(); ++it ) {
       if (!(*it)->decRef()) {
          delete *it;
       }
diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc
index d8334bc..a12992e 100644
--- a/utils/HtmlFonts.cc
+++ b/utils/HtmlFonts.cc
@@ -25,6 +25,7 @@
 // Copyright (C) 2011 Stephen Reichling <sreichling at chegg.com>
 // Copyright (C) 2012 Igor Slepchin <igor.slepchin at gmail.com>
 // Copyright (C) 2012 Luis Parravicini <lparravi at gmail.com>
+// Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -297,7 +298,7 @@ HtmlFontAccu::~HtmlFontAccu(){
 
 int HtmlFontAccu::AddFont(const HtmlFont& font){
  std::vector<HtmlFont>::iterator i; 
- for (i=accu->begin();i!=accu->end();i++)
+ for (i=accu->begin();i!=accu->end();++i)
  {
 	if (font.isEqual(*i)) 
 	{
diff --git a/utils/HtmlLinks.cc b/utils/HtmlLinks.cc
index 1d609f6..34b246e 100644
--- a/utils/HtmlLinks.cc
+++ b/utils/HtmlLinks.cc
@@ -19,6 +19,7 @@
 //
 // Copyright (C) 2008 Boris Toloknov <tlknv at yandex.ru>
 // Copyright (C) 2010 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -128,7 +129,7 @@ HtmlLinks::~HtmlLinks(){
 
 GBool HtmlLinks::inLink(double xmin,double ymin,double xmax,double ymax,int& p)const {
   
-  for(std::vector<HtmlLink>::iterator i=accu->begin();i!=accu->end();i++){
+  for(std::vector<HtmlLink>::iterator i=accu->begin();i!=accu->end();++i){
     if (i->inLink(xmin,ymin,xmax,ymax)) {
         p=(i - accu->begin());
         return 1;
commit ed01688a899c5e7560a93ca2424ca302ff3452f1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jun 9 12:10:01 2013 +0200

    Fix mismatched allocation and deallocation
    
    Part of bug #65551

diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h
index 5a9e1b8..9748ebb 100644
--- a/qt4/src/poppler-private.h
+++ b/qt4/src/poppler-private.h
@@ -6,6 +6,7 @@
  * Copyright (C) 2011 Andreas Hartmetz <ahartmetz at gmail.com>
  * Copyright (C) 2011 Hib Eris <hib at hiberis.nl>
  * Copyright (C) 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
+ * Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
  * Inspired on code by
  * Copyright (C) 2004 by Albert Astals Cid <tsdgeos at terra.es>
  * Copyright (C) 2004 by Enrico Ros <eros.kde at email.it>
@@ -87,7 +88,7 @@ namespace Poppler {
 		wchar_t *fileName = new WCHAR[filePath.length()];
 		int length = filePath.toWCharArray(fileName); 
 		doc = new PDFDoc(fileName, length, ownerPassword, userPassword);
-		delete fileName;
+		delete[] fileName;
 #else
 		GooString *fileName = new GooString(QFile::encodeName(filePath));
 		doc = new PDFDoc(fileName, ownerPassword, userPassword);
commit a27890ac441fbd613ddfe6fcf404b92be371e554
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jun 9 12:08:06 2013 +0200

    Fix memory leak

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 9eaab42..39069fe 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -34,6 +34,7 @@
 // Copyright (C) 2012 Ihar Filipau <thephilips at gmail.com>
 // Copyright (C) 2012 Gerald Schmidt <solahcin at gmail.com>
 // Copyright (C) 2012 Pino Toscano <pino at kde.org>
+// Copyright (C) 2013 Julien Nabet <serval2412 at yahoo.fr>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -1699,9 +1700,9 @@ GBool HtmlOutputDev::dumpDocOutline(PDFDoc* doc)
 			GooString *str = Docname->copy();
 			str->append("-outline.html");
 			output = fopen(str->getCString(), "w");
+			delete str;
 			if (output == NULL)
 				return gFalse;
-			delete str;
 			bClose = gTrue;
 
 			GooString *htmlEncoding =


More information about the poppler mailing list