[poppler] 2 commits - poppler/GfxState.cc poppler/JPXStream.cc poppler/SplashOutputDev.cc poppler/Stream.cc qt5/src

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 1 23:22:35 UTC 2019


 poppler/GfxState.cc         |    2 +-
 poppler/JPXStream.cc        |   34 +++++++++++++++++-----------------
 poppler/SplashOutputDev.cc  |    2 +-
 poppler/Stream.cc           |   12 ++++++------
 qt5/src/poppler-document.cc |    4 ++--
 qt5/src/poppler-form.cc     |    2 +-
 qt5/src/poppler-qt5.h       |    2 +-
 7 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 615a12a4d12bc4769226f73026961623f0b15b62
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Jan 2 00:20:58 2019 +0100

    Fix some trivial warnings
    
    No (C) for this (a machine could do it)

diff --git a/poppler/JPXStream.cc b/poppler/JPXStream.cc
index 1f730581..d1e4f454 100644
--- a/poppler/JPXStream.cc
+++ b/poppler/JPXStream.cc
@@ -250,7 +250,7 @@ JPXStream::JPXStream(Stream *strA):
   haveCompMap = false;
   haveChannelDefn = false;
 
-  img.tiles = NULL;
+  img.tiles = nullptr;
   bitBuf = 0;
   bitBufLen = 0;
   bitBufSkip = false;
@@ -289,7 +289,7 @@ void JPXStream::close() {
   unsigned int comp, i, k, r, pre, sb;
 
   gfree(bpc);
-  bpc = NULL;
+  bpc = nullptr;
   if (havePalette) {
     gfree(palette.bpc);
     gfree(palette.c);
@@ -356,7 +356,7 @@ void JPXStream::close() {
       }
     }
     gfree(img.tiles);
-    img.tiles = NULL;
+    img.tiles = nullptr;
   }
   bufStr->close();
 }
@@ -412,7 +412,7 @@ void JPXStream::fillReadBuf() {
     tileIdx = ((curY - img.yTileOffset) / img.yTileSize) * img.nXTiles
               + (curX - img.xTileOffset) / img.xTileSize;
 #if 1 //~ ignore the palette, assume the PDF ColorSpace object is valid
-    if (img.tiles == NULL || tileIdx >= img.nXTiles * img.nYTiles || img.tiles[tileIdx].tileComps == NULL) {
+    if (img.tiles == nullptr || tileIdx >= img.nXTiles * img.nYTiles || img.tiles[tileIdx].tileComps == nullptr) {
       error(errSyntaxError, getPos(), "Unexpected tileIdx in fillReadBuf in JPX stream");
       return;
     } 
@@ -465,7 +465,7 @@ void JPXStream::fillReadBuf() {
 }
 
 GooString *JPXStream::getPSFilter(int psLevel, const char *indent) {
-  return NULL;
+  return nullptr;
 }
 
 bool JPXStream::isBinary(bool last) {
@@ -989,10 +989,10 @@ bool JPXStream::readCodestream(unsigned int len) {
 	img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps,
 							 sizeof(JPXTileComp));
 	for (comp = 0; comp < img.nComps; ++comp) {
-	  img.tiles[i].tileComps[comp].quantSteps = NULL;
-	  img.tiles[i].tileComps[comp].data = NULL;
-	  img.tiles[i].tileComps[comp].buf = NULL;
-	  img.tiles[i].tileComps[comp].resLevels = NULL;
+	  img.tiles[i].tileComps[comp].quantSteps = nullptr;
+	  img.tiles[i].tileComps[comp].data = nullptr;
+	  img.tiles[i].tileComps[comp].buf = nullptr;
+	  img.tiles[i].tileComps[comp].resLevels = nullptr;
 	}
       }
       for (comp = 0; comp < img.nComps; ++comp) {
@@ -1024,7 +1024,7 @@ bool JPXStream::readCodestream(unsigned int len) {
 	      "JPX COD marker segment before SIZ segment");
 	return false;
       }
-      if (img.tiles == NULL || img.nXTiles * img.nYTiles == 0 || img.tiles[0].tileComps == NULL) {
+      if (img.tiles == nullptr || img.nXTiles * img.nYTiles == 0 || img.tiles[0].tileComps == nullptr) {
 	error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
 	return false;
       } 
@@ -1074,12 +1074,12 @@ bool JPXStream::readCodestream(unsigned int len) {
 	      (JPXResLevel *)gmallocn_checkoverflow(
 		     (img.tiles[i].tileComps[comp].nDecompLevels + 1),
 		     sizeof(JPXResLevel));
-	  if (img.tiles[i].tileComps[comp].resLevels == NULL) {
+	  if (img.tiles[i].tileComps[comp].resLevels == nullptr) {
 	    error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
 	    return false;
 	  }
 	  for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
-	    img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL;
+	    img.tiles[i].tileComps[comp].resLevels[r].precincts = nullptr;
 	  }
 	}
       }
@@ -1164,7 +1164,7 @@ bool JPXStream::readCodestream(unsigned int len) {
 		     (img.tiles[i].tileComps[comp].nDecompLevels + 1),
 		     sizeof(JPXResLevel));
 	for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
-	  img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL;
+	  img.tiles[i].tileComps[comp].resLevels[r].precincts = nullptr;
 	}
       }
       for (r = 0; r <= img.tiles[0].tileComps[comp].nDecompLevels; ++r) {
@@ -1607,7 +1607,7 @@ bool JPXStream::readTilePart() {
 	for (r = 0;
 	     r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels;
 	     ++r) {
-	  img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL;
+	  img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = nullptr;
 	}
       }
       for (r = 0; r <= img.tiles[tileIdx].tileComps[0].nDecompLevels; ++r) {
@@ -1667,7 +1667,7 @@ bool JPXStream::readTilePart() {
 		     (img.tiles[tileIdx].tileComps[comp].nDecompLevels + 1),
 		     sizeof(JPXResLevel));
       for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) {
-	img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL;
+	img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = nullptr;
       }
       for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) {
 	if (img.tiles[tileIdx].tileComps[comp].style & 0x01) {
@@ -2082,8 +2082,8 @@ bool JPXStream::readTilePart() {
 		}
 		memset(cb->touched, 0,
 		       (1 << (tileComp->codeBlockW + tileComp->codeBlockH)));
-		cb->arithDecoder = NULL;
-		cb->stats = NULL;
+		cb->arithDecoder = nullptr;
+		cb->stats = nullptr;
 		++cb;
 	      }
 	    }
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 3b850c8f..195232fe 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -3609,7 +3609,7 @@ void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   tf = maskColors == nullptr && useIccImageSrc(&imgData) ? &iccTransform : nullptr;
 #else
   src = maskColors ? &alphaImageSrc : &imageSrc;
-  tf = NULL;
+  tf = nullptr;
 #endif
   splash->drawImage(src, tf, &imgData, srcMode, maskColors ? true : false,
 		    width, height, mat, interpolate);
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index d606f99b..68c4f11c 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -2419,9 +2419,9 @@ DCTStream::DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion):
   x = y = dy = 0;
   for (i = 0; i < 4; ++i) {
     for (j = 0; j < 32; ++j) {
-      rowBuf[i][j] = NULL;
+      rowBuf[i][j] = nullptr;
     }
-    frameBuf[i] = NULL;
+    frameBuf[i] = nullptr;
   }
 
   if (!dctClipInit) {
@@ -2562,10 +2562,10 @@ void DCTStream::close() {
   for (i = 0; i < 4; ++i) {
     for (j = 0; j < 32; ++j) {
       gfree(rowBuf[i][j]);
-      rowBuf[i][j] = NULL;
+      rowBuf[i][j] = nullptr;
     }
     gfree(frameBuf[i]);
-    frameBuf[i] = NULL;
+    frameBuf[i] = nullptr;
   }
   FilterStream::close();
 }
@@ -3827,10 +3827,10 @@ GooString *DCTStream::getPSFilter(int psLevel, const char *indent) {
   GooString *s;
 
   if (psLevel < 2) {
-    return NULL;
+    return nullptr;
   }
   if (!(s = str->getPSFilter(psLevel, indent))) {
-    return NULL;
+    return nullptr;
   }
   s->append(indent)->append("<< >> /DCTDecode filter\n");
   return s;
diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc
index a76da0aa..216ef582 100644
--- a/qt5/src/poppler-document.cc
+++ b/qt5/src/poppler-document.cc
@@ -639,7 +639,7 @@ namespace Poppler {
 #if defined(USE_CMS)
         return (void*)GfxColorSpace::getRGBProfile();
 #else
-        return NULL;
+        return nullptr;
 #endif
     }
 
@@ -648,7 +648,7 @@ namespace Poppler {
 #if defined(USE_CMS)
        return (void*)GfxColorSpace::getDisplayProfile();
 #else
-       return NULL;
+       return nullptr;
 #endif
     }
 
diff --git a/qt5/src/poppler-form.cc b/qt5/src/poppler-form.cc
index 4485f985..38ebf2df 100644
--- a/qt5/src/poppler-form.cc
+++ b/qt5/src/poppler-form.cc
@@ -565,9 +565,9 @@ QString SignatureValidationInfo::reason() const
 
 SignatureValidationInfo::HashAlgorithm SignatureValidationInfo::hashAlgorithm() const
 {
+#ifdef ENABLE_NSS3
   Q_D(const SignatureValidationInfo);
 
-#ifdef ENABLE_NSS3
   switch (d->hash_algorithm)
   {
     case HASH_AlgMD2:
commit ac407360c3d3494a8ebc872080d680b76c294b0a
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Jan 2 00:22:17 2019 +0100

    Add (C) from last commit

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 4e3ccbfd..c5a10000 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -32,7 +32,7 @@
 // Copyright (C) 2017 Oliver Sander <oliver.sander at tu-dresden.de>
 // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by the LiMux project of the city of Munich
 // Copyright (C) 2018 Volker Krause <vkrause at kde.org>
-// Copyright (C) 2018 Adam Reichold <adam.reichold at t-online.de>
+// Copyright (C) 2018, 2019 Adam Reichold <adam.reichold at t-online.de>
 //
 // 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 --git a/qt5/src/poppler-qt5.h b/qt5/src/poppler-qt5.h
index ddac7dfb..5373a3a1 100644
--- a/qt5/src/poppler-qt5.h
+++ b/qt5/src/poppler-qt5.h
@@ -12,7 +12,7 @@
  * Copyright (C) 2012, Guillermo A. Amaral B. <gamaral at kde.org>
  * Copyright (C) 2012, Fabio D'Urso <fabiodurso at hotmail.it>
  * Copyright (C) 2012, Tobias Koenig <tobias.koenig at kdab.com>
- * Copyright (C) 2012, 2014, 2015 Adam Reichold <adamreichold at myopera.com>
+ * Copyright (C) 2012, 2014, 2015, 2019 Adam Reichold <adamreichold at myopera.com>
  * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
  * Copyright (C) 2013 Anthony Granger <grangeranthony at gmail.com>
  * Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>


More information about the poppler mailing list