[poppler] glib/poppler-input-stream.h poppler/CachedFile.h poppler/DCTStream.h poppler/Decrypt.h poppler/FlateEncoder.h poppler/FlateStream.h poppler/JBIG2Stream.h poppler/JPEG2000Stream.h poppler/JPXStream.h poppler/PSOutputDev.cc poppler/Stream.cc poppler/Stream.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Nov 24 09:39:46 UTC 2019
glib/poppler-input-stream.h | 3 ++-
poppler/CachedFile.h | 4 ++--
poppler/DCTStream.h | 4 ++--
poppler/Decrypt.h | 2 +-
poppler/FlateEncoder.h | 4 ++--
poppler/FlateStream.h | 4 ++--
poppler/JBIG2Stream.h | 3 ++-
poppler/JPEG2000Stream.h | 4 ++--
poppler/JPXStream.h | 16 +++++++++++++++-
poppler/PSOutputDev.cc | 2 +-
poppler/Stream.cc | 2 +-
poppler/Stream.h | 42 +++++++++++++++++++++---------------------
12 files changed, 53 insertions(+), 37 deletions(-)
New commits:
commit a0fbc4c7ef978873ba5730958c9e1fa6aeea06c4
Author: Albert Astals Cid <aacid at kde.org>
Date: Sun Nov 24 10:03:25 2019 +0100
Make Stream::getKind const
diff --git a/glib/poppler-input-stream.h b/glib/poppler-input-stream.h
index 99710e0d..7484e516 100644
--- a/glib/poppler-input-stream.h
+++ b/glib/poppler-input-stream.h
@@ -1,6 +1,7 @@
/* poppler-input-stream.h: glib interface to poppler
*
* Copyright (C) 2012 Carlos Garcia Campos <carlosgc at gnome.org>
+ * Copyright (C) 2019 Albert Astals Cid <aacid at kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -36,7 +37,7 @@ public:
BaseStream *copy() override;
Stream *makeSubStream(Goffset start, bool limited,
Goffset lengthA, Object &&dictA) override;
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
void close() override;
int getChar() override
diff --git a/poppler/CachedFile.h b/poppler/CachedFile.h
index 665744c6..a295fbf7 100644
--- a/poppler/CachedFile.h
+++ b/poppler/CachedFile.h
@@ -8,7 +8,7 @@
//
// Copyright 2009 Stefan Thomas <thomas at eload24.com>
// Copyright 2010 Hib Eris <hib at hiberis.nl>
-// Copyright 2010, 2018 Albert Astals Cid <aacid at kde.org>
+// Copyright 2010, 2018, 2019 Albert Astals Cid <aacid at kde.org>
//
//========================================================================
@@ -49,7 +49,7 @@ public:
CachedFile(const CachedFile &) = delete;
CachedFile& operator=(const CachedFile &) = delete;
- unsigned int getLength() { return length; }
+ unsigned int getLength() const { return length; }
long int tell();
int seek(long int offset, int origin);
size_t read(void * ptr, size_t unitsize, size_t count);
diff --git a/poppler/DCTStream.h b/poppler/DCTStream.h
index 1c10a116..e6dccb83 100644
--- a/poppler/DCTStream.h
+++ b/poppler/DCTStream.h
@@ -6,7 +6,7 @@
//
// Copyright 2005 Jeff Muizelaar <jeff at infidigm.net>
// Copyright 2005 Martin Kretzschmar <martink at gnome.org>
-// Copyright 2005-2007, 2009-2011, 2017 Albert Astals Cid <aacid at kde.org>
+// Copyright 2005-2007, 2009-2011, 2017, 2019 Albert Astals Cid <aacid at kde.org>
// Copyright 2010 Carlos Garcia Campos <carlosgc at gnome.org>
// Copyright 2011 Daiki Ueno <ueno at unixuser.org>
// Copyright 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
@@ -57,7 +57,7 @@ public:
DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion);
~DCTStream();
- StreamKind getKind() override { return strDCT; }
+ StreamKind getKind() const override { return strDCT; }
void reset() override;
int getChar() override;
int lookChar() override;
diff --git a/poppler/Decrypt.h b/poppler/Decrypt.h
index fbd135fc..ad68af83 100644
--- a/poppler/Decrypt.h
+++ b/poppler/Decrypt.h
@@ -101,7 +101,7 @@ public:
BaseCryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, Ref ref);
~BaseCryptStream();
- StreamKind getKind() override { return strCrypt; }
+ StreamKind getKind() const override { return strCrypt; }
void reset() override;
int getChar() override;
int lookChar() override = 0;
diff --git a/poppler/FlateEncoder.h b/poppler/FlateEncoder.h
index 66f8eda0..a85fc5d5 100644
--- a/poppler/FlateEncoder.h
+++ b/poppler/FlateEncoder.h
@@ -3,7 +3,7 @@
// FlateEncoder.h
//
// Copyright (C) 2016, William Bader <williambader at hotmail.com>
-// Copyright (C) 2018 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2018, 2019 Albert Astals Cid <aacid at kde.org>
//
// This file is under the GPLv2 or later license
//
@@ -42,7 +42,7 @@ public:
FlateEncoder(Stream *strA);
~FlateEncoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override
{ return (outBufPtr >= outBufEnd && !fillBuf()) ? EOF : (*outBufPtr++ & 0xff); }
diff --git a/poppler/FlateStream.h b/poppler/FlateStream.h
index c8ab0763..6902595d 100644
--- a/poppler/FlateStream.h
+++ b/poppler/FlateStream.h
@@ -3,7 +3,7 @@
// FlateStream.h
//
// Copyright (C) 2005, Jeff Muizelaar <jeff at infidigm.net>
-// Copyright (C) 2010, 2011, Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2010, 2011, 2019, Albert Astals Cid <aacid at kde.org>
//
// This file is under the GPLv2 or later license
//
@@ -37,7 +37,7 @@ public:
FlateStream(Stream *strA, int predictor, int columns, int colors, int bits);
virtual ~FlateStream();
- virtual StreamKind getKind() override { return strFlate; }
+ virtual StreamKind getKind() const override { return strFlate; }
virtual void reset() override;
virtual int getChar() override;
virtual int lookChar() override;
diff --git a/poppler/JBIG2Stream.h b/poppler/JBIG2Stream.h
index 89b199aa..2a82ea14 100644
--- a/poppler/JBIG2Stream.h
+++ b/poppler/JBIG2Stream.h
@@ -18,6 +18,7 @@
// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki at hiroshima-u.ac.jp>
// Copyright (C) 2019 Oliver Sander <oliver.sander at tu-dresden.de>
// Copyright (C) 2019 Volker Krause <vkrause at kde.org>
+// Copyright (C) 2019 Albert Astals Cid <aacid at kde.org>
//
// 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
@@ -45,7 +46,7 @@ public:
JBIG2Stream(Stream *strA, Object &&globalsStreamA, Object *globalsStreamRefA);
~JBIG2Stream();
- StreamKind getKind() override { return strJBIG2; }
+ StreamKind getKind() const override { return strJBIG2; }
void reset() override;
void close() override;
Goffset getPos() override;
diff --git a/poppler/JPEG2000Stream.h b/poppler/JPEG2000Stream.h
index 06461e80..b11abee0 100644
--- a/poppler/JPEG2000Stream.h
+++ b/poppler/JPEG2000Stream.h
@@ -4,7 +4,7 @@
//
// A JPX stream decoder using OpenJPEG
//
-// Copyright 2008, 2010 Albert Astals Cid <aacid at kde.org>
+// Copyright 2008, 2010, 2019 Albert Astals Cid <aacid at kde.org>
// Copyright 2011 Daniel Glöckner <daniel-gl at gmx.net>
// Copyright 2013, 2014 Adrian Johnson <ajohnson at redneon.com>
// Copyright 2015 Adam Reichold <adam.reichold at t-online.de>
@@ -28,7 +28,7 @@ public:
JPXStream(Stream *strA);
~JPXStream();
- StreamKind getKind() override { return strJPX; }
+ StreamKind getKind() const override { return strJPX; }
void reset() override;
void close() override;
Goffset getPos() override;
diff --git a/poppler/JPXStream.h b/poppler/JPXStream.h
index 775af916..45fdc666 100644
--- a/poppler/JPXStream.h
+++ b/poppler/JPXStream.h
@@ -6,6 +6,20 @@
//
//========================================================================
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2019 Albert Astals Cid <aacid at kde.org>
+//
+// 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
+//
+//========================================================================
+
#ifndef JPXSTREAM_H
#define JPXSTREAM_H
@@ -257,7 +271,7 @@ public:
JPXStream(Stream *strA);
virtual ~JPXStream();
- virtual StreamKind getKind() override { return strJPX; }
+ virtual StreamKind getKind() const override { return strJPX; }
virtual void reset() override;
virtual void close() override;
virtual int getChar() override;
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 2de5454d..9e279c6a 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -990,7 +990,7 @@ public:
DeviceNRecoder(Stream *strA, int widthA, int heightA,
GfxImageColorMap *colorMapA);
~DeviceNRecoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override
{ return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx++]; }
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index 8c29f8eb..805bb97d 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -182,7 +182,7 @@ public:
{
}
- StreamKind getKind() override { return str->getBaseStream()->getKind(); }
+ StreamKind getKind() const override { return str->getBaseStream()->getKind(); }
void reset() override { str->getBaseStream()->reset(); }
int getChar() override { return str->getBaseStream()->getChar(); }
int lookChar() override { return str->getBaseStream()->lookChar(); }
diff --git a/poppler/Stream.h b/poppler/Stream.h
index 1b0ae69b..dcfd3a26 100644
--- a/poppler/Stream.h
+++ b/poppler/Stream.h
@@ -106,7 +106,7 @@ public:
Stream& operator=(const Stream &other) = delete;
// Get kind of stream.
- virtual StreamKind getKind() = 0;
+ virtual StreamKind getKind() const = 0;
// Reset stream to beginning.
virtual void reset() = 0;
@@ -456,7 +456,7 @@ public:
BaseStream *copy() override;
Stream *makeSubStream(Goffset startA, bool limitedA,
Goffset lengthA, Object &&dictA) override;
- StreamKind getKind() override { return strFile; }
+ StreamKind getKind() const override { return strFile; }
void reset() override;
void close() override;
int getChar() override
@@ -531,7 +531,7 @@ public:
BaseStream *copy() override;
Stream *makeSubStream(Goffset startA, bool limitedA,
Goffset lengthA, Object &&dictA) override;
- StreamKind getKind() override { return strCachedFile; }
+ StreamKind getKind() const override { return strCachedFile; }
void reset() override;
void close() override;
int getChar() override
@@ -593,7 +593,7 @@ public:
return new BaseMemStream(buf, startA, newLength, std::move(dictA));
}
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override {
bufPtr = buf + start;
@@ -703,7 +703,7 @@ public:
BaseStream *copy() override;
Stream *makeSubStream(Goffset start, bool limitedA,
Goffset lengthA, Object &&dictA) override;
- StreamKind getKind() override { return str->getKind(); }
+ StreamKind getKind() const override { return str->getKind(); }
void reset() override {}
int getChar() override;
int lookChar() override;
@@ -744,7 +744,7 @@ public:
ASCIIHexStream(Stream *strA);
~ASCIIHexStream();
- StreamKind getKind() override { return strASCIIHex; }
+ StreamKind getKind() const override { return strASCIIHex; }
void reset() override;
int getChar() override
{ int c = lookChar(); buf = EOF; return c; }
@@ -767,7 +767,7 @@ public:
ASCII85Stream(Stream *strA);
~ASCII85Stream();
- StreamKind getKind() override { return strASCII85; }
+ StreamKind getKind() const override { return strASCII85; }
void reset() override;
int getChar() override
{ int ch = lookChar(); ++index; return ch; }
@@ -793,7 +793,7 @@ public:
LZWStream(Stream *strA, int predictor, int columns, int colors,
int bits, int earlyA);
~LZWStream();
- StreamKind getKind() override { return strLZW; }
+ StreamKind getKind() const override { return strLZW; }
void reset() override;
int getChar() override;
int lookChar() override;
@@ -852,7 +852,7 @@ public:
RunLengthStream(Stream *strA);
~RunLengthStream();
- StreamKind getKind() override { return strRunLength; }
+ StreamKind getKind() const override { return strRunLength; }
void reset() override;
int getChar() override
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
@@ -887,7 +887,7 @@ public:
bool byteAlignA, int columnsA, int rowsA,
bool endOfBlockA, bool blackA, int damagedRowsBeforeErrorA);
~CCITTFaxStream();
- StreamKind getKind() override { return strCCITTFax; }
+ StreamKind getKind() const override { return strCCITTFax; }
void reset() override;
int getChar() override
{ int c = lookChar(); buf = EOF; return c; }
@@ -973,7 +973,7 @@ public:
DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion);
virtual ~DCTStream();
- StreamKind getKind() override { return strDCT; }
+ StreamKind getKind() const override { return strDCT; }
void reset() override;
void close() override;
int getChar() override;
@@ -1081,7 +1081,7 @@ public:
FlateStream(Stream *strA, int predictor, int columns,
int colors, int bits);
~FlateStream();
- StreamKind getKind() override { return strFlate; }
+ StreamKind getKind() const override { return strFlate; }
void reset() override;
int getChar() override;
int lookChar() override;
@@ -1155,7 +1155,7 @@ public:
EOFStream(Stream *strA);
~EOFStream();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override {}
int getChar() override { return EOF; }
int lookChar() override { return EOF; }
@@ -1172,7 +1172,7 @@ public:
BufStream(Stream *strA, int bufSizeA);
~BufStream();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override;
int lookChar() override;
@@ -1197,7 +1197,7 @@ public:
FixedLengthEncoder(Stream *strA, int lengthA);
~FixedLengthEncoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override;
int lookChar() override;
@@ -1220,7 +1220,7 @@ public:
ASCIIHexEncoder(Stream *strA);
~ASCIIHexEncoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
@@ -1250,7 +1250,7 @@ public:
ASCII85Encoder(Stream *strA);
~ASCII85Encoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
@@ -1280,7 +1280,7 @@ public:
RunLengthEncoder(Stream *strA);
~RunLengthEncoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
@@ -1316,7 +1316,7 @@ public:
LZWEncoder(Stream *strA);
~LZWEncoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override;
int lookChar() override;
@@ -1348,7 +1348,7 @@ public:
CMYKGrayEncoder(Stream *strA);
~CMYKGrayEncoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
@@ -1377,7 +1377,7 @@ public:
RGBGrayEncoder(Stream *strA);
~RGBGrayEncoder();
- StreamKind getKind() override { return strWeird; }
+ StreamKind getKind() const override { return strWeird; }
void reset() override;
int getChar() override
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
More information about the poppler
mailing list