[poppler] 2 commits - splash/Splash.cc utils/pdfseparate.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Feb 25 06:03:08 PST 2015


 splash/Splash.cc     |    4 ++--
 utils/pdfseparate.cc |    7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 7980fe868a8ef2ee3315f0bcb606c448d6604039
Author: William Bader <williambader at hotmail.com>
Date:   Wed Feb 25 15:00:33 2015 +0100

    Fix uninitialized variable in Splash::pipeRun
    
    Use useShape is actually the guard for shape, so use it in the if

diff --git a/splash/Splash.cc b/splash/Splash.cc
index 142516f..cac226d 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -15,7 +15,7 @@
 // Copyright (C) 2005 Marco Pesenti Gritti <mpg at redhat.com>
 // Copyright (C) 2010-2014 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger at googlemail.com>
-// Copyright (C) 2011-2013 William Bader <williambader at hotmail.com>
+// Copyright (C) 2011-2013, 2015 William Bader <williambader at hotmail.com>
 // Copyright (C) 2012 Markus Trippelsdorf <markus at trippelsdorf.de>
 // Copyright (C) 2012 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2012 Matthias Kramm <kramm at quiss.org>
@@ -467,7 +467,7 @@ void Splash::pipeRun(SplashPipe *pipe) {
     //----- read destination pixel
 
     Guchar *destColorPtr;
-    if (pipe->shape && state->blendFunc && pipe->knockout && alpha0Bitmap != NULL) {
+    if (pipe->usesShape && state->blendFunc && pipe->knockout && alpha0Bitmap != NULL) {
       destColorPtr = alpha0Bitmap->data + (alpha0Y+pipe->y)*alpha0Bitmap->rowSize;
       switch (bitmap->mode) {
         case splashModeMono1:
commit 57b6b78a0831fb31c06fd1bc6e9803de524f9d2d
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date:   Tue Feb 24 23:34:57 2015 +0100

    pdfseparate: use always an unique instance for PDFDoc for savePageAs

diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc
index bc98c7d..9fa7052 100644
--- a/utils/pdfseparate.cc
+++ b/utils/pdfseparate.cc
@@ -4,7 +4,7 @@
 //
 // This file is licensed under the GPLv2 or later
 //
-// Copyright (C) 2011, 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
+// Copyright (C) 2011, 2012, 2015 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2012-2014 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2013 Pino Toscano <pino at kde.org>
 // Copyright (C) 2013 Daniel Kahn Gillmor <dkg at fifthhorseman.net>
@@ -124,12 +124,15 @@ bool extractPages (const char *srcFileName, const char *destFileName) {
   for (int pageNo = firstPage; pageNo <= lastPage; pageNo++) {
     snprintf (pathName, sizeof (pathName) - 1, destFileName, pageNo);
     GooString *gpageName = new GooString (pathName);
-    int errCode = doc->savePageAs(gpageName, pageNo);
+    PDFDoc *pagedoc = new PDFDoc (new GooString (srcFileName), NULL, NULL, NULL);
+    int errCode = pagedoc->savePageAs(gpageName, pageNo);
     if ( errCode != errNone) {
       delete gpageName;
       delete doc;
+      delete pagedoc;
       return false;
     }
+    delete pagedoc;
     delete gpageName;
   }
   delete doc;


More information about the poppler mailing list