[poppler] 2 commits - CMakeLists.txt cmake/modules configure.ac fofi/FoFiIdentifier.cc fofi/FoFiTrueType.h fofi/FoFiType1.h glib/poppler-cached-file-loader.h glib/poppler-input-stream.h goo/JpegWriter.h goo/NetPBMWriter.h goo/PNGWriter.h goo/TiffWriter.h poppler/Annot.h poppler/CairoFontEngine.h poppler/CairoOutputDev.cc poppler/CairoOutputDev.h poppler/DCTStream.h poppler/Decrypt.h poppler/FlateEncoder.h poppler/Form.h poppler/Function.h poppler/GfxFont.h poppler/GfxState.cc poppler/GfxState.h poppler/JBIG2Stream.cc poppler/JBIG2Stream.h poppler/JPEG2000Stream.h poppler/Link.h poppler/LocalPDFDocBuilder.h poppler/MarkedContentOutputDev.h poppler/PopplerCache.cc poppler/PreScanOutputDev.h poppler/PSOutputDev.cc poppler/PSOutputDev.h poppler/SecurityHandler.h poppler/SplashOutputDev.cc poppler/SplashOutputDev.h poppler/StdinCachedFile.h poppler/StdinPDFDocBuilder.h poppler/Stream.h poppler/TextOutputDev.cc poppler/TextOutputDev.h poppler/XRef.cc poppler/XRef.h qt4/CMakeLists.txt qt4/sr c qt5/demos qt5/src qt5/tests splash/SplashFTFontFile.h splash/SplashFTFont.h splash/SplashPattern.h test/gtk-test.cc utils/HtmlOutputDev.h utils/ImageOutputDev.h utils/pdftohtml.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Mar 8 23:30:37 UTC 2017


 CMakeLists.txt                               |    4 
 cmake/modules/PopplerMacros.cmake            |    4 
 configure.ac                                 |    1 
 fofi/FoFiIdentifier.cc                       |   42 +-
 fofi/FoFiTrueType.h                          |    2 
 fofi/FoFiType1.h                             |    2 
 glib/poppler-cached-file-loader.h            |    4 
 glib/poppler-input-stream.h                  |   34 +-
 goo/JpegWriter.h                             |   10 
 goo/NetPBMWriter.h                           |    8 
 goo/PNGWriter.h                              |    8 
 goo/TiffWriter.h                             |   10 
 poppler/Annot.h                              |   50 +--
 poppler/CairoFontEngine.h                    |    6 
 poppler/CairoOutputDev.cc                    |    2 
 poppler/CairoOutputDev.h                     |  344 +++++++++++-----------
 poppler/DCTStream.h                          |   18 -
 poppler/Decrypt.h                            |   24 -
 poppler/FlateEncoder.h                       |   16 -
 poppler/Form.h                               |   18 -
 poppler/Function.h                           |   52 +--
 poppler/GfxFont.h                            |   20 -
 poppler/GfxState.cc                          |    2 
 poppler/GfxState.h                           |  366 +++++++++++------------
 poppler/JBIG2Stream.cc                       |   16 -
 poppler/JBIG2Stream.h                        |   22 -
 poppler/JPEG2000Stream.h                     |   24 -
 poppler/Link.h                               |   66 ++--
 poppler/LocalPDFDocBuilder.h                 |    5 
 poppler/MarkedContentOutputDev.h             |   22 -
 poppler/PSOutputDev.cc                       |   16 -
 poppler/PSOutputDev.h                        |  142 ++++-----
 poppler/PopplerCache.cc                      |    2 
 poppler/PreScanOutputDev.h                   |  110 +++----
 poppler/SecurityHandler.h                    |   30 -
 poppler/SplashOutputDev.cc                   |    2 
 poppler/SplashOutputDev.h                    |  210 ++++++-------
 poppler/StdinCachedFile.h                    |    5 
 poppler/StdinPDFDocBuilder.h                 |    5 
 poppler/Stream.h                             |  422 +++++++++++++--------------
 poppler/TextOutputDev.cc                     |   38 +-
 poppler/TextOutputDev.h                      |   46 +-
 poppler/XRef.cc                              |    2 
 poppler/XRef.h                               |   12 
 qt4/CMakeLists.txt                           |    3 
 qt4/src/poppler-annotation.h                 |    8 
 qt4/src/poppler-link.h                       |    2 
 qt5/demos/abstractinfodock.h                 |    6 
 qt5/demos/embeddedfiles.h                    |    6 
 qt5/demos/fonts.h                            |    4 
 qt5/demos/info.h                             |    4 
 qt5/demos/metadata.h                         |    4 
 qt5/demos/navigationtoolbar.h                |    6 
 qt5/demos/optcontent.h                       |    6 
 qt5/demos/pageview.h                         |    6 
 qt5/demos/permissions.h                      |    4 
 qt5/demos/thumbnails.h                       |    4 
 qt5/demos/toc.h                              |    4 
 qt5/demos/viewer.h                           |    2 
 qt5/src/ArthurOutputDev.cc                   |    2 
 qt5/src/ArthurOutputDev.h                    |   90 ++---
 qt5/src/poppler-annotation.cc                |   56 +--
 qt5/src/poppler-annotation.h                 |   84 ++---
 qt5/src/poppler-form.h                       |   16 -
 qt5/src/poppler-link-extractor-private.h     |   10 
 qt5/src/poppler-link.h                       |   24 -
 qt5/src/poppler-optcontent.h                 |   18 -
 qt5/src/poppler-qiodeviceoutstream-private.h |   10 
 qt5/src/poppler-qt5.h                        |    6 
 qt5/tests/stress-threads-qt5.cpp             |    4 
 qt5/tests/test-password-qt5.cpp              |    4 
 qt5/tests/test-poppler-qt5.cpp               |    6 
 splash/SplashFTFont.h                        |   12 
 splash/SplashFTFontFile.h                    |    6 
 splash/SplashPattern.h                       |   12 
 test/gtk-test.cc                             |    6 
 utils/HtmlOutputDev.h                        |   56 +--
 utils/ImageOutputDev.h                       |   62 +--
 utils/pdftohtml.cc                           |   12 
 79 files changed, 1408 insertions(+), 1401 deletions(-)

New commits:
commit 96333f6dcd93afadea35f9301c7a919545037ed4
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Mar 8 23:33:00 2017 +0100

    Add override markers

diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index 6cadf40..8e3ef39 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -99,6 +99,10 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
 endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
 
 if(CMAKE_COMPILER_IS_GNUCXX)
+   if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" )
+   endif()
+
   # set the default compile warnings
   set(DEFAULT_COMPILE_WARNINGS_NO)
   set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common")
diff --git a/fofi/FoFiIdentifier.cc b/fofi/FoFiIdentifier.cc
index be28e25..00b240f 100644
--- a/fofi/FoFiIdentifier.cc
+++ b/fofi/FoFiIdentifier.cc
@@ -69,13 +69,13 @@ class MemReader: public Reader {
 public:
 
   static MemReader *make(char *bufA, int lenA);
-  virtual ~MemReader();
-  virtual int getByte(int pos);
-  virtual GBool getU16BE(int pos, int *val);
-  virtual GBool getU32BE(int pos, Guint *val);
-  virtual GBool getU32LE(int pos, Guint *val);
-  virtual GBool getUVarBE(int pos, int size, Guint *val);
-  virtual GBool cmp(int pos, const char *s);
+  ~MemReader();
+  int getByte(int pos) override;
+  GBool getU16BE(int pos, int *val) override;
+  GBool getU32BE(int pos, Guint *val) override;
+  GBool getU32LE(int pos, Guint *val) override;
+  GBool getUVarBE(int pos, int size, Guint *val) override;
+  GBool cmp(int pos, const char *s) override;
 
 private:
 
@@ -164,13 +164,13 @@ class FileReader: public Reader {
 public:
 
   static FileReader *make(char *fileName);
-  virtual ~FileReader();
-  virtual int getByte(int pos);
-  virtual GBool getU16BE(int pos, int *val);
-  virtual GBool getU32BE(int pos, Guint *val);
-  virtual GBool getU32LE(int pos, Guint *val);
-  virtual GBool getUVarBE(int pos, int size, Guint *val);
-  virtual GBool cmp(int pos, const char *s);
+  ~FileReader();
+  int getByte(int pos) override;
+  GBool getU16BE(int pos, int *val) override;
+  GBool getU32BE(int pos, Guint *val) override;
+  GBool getU32LE(int pos, Guint *val) override;
+  GBool getUVarBE(int pos, int size, Guint *val) override;
+  GBool cmp(int pos, const char *s) override;
 
 private:
 
@@ -287,13 +287,13 @@ class StreamReader: public Reader {
 public:
 
   static StreamReader *make(int (*getCharA)(void *data), void *dataA);
-  virtual ~StreamReader();
-  virtual int getByte(int pos);
-  virtual GBool getU16BE(int pos, int *val);
-  virtual GBool getU32BE(int pos, Guint *val);
-  virtual GBool getU32LE(int pos, Guint *val);
-  virtual GBool getUVarBE(int pos, int size, Guint *val);
-  virtual GBool cmp(int pos, const char *s);
+  ~StreamReader();
+  int getByte(int pos) override;
+  GBool getU16BE(int pos, int *val) override;
+  GBool getU32BE(int pos, Guint *val) override;
+  GBool getU32LE(int pos, Guint *val) override;
+  GBool getUVarBE(int pos, int size, Guint *val) override;
+  GBool cmp(int pos, const char *s) override;
 
 private:
 
diff --git a/fofi/FoFiTrueType.h b/fofi/FoFiTrueType.h
index a4e28f2..0c42c83 100644
--- a/fofi/FoFiTrueType.h
+++ b/fofi/FoFiTrueType.h
@@ -53,7 +53,7 @@ public:
   // Create a FoFiTrueType object from a file on disk.
   static FoFiTrueType *load(char *fileName, int faceIndexA=0);
 
-  virtual ~FoFiTrueType();
+  ~FoFiTrueType();
 
   // Returns true if this an OpenType font containing CFF data, false
   // if it's a TrueType font (or OpenType font with TrueType data).
diff --git a/fofi/FoFiType1.h b/fofi/FoFiType1.h
index f4e29b4..ac0b9c9 100644
--- a/fofi/FoFiType1.h
+++ b/fofi/FoFiType1.h
@@ -29,7 +29,7 @@ public:
   // Create a FoFiType1 object from a file on disk.
   static FoFiType1 *load(char *fileName);
 
-  virtual ~FoFiType1();
+  ~FoFiType1();
 
   // Return the font name.
   char *getName();
diff --git a/glib/poppler-cached-file-loader.h b/glib/poppler-cached-file-loader.h
index 3660435..4eb26db 100644
--- a/glib/poppler-cached-file-loader.h
+++ b/glib/poppler-cached-file-loader.h
@@ -28,8 +28,8 @@ class PopplerCachedFileLoader: public CachedFileLoader {
 public:
   PopplerCachedFileLoader(GInputStream* inputStreamA, GCancellable *cancellableA, goffset lengthA = -1);
   ~PopplerCachedFileLoader();
-  size_t init(GooString *url, CachedFile* cachedFile);
-  int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer);
+  size_t init(GooString *url, CachedFile* cachedFile) override;
+  int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override;
 
 private:
   GInputStream *inputStream;
diff --git a/glib/poppler-input-stream.h b/glib/poppler-input-stream.h
index 74c198f..39bbe01 100644
--- a/glib/poppler-input-stream.h
+++ b/glib/poppler-input-stream.h
@@ -32,31 +32,31 @@ public:
 
   PopplerInputStream(GInputStream *inputStream, GCancellable *cancellableA,
                      Goffset startA, GBool limitedA, Goffset lengthA, Object *dictA);
-  virtual ~PopplerInputStream();
-  virtual BaseStream *copy();
-  virtual Stream *makeSubStream(Goffset start, GBool limited,
-                                Goffset lengthA, Object *dictA);
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual void close();
-  virtual int getChar()
+  ~PopplerInputStream();
+  BaseStream *copy() override;
+  Stream *makeSubStream(Goffset start, GBool limited,
+                        Goffset lengthA, Object *dictA) override;
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  void close() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual Goffset getPos() { return bufPos + (bufPtr - buf); }
-  virtual void setPos(Goffset pos, int dir = 0);
-  virtual Goffset getStart() { return start; }
-  virtual void moveStart(Goffset delta);
+  Goffset getPos() override { return bufPos + (bufPtr - buf); }
+  void setPos(Goffset pos, int dir = 0) override;
+  Goffset getStart() override { return start; }
+  void moveStart(Goffset delta) override;
 
-  virtual int getUnfilteredChar() { return getChar(); }
-  virtual void unfilteredReset() { reset(); }
+  int getUnfilteredChar() override { return getChar(); }
+  void unfilteredReset() override { reset(); }
 
 private:
 
   GBool fillBuf();
 
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   GInputStream *inputStream;
   GCancellable *cancellable;
diff --git a/goo/JpegWriter.h b/goo/JpegWriter.h
index d69bbbb..7d0cf58 100644
--- a/goo/JpegWriter.h
+++ b/goo/JpegWriter.h
@@ -39,13 +39,13 @@ public:
   JpegWriter(Format format = RGB);
   ~JpegWriter();
 
-  bool init(FILE *f, int width, int height, int hDPI, int vDPI);
+  bool init(FILE *f, int width, int height, int hDPI, int vDPI) override;
 
-  bool writePointers(unsigned char **rowPointers, int rowCount);
-  bool writeRow(unsigned char **row);
+  bool writePointers(unsigned char **rowPointers, int rowCount) override;
+  bool writeRow(unsigned char **row) override;
 
-  bool close();
-  bool supportCMYK();
+  bool close() override;
+  bool supportCMYK() override;
 
 private:
   JpegWriter(const JpegWriter &other);
diff --git a/goo/NetPBMWriter.h b/goo/NetPBMWriter.h
index 21a19ee..ffdd7e1 100644
--- a/goo/NetPBMWriter.h
+++ b/goo/NetPBMWriter.h
@@ -36,12 +36,12 @@ public:
   NetPBMWriter(Format formatA = RGB);
   ~NetPBMWriter() {};
 
-  bool init(FILE *f, int width, int height, int hDPI, int vDPI);
+  bool init(FILE *f, int width, int height, int hDPI, int vDPI) override;
 
-  bool writePointers(unsigned char **rowPointers, int rowCount);
-  bool writeRow(unsigned char **row);
+  bool writePointers(unsigned char **rowPointers, int rowCount) override;
+  bool writeRow(unsigned char **row) override;
 
-  bool close();
+  bool close() override;
 
 private:
   FILE *file;
diff --git a/goo/PNGWriter.h b/goo/PNGWriter.h
index ddaedaf..452501c 100644
--- a/goo/PNGWriter.h
+++ b/goo/PNGWriter.h
@@ -43,12 +43,12 @@ public:
   void setSRGBProfile();
 
 
-  bool init(FILE *f, int width, int height, int hDPI, int vDPI);
+  bool init(FILE *f, int width, int height, int hDPI, int vDPI) override;
 
-  bool writePointers(unsigned char **rowPointers, int rowCount);
-  bool writeRow(unsigned char **row);
+  bool writePointers(unsigned char **rowPointers, int rowCount) override;
+  bool writeRow(unsigned char **row) override;
 
-  bool close();
+  bool close() override;
 
 private:
   PNGWriter(const PNGWriter &other);
diff --git a/goo/TiffWriter.h b/goo/TiffWriter.h
index e347c64..d0df8a5 100644
--- a/goo/TiffWriter.h
+++ b/goo/TiffWriter.h
@@ -40,14 +40,14 @@ public:
 
   void setCompressionString(const char *compressionStringArg);
 
-  bool init(FILE *openedFile, int width, int height, int hDPI, int vDPI);
+  bool init(FILE *openedFile, int width, int height, int hDPI, int vDPI) override;
 
-  bool writePointers(unsigned char **rowPointers, int rowCount);
-  bool writeRow(unsigned char **rowData);
+  bool writePointers(unsigned char **rowPointers, int rowCount) override;
+  bool writeRow(unsigned char **rowData) override;
 
-  bool supportCMYK() { return true; }
+  bool supportCMYK() override { return true; }
 
-  bool close();
+  bool close() override;
 
 private:
   TiffWriter(const TiffWriter &other);
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 02311cb..87ba9c3 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -270,8 +270,8 @@ public:
   double getVerticalCorner() const { return verticalCorner; }
 
 private:
-  virtual AnnotBorderType getType() const { return typeArray; }
-  virtual void writeToObject(XRef *xref, Object *obj1) const;
+  AnnotBorderType getType() const override { return typeArray; }
+  void writeToObject(XRef *xref, Object *obj1) const override;
 
   double horizontalCorner;          // (Default 0)
   double verticalCorner;            // (Default 0)
@@ -289,8 +289,8 @@ public:
   AnnotBorderBS(Dict *dict);
 
 private:
-  virtual AnnotBorderType getType() const { return typeBS; }
-  virtual void writeToObject(XRef *xref, Object *obj1) const;
+  AnnotBorderType getType() const override { return typeBS; }
+  void writeToObject(XRef *xref, Object *obj1) const override;
 
   const char *getStyleName() const;
 
@@ -725,7 +725,7 @@ public:
 
   AnnotMarkup(PDFDoc *docA, PDFRectangle *rect);
   AnnotMarkup(PDFDoc *docA, Dict *dict, Object *obj);
-  virtual ~AnnotMarkup();
+  ~AnnotMarkup();
 
   // getters
   GooString *getLabel() const { return label; }
@@ -745,7 +745,7 @@ public:
   void setDate(GooString *new_date);
 
 protected:
-  virtual void removeReferencedObjects();
+  void removeReferencedObjects() override;
 
   GooString *label;             // T            (Default autor)
   AnnotPopup *popup;            // Popup
@@ -787,7 +787,7 @@ public:
   AnnotText(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotText();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   // getters
   GBool getOpen() const { return open; }
@@ -820,7 +820,7 @@ class AnnotMovie: public Annot {
   AnnotMovie(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotMovie();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   GooString* getTitle() { return title; }
   Movie* getMovie() { return movie; }
@@ -878,9 +878,9 @@ public:
 
   AnnotLink(PDFDoc *docA, PDFRectangle *rect);
   AnnotLink(PDFDoc *docA, Dict *dict, Object *obj);
-  virtual ~AnnotLink();
+  ~AnnotLink();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   // getters
   LinkAction *getAction() const { return action; }
@@ -922,9 +922,9 @@ public:
   AnnotFreeText(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotFreeText();
 
-  virtual void draw(Gfx *gfx, GBool printing);
-  virtual Object *getAppearanceResDict(Object *dest);
-  virtual void setContents(GooString *new_content);
+  void draw(Gfx *gfx, GBool printing) override;
+  Object *getAppearanceResDict(Object *dest) override;
+  void setContents(GooString *new_content) override;
 
   void setAppearanceString(GooString *new_string);
   void setQuadding(AnnotFreeTextQuadding new_quadding);
@@ -986,9 +986,9 @@ public:
   AnnotLine(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotLine();
 
-  virtual void draw(Gfx *gfx, GBool printing);
-  virtual Object *getAppearanceResDict(Object *dest);
-  virtual void setContents(GooString *new_content);
+  void draw(Gfx *gfx, GBool printing) override;
+  Object *getAppearanceResDict(Object *dest) override;
+  void setContents(GooString *new_content) override;
 
   void setVertices(double x1, double y1, double x2, double y2);
   void setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end);
@@ -1050,9 +1050,9 @@ public:
 
   AnnotTextMarkup(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType);
   AnnotTextMarkup(PDFDoc *docA, Dict *dict, Object *obj);
-  virtual ~AnnotTextMarkup();
+  ~AnnotTextMarkup();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   // typeHighlight, typeUnderline, typeSquiggly or typeStrikeOut
   void setType(AnnotSubtype new_type);
@@ -1102,7 +1102,7 @@ public:
   AnnotGeometry(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotGeometry();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   void setType(AnnotSubtype new_type); // typeSquare or typeCircle
   void setInteriorColor(AnnotColor *new_color);
@@ -1138,7 +1138,7 @@ public:
   AnnotPolygon(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotPolygon();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   void setType(AnnotSubtype new_type); // typePolygon or typePolyLine
   void setVertices(AnnotPath *path);
@@ -1213,7 +1213,7 @@ public:
   AnnotInk(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotInk();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   void setInkList(AnnotPath **paths, int n_paths);
 
@@ -1248,7 +1248,7 @@ public:
   AnnotFileAttachment(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotFileAttachment();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   // getters
   Object *getFile() { return &file; }
@@ -1276,7 +1276,7 @@ public:
   AnnotSound(PDFDoc *docA, Dict *dict, Object *obj);
   ~AnnotSound();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   // getters
   Sound *getSound() { return sound; }
@@ -1309,9 +1309,9 @@ public:
 
   AnnotWidget(PDFDoc *docA, Dict *dict, Object *obj);
   AnnotWidget(PDFDoc *docA, Dict *dict, Object *obj, FormField *fieldA);
-  virtual ~AnnotWidget();
+  ~AnnotWidget();
 
-  virtual void draw(Gfx *gfx, GBool printing);
+  void draw(Gfx *gfx, GBool printing) override;
 
   void drawBorder();
   void drawFormFieldButton(GfxResources *resources, GooString *da);
diff --git a/poppler/CairoFontEngine.h b/poppler/CairoFontEngine.h
index 8c0dba1..0d7317e 100644
--- a/poppler/CairoFontEngine.h
+++ b/poppler/CairoFontEngine.h
@@ -74,7 +74,7 @@ protected:
 class CairoFreeTypeFont : public CairoFont {
 public:
   static CairoFreeTypeFont *create(GfxFont *gfxFont, XRef *xref, FT_Library lib, GBool useCIDs);
-  virtual ~CairoFreeTypeFont();
+  ~CairoFreeTypeFont();
 
 private:
   CairoFreeTypeFont(Ref ref, cairo_font_face_t *cairo_font_face,
@@ -88,9 +88,9 @@ public:
   static CairoType3Font *create(GfxFont *gfxFont, PDFDoc *doc,
 				CairoFontEngine *fontEngine,
 				GBool printing, XRef *xref);
-  virtual ~CairoType3Font();
+  ~CairoType3Font();
 
-  virtual GBool matches(Ref &other, GBool printing);
+  GBool matches(Ref &other, GBool printing) override;
 
 private:
   CairoType3Font(Ref ref, PDFDoc *doc,
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 89d0c99..2946c92 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -3119,7 +3119,7 @@ public:
     return image;
   }
 
-  void getRow(int row_num, uint32_t *row_data) {
+  void getRow(int row_num, uint32_t *row_data) override {
     int i;
     Guchar *pix;
 
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
index 4a1cd99..1fee812 100644
--- a/poppler/CairoOutputDev.h
+++ b/poppler/CairoOutputDev.h
@@ -97,121 +97,121 @@ public:
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gTrue; }
+  GBool upsideDown() override { return gTrue; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gTrue; }
+  GBool useDrawChar() override { return gTrue; }
 
   // Does this device use tilingPatternFill()?  If this returns false,
   // tiling pattern fills will be reduced to a series of other drawing
   // operations.
-  virtual GBool useTilingPatternFill() { return gTrue; }
+  GBool useTilingPatternFill() override { return gTrue; }
 
   // Does this device use functionShadedFill(), axialShadedFill(), and
   // radialShadedFill()?  If this returns false, these shaded fills
   // will be reduced to a series of other drawing operations.
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
-  virtual GBool useShadedFills(int type) { return type <= 7; }
+  GBool useShadedFills(int type) override { return type <= 7; }
 #else
-  virtual GBool useShadedFills(int type) { return type > 1 && type < 4; }
+  GBool useShadedFills(int type) override { return type > 1 && type < 4; }
 #endif
 
   // Does this device use FillColorStop()?
-  virtual GBool useFillColorStop() { return gTrue; }
+  GBool useFillColorStop() override { return gTrue; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gFalse; }
+  GBool interpretType3Chars() override { return gFalse; }
 
   // Does this device need to clip pages to the crop box even when the
   // box is the crop box?
-  virtual GBool needClipToCropBox() { return gTrue; }
+  GBool needClipToCropBox() override { return gTrue; }
 
   //----- initialization and control
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   //----- save/restore graphics state
-  virtual void saveState(GfxState *state);
-  virtual void restoreState(GfxState *state);
+  void saveState(GfxState *state) override;
+  void restoreState(GfxState *state) override;
 
   //----- update graphics state
-  virtual void updateAll(GfxState *state);
-  virtual void setDefaultCTM(double *ctm);
-  virtual void updateCTM(GfxState *state, double m11, double m12,
-			 double m21, double m22, double m31, double m32);
-  virtual void updateLineDash(GfxState *state);
-  virtual void updateFlatness(GfxState *state);
-  virtual void updateLineJoin(GfxState *state);
-  virtual void updateLineCap(GfxState *state);
-  virtual void updateMiterLimit(GfxState *state);
-  virtual void updateLineWidth(GfxState *state);
-  virtual void updateFillColor(GfxState *state);
-  virtual void updateStrokeColor(GfxState *state);
-  virtual void updateFillOpacity(GfxState *state);
-  virtual void updateStrokeOpacity(GfxState *state);
-  virtual void updateFillColorStop(GfxState *state, double offset);
-  virtual void updateBlendMode(GfxState *state);
+  void updateAll(GfxState *state) override;
+  void setDefaultCTM(double *ctm) override;
+  void updateCTM(GfxState *state, double m11, double m12,
+		 double m21, double m22, double m31, double m32) override;
+  void updateLineDash(GfxState *state) override;
+  void updateFlatness(GfxState *state) override;
+  void updateLineJoin(GfxState *state) override;
+  void updateLineCap(GfxState *state) override;
+  void updateMiterLimit(GfxState *state) override;
+  void updateLineWidth(GfxState *state) override;
+  void updateFillColor(GfxState *state) override;
+  void updateStrokeColor(GfxState *state) override;
+  void updateFillOpacity(GfxState *state) override;
+  void updateStrokeOpacity(GfxState *state) override;
+  void updateFillColorStop(GfxState *state, double offset) override;
+  void updateBlendMode(GfxState *state) override;
 
   //----- update text state
-  virtual void updateFont(GfxState *state);
+  void updateFont(GfxState *state) override;
 
   //----- path painting
-  virtual void stroke(GfxState *state);
-  virtual void fill(GfxState *state);
-  virtual void eoFill(GfxState *state);
-  virtual void clipToStrokePath(GfxState *state);
-  virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
-				  double *pmat, int paintType, int tilingType, Dict *resDict,
-				  double *mat, double *bbox,
-				  int x0, int y0, int x1, int y1,
-				  double xStep, double yStep);
+  void stroke(GfxState *state) override;
+  void fill(GfxState *state) override;
+  void eoFill(GfxState *state) override;
+  void clipToStrokePath(GfxState *state) override;
+  GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
+			  double *pmat, int paintType, int tilingType, Dict *resDict,
+			  double *mat, double *bbox,
+			  int x0, int y0, int x1, int y1,
+			  double xStep, double yStep) override;
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
-  virtual GBool functionShadedFill(GfxState *state, GfxFunctionShading *shading);
+  GBool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
 #endif
-  virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax);
-  virtual GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading);
-  virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax);
-  virtual GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading);
+  GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
+  GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) override;
+  GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override;
+  GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) override;
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
-  virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading);
-  virtual GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading);
+  GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) override;
+  GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) override;
 #endif
 
   //----- path clipping
-  virtual void clip(GfxState *state);
-  virtual void eoClip(GfxState *state);
+  void clip(GfxState *state) override;
+  void eoClip(GfxState *state) override;
 
   //----- text drawing
-  void beginString(GfxState *state, GooString *s);
-  void endString(GfxState *state);
+  void beginString(GfxState *state, GooString *s) override;
+  void endString(GfxState *state) override;
   void drawChar(GfxState *state, double x, double y,
 		double dx, double dy,
 		double originX, double originY,
-		CharCode code, int nBytes, Unicode *u, int uLen);
-  void beginActualText(GfxState *state, GooString *text);
-  void endActualText(GfxState *state);
+		CharCode code, int nBytes, Unicode *u, int uLen) override;
+  void beginActualText(GfxState *state, GooString *text) override;
+  void endActualText(GfxState *state) override;
 
-  virtual GBool beginType3Char(GfxState *state, double x, double y,
-			       double dx, double dy,
-			       CharCode code, Unicode *u, int uLen);
-  virtual void endType3Char(GfxState *state);
-  virtual void beginTextObject(GfxState *state);
-  virtual void endTextObject(GfxState *state);
+  GBool beginType3Char(GfxState *state, double x, double y,
+		       double dx, double dy,
+		       CharCode code, Unicode *u, int uLen) override;
+  void endType3Char(GfxState *state) override;
+  void beginTextObject(GfxState *state) override;
+  void endTextObject(GfxState *state) override;
 
   //----- image drawing
-  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
-			     int width, int height, GBool invert, GBool interpolate,
-			     GBool inlineImg);
-  virtual void setSoftMaskFromImageMask(GfxState *state,
-					Object *ref, Stream *str,
-					int width, int height, GBool invert,
-					GBool inlineImg, double *baseMatrix);
-  virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix);
+  void drawImageMask(GfxState *state, Object *ref, Stream *str,
+		     int width, int height, GBool invert, GBool interpolate,
+		     GBool inlineImg) override;
+  void setSoftMaskFromImageMask(GfxState *state,
+				Object *ref, Stream *str,
+				int width, int height, GBool invert,
+				GBool inlineImg, double *baseMatrix) override;
+  void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override;
   void drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str,
 			      int width, int height, GBool invert, GBool interpolate,
 			      GBool inlineImg);
@@ -219,42 +219,42 @@ public:
 			    int width, int height, GBool invert, GBool interpolate,
 			    GBool inlineImg);
 
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
-			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
-  virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
-				   int width, int height,
-				   GfxImageColorMap *colorMap,
-				   GBool interpolate,
-				   Stream *maskStr,
-				   int maskWidth, int maskHeight,
-				   GfxImageColorMap *maskColorMap,
-				   GBool maskInterpolate);
-
-  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
-			       int width, int height,
-			       GfxImageColorMap *colorMap,
-			       GBool interpolate,
-			       Stream *maskStr,
-			       int maskWidth, int maskHeight,
-			       GBool maskInvert, GBool maskInterpolate);
+  void drawImage(GfxState *state, Object *ref, Stream *str,
+		 int width, int height, GfxImageColorMap *colorMap,
+		 GBool interpolate, int *maskColors, GBool inlineImg) override;
+  void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+			   int width, int height,
+			   GfxImageColorMap *colorMap,
+			   GBool interpolate,
+			   Stream *maskStr,
+			   int maskWidth, int maskHeight,
+			   GfxImageColorMap *maskColorMap,
+			   GBool maskInterpolate) override;
+
+  void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+		       int width, int height,
+		       GfxImageColorMap *colorMap,
+		       GBool interpolate,
+		       Stream *maskStr,
+		       int maskWidth, int maskHeight,
+		       GBool maskInvert, GBool maskInterpolate) override;
 
   //----- transparency groups and soft masks
-  virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
+  void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
                                       GfxColorSpace * /*blendingColorSpace*/,
                                       GBool /*isolated*/, GBool /*knockout*/,
-                                      GBool /*forSoftMask*/);
-  virtual void endTransparencyGroup(GfxState * /*state*/);
+                                      GBool /*forSoftMask*/) override;
+  void endTransparencyGroup(GfxState * /*state*/) override;
   void popTransparencyGroup();
-  virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/);
-  virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,
-                           Function * /*transferFunc*/, GfxColor * /*backdropColor*/);
-  virtual void clearSoftMask(GfxState * /*state*/);
+  void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) override;
+  void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,
+		   Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override;
+  void clearSoftMask(GfxState * /*state*/) override;
 
   //----- Type 3 font operators
-  virtual void type3D0(GfxState *state, double wx, double wy);
-  virtual void type3D1(GfxState *state, double wx, double wy,
-      double llx, double lly, double urx, double ury);
+  void type3D0(GfxState *state, double wx, double wy) override;
+  void type3D1(GfxState *state, double wx, double wy,
+	       double llx, double lly, double urx, double ury) override;
 
   //----- special access
   
@@ -388,118 +388,118 @@ public:
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gTrue; }
+  GBool upsideDown() override { return gTrue; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gFalse; }
+  GBool useDrawChar() override { return gFalse; }
 
   // Does this device use tilingPatternFill()?  If this returns false,
   // tiling pattern fills will be reduced to a series of other drawing
   // operations.
-  virtual GBool useTilingPatternFill() { return gTrue; }
+  GBool useTilingPatternFill() override { return gTrue; }
 
   // Does this device use functionShadedFill(), axialShadedFill(), and
   // radialShadedFill()?  If this returns false, these shaded fills
   // will be reduced to a series of other drawing operations.
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)
-  virtual GBool useShadedFills(int type) { return type <= 7; }
+  GBool useShadedFills(int type) override { return type <= 7; }
 #else
-  virtual GBool useShadedFills(int type) { return type < 4; }
+  GBool useShadedFills(int type) override { return type < 4; }
 #endif
 
   // Does this device use FillColorStop()?
-  virtual GBool useFillColorStop() { return gFalse; }
+  GBool useFillColorStop() override { return gFalse; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gFalse; }
+  GBool interpretType3Chars() override { return gFalse; }
 
   // Does this device need non-text content?
-  virtual GBool needNonText() { return gTrue; }
+  GBool needNonText() override { return gTrue; }
 
   //----- save/restore graphics state
-  virtual void saveState(GfxState *state) { }
-  virtual void restoreState(GfxState *state) { }
+  void saveState(GfxState *state) override { }
+  void restoreState(GfxState *state) override { }
 
   //----- update graphics state
-  virtual void updateAll(GfxState *state) { }
-  virtual void setDefaultCTM(double *ctm) { }
-  virtual void updateCTM(GfxState *state, double m11, double m12,
-				 double m21, double m22, double m31, double m32) { }
-  virtual void updateLineDash(GfxState *state) { }
-  virtual void updateFlatness(GfxState *state) { }
-  virtual void updateLineJoin(GfxState *state) { }
-  virtual void updateLineCap(GfxState *state) { }
-  virtual void updateMiterLimit(GfxState *state) { }
-  virtual void updateLineWidth(GfxState *state) { }
-  virtual void updateFillColor(GfxState *state) { }
-  virtual void updateStrokeColor(GfxState *state) { }
-  virtual void updateFillOpacity(GfxState *state) { }
-  virtual void updateStrokeOpacity(GfxState *state) { }
-  virtual void updateBlendMode(GfxState *state) { }
+  void updateAll(GfxState *state) override { }
+  void setDefaultCTM(double *ctm) override { }
+  void updateCTM(GfxState *state, double m11, double m12,
+		 double m21, double m22, double m31, double m32) override { }
+  void updateLineDash(GfxState *state) override { }
+  void updateFlatness(GfxState *state) override { }
+  void updateLineJoin(GfxState *state) override { }
+  void updateLineCap(GfxState *state) override { }
+  void updateMiterLimit(GfxState *state) override { }
+  void updateLineWidth(GfxState *state) override { }
+  void updateFillColor(GfxState *state) override { }
+  void updateStrokeColor(GfxState *state) override { }
+  void updateFillOpacity(GfxState *state) override { }
+  void updateStrokeOpacity(GfxState *state) override { }
+  void updateBlendMode(GfxState *state) override { }
 
   //----- update text state
-  virtual void updateFont(GfxState *state) { }
+  void updateFont(GfxState *state) override { }
 
   //----- path painting
-  virtual void stroke(GfxState *state) { }
-  virtual void fill(GfxState *state) { }
-  virtual void eoFill(GfxState *state) { }
-  virtual void clipToStrokePath(GfxState *state) { }
-  virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
-				  double *pmat, int paintType, int tilingType, Dict *resDict,
-				  double *mat, double *bbox,
-				  int x0, int y0, int x1, int y1,
-				  double xStep, double yStep) { return gTrue; }
-  virtual GBool axialShadedFill(GfxState *state,
-				GfxAxialShading *shading,
-				double tMin, double tMax) { return gTrue; }
-  virtual GBool radialShadedFill(GfxState *state,
-				 GfxRadialShading *shading,
-				 double sMin, double sMax) { return gTrue; }
+  void stroke(GfxState *state) override { }
+  void fill(GfxState *state) override { }
+  void eoFill(GfxState *state) override { }
+  void clipToStrokePath(GfxState *state) override { }
+  GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
+			  double *pmat, int paintType, int tilingType, Dict *resDict,
+			  double *mat, double *bbox,
+			  int x0, int y0, int x1, int y1,
+			  double xStep, double yStep) override { return gTrue; }
+  GBool axialShadedFill(GfxState *state,
+			GfxAxialShading *shading,
+			double tMin, double tMax) override { return gTrue; }
+  GBool radialShadedFill(GfxState *state,
+			 GfxRadialShading *shading,
+			 double sMin, double sMax) override { return gTrue; }
 
   //----- path clipping
-  virtual void clip(GfxState *state) { }
-  virtual void eoClip(GfxState *state) { }
+  void clip(GfxState *state) override { }
+  void eoClip(GfxState *state) override { }
 
   //----- image drawing
-  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
-			     int width, int height, GBool invert,
-			     GBool interpolate, GBool inlineImg);
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
-			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
-  virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
-				   int width, int height,
-				   GfxImageColorMap *colorMap,
-				   GBool interpolate,
-				   Stream *maskStr,
-				   int maskWidth, int maskHeight,
-				   GfxImageColorMap *maskColorMap,
-				   GBool maskInterpolate);
-  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
-			       int width, int height,
-			       GfxImageColorMap *colorMap,
-			       GBool interpolate,
-			       Stream *maskStr,
-			       int maskWidth, int maskHeight,
-			       GBool maskInvert, GBool maskInterpolate);
-  virtual void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str,
-                                        int width, int height, GBool invert,
-                                        GBool inlineImg, double *baseMatrix);
-  virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) {}
+  void drawImageMask(GfxState *state, Object *ref, Stream *str,
+		     int width, int height, GBool invert,
+		     GBool interpolate, GBool inlineImg) override;
+  void drawImage(GfxState *state, Object *ref, Stream *str,
+		 int width, int height, GfxImageColorMap *colorMap,
+		 GBool interpolate, int *maskColors, GBool inlineImg) override;
+  void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+			   int width, int height,
+			   GfxImageColorMap *colorMap,
+			   GBool interpolate,
+			   Stream *maskStr,
+			   int maskWidth, int maskHeight,
+			   GfxImageColorMap *maskColorMap,
+			   GBool maskInterpolate) override;
+  void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+		       int width, int height,
+		       GfxImageColorMap *colorMap,
+		       GBool interpolate,
+		       Stream *maskStr,
+		       int maskWidth, int maskHeight,
+		       GBool maskInvert, GBool maskInterpolate) override;
+  void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str,
+				int width, int height, GBool invert,
+				GBool inlineImg, double *baseMatrix) override;
+  void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override {}
 
 
   //----- transparency groups and soft masks
-  virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
-				      GfxColorSpace * /*blendingColorSpace*/,
-				      GBool /*isolated*/, GBool /*knockout*/,
-				      GBool /*forSoftMask*/) {}
-  virtual void endTransparencyGroup(GfxState * /*state*/) {}
-  virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {}
-  virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,
-			   Function * /*transferFunc*/, GfxColor * /*backdropColor*/) {}
-  virtual void clearSoftMask(GfxState * /*state*/) {}
+  void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
+			      GfxColorSpace * /*blendingColorSpace*/,
+			      GBool /*isolated*/, GBool /*knockout*/,
+			      GBool /*forSoftMask*/) override {}
+  void endTransparencyGroup(GfxState * /*state*/) override {}
+  void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) override {}
+  void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/,
+		   Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override {}
+  void clearSoftMask(GfxState * /*state*/) override {}
 
   //----- Image list
   // By default images are not rendred
diff --git a/poppler/DCTStream.h b/poppler/DCTStream.h
index bc20a7a..cfa0663 100644
--- a/poppler/DCTStream.h
+++ b/poppler/DCTStream.h
@@ -65,19 +65,19 @@ class DCTStream: public FilterStream {
 public:
 
   DCTStream(Stream *strA, int colorXformA, Object *dict, int recursion);
-  virtual ~DCTStream();
-  virtual StreamKind getKind() { return strDCT; }
-  virtual void reset();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
+  ~DCTStream();
+  StreamKind getKind() override { return strDCT; }
+  void reset() override;
+  int getChar() override;
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
 
 private:
   void init();
 
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   int colorXform;
   JSAMPLE *current;
diff --git a/poppler/Decrypt.h b/poppler/Decrypt.h
index 10a6386..61b0b45 100644
--- a/poppler/Decrypt.h
+++ b/poppler/Decrypt.h
@@ -105,14 +105,14 @@ public:
 
   BaseCryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA,
                   int keyLength, int objNum, int objGen);
-  virtual ~BaseCryptStream();
-  virtual StreamKind getKind() { return strCrypt; }
-  virtual void reset();
-  virtual int getChar();
-  virtual int lookChar() = 0;
-  virtual Goffset getPos();
-  virtual GBool isBinary(GBool last);
-  virtual Stream *getUndecodedStream() { return this; }
+  ~BaseCryptStream();
+  StreamKind getKind() override { return strCrypt; }
+  void reset() override;
+  int getChar() override;
+  int lookChar() override = 0;
+  Goffset getPos() override;
+  GBool isBinary(GBool last) override;
+  Stream *getUndecodedStream() override { return this; }
   void setAutoDelete(GBool val);
 
 protected:
@@ -140,8 +140,8 @@ public:
   EncryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA,
                 int keyLength, int objNum, int objGen);
   ~EncryptStream();
-  virtual void reset();
-  virtual int lookChar();
+  void reset() override;
+  int lookChar() override;
 };
 
 class DecryptStream : public BaseCryptStream {
@@ -150,8 +150,8 @@ public:
   DecryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA,
                 int keyLength, int objNum, int objGen);
   ~DecryptStream();
-  virtual void reset();
-  virtual int lookChar();
+  void reset() override;
+  int lookChar() override;
 };
  
 //------------------------------------------------------------------------
diff --git a/poppler/FlateEncoder.h b/poppler/FlateEncoder.h
index 6dee292..093104a 100644
--- a/poppler/FlateEncoder.h
+++ b/poppler/FlateEncoder.h
@@ -44,16 +44,16 @@ class FlateEncoder: public FilterStream {
 public:
 
   FlateEncoder(Stream *strA);
-  virtual ~FlateEncoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar()
+  ~FlateEncoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override
     { return (outBufPtr >= outBufEnd && !fillBuf()) ? EOF : (*outBufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (outBufPtr >= outBufEnd && !fillBuf()) ? EOF : (*outBufPtr & 0xff); }
-  virtual GooString *getPSFilter(int psLevel, const char *indent) { return NULL; }
-  virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
-  virtual GBool isEncoder() { return gTrue; }
+  GooString *getPSFilter(int psLevel, const char *indent) override { return NULL; }
+  GBool isBinary(GBool last = gTrue) override { return gTrue; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
diff --git a/poppler/Form.h b/poppler/Form.h
index a197ad6..8ddb6fe 100644
--- a/poppler/Form.h
+++ b/poppler/Form.h
@@ -165,7 +165,7 @@ public:
 
   char* getOnStr();
   void setAppearanceState(const char *state);
-  void updateWidgetAppearance();
+  void updateWidgetAppearance() override;
 
 protected:
   FormFieldButton *parent() const;
@@ -187,7 +187,7 @@ public:
   //except a UTF16BE string
   void setContent(GooString* new_content);
 
-  void updateWidgetAppearance();
+  void updateWidgetAppearance() override;
 
   bool isMultiline () const; 
   bool isPassword () const; 
@@ -228,7 +228,7 @@ public:
 
   GooString* getEditChoice ();
 
-  void updateWidgetAppearance();
+  void updateWidgetAppearance() override;
   bool isSelected (int i);
 
   bool isCombo () const; 
@@ -249,7 +249,7 @@ protected:
 class FormWidgetSignature: public FormWidget {
 public:
   FormWidgetSignature(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p);
-  void updateWidgetAppearance();
+  void updateWidgetAppearance() override;
 
   SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation);
 };
@@ -350,7 +350,7 @@ public:
 
   char *getAppearanceState() { return appearanceState.isName() ? appearanceState.getName() : NULL; }
 
-  void fillChildrenSiblingsID ();
+  void fillChildrenSiblingsID () override;
   
   void setNumSiblings (int num);
   void setSibling (int i, FormFieldButton *id) { siblings[i] = id; }
@@ -363,7 +363,7 @@ public:
   void print(int indent = 0);
 #endif
 
-  virtual ~FormFieldButton();
+  ~FormFieldButton();
 protected:
   void updateState(char *state);
 
@@ -389,7 +389,7 @@ public:
   GooString* getContent () { return content; }
   GooString* getContentCopy ();
   void setContentCopy (GooString* new_content);
-  virtual ~FormFieldText();
+  ~FormFieldText();
 
   bool isMultiline () const { return multiline; }
   bool isPassword () const { return password; }
@@ -424,7 +424,7 @@ class FormFieldChoice: public FormField {
 public:
   FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents);
 
-  virtual ~FormFieldChoice();
+  ~FormFieldChoice();
 
   int getNumChoices() { return numChoices; }
   GooString* getChoice(int i) { return choices ? choices[i].optionName : NULL; }
@@ -495,7 +495,7 @@ public:
 
   SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation);
 
-  virtual ~FormFieldSignature();
+  ~FormFieldSignature();
 
 private:
   void parseInfo();
diff --git a/poppler/Function.h b/poppler/Function.h
index 90e2a76..56e5495 100644
--- a/poppler/Function.h
+++ b/poppler/Function.h
@@ -109,11 +109,11 @@ class IdentityFunction: public Function {
 public:
 
   IdentityFunction();
-  virtual ~IdentityFunction();
-  virtual Function *copy() { return new IdentityFunction(); }
-  virtual int getType() { return -1; }
-  virtual void transform(double *in, double *out);
-  virtual GBool isOk() { return gTrue; }
+  ~IdentityFunction();
+  Function *copy() override { return new IdentityFunction(); }
+  int getType() override { return -1; }
+  void transform(double *in, double *out) override;
+  GBool isOk() override { return gTrue; }
 
 private:
 };
@@ -126,12 +126,12 @@ class SampledFunction: public Function {
 public:
 
   SampledFunction(Object *funcObj, Dict *dict);
-  virtual ~SampledFunction();
-  virtual Function *copy() { return new SampledFunction(this); }
-  virtual int getType() { return 0; }
-  virtual void transform(double *in, double *out);
-  virtual GBool isOk() { return ok; }
-  virtual GBool hasDifferentResultSet(Function *func);
+  ~SampledFunction();
+  Function *copy() override { return new SampledFunction(this); }
+  int getType() override { return 0; }
+  void transform(double *in, double *out) override;
+  GBool isOk() override { return ok; }
+  GBool hasDifferentResultSet(Function *func) override;
 
   int getSampleSize(int i) { return sampleSize[i]; }
   double getEncodeMin(int i) { return encode[i][0]; }
@@ -170,11 +170,11 @@ class ExponentialFunction: public Function {
 public:
 
   ExponentialFunction(Object *funcObj, Dict *dict);
-  virtual ~ExponentialFunction();
-  virtual Function *copy() { return new ExponentialFunction(this); }
-  virtual int getType() { return 2; }
-  virtual void transform(double *in, double *out);
-  virtual GBool isOk() { return ok; }
+  ~ExponentialFunction();
+  Function *copy() override { return new ExponentialFunction(this); }
+  int getType() override { return 2; }
+  void transform(double *in, double *out) override;
+  GBool isOk() override { return ok; }
 
   double *getC0() { return c0; }
   double *getC1() { return c1; }
@@ -199,11 +199,11 @@ class StitchingFunction: public Function {
 public:
 
   StitchingFunction(Object *funcObj, Dict *dict, std::set<int> *usedParents);
-  virtual ~StitchingFunction();
-  virtual Function *copy() { return new StitchingFunction(this); }
-  virtual int getType() { return 3; }
-  virtual void transform(double *in, double *out);
-  virtual GBool isOk() { return ok; }
+  ~StitchingFunction();
+  Function *copy() override { return new StitchingFunction(this); }
+  int getType() override { return 3; }
+  void transform(double *in, double *out) override;
+  GBool isOk() override { return ok; }
 
   int getNumFuncs() { return k; }
   Function *getFunc(int i) { return funcs[i]; }
@@ -231,11 +231,11 @@ class PostScriptFunction: public Function {
 public:
 
   PostScriptFunction(Object *funcObj, Dict *dict);
-  virtual ~PostScriptFunction();
-  virtual Function *copy() { return new PostScriptFunction(this); }
-  virtual int getType() { return 4; }
-  virtual void transform(double *in, double *out);
-  virtual GBool isOk() { return ok; }
+  ~PostScriptFunction();
+  Function *copy() override { return new PostScriptFunction(this); }
+  int getType() override { return 4; }
+  void transform(double *in, double *out) override;
+  GBool isOk() override { return ok; }
 
   GooString *getCodeString() { return codeString; }
 
diff --git a/poppler/GfxFont.h b/poppler/GfxFont.h
index 85bdea1..de7a746 100644
--- a/poppler/GfxFont.h
+++ b/poppler/GfxFont.h
@@ -322,15 +322,15 @@ public:
   Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA,
 	      GfxFontType typeA, Ref embFontIDA, Dict *fontDict);
 
-  virtual int getNextChar(char *s, int len, CharCode *code,
+  int getNextChar(char *s, int len, CharCode *code,
 			  Unicode **u, int *uLen,
-			  double *dx, double *dy, double *ox, double *oy);
+			  double *dx, double *dy, double *ox, double *oy) override;
 
   // Return the encoding.
   char **getEncoding() { return enc; }
 
   // Return the Unicode map.
-  CharCodeToUnicode *getToUnicode();
+  CharCodeToUnicode *getToUnicode() override;
 
   // Return the character name associated with <code>.
   char *getCharName(int code) { return enc[code]; }
@@ -358,7 +358,7 @@ public:
   Dict *getResources();
 
 private:
-  virtual ~Gfx8BitFont();
+  ~Gfx8BitFont();
 
   const Base14FontMapEntry *base14;	// for Base-14 fonts only; NULL otherwise
   char *enc[256];		// char code --> char name
@@ -384,17 +384,17 @@ public:
   GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA,
 	     GfxFontType typeA, Ref embFontIDA, Dict *fontDict);
 
-  virtual GBool isCIDFont() { return gTrue; }
+  GBool isCIDFont() override { return gTrue; }
 
-  virtual int getNextChar(char *s, int len, CharCode *code,
+  int getNextChar(char *s, int len, CharCode *code,
 			  Unicode **u, int *uLen,
-			  double *dx, double *dy, double *ox, double *oy);
+			  double *dx, double *dy, double *ox, double *oy) override;
 
   // Return the writing mode (0=horizontal, 1=vertical).
-  virtual int getWMode();
+  int getWMode() override;
 
   // Return the Unicode map.
-  CharCodeToUnicode *getToUnicode();
+  CharCodeToUnicode *getToUnicode() override;
 
   // Get the collection name (<registry>-<ordering>).
   GooString *getCollection();
@@ -409,7 +409,7 @@ public:
   double getWidth(char* s, int len);
 
 private:
-  virtual ~GfxCIDFont();
+  ~GfxCIDFont();
 
   int mapCodeToGID(FoFiTrueType *ff, int cmapi,
     Unicode unicode, GBool wmode);
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 6ac1874..331d78c 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -1855,7 +1855,7 @@ class GfxICCBasedColorSpaceKey : public PopplerCacheKey
     {
     }
     
-    bool operator==(const PopplerCacheKey &key) const
+    bool operator==(const PopplerCacheKey &key) const override
     {
       const GfxICCBasedColorSpaceKey *k = static_cast<const GfxICCBasedColorSpaceKey*>(&key);
       return k->num == num && k->gen == gen;
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index e0872f7..50ecdb0 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -292,28 +292,28 @@ class GfxDeviceGrayColorSpace: public GfxColorSpace {
 public:
 
   GfxDeviceGrayColorSpace();
-  virtual ~GfxDeviceGrayColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csDeviceGray; }
-
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
-  virtual void getGrayLine(Guchar *in, Guchar *out, int length);
-  virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
-  virtual void getRGBLine(Guchar *in, Guchar *out, int length);
-  virtual void getRGBXLine(Guchar *in, Guchar *out, int length);
-  virtual void getCMYKLine(Guchar *in, Guchar *out, int length);
-  virtual void getDeviceNLine(Guchar *in, Guchar *out, int length);
-
-  virtual GBool useGetRGBLine() { return gTrue; }
-  virtual GBool useGetGrayLine() { return gTrue; }
-  virtual GBool useGetCMYKLine() { return gTrue; }
-  virtual GBool useGetDeviceNLine() { return gTrue; }
-
-  virtual int getNComps() { return 1; }
-  virtual void getDefaultColor(GfxColor *color);
+  ~GfxDeviceGrayColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csDeviceGray; }
+
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
+  void getGrayLine(Guchar *in, Guchar *out, int length) override;
+  void getRGBLine(Guchar *in, unsigned int *out, int length) override;
+  void getRGBLine(Guchar *in, Guchar *out, int length) override;
+  void getRGBXLine(Guchar *in, Guchar *out, int length) override;
+  void getCMYKLine(Guchar *in, Guchar *out, int length) override;
+  void getDeviceNLine(Guchar *in, Guchar *out, int length) override;
+
+  GBool useGetRGBLine() override { return gTrue; }
+  GBool useGetGrayLine() override { return gTrue; }
+  GBool useGetCMYKLine() override { return gTrue; }
+  GBool useGetDeviceNLine() override { return gTrue; }
+
+  int getNComps() override { return 1; }
+  void getDefaultColor(GfxColor *color) override;
 
 private:
 };
@@ -326,20 +326,20 @@ class GfxCalGrayColorSpace: public GfxColorSpace {
 public:
 
   GfxCalGrayColorSpace();
-  virtual ~GfxCalGrayColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csCalGray; }
+  ~GfxCalGrayColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csCalGray; }
 
   // Construct a CalGray color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(Array *arr, GfxState *state);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
 
-  virtual int getNComps() { return 1; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return 1; }
+  void getDefaultColor(GfxColor *color) override;
 
   // CalGray-specific access.
   double getWhiteX() { return whiteX; }
@@ -370,28 +370,28 @@ class GfxDeviceRGBColorSpace: public GfxColorSpace {
 public:
 
   GfxDeviceRGBColorSpace();
-  virtual ~GfxDeviceRGBColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csDeviceRGB; }
-
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
-  virtual void getGrayLine(Guchar *in, Guchar *out, int length);
-  virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
-  virtual void getRGBLine(Guchar *in, Guchar *out, int length);
-  virtual void getRGBXLine(Guchar *in, Guchar *out, int length);
-  virtual void getCMYKLine(Guchar *in, Guchar *out, int length);
-  virtual void getDeviceNLine(Guchar *in, Guchar *out, int length);
-
-  virtual GBool useGetRGBLine() { return gTrue; }
-  virtual GBool useGetGrayLine() { return gTrue; }
-  virtual GBool useGetCMYKLine() { return gTrue; }
-  virtual GBool useGetDeviceNLine() { return gTrue; }
-
-  virtual int getNComps() { return 3; }
-  virtual void getDefaultColor(GfxColor *color);
+  ~GfxDeviceRGBColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csDeviceRGB; }
+
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
+  void getGrayLine(Guchar *in, Guchar *out, int length) override;
+  void getRGBLine(Guchar *in, unsigned int *out, int length) override;
+  void getRGBLine(Guchar *in, Guchar *out, int length) override;
+  void getRGBXLine(Guchar *in, Guchar *out, int length) override;
+  void getCMYKLine(Guchar *in, Guchar *out, int length) override;
+  void getDeviceNLine(Guchar *in, Guchar *out, int length) override;
+
+  GBool useGetRGBLine() override { return gTrue; }
+  GBool useGetGrayLine() override { return gTrue; }
+  GBool useGetCMYKLine() override { return gTrue; }
+  GBool useGetDeviceNLine() override { return gTrue; }
+
+  int getNComps() override { return 3; }
+  void getDefaultColor(GfxColor *color) override;
 
 private:
 };
@@ -404,20 +404,20 @@ class GfxCalRGBColorSpace: public GfxColorSpace {
 public:
 
   GfxCalRGBColorSpace();
-  virtual ~GfxCalRGBColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csCalRGB; }
+  ~GfxCalRGBColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csCalRGB; }
 
   // Construct a CalRGB color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(Array *arr, GfxState *state);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
 
-  virtual int getNComps() { return 3; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return 3; }
+  void getDefaultColor(GfxColor *color) override;
 
   // CalRGB-specific access.
   double getWhiteX() { return whiteX; }
@@ -452,25 +452,25 @@ class GfxDeviceCMYKColorSpace: public GfxColorSpace {
 public:
 
   GfxDeviceCMYKColorSpace();
-  virtual ~GfxDeviceCMYKColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csDeviceCMYK; }
-
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
-  virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
-  virtual void getRGBLine(Guchar *, Guchar *out, int length);
-  virtual void getRGBXLine(Guchar *in, Guchar *out, int length);
-  virtual void getCMYKLine(Guchar *in, Guchar *out, int length);
-  virtual void getDeviceNLine(Guchar *in, Guchar *out, int length);
-  virtual GBool useGetRGBLine() { return gTrue; }
-  virtual GBool useGetCMYKLine() { return gTrue; }
-  virtual GBool useGetDeviceNLine() { return gTrue; }
-
-  virtual int getNComps() { return 4; }
-  virtual void getDefaultColor(GfxColor *color);
+  ~GfxDeviceCMYKColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csDeviceCMYK; }
+
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
+  void getRGBLine(Guchar *in, unsigned int *out, int length) override;
+  void getRGBLine(Guchar *, Guchar *out, int length) override;
+  void getRGBXLine(Guchar *in, Guchar *out, int length) override;
+  void getCMYKLine(Guchar *in, Guchar *out, int length) override;
+  void getDeviceNLine(Guchar *in, Guchar *out, int length) override;
+  GBool useGetRGBLine() override { return gTrue; }
+  GBool useGetCMYKLine() override { return gTrue; }
+  GBool useGetDeviceNLine() override { return gTrue; }
+
+  int getNComps() override { return 4; }
+  void getDefaultColor(GfxColor *color) override;
 
 private:
 };
@@ -483,23 +483,23 @@ class GfxLabColorSpace: public GfxColorSpace {
 public:
 
   GfxLabColorSpace();
-  virtual ~GfxLabColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csLab; }
+  ~GfxLabColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csLab; }
 
   // Construct a Lab color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(Array *arr, GfxState *state);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
 
-  virtual int getNComps() { return 3; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return 3; }
+  void getDefaultColor(GfxColor *color) override;
 
-  virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
-				int maxImgPixel);
+  void getDefaultRanges(double *decodeLow, double *decodeRange,
+				int maxImgPixel) override;
 
   // Lab-specific access.
   double getWhiteX() { return whiteX; }
@@ -534,32 +534,32 @@ public:
 
   GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA,
 			Ref *iccProfileStreamA);
-  virtual ~GfxICCBasedColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csICCBased; }
+  ~GfxICCBasedColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csICCBased; }
 
   // Construct an ICCBased color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(Array *arr, OutputDev *out, GfxState *state, int recursion);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
-  virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
-  virtual void getRGBLine(Guchar *in, Guchar *out, int length);
-  virtual void getRGBXLine(Guchar *in, Guchar *out, int length);
-  virtual void getCMYKLine(Guchar *in, Guchar *out, int length);
-  virtual void getDeviceNLine(Guchar *in, Guchar *out, int length);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
+  void getRGBLine(Guchar *in, unsigned int *out, int length) override;
+  void getRGBLine(Guchar *in, Guchar *out, int length) override;
+  void getRGBXLine(Guchar *in, Guchar *out, int length) override;
+  void getCMYKLine(Guchar *in, Guchar *out, int length) override;
+  void getDeviceNLine(Guchar *in, Guchar *out, int length) override;
 
-  virtual GBool useGetRGBLine();
-  virtual GBool useGetCMYKLine();
-  virtual GBool useGetDeviceNLine();
+  GBool useGetRGBLine() override;
+  GBool useGetCMYKLine() override;
+  GBool useGetDeviceNLine() override;
 
-  virtual int getNComps() { return nComps; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return nComps; }
+  void getDefaultColor(GfxColor *color) override;
 
-  virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
-				int maxImgPixel);
+  void getDefaultRanges(double *decodeLow, double *decodeRange,
+				int maxImgPixel) override;
 
   // ICCBased-specific access.
   GfxColorSpace *getAlt() { return alt; }
@@ -586,32 +586,32 @@ class GfxIndexedColorSpace: public GfxColorSpace {
 public:
 
   GfxIndexedColorSpace(GfxColorSpace *baseA, int indexHighA);
-  virtual ~GfxIndexedColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csIndexed; }
+  ~GfxIndexedColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csIndexed; }
 
   // Construct an Indexed color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
-  virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
-  virtual void getRGBLine(Guchar *in, Guchar *out, int length);
-  virtual void getRGBXLine(Guchar *in, Guchar *out, int length);
-  virtual void getCMYKLine(Guchar *in, Guchar *out, int length);
-  virtual void getDeviceNLine(Guchar *in, Guchar *out, int length);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
+  void getRGBLine(Guchar *in, unsigned int *out, int length) override;
+  void getRGBLine(Guchar *in, Guchar *out, int length) override;
+  void getRGBXLine(Guchar *in, Guchar *out, int length) override;
+  void getCMYKLine(Guchar *in, Guchar *out, int length) override;
+  void getDeviceNLine(Guchar *in, Guchar *out, int length) override;
 
-  virtual GBool useGetRGBLine() { return gTrue; }
-  virtual GBool useGetCMYKLine() { return gTrue; }
-  virtual GBool useGetDeviceNLine() { return gTrue; }
+  GBool useGetRGBLine() override { return gTrue; }
+  GBool useGetCMYKLine() override { return gTrue; }
+  GBool useGetDeviceNLine() override { return gTrue; }
 
-  virtual int getNComps() { return 1; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return 1; }
+  void getDefaultColor(GfxColor *color) override;
 
-  virtual void getDefaultRanges(double *decodeLow, double *decodeRange,
-				int maxImgPixel);
+  void getDefaultRanges(double *decodeLow, double *decodeRange,
+				int maxImgPixel) override;
 
   // Indexed-specific access.
   GfxColorSpace *getBase() { return base; }
@@ -619,7 +619,7 @@ public:
   Guchar *getLookup() { return lookup; }
   GfxColor *mapColorToBase(GfxColor *color, GfxColor *baseColor);
   Guint getOverprintMask() { return base->getOverprintMask(); }
-  virtual void createMapping(GooList *separationList, int maxSepComps)
+  void createMapping(GooList *separationList, int maxSepComps) override
     { base->createMapping(separationList, maxSepComps); }
 
 
@@ -639,24 +639,24 @@ public:
 
   GfxSeparationColorSpace(GooString *nameA, GfxColorSpace *altA,
 			  Function *funcA);
-  virtual ~GfxSeparationColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csSeparation; }
+  ~GfxSeparationColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csSeparation; }
 
   // Construct a Separation color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
 
-  virtual void createMapping(GooList *separationList, int maxSepComps);
+  void createMapping(GooList *separationList, int maxSepComps) override;
 
-  virtual int getNComps() { return 1; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return 1; }
+  void getDefaultColor(GfxColor *color) override;
 
-  virtual GBool isNonMarking() { return nonMarking; }
+  GBool isNonMarking() override { return nonMarking; }
 
   // Separation-specific access.
   GooString *getName() { return name; }
@@ -684,24 +684,24 @@ public:
 
   GfxDeviceNColorSpace(int nCompsA, GooString **namesA,
 		       GfxColorSpace *alt, Function *func, GooList *sepsCS);
-  virtual ~GfxDeviceNColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csDeviceN; }
+  ~GfxDeviceNColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csDeviceN; }
 
   // Construct a DeviceN color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
 
-  virtual void createMapping(GooList *separationList, int maxSepComps);
+  void createMapping(GooList *separationList, int maxSepComps) override;
 
-  virtual int getNComps() { return nComps; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return nComps; }
+  void getDefaultColor(GfxColor *color) override;
 
-  virtual GBool isNonMarking() { return nonMarking; }
+  GBool isNonMarking() override { return nonMarking; }
 
   // DeviceN-specific access.
   GooString *getColorantName(int i) { return names[i]; }
@@ -731,20 +731,20 @@ class GfxPatternColorSpace: public GfxColorSpace {
 public:
 
   GfxPatternColorSpace(GfxColorSpace *underA);
-  virtual ~GfxPatternColorSpace();
-  virtual GfxColorSpace *copy();
-  virtual GfxColorSpaceMode getMode() { return csPattern; }
+  ~GfxPatternColorSpace();
+  GfxColorSpace *copy() override;
+  GfxColorSpaceMode getMode() override { return csPattern; }
 
   // Construct a Pattern color space.  Returns NULL if unsuccessful.
   static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion);
 
-  virtual void getGray(GfxColor *color, GfxGray *gray);
-  virtual void getRGB(GfxColor *color, GfxRGB *rgb);
-  virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
-  virtual void getDeviceN(GfxColor *color, GfxColor *deviceN);
+  void getGray(GfxColor *color, GfxGray *gray) override;
+  void getRGB(GfxColor *color, GfxRGB *rgb) override;
+  void getCMYK(GfxColor *color, GfxCMYK *cmyk) override;
+  void getDeviceN(GfxColor *color, GfxColor *deviceN) override;
 
-  virtual int getNComps() { return 0; }
-  virtual void getDefaultColor(GfxColor *color);
+  int getNComps() override { return 0; }
+  void getDefaultColor(GfxColor *color) override;
 
   // Pattern-specific access.
   GfxColorSpace *getUnder() { return under; }
@@ -784,9 +784,9 @@ class GfxTilingPattern: public GfxPattern {
 public:
 
   static GfxTilingPattern *parse(Object *patObj);
-  virtual ~GfxTilingPattern();
+  ~GfxTilingPattern();
 
-  virtual GfxPattern *copy();
+  GfxPattern *copy() override;
 
   int getPaintType() { return paintType; }
   int getTilingType() { return tilingType; }
@@ -822,9 +822,9 @@ class GfxShadingPattern: public GfxPattern {
 public:
 
   static GfxShadingPattern *parse(GfxResources *res, Object *patObj, OutputDev *out, GfxState *state);
-  virtual ~GfxShadingPattern();
+  ~GfxShadingPattern();
 
-  virtual GfxPattern *copy();
+  GfxPattern *copy() override;
 
   GfxShading *getShading() { return shading; }
   double *getMatrix() { return matrix; }
@@ -884,7 +884,7 @@ public:
 		       Function **funcsA, int nFuncsA,
 		       GBool extend0A, GBool extend1A);
   GfxUnivariateShading(GfxUnivariateShading *shading);
-  virtual ~GfxUnivariateShading();
+  ~GfxUnivariateShading();
 
   double getDomain0() { return t0; }
   double getDomain1() { return t1; }
@@ -929,11 +929,11 @@ public:
 		     double *matrixA,
 		     Function **funcsA, int nFuncsA);
   GfxFunctionShading(GfxFunctionShading *shading);
-  virtual ~GfxFunctionShading();
+  ~GfxFunctionShading();
 
   static GfxFunctionShading *parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state);
 
-  virtual GfxShading *copy();
+  GfxShading *copy() override;
 
   void getDomain(double *x0A, double *y0A, double *x1A, double *y1A)
     { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; }
@@ -963,20 +963,20 @@ public:
 		  Function **funcsA, int nFuncsA,
 		  GBool extend0A, GBool extend1A);
   GfxAxialShading(GfxAxialShading *shading);
-  virtual ~GfxAxialShading();
+  ~GfxAxialShading();
 
   static GfxAxialShading *parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state);
 
-  virtual GfxShading *copy();
+  GfxShading *copy() override;
 
   void getCoords(double *x0A, double *y0A, double *x1A, double *y1A)
     { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; }
 
-  virtual void getParameterRange(double *lower, double *upper,
+  void getParameterRange(double *lower, double *upper,
 				 double xMin, double yMin,
-				 double xMax, double yMax);
+				 double xMax, double yMax) override;
 
-  virtual double getDistance(double tMin, double tMax);
+  double getDistance(double tMin, double tMax) override;
 
 private:
 
@@ -996,21 +996,21 @@ public:
 		   Function **funcsA, int nFuncsA,
 		   GBool extend0A, GBool extend1A);
   GfxRadialShading(GfxRadialShading *shading);
-  virtual ~GfxRadialShading();
+  ~GfxRadialShading();
 
   static GfxRadialShading *parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state);
 
-  virtual GfxShading *copy();
+  GfxShading *copy() override;
 
   void getCoords(double *x0A, double *y0A, double *r0A,
 		 double *x1A, double *y1A, double *r1A)
     { *x0A = x0; *y0A = y0; *r0A = r0; *x1A = x1; *y1A = y1; *r1A = r1; }
 
-  virtual void getParameterRange(double *lower, double *upper,
+  void getParameterRange(double *lower, double *upper,
 				 double xMin, double yMin,
-				 double xMax, double yMax);
+				 double xMax, double yMax) override;
 
-  virtual double getDistance(double tMin, double tMax);
+  double getDistance(double tMin, double tMax) override;
 
 private:
 
@@ -1034,11 +1034,11 @@ public:
 			    int (*trianglesA)[3], int nTrianglesA,
 			    Function **funcsA, int nFuncsA);
   GfxGouraudTriangleShading(GfxGouraudTriangleShading *shading);
-  virtual ~GfxGouraudTriangleShading();
+  ~GfxGouraudTriangleShading();
 
   static GfxGouraudTriangleShading *parse(GfxResources *res, int typeA, Dict *dict, Stream *str, OutputDev *out, GfxState *state);
 
-  virtual GfxShading *copy();
+  GfxShading *copy() override;
 
   int getNTriangles() { return nTriangles; }
 
@@ -1120,11 +1120,11 @@ public:
   GfxPatchMeshShading(int typeA, GfxPatch *patchesA, int nPatchesA,
 		      Function **funcsA, int nFuncsA);
   GfxPatchMeshShading(GfxPatchMeshShading *shading);
-  virtual ~GfxPatchMeshShading();
+  ~GfxPatchMeshShading();
 
   static GfxPatchMeshShading *parse(GfxResources *res, int typeA, Dict *dict, Stream *str, OutputDev *out, GfxState *state);
 
-  virtual GfxShading *copy();
+  GfxShading *copy() override;
 
   int getNPatches() { return nPatches; }
   GfxPatch *getPatch(int i) { return &patches[i]; }
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index a1d2f97..d26ba02 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -674,8 +674,8 @@ class JBIG2Bitmap: public JBIG2Segment {
 public:
 
   JBIG2Bitmap(Guint segNumA, int wA, int hA);
-  virtual ~JBIG2Bitmap();
-  virtual JBIG2SegmentType getType() { return jbig2SegBitmap; }
+  ~JBIG2Bitmap();
+  JBIG2SegmentType getType() override { return jbig2SegBitmap; }
   JBIG2Bitmap *copy() { return new JBIG2Bitmap(0, this); }
   JBIG2Bitmap *getSlice(Guint x, Guint y, Guint wA, Guint hA);
   void expand(int newH, Guint pixel);
@@ -1046,8 +1046,8 @@ class JBIG2SymbolDict: public JBIG2Segment {
 public:
 
   JBIG2SymbolDict(Guint segNumA, Guint sizeA);
-  virtual ~JBIG2SymbolDict();
-  virtual JBIG2SegmentType getType() { return jbig2SegSymbolDict; }
+  ~JBIG2SymbolDict();
+  JBIG2SegmentType getType() override { return jbig2SegSymbolDict; }
   Guint getSize() { return size; }
   void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { bitmaps[idx] = bitmap; }
   JBIG2Bitmap *getBitmap(Guint idx) { return bitmaps[idx]; }
@@ -1107,8 +1107,8 @@ class JBIG2PatternDict: public JBIG2Segment {
 public:
 
   JBIG2PatternDict(Guint segNumA, Guint sizeA);
-  virtual ~JBIG2PatternDict();
-  virtual JBIG2SegmentType getType() { return jbig2SegPatternDict; }
+  ~JBIG2PatternDict();
+  JBIG2SegmentType getType() override { return jbig2SegPatternDict; }
   Guint getSize() { return size; }
   void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { if (likely(idx < size)) bitmaps[idx] = bitmap; }
   JBIG2Bitmap *getBitmap(Guint idx) { return (idx < size) ? bitmaps[idx] : NULL; }
@@ -1148,8 +1148,8 @@ class JBIG2CodeTable: public JBIG2Segment {
 public:
 
   JBIG2CodeTable(Guint segNumA, JBIG2HuffmanTable *tableA);
-  virtual ~JBIG2CodeTable();
-  virtual JBIG2SegmentType getType() { return jbig2SegCodeTable; }
+  ~JBIG2CodeTable();
+  JBIG2SegmentType getType() override { return jbig2SegCodeTable; }
   JBIG2HuffmanTable *getHuffTable() { return table; }
 
 private:
diff --git a/poppler/JBIG2Stream.h b/poppler/JBIG2Stream.h
index 1e14c5c..f28a7d2 100644
--- a/poppler/JBIG2Stream.h
+++ b/poppler/JBIG2Stream.h
@@ -48,21 +48,21 @@ class JBIG2Stream: public FilterStream {
 public:
 
   JBIG2Stream(Stream *strA, Object *globalsStreamA, Object *globalsStreamRefA);
-  virtual ~JBIG2Stream();
-  virtual StreamKind getKind() { return strJBIG2; }
-  virtual void reset();
-  virtual void close();
-  virtual Goffset getPos();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
+  ~JBIG2Stream();
+  StreamKind getKind() override { return strJBIG2; }
+  void reset() override;
+  void close() override;
+  Goffset getPos() override;
+  int getChar() override;
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
   virtual Object *getGlobalsStream() { return &globalsStream; }
   virtual Ref getGlobalsStreamRef() { return globalsStreamRef; }
 
 private:
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   void readSegments();
   GBool readSymbolDictSeg(Guint segNum, Guint length,
diff --git a/poppler/JPEG2000Stream.h b/poppler/JPEG2000Stream.h
index 73b6bdd..1fb63f1 100644
--- a/poppler/JPEG2000Stream.h
+++ b/poppler/JPEG2000Stream.h
@@ -28,16 +28,16 @@ class JPXStream: public FilterStream {
 public:
 
   JPXStream(Stream *strA);
-  virtual ~JPXStream();
-  virtual StreamKind getKind() { return strJPX; }
-  virtual void reset();
-  virtual void close();
-  virtual Goffset getPos();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
-  virtual void getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode);
+  ~JPXStream();
+  StreamKind getKind() override { return strJPX; }
+  void reset() override;
+  void close() override;
+  Goffset getPos() override;
+  int getChar() override;
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
+  void getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode) override;
 
   int readStream(int nChars, Guchar *buffer) {
     return str->doGetChars(nChars, buffer);
@@ -48,8 +48,8 @@ private:
   JPXStreamPrivate *priv;
 
   void init();
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 };
 
 #endif
diff --git a/poppler/Link.h b/poppler/Link.h
index fc2abe6..df44a49 100644
--- a/poppler/Link.h
+++ b/poppler/Link.h
@@ -150,13 +150,13 @@ public:
   LinkGoTo(Object *destObj);
 
   // Destructor.
-  virtual ~LinkGoTo();
+  ~LinkGoTo();
 
   // Was the LinkGoTo created successfully?
-  virtual GBool isOk() { return dest || namedDest; }
+  GBool isOk() override { return dest || namedDest; }
 
   // Accessors.
-  virtual LinkActionKind getKind() { return actionGoTo; }
+  LinkActionKind getKind() override { return actionGoTo; }
   LinkDest *getDest() { return dest; }
   GooString *getNamedDest() { return namedDest; }
 
@@ -180,13 +180,13 @@ public:
   LinkGoToR(Object *fileSpecObj, Object *destObj);
 
   // Destructor.
-  virtual ~LinkGoToR();
+  ~LinkGoToR();
 
   // Was the LinkGoToR created successfully?
-  virtual GBool isOk() { return fileName && (dest || namedDest); }
+  GBool isOk() override { return fileName && (dest || namedDest); }
 
   // Accessors.
-  virtual LinkActionKind getKind() { return actionGoToR; }
+  LinkActionKind getKind() override { return actionGoToR; }
   GooString *getFileName() { return fileName; }
   LinkDest *getDest() { return dest; }
   GooString *getNamedDest() { return namedDest; }
@@ -211,13 +211,13 @@ public:
   LinkLaunch(Object *actionObj);
 
   // Destructor.
-  virtual ~LinkLaunch();
+  ~LinkLaunch();
 
   // Was the LinkLaunch created successfully?
-  virtual GBool isOk() { return fileName != NULL; }
+  GBool isOk() override { return fileName != NULL; }
 
   // Accessors.
-  virtual LinkActionKind getKind() { return actionLaunch; }
+  LinkActionKind getKind() override { return actionLaunch; }
   GooString *getFileName() { return fileName; }
   GooString *getParams() { return params; }
 
@@ -238,13 +238,13 @@ public:
   LinkURI(Object *uriObj, GooString *baseURI);
 
   // Destructor.
-  virtual ~LinkURI();
+  ~LinkURI();
 
   // Was the LinkURI created successfully?
-  virtual GBool isOk() { return uri != NULL; }
+  GBool isOk() override { return uri != NULL; }
 
   // Accessors.
-  virtual LinkActionKind getKind() { return actionURI; }
+  LinkActionKind getKind() override { return actionURI; }
   GooString *getURI() { return uri; }
 
 private:
@@ -262,11 +262,11 @@ public:
   // Build a LinkNamed given the action name.
   LinkNamed(Object *nameObj);
 
-  virtual ~LinkNamed();
+  ~LinkNamed();
 
-  virtual GBool isOk() { return name != NULL; }
+  GBool isOk() override { return name != NULL; }
 
-  virtual LinkActionKind getKind() { return actionNamed; }
+  LinkActionKind getKind() override { return actionNamed; }
   GooString *getName() { return name; }
 
 private:
@@ -290,10 +290,10 @@ public:
   };
 
   LinkMovie(Object *obj);
-  virtual ~LinkMovie();
+  ~LinkMovie();
 
-  virtual GBool isOk() { return annotRef.num >= 0 || annotTitle != NULL; }
-  virtual LinkActionKind getKind() { return actionMovie; }
+  GBool isOk() override { return annotRef.num >= 0 || annotTitle != NULL; }
+  LinkActionKind getKind() override { return actionMovie; }
 
   // a movie action stores either an indirect reference to a movie annotation
   // or the movie annotation title
@@ -333,11 +333,11 @@ public:
 
   LinkRendition(Object *Obj);
 
-  virtual ~LinkRendition();
+  ~LinkRendition();
 
-  virtual GBool isOk() { return true; }
+  GBool isOk() override { return true; }
 
-  virtual LinkActionKind getKind() { return actionRendition; }
+  LinkActionKind getKind() override { return actionRendition; }
 
   GBool hasRenditionObject() { return renditionObj.isDict(); }
   Object* getRenditionObject() { return &renditionObj; }
@@ -371,11 +371,11 @@ public:
 
   LinkSound(Object *soundObj);
 
-  virtual ~LinkSound();
+  ~LinkSound();
 
-  virtual GBool isOk() { return sound != NULL; }
+  GBool isOk() override { return sound != NULL; }
 
-  virtual LinkActionKind getKind() { return actionSound; }
+  LinkActionKind getKind() override { return actionSound; }
 
   double getVolume() { return volume; }
   GBool getSynchronous() { return sync; }
@@ -402,11 +402,11 @@ public:
   // Build a LinkJavaScript given the action name.
   LinkJavaScript(Object *jsObj);
 
-  virtual ~LinkJavaScript();
+  ~LinkJavaScript();
 
-  virtual GBool isOk() { return js != NULL; }
+  GBool isOk() override { return js != NULL; }
 
-  virtual LinkActionKind getKind() { return actionJavaScript; }
+  LinkActionKind getKind() override { return actionJavaScript; }
   GooString *getScript() { return js; }
 
 private:
@@ -421,11 +421,11 @@ class LinkOCGState: public LinkAction {
 public:
   LinkOCGState(Object *obj);
 
-  virtual ~LinkOCGState();
+  ~LinkOCGState();
 
-  virtual GBool isOk() { return stateList != NULL; }
+  GBool isOk() override { return stateList != NULL; }
 
-  virtual LinkActionKind getKind() { return actionOCGState; }
+  LinkActionKind getKind() override { return actionOCGState; }
 
   enum State { On, Off, Toggle};
   struct StateList {
@@ -454,13 +454,13 @@ public:
   LinkUnknown(char *actionA);
 
   // Destructor.
-  virtual ~LinkUnknown();
+  ~LinkUnknown();
 
   // Was the LinkUnknown create successfully?
-  virtual GBool isOk() { return action != NULL; }
+  GBool isOk() override { return action != NULL; }
 
   // Accessors.
-  virtual LinkActionKind getKind() { return actionUnknown; }
+  LinkActionKind getKind() override { return actionUnknown; }
   GooString *getAction() { return action; }
 
 private:
diff --git a/poppler/LocalPDFDocBuilder.h b/poppler/LocalPDFDocBuilder.h
index c2b1d90..0ebfdc6 100644
--- a/poppler/LocalPDFDocBuilder.h
+++ b/poppler/LocalPDFDocBuilder.h
@@ -23,10 +23,9 @@
 class LocalPDFDocBuilder : public PDFDocBuilder {
 
 public:
-
   PDFDoc *buildPDFDoc(const GooString &uri, GooString *ownerPassword = NULL,
-    GooString *userPassword = NULL, void *guiDataA = NULL);
-  GBool supports(const GooString &uri);
+                      GooString *userPassword = NULL, void *guiDataA = NULL) override;
+  GBool supports(const GooString &uri) override;
 
 };
 
diff --git a/poppler/MarkedContentOutputDev.h b/poppler/MarkedContentOutputDev.h
index 4ea60c2..5b9de05 100644
--- a/poppler/MarkedContentOutputDev.h
+++ b/poppler/MarkedContentOutputDev.h
@@ -89,24 +89,24 @@ public:
   virtual ~MarkedContentOutputDev();
 
   virtual GBool isOk() { return gTrue; }
-  virtual GBool upsideDown() { return gTrue; }
-  virtual GBool useDrawChar() { return gTrue; }
-  virtual GBool interpretType3Chars() { return gFalse; }
-  virtual GBool needNonText() { return gFalse; }
-  virtual GBool needCharCount() { return gFalse; }
+  GBool upsideDown() override { return gTrue; }
+  GBool useDrawChar() override { return gTrue; }
+  GBool interpretType3Chars() override { return gFalse; }
+  GBool needNonText() override { return gFalse; }
+  GBool needCharCount() override { return gFalse; }
 
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
-  virtual void endPage();
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
+  void endPage() override;
 
-  virtual void drawChar(GfxState *state,
+  void drawChar(GfxState *state,
                         double xx, double yy,
                         double dx, double dy,
                         double ox, double oy,
                         CharCode c, int nBytes,
-                        Unicode *u, int uLen);
+                        Unicode *u, int uLen) override;
 
-  virtual void beginMarkedContent(char *name, Dict *properties);
-  virtual void endMarkedContent(GfxState *state);
+  void beginMarkedContent(char *name, Dict *properties) override;
+  void endMarkedContent(GfxState *state) override;
 
   const TextSpanArray& getTextSpans() const;
 
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 246244f..c7a6057 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -989,16 +989,16 @@ public:
 
   DeviceNRecoder(Stream *strA, int widthA, int heightA,
 		 GfxImageColorMap *colorMapA);
-  virtual ~DeviceNRecoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar()
+  ~DeviceNRecoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override
     { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx++]; }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx]; }
-  virtual GooString *getPSFilter(int psLevel, const char *indent) { return NULL; }
-  virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
-  virtual GBool isEncoder() { return gTrue; }
+  GooString *getPSFilter(int psLevel, const char *indent) override { return NULL; }
+  GBool isBinary(GBool last = gTrue) override { return gTrue; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index 072608a..833f686 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -134,31 +134,31 @@ public:
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gFalse; }
+  GBool upsideDown() override { return gFalse; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gFalse; }
+  GBool useDrawChar() override { return gFalse; }
 
   // Does this device use tilingPatternFill()?  If this returns false,
   // tiling pattern fills will be reduced to a series of other drawing
   // operations.
-  virtual GBool useTilingPatternFill() { return gTrue; }
+  GBool useTilingPatternFill() override { return gTrue; }
 
   // Does this device use functionShadedFill(), axialShadedFill(), and
   // radialShadedFill()?  If this returns false, these shaded fills
   // will be reduced to a series of other drawing operations.
-  virtual GBool useShadedFills(int type)
+  GBool useShadedFills(int type) override
     { return type < 4 && level >= psLevel2; }
 
   // Does this device use drawForm()?  If this returns false,
   // form-type XObjects will be interpreted (i.e., unrolled).
-  virtual GBool useDrawForm() { return preloadImagesForms; }
+  GBool useDrawForm() override { return preloadImagesForms; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gFalse; }
+  GBool interpretType3Chars() override { return gFalse; }
   
-  virtual GBool needClipToCropBox() { return mode == psModeEPS; }
+  GBool needClipToCropBox() override { return mode == psModeEPS; }
 
   //----- header/trailer (used only if manualCtrl is true)
 
@@ -182,115 +182,115 @@ public:
   // returns false, the page display is aborted.  Typically, an
   // OutputDev will use some alternate means to display the page
   // before returning false.
-  virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
+  GBool checkPageSlice(Page *page, double hDPI, double vDPI,
 			       int rotate, GBool useMediaBox, GBool crop,
 			       int sliceX, int sliceY, int sliceW, int sliceH,
 			       GBool printing,
 			       GBool (*abortCheckCbk)(void *data) = NULL,
 			       void *abortCheckCbkData = NULL,
 			       GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
-			       void *annotDisplayDecideCbkData = NULL);
+			       void *annotDisplayDecideCbkData = NULL) override;
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   //----- save/restore graphics state
-  virtual void saveState(GfxState *state);
-  virtual void restoreState(GfxState *state);
+  void saveState(GfxState *state) override;
+  void restoreState(GfxState *state) override;
 
   //----- update graphics state
-  virtual void updateCTM(GfxState *state, double m11, double m12,
-			 double m21, double m22, double m31, double m32);
-  virtual void updateLineDash(GfxState *state);
-  virtual void updateFlatness(GfxState *state);
-  virtual void updateLineJoin(GfxState *state);
-  virtual void updateLineCap(GfxState *state);
-  virtual void updateMiterLimit(GfxState *state);
-  virtual void updateLineWidth(GfxState *state);
-  virtual void updateFillColorSpace(GfxState *state);
-  virtual void updateStrokeColorSpace(GfxState *state);
-  virtual void updateFillColor(GfxState *state);
-  virtual void updateStrokeColor(GfxState *state);
-  virtual void updateFillOverprint(GfxState *state);
-  virtual void updateStrokeOverprint(GfxState *state);
-  virtual void updateOverprintMode(GfxState *state);
-  virtual void updateTransfer(GfxState *state);
+  void updateCTM(GfxState *state, double m11, double m12,
+			 double m21, double m22, double m31, double m32) override;
+  void updateLineDash(GfxState *state) override;
+  void updateFlatness(GfxState *state) override;
+  void updateLineJoin(GfxState *state) override;
+  void updateLineCap(GfxState *state) override;
+  void updateMiterLimit(GfxState *state) override;
+  void updateLineWidth(GfxState *state) override;
+  void updateFillColorSpace(GfxState *state) override;
+  void updateStrokeColorSpace(GfxState *state) override;
+  void updateFillColor(GfxState *state) override;
+  void updateStrokeColor(GfxState *state) override;
+  void updateFillOverprint(GfxState *state) override;
+  void updateStrokeOverprint(GfxState *state) override;
+  void updateOverprintMode(GfxState *state) override;
+  void updateTransfer(GfxState *state) override;
 
   //----- update text state
-  virtual void updateFont(GfxState *state);
-  virtual void updateTextMat(GfxState *state);
-  virtual void updateCharSpace(GfxState *state);
-  virtual void updateRender(GfxState *state);
-  virtual void updateRise(GfxState *state);
-  virtual void updateWordSpace(GfxState *state);
-  virtual void updateHorizScaling(GfxState *state);
-  virtual void updateTextPos(GfxState *state);
-  virtual void updateTextShift(GfxState *state, double shift);
-  virtual void saveTextPos(GfxState *state);
-  virtual void restoreTextPos(GfxState *state);
+  void updateFont(GfxState *state) override;
+  void updateTextMat(GfxState *state) override;
+  void updateCharSpace(GfxState *state) override;
+  void updateRender(GfxState *state) override;
+  void updateRise(GfxState *state) override;
+  void updateWordSpace(GfxState *state) override;
+  void updateHorizScaling(GfxState *state) override;
+  void updateTextPos(GfxState *state) override;
+  void updateTextShift(GfxState *state, double shift) override;
+  void saveTextPos(GfxState *state) override;
+  void restoreTextPos(GfxState *state) override;
 
   //----- path painting
-  virtual void stroke(GfxState *state);
-  virtual void fill(GfxState *state);
-  virtual void eoFill(GfxState *state);
-  virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
+  void stroke(GfxState *state) override;
+  void fill(GfxState *state) override;
+  void eoFill(GfxState *state) override;
+  GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
 				  double *pmat, int paintType, int tilingType, Dict *resDict,
 				  double *mat, double *bbox,
 				  int x0, int y0, int x1, int y1,
-				  double xStep, double yStep);
-  virtual GBool functionShadedFill(GfxState *state,
-				   GfxFunctionShading *shading);
-  virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/);
-  virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/);
+				  double xStep, double yStep) override;
+  GBool functionShadedFill(GfxState *state,
+				   GfxFunctionShading *shading) override;
+  GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) override;
+  GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) override;
 
   //----- path clipping
-  virtual void clip(GfxState *state);
-  virtual void eoClip(GfxState *state);
-  virtual void clipToStrokePath(GfxState *state);
+  void clip(GfxState *state) override;
+  void eoClip(GfxState *state) override;
+  void clipToStrokePath(GfxState *state) override;
 
   //----- text drawing
-  virtual void drawString(GfxState *state, GooString *s);
-  virtual void beginTextObject(GfxState *state);
-  virtual void endTextObject(GfxState *state);
+  void drawString(GfxState *state, GooString *s) override;
+  void beginTextObject(GfxState *state) override;
+  void endTextObject(GfxState *state) override;
 
   //----- image drawing
-  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+  void drawImageMask(GfxState *state, Object *ref, Stream *str,
 			     int width, int height, GBool invert,
-			     GBool interpolate, GBool inlineImg);
-  virtual void setSoftMaskFromImageMask(GfxState *state,
+			     GBool interpolate, GBool inlineImg) override;
+  void setSoftMaskFromImageMask(GfxState *state,
 					Object *ref, Stream *str,
 					int width, int height, GBool invert,
-					GBool inlineImg, double *baseMatrix);
-  virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix);
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+					GBool inlineImg, double *baseMatrix) override;
+  void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override;
+  void drawImage(GfxState *state, Object *ref, Stream *str,
 			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
-  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+			 GBool interpolate, int *maskColors, GBool inlineImg) override;
+  void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
 			       int width, int height,
 			       GfxImageColorMap *colorMap,
 			       GBool interpolate,
 			       Stream *maskStr, int maskWidth, int maskHeight,
-			       GBool maskInvert, GBool maskInterpolate);
+			       GBool maskInvert, GBool maskInterpolate) override;
 
 #if OPI_SUPPORT
   //----- OPI functions
-  virtual void opiBegin(GfxState *state, Dict *opiDict);
-  virtual void opiEnd(GfxState *state, Dict *opiDict);
+  void opiBegin(GfxState *state, Dict *opiDict) override;
+  void opiEnd(GfxState *state, Dict *opiDict) override;
 #endif
 
   //----- Type 3 font operators
-  virtual void type3D0(GfxState *state, double wx, double wy);
-  virtual void type3D1(GfxState *state, double wx, double wy,
-		       double llx, double lly, double urx, double ury);
+  void type3D0(GfxState *state, double wx, double wy) override;
+  void type3D1(GfxState *state, double wx, double wy,
+		       double llx, double lly, double urx, double ury) override;
 
   //----- form XObjects
-  virtual void drawForm(Ref ref);
+  void drawForm(Ref ref) override;
 
   //----- PostScript XObjects
-  virtual void psXObject(Stream *psStream, Stream *level1Stream);
+  void psXObject(Stream *psStream, Stream *level1Stream) override;
 
   //----- miscellaneous
   void setOffset(double x, double y)
diff --git a/poppler/PopplerCache.cc b/poppler/PopplerCache.cc
index 6018a77..970c003 100644
--- a/poppler/PopplerCache.cc
+++ b/poppler/PopplerCache.cc
@@ -110,7 +110,7 @@ class ObjectKey : public PopplerCacheKey {
     {
     }
 
-    bool operator==(const PopplerCacheKey &key) const
+    bool operator==(const PopplerCacheKey &key) const override
     {
       const ObjectKey *k = static_cast<const ObjectKey*>(&key);
       return k->num == num && k->gen == gen;
diff --git a/poppler/PreScanOutputDev.h b/poppler/PreScanOutputDev.h
index 50fcbf2..a1fd6b5 100644
--- a/poppler/PreScanOutputDev.h
+++ b/poppler/PreScanOutputDev.h
@@ -48,95 +48,95 @@ public:
   PreScanOutputDev(PDFDoc *docA);
 
   // Destructor.
-  virtual ~PreScanOutputDev();
+  ~PreScanOutputDev();
 
   //----- get info about output device
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gTrue; }
+  GBool upsideDown() override { return gTrue; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gTrue; }
+  GBool useDrawChar() override { return gTrue; }
 
   // Does this device use tilingPatternFill()?  If this returns false,
   // tiling pattern fills will be reduced to a series of other drawing
   // operations.
-  virtual GBool useTilingPatternFill() { return gTrue; }
+  GBool useTilingPatternFill() override { return gTrue; }
 
   // Does this device use functionShadedFill(), axialShadedFill(), and
   // radialShadedFill()?  If this returns false, these shaded fills
   // will be reduced to a series of other drawing operations.
-  virtual GBool useShadedFills(int type) { return gTrue; }
+  GBool useShadedFills(int type) override { return gTrue; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gTrue; }
+  GBool interpretType3Chars() override { return gTrue; }
 
   //----- initialization and control
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   //----- path painting
-  virtual void stroke(GfxState *state);
-  virtual void fill(GfxState *state);
-  virtual void eoFill(GfxState *state);
-  virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
-				  double *pmat, int paintType, int tilingType, Dict *resDict,
-				  double *mat, double *bbox,
-				  int x0, int y0, int x1, int y1,
-				  double xStep, double yStep);
-  virtual GBool functionShadedFill(GfxState *state,
-				   GfxFunctionShading *shading);
-  virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax);
-  virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax);
+  void stroke(GfxState *state) override;
+  void fill(GfxState *state) override;
+  void eoFill(GfxState *state) override;
+  GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
+			  double *pmat, int paintType, int tilingType, Dict *resDict,
+			  double *mat, double *bbox,
+			  int x0, int y0, int x1, int y1,
+			  double xStep, double yStep) override;
+  GBool functionShadedFill(GfxState *state,
+			   GfxFunctionShading *shading) override;
+  GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
+  GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax) override;
 
   //----- path clipping
-  virtual void clip(GfxState *state);
-  virtual void eoClip(GfxState *state);
+  void clip(GfxState *state) override;
+  void eoClip(GfxState *state) override;
 
   //----- text drawing
-  virtual void beginStringOp(GfxState *state);
-  virtual void endStringOp(GfxState *state);
-  virtual GBool beginType3Char(GfxState *state, double x, double y,
-			       double dx, double dy,
-			       CharCode code, Unicode *u, int uLen);
-  virtual void endType3Char(GfxState *state);
+  void beginStringOp(GfxState *state) override;
+  void endStringOp(GfxState *state) override;
+  GBool beginType3Char(GfxState *state, double x, double y,
+		       double dx, double dy,
+		       CharCode code, Unicode *u, int uLen) override;
+  void endType3Char(GfxState *state) override;
 
   //----- image drawing
-  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
-			     int width, int height, GBool invert,
-			     GBool interpolate, GBool inlineImg);
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
-			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
-  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
-			       int width, int height,
-			       GfxImageColorMap *colorMap,
-			       GBool interpolate,
-			       Stream *maskStr, int maskWidth, int maskHeight,
-			       GBool maskInvert, GBool maskInterpolate);
-  virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
-				   int width, int height,
-				   GfxImageColorMap *colorMap,
-				   GBool interpolate,
-				   Stream *maskStr,
-				   int maskWidth, int maskHeight,
-				   GfxImageColorMap *maskColorMap,
-				   GBool maskInterpolate);
+  void drawImageMask(GfxState *state, Object *ref, Stream *str,
+		     int width, int height, GBool invert,
+		     GBool interpolate, GBool inlineImg) override;
+  void drawImage(GfxState *state, Object *ref, Stream *str,
+		 int width, int height, GfxImageColorMap *colorMap,
+		 GBool interpolate, int *maskColors, GBool inlineImg) override;
+  void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+		      int width, int height,
+		      GfxImageColorMap *colorMap,
+		      GBool interpolate,
+		      Stream *maskStr, int maskWidth, int maskHeight,
+		      GBool maskInvert, GBool maskInterpolate) override;
+  void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+			   int width, int height,
+			   GfxImageColorMap *colorMap,
+			   GBool interpolate,
+			   Stream *maskStr,
+			   int maskWidth, int maskHeight,
+			   GfxImageColorMap *maskColorMap,
+			   GBool maskInterpolate) override;
 
   //----- transparency groups and soft masks
-  virtual void beginTransparencyGroup(GfxState *state, double *bbox,
-				      GfxColorSpace *blendingColorSpace,
-				      GBool isolated, GBool knockout,
-				      GBool forSoftMask);
-	virtual void paintTransparencyGroup(GfxState *state, double *bbox);
-	virtual void setSoftMask(GfxState *state, double *bbox, GBool alpha,
-			   Function *transferFunc, GfxColor *backdropColor);
+  void beginTransparencyGroup(GfxState *state, double *bbox,
+			      GfxColorSpace *blendingColorSpace,
+			      GBool isolated, GBool knockout,
+			      GBool forSoftMask) override;
+  void paintTransparencyGroup(GfxState *state, double *bbox) override;
+  void setSoftMask(GfxState *state, double *bbox, GBool alpha,
+		   Function *transferFunc, GfxColor *backdropColor) override;
 
   //----- special access
 
diff --git a/poppler/SecurityHandler.h b/poppler/SecurityHandler.h
index c2991c8..f363d3f 100644
--- a/poppler/SecurityHandler.h
+++ b/poppler/SecurityHandler.h
@@ -107,21 +107,21 @@ class StandardSecurityHandler: public SecurityHandler {
 public:
 
   StandardSecurityHandler(PDFDoc *docA, Object *encryptDictA);
-  virtual ~StandardSecurityHandler();
-
-  virtual GBool isUnencrypted();
-  virtual void *makeAuthData(GooString *ownerPassword,
-			     GooString *userPassword);
-  virtual void *getAuthData();
-  virtual void freeAuthData(void *authData);
-  virtual GBool authorize(void *authData);
-  virtual int getPermissionFlags() { return permFlags; }
-  virtual GBool getOwnerPasswordOk() { return ownerPasswordOk; }
-  virtual Guchar *getFileKey() { return fileKey; }
-  virtual int getFileKeyLength() { return fileKeyLength; }
-  virtual int getEncVersion() { return encVersion; }
-  virtual int getEncRevision() { return encRevision; }
-  virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; }
+  ~StandardSecurityHandler();
+
+  GBool isUnencrypted() override;
+  void *makeAuthData(GooString *ownerPassword,
+			     GooString *userPassword) override;
+  void *getAuthData() override;
+  void freeAuthData(void *authData) override;
+  GBool authorize(void *authData) override;
+  int getPermissionFlags() override { return permFlags; }
+  GBool getOwnerPasswordOk() override { return ownerPasswordOk; }
+  Guchar *getFileKey() override { return fileKey; }
+  int getFileKeyLength() override { return fileKeyLength; }
+  int getEncVersion() override { return encVersion; }
+  int getEncRevision() override { return encRevision; }
+  CryptAlgorithm getEncAlgorithm() override { return encAlgorithm; }
 
 private:
 
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 3caa6d1..b9fa6cb 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1215,7 +1215,7 @@ public:
 
   ~SplashOutFontFileID() {}
 
-  GBool matches(SplashFontFileID *id) {
+  GBool matches(SplashFontFileID *id) override {
     return ((SplashOutFontFileID *)id)->r.num == r.num &&
            ((SplashOutFontFileID *)id)->r.gen == r.gen;
   }
diff --git a/poppler/SplashOutputDev.h b/poppler/SplashOutputDev.h
index 5c5512b..88635d0 100644
--- a/poppler/SplashOutputDev.h
+++ b/poppler/SplashOutputDev.h
@@ -64,19 +64,19 @@ public:
 
   SplashFunctionPattern(SplashColorMode colorMode, GfxState *state, GfxFunctionShading *shading);
 
-  virtual SplashPattern *copy() { return new SplashFunctionPattern(colorMode, state, (GfxFunctionShading *) shading); }
+  SplashPattern *copy() override { return new SplashFunctionPattern(colorMode, state, (GfxFunctionShading *) shading); }
 
-  virtual ~SplashFunctionPattern();
+  ~SplashFunctionPattern();
 
-  virtual GBool testPosition(int x, int y) { return gTrue; }
+  GBool testPosition(int x, int y) override { return gTrue; }
 
-  virtual GBool isStatic() { return gFalse; }
+  GBool isStatic() override { return gFalse; }
 
-  virtual GBool getColor(int x, int y, SplashColorPtr c);
+  GBool getColor(int x, int y, SplashColorPtr c) override;
 
   virtual GfxFunctionShading *getShading() { return shading; }
 
-  virtual GBool isCMYK() { return gfxMode == csDeviceCMYK; }
+  GBool isCMYK() override { return gfxMode == csDeviceCMYK; }
 
 protected:
   Matrix ictm;
@@ -92,19 +92,19 @@ public:
 
   SplashUnivariatePattern(SplashColorMode colorMode, GfxState *state, GfxUnivariateShading *shading);
 
-  virtual ~SplashUnivariatePattern();
+  ~SplashUnivariatePattern();
 
-  virtual GBool getColor(int x, int y, SplashColorPtr c);
+  GBool getColor(int x, int y, SplashColorPtr c) override;
 
-  virtual GBool testPosition(int x, int y);
+  GBool testPosition(int x, int y) override;
 
-  virtual GBool isStatic() { return gFalse; }
+  GBool isStatic() override { return gFalse; }
 
   virtual GBool getParameter(double xs, double ys, double *t) = 0;
 
   virtual GfxUnivariateShading *getShading() { return shading; }
 
-  virtual GBool isCMYK() { return gfxMode == csDeviceCMYK; }
+  GBool isCMYK() override { return gfxMode == csDeviceCMYK; }
 
 protected:
   Matrix ictm;
@@ -120,11 +120,11 @@ public:
 
   SplashAxialPattern(SplashColorMode colorMode, GfxState *state, GfxAxialShading *shading);
 
-  virtual SplashPattern *copy() { return new SplashAxialPattern(colorMode, state, (GfxAxialShading *) shading); }
+  SplashPattern *copy() override { return new SplashAxialPattern(colorMode, state, (GfxAxialShading *) shading); }
 
-  virtual ~SplashAxialPattern();
+  ~SplashAxialPattern();
 
-  virtual GBool getParameter(double xs, double ys, double *t);
+  GBool getParameter(double xs, double ys, double *t) override;
 
 private:
   double x0, y0, x1, y1;
@@ -137,26 +137,26 @@ public:
 
   SplashGouraudPattern(GBool bDirectColorTranslation, GfxState *state, GfxGouraudTriangleShading *shading, SplashColorMode mode);
 
-  virtual SplashPattern *copy() { return new SplashGouraudPattern(bDirectColorTranslation, state, shading, mode); }
+  SplashPattern *copy() override { return new SplashGouraudPattern(bDirectColorTranslation, state, shading, mode); }
 
-  virtual ~SplashGouraudPattern();
+  ~SplashGouraudPattern();
 
-  virtual GBool getColor(int x, int y, SplashColorPtr c) { return gFalse; }
+  GBool getColor(int x, int y, SplashColorPtr c) override { return gFalse; }
 
-  virtual GBool testPosition(int x, int y) { return gFalse; }
+  GBool testPosition(int x, int y) override { return gFalse; }
 
-  virtual GBool isStatic() { return gFalse; }
+  GBool isStatic() override { return gFalse; }
 
-  virtual GBool isCMYK() { return gfxMode == csDeviceCMYK; }
+  GBool isCMYK() override { return gfxMode == csDeviceCMYK; }
 
-  virtual GBool isParameterized() { return shading->isParameterized(); }
-  virtual int getNTriangles() { return shading->getNTriangles(); }
-  virtual  void getTriangle(int i, double *x0, double *y0, double *color0,
+  GBool isParameterized() override { return shading->isParameterized(); }
+  int getNTriangles() override { return shading->getNTriangles(); }
+   void getTriangle(int i, double *x0, double *y0, double *color0,
                             double *x1, double *y1, double *color1,
-                            double *x2, double *y2, double *color2)
+                            double *x2, double *y2, double *color2) override
   { return shading->getTriangle(i, x0, y0, color0, x1, y1, color1, x2, y2, color2); }
 
-  virtual void getParameterizedColor(double t, SplashColorMode mode, SplashColorPtr c);
+  void getParameterizedColor(double t, SplashColorMode mode, SplashColorPtr c) override;
 
 private:
   GfxGouraudTriangleShading *shading;
@@ -172,11 +172,11 @@ public:
 
   SplashRadialPattern(SplashColorMode colorMode, GfxState *state, GfxRadialShading *shading);
 
-  virtual SplashPattern *copy() { return new SplashRadialPattern(colorMode, state, (GfxRadialShading *) shading); }
+  SplashPattern *copy() override { return new SplashRadialPattern(colorMode, state, (GfxRadialShading *) shading); }
 
-  virtual ~SplashRadialPattern();
+  ~SplashRadialPattern();
 
-  virtual GBool getParameter(double xs, double ys, double *t);
+  GBool getParameter(double xs, double ys, double *t) override;
 
 private:
   double x0, y0, r0, dx, dy, dr;
@@ -203,146 +203,146 @@ public:
 		  GBool overprintPreviewA = globalParams->getOverprintPreview());
 
   // Destructor.
-  virtual ~SplashOutputDev();
+  ~SplashOutputDev();
 
   //----- get info about output device
 
   // Does this device use tilingPatternFill()?  If this returns false,
   // tiling pattern fills will be reduced to a series of other drawing
   // operations.
-  virtual GBool useTilingPatternFill() { return gTrue; }
+  GBool useTilingPatternFill() override { return gTrue; }
 
   // Does this device use functionShadedFill(), axialShadedFill(), and
   // radialShadedFill()?  If this returns false, these shaded fills
   // will be reduced to a series of other drawing operations.
-  virtual GBool useShadedFills(int type)
+  GBool useShadedFills(int type) override
   { return (type >= 1 && type <= 5) ? gTrue : gFalse; }
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return bitmapTopDown ^ bitmapUpsideDown; }
+  GBool upsideDown() override { return bitmapTopDown ^ bitmapUpsideDown; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gTrue; }
+  GBool useDrawChar() override { return gTrue; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gTrue; }
+  GBool interpretType3Chars() override { return gTrue; }
 
   //----- initialization and control
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   //----- save/restore graphics state
-  virtual void saveState(GfxState *state);
-  virtual void restoreState(GfxState *state);
+  void saveState(GfxState *state) override;
+  void restoreState(GfxState *state) override;
 
   //----- update graphics state
-  virtual void updateAll(GfxState *state);
-  virtual void updateCTM(GfxState *state, double m11, double m12,
-			 double m21, double m22, double m31, double m32);
-  virtual void updateLineDash(GfxState *state);
-  virtual void updateFlatness(GfxState *state);
-  virtual void updateLineJoin(GfxState *state);
-  virtual void updateLineCap(GfxState *state);
-  virtual void updateMiterLimit(GfxState *state);
-  virtual void updateLineWidth(GfxState *state);
-  virtual void updateStrokeAdjust(GfxState *state);
-  virtual void updateFillColorSpace(GfxState *state);
-  virtual void updateStrokeColorSpace(GfxState *state);
-  virtual void updateFillColor(GfxState *state);
-  virtual void updateStrokeColor(GfxState *state);
-  virtual void updateBlendMode(GfxState *state);
-  virtual void updateFillOpacity(GfxState *state);
-  virtual void updateStrokeOpacity(GfxState *state);
-  virtual void updatePatternOpacity(GfxState *state);
-  virtual void clearPatternOpacity(GfxState *state);
-  virtual void updateFillOverprint(GfxState *state);
-  virtual void updateStrokeOverprint(GfxState *state);
-  virtual void updateOverprintMode(GfxState *state);
-  virtual void updateTransfer(GfxState *state);
+  void updateAll(GfxState *state) override;
+  void updateCTM(GfxState *state, double m11, double m12,
+			 double m21, double m22, double m31, double m32) override;
+  void updateLineDash(GfxState *state) override;
+  void updateFlatness(GfxState *state) override;
+  void updateLineJoin(GfxState *state) override;
+  void updateLineCap(GfxState *state) override;
+  void updateMiterLimit(GfxState *state) override;
+  void updateLineWidth(GfxState *state) override;
+  void updateStrokeAdjust(GfxState *state) override;
+  void updateFillColorSpace(GfxState *state) override;
+  void updateStrokeColorSpace(GfxState *state) override;
+  void updateFillColor(GfxState *state) override;
+  void updateStrokeColor(GfxState *state) override;
+  void updateBlendMode(GfxState *state) override;
+  void updateFillOpacity(GfxState *state) override;
+  void updateStrokeOpacity(GfxState *state) override;
+  void updatePatternOpacity(GfxState *state) override;
+  void clearPatternOpacity(GfxState *state) override;
+  void updateFillOverprint(GfxState *state) override;
+  void updateStrokeOverprint(GfxState *state) override;
+  void updateOverprintMode(GfxState *state) override;
+  void updateTransfer(GfxState *state) override;
 
   //----- update text state
-  virtual void updateFont(GfxState *state);
+  void updateFont(GfxState *state) override;
 
   //----- path painting
-  virtual void stroke(GfxState *state);
-  virtual void fill(GfxState *state);
-  virtual void eoFill(GfxState *state);
-  virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str,
+  void stroke(GfxState *state) override;
+  void fill(GfxState *state) override;
+  void eoFill(GfxState *state) override;
+  GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str,
 				  double *pmat, int paintType, int tilingType, Dict *resDict,
 				  double *mat, double *bbox,
 				  int x0, int y0, int x1, int y1,
-				  double xStep, double yStep);
-  virtual GBool functionShadedFill(GfxState *state, GfxFunctionShading *shading);
-  virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax);
-  virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax);
-  virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading);
+				  double xStep, double yStep) override;
+  GBool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
+  GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
+  GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax) override;
+  GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) override;
 
   //----- path clipping
-  virtual void clip(GfxState *state);
-  virtual void eoClip(GfxState *state);
-  virtual void clipToStrokePath(GfxState *state);
+  void clip(GfxState *state) override;
+  void eoClip(GfxState *state) override;
+  void clipToStrokePath(GfxState *state) override;
 
   //----- text drawing
-  virtual void drawChar(GfxState *state, double x, double y,
+  void drawChar(GfxState *state, double x, double y,
 			double dx, double dy,
 			double originX, double originY,
-			CharCode code, int nBytes, Unicode *u, int uLen);
-  virtual GBool beginType3Char(GfxState *state, double x, double y,
+			CharCode code, int nBytes, Unicode *u, int uLen) override;
+  GBool beginType3Char(GfxState *state, double x, double y,
 			       double dx, double dy,
-			       CharCode code, Unicode *u, int uLen);
-  virtual void endType3Char(GfxState *state);
-  virtual void beginTextObject(GfxState *state);
-  virtual void endTextObject(GfxState *state);
+			       CharCode code, Unicode *u, int uLen) override;
+  void endType3Char(GfxState *state) override;
+  void beginTextObject(GfxState *state) override;
+  void endTextObject(GfxState *state) override;
 
   //----- image drawing
-  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+  void drawImageMask(GfxState *state, Object *ref, Stream *str,
 			     int width, int height, GBool invert,
-			     GBool interpolate, GBool inlineImg);
-  virtual void setSoftMaskFromImageMask(GfxState *state,
+			     GBool interpolate, GBool inlineImg) override;
+  void setSoftMaskFromImageMask(GfxState *state,
 					Object *ref, Stream *str,
 					int width, int height, GBool invert,
-					GBool inlineImg, double *baseMatrix);
-  virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix);
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+					GBool inlineImg, double *baseMatrix) override;
+  void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override;
+  void drawImage(GfxState *state, Object *ref, Stream *str,
 			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
-  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+			 GBool interpolate, int *maskColors, GBool inlineImg) override;
+  void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
 			       int width, int height,
 			       GfxImageColorMap *colorMap,
 			       GBool interpolate,
 			       Stream *maskStr, int maskWidth, int maskHeight,
-			       GBool maskInvert, GBool maskInterpolate);
-  virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+			       GBool maskInvert, GBool maskInterpolate) override;
+  void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
 				   int width, int height,
 				   GfxImageColorMap *colorMap,
 				   GBool interpolate,
 				   Stream *maskStr,
 				   int maskWidth, int maskHeight,
 				   GfxImageColorMap *maskColorMap,
-				   GBool maskInterpolate);
+				   GBool maskInterpolate) override;
 
   //----- Type 3 font operators
-  virtual void type3D0(GfxState *state, double wx, double wy);
-  virtual void type3D1(GfxState *state, double wx, double wy,
-		       double llx, double lly, double urx, double ury);
+  void type3D0(GfxState *state, double wx, double wy) override;
+  void type3D1(GfxState *state, double wx, double wy,
+		       double llx, double lly, double urx, double ury) override;
 
   //----- transparency groups and soft masks
-  virtual GBool checkTransparencyGroup(GfxState *state, GBool knockout);
-  virtual void beginTransparencyGroup(GfxState *state, double *bbox,
+  GBool checkTransparencyGroup(GfxState *state, GBool knockout) override;
+  void beginTransparencyGroup(GfxState *state, double *bbox,
 				      GfxColorSpace *blendingColorSpace,
 				      GBool isolated, GBool knockout,
-				      GBool forSoftMask);
-  virtual void endTransparencyGroup(GfxState *state);
-  virtual void paintTransparencyGroup(GfxState *state, double *bbox);
-  virtual void setSoftMask(GfxState *state, double *bbox, GBool alpha,
-			   Function *transferFunc, GfxColor *backdropColor);
-  virtual void clearSoftMask(GfxState *state);
+				      GBool forSoftMask) override;
+  void endTransparencyGroup(GfxState *state) override;
+  void paintTransparencyGroup(GfxState *state, double *bbox) override;
+  void setSoftMask(GfxState *state, double *bbox, GBool alpha,
+			   Function *transferFunc, GfxColor *backdropColor) override;
+  void clearSoftMask(GfxState *state) override;
 
   //----- special access
 
@@ -386,8 +386,8 @@ public:
   int getNestCount() { return nestCount; }
 
 #if 1 //~tmp: turn off anti-aliasing temporarily
-  virtual GBool getVectorAntialias();
-  virtual void setVectorAntialias(GBool vaa);
+  GBool getVectorAntialias() override;
+  void setVectorAntialias(GBool vaa) override;
 #endif
 
   GBool getFontAntialias() { return fontAntialias; }
diff --git a/poppler/StdinCachedFile.h b/poppler/StdinCachedFile.h
index 5be6fa8..7d608a7 100644
--- a/poppler/StdinCachedFile.h
+++ b/poppler/StdinCachedFile.h
@@ -17,9 +17,8 @@
 class StdinCacheLoader : public CachedFileLoader {
 
 public:
-
-  size_t init(GooString *dummy, CachedFile* cachedFile);
-  int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer);
+  size_t init(GooString *dummy, CachedFile* cachedFile) override;
+  int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override;
 
 };
 
diff --git a/poppler/StdinPDFDocBuilder.h b/poppler/StdinPDFDocBuilder.h
index e9b2f47..acc43b0 100644
--- a/poppler/StdinPDFDocBuilder.h
+++ b/poppler/StdinPDFDocBuilder.h
@@ -23,10 +23,9 @@
 class StdinPDFDocBuilder : public PDFDocBuilder {
 
 public:
-
   PDFDoc *buildPDFDoc(const GooString &uri, GooString *ownerPassword = NULL,
-    GooString *userPassword = NULL, void *guiDataA = NULL);
-  GBool supports(const GooString &uri);
+                      GooString *userPassword = NULL, void *guiDataA = NULL) override;
+  GBool supports(const GooString &uri) override;
 
 };
 
diff --git a/poppler/Stream.h b/poppler/Stream.h
index 07b3933..91b524f 100644
--- a/poppler/Stream.h
+++ b/poppler/Stream.h
@@ -281,15 +281,15 @@ class FileOutStream : public OutStream {
 public:
   FileOutStream (FILE* fa, Goffset startA);
 
-  virtual ~FileOutStream ();
+  ~FileOutStream ();
 
-  virtual void close();
+  void close() override;
 
-  virtual Goffset getPos();
+  Goffset getPos() override;
 
-  virtual void put (char c);
+  void put (char c) override;
 
-  virtual void printf (const char *format, ...);
+  void printf (const char *format, ...) override;
 private:
   FILE *f;
   Goffset start;
@@ -307,15 +307,15 @@ class BaseStream: public Stream {
 public:
 
   BaseStream(Object *dictA, Goffset lengthA);
-  virtual ~BaseStream();
+  ~BaseStream();
   virtual BaseStream *copy() = 0;
   virtual Stream *makeSubStream(Goffset start, GBool limited,
 				Goffset length, Object *dict) = 0;
-  virtual void setPos(Goffset pos, int dir = 0) = 0;
-  virtual GBool isBinary(GBool last = gTrue) { return last; }
-  virtual BaseStream *getBaseStream() { return this; }
-  virtual Stream *getUndecodedStream() { return this; }
-  virtual Dict *getDict() { return dict.getDict(); }
+  void setPos(Goffset pos, int dir = 0) override = 0;
+  GBool isBinary(GBool last = gTrue) override { return last; }
+  BaseStream *getBaseStream() override { return this; }
+  Stream *getUndecodedStream() override { return this; }
+  Dict *getDict() override { return dict.getDict(); }
   virtual GooString *getFileName() { return NULL; }
   virtual Goffset getLength() { return length; }
 
@@ -339,17 +339,17 @@ class FilterStream: public Stream {
 public:
 
   FilterStream(Stream *strA);
-  virtual ~FilterStream();
-  virtual void close();
-  virtual Goffset getPos() { return str->getPos(); }
-  virtual void setPos(Goffset pos, int dir = 0);
-  virtual BaseStream *getBaseStream() { return str->getBaseStream(); }
-  virtual Stream *getUndecodedStream() { return str->getUndecodedStream(); }
-  virtual Dict *getDict() { return str->getDict(); }
-  virtual Stream *getNextStream() { return str; }
-
-  virtual int getUnfilteredChar () { return str->getUnfilteredChar(); }
-  virtual void unfilteredReset () { str->unfilteredReset(); }
+  ~FilterStream();
+  void close() override;
+  Goffset getPos() override { return str->getPos(); }
+  void setPos(Goffset pos, int dir = 0) override;
+  BaseStream *getBaseStream() override { return str->getBaseStream(); }
+  Stream *getUndecodedStream() override { return str->getUndecodedStream(); }
+  Dict *getDict() override { return str->getDict(); }
+  Stream *getNextStream() override { return str; }
+
+  int getUnfilteredChar () override { return str->getUnfilteredChar(); }
+  void unfilteredReset () override { str->unfilteredReset(); }
 
 protected:
 
@@ -448,31 +448,31 @@ public:
 
   FileStream(GooFile* fileA, Goffset startA, GBool limitedA,
 	     Goffset lengthA, Object *dictA);
-  virtual ~FileStream();
-  virtual BaseStream *copy();
-  virtual Stream *makeSubStream(Goffset startA, GBool limitedA,
-				Goffset lengthA, Object *dictA);
-  virtual StreamKind getKind() { return strFile; }
-  virtual void reset();
-  virtual void close();
-  virtual int getChar()
+  ~FileStream();
+  BaseStream *copy() override;
+  Stream *makeSubStream(Goffset startA, GBool limitedA,
+				Goffset lengthA, Object *dictA) override;
+  StreamKind getKind() override { return strFile; }
+  void reset() override;
+  void close() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual Goffset getPos() { return bufPos + (bufPtr - buf); }
-  virtual void setPos(Goffset pos, int dir = 0);
-  virtual Goffset getStart() { return start; }
-  virtual void moveStart(Goffset delta);
+  Goffset getPos() override { return bufPos + (bufPtr - buf); }
+  void setPos(Goffset pos, int dir = 0) override;
+  Goffset getStart() override { return start; }
+  void moveStart(Goffset delta) override;
 
-  virtual int getUnfilteredChar () { return getChar(); }
-  virtual void unfilteredReset () { reset(); }
+  int getUnfilteredChar () override { return getChar(); }
+  void unfilteredReset () override { reset(); }
 
 private:
 
   GBool fillBuf();
   
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer)
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override
     {
       int n, m;
 
@@ -518,24 +518,24 @@ public:
 
   CachedFileStream(CachedFile *ccA, Goffset startA, GBool limitedA,
 	     Goffset lengthA, Object *dictA);
-  virtual ~CachedFileStream();
-  virtual BaseStream *copy();
-  virtual Stream *makeSubStream(Goffset startA, GBool limitedA,
-				Goffset lengthA, Object *dictA);
-  virtual StreamKind getKind() { return strCachedFile; }
-  virtual void reset();
-  virtual void close();
-  virtual int getChar()
+  ~CachedFileStream();
+  BaseStream *copy() override;
+  Stream *makeSubStream(Goffset startA, GBool limitedA,
+				Goffset lengthA, Object *dictA) override;
+  StreamKind getKind() override { return strCachedFile; }
+  void reset() override;
+  void close() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual Goffset getPos() { return bufPos + (bufPtr - buf); }
-  virtual void setPos(Goffset pos, int dir = 0);
-  virtual Goffset getStart() { return start; }
-  virtual void moveStart(Goffset delta);
+  Goffset getPos() override { return bufPos + (bufPtr - buf); }
+  void setPos(Goffset pos, int dir = 0) override;
+  Goffset getStart() override { return start; }
+  void moveStart(Goffset delta) override;
 
-  virtual int getUnfilteredChar () { return getChar(); }
-  virtual void unfilteredReset () { reset(); }
+  int getUnfilteredChar () override { return getChar(); }
+  void unfilteredReset () override { reset(); }
 
 private:
 
@@ -561,33 +561,33 @@ class MemStream: public BaseStream {
 public:
 
   MemStream(char *bufA, Goffset startA, Goffset lengthA, Object *dictA);
-  virtual ~MemStream();
-  virtual BaseStream *copy();
-  virtual Stream *makeSubStream(Goffset start, GBool limited,
-				Goffset lengthA, Object *dictA);
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual void close();
-  virtual int getChar()
+  ~MemStream();
+  BaseStream *copy() override;
+  Stream *makeSubStream(Goffset start, GBool limited,
+				Goffset lengthA, Object *dictA) override;
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  void close() override;
+  int getChar() override
     { return (bufPtr < bufEnd) ? (*bufPtr++ & 0xff) : EOF; }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr < bufEnd) ? (*bufPtr & 0xff) : EOF; }
-  virtual Goffset getPos() { return (int)(bufPtr - buf); }
-  virtual void setPos(Goffset pos, int dir = 0);
-  virtual Goffset getStart() { return start; }
-  virtual void moveStart(Goffset delta);
+  Goffset getPos() override { return (int)(bufPtr - buf); }
+  void setPos(Goffset pos, int dir = 0) override;
+  Goffset getStart() override { return start; }
+  void moveStart(Goffset delta) override;
 
   //if needFree = true, the stream will delete buf when it is destroyed
   //otherwise it will not touch it. Default value is false
   virtual void setNeedFree (GBool val) { needFree = val; }
 
-  virtual int getUnfilteredChar () { return getChar(); }
-  virtual void unfilteredReset () { reset (); } 
+  int getUnfilteredChar () override { return getChar(); }
+  void unfilteredReset () override { reset (); } 
 
 private:
 
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   char *buf;
   Goffset start;
@@ -610,27 +610,27 @@ class EmbedStream: public BaseStream {
 public:
 
   EmbedStream(Stream *strA, Object *dictA, GBool limitedA, Goffset lengthA);
-  virtual ~EmbedStream();
-  virtual BaseStream *copy();
-  virtual Stream *makeSubStream(Goffset start, GBool limitedA,
-				Goffset lengthA, Object *dictA);
-  virtual StreamKind getKind() { return str->getKind(); }
-  virtual void reset() {}
-  virtual int getChar();
-  virtual int lookChar();
-  virtual Goffset getPos() { return str->getPos(); }
-  virtual void setPos(Goffset pos, int dir = 0);
-  virtual Goffset getStart();
-  virtual void moveStart(Goffset delta);
-
-  virtual int getUnfilteredChar () { return str->getUnfilteredChar(); }
-  virtual void unfilteredReset () { str->unfilteredReset(); }
+  ~EmbedStream();
+  BaseStream *copy() override;
+  Stream *makeSubStream(Goffset start, GBool limitedA,
+				Goffset lengthA, Object *dictA) override;
+  StreamKind getKind() override { return str->getKind(); }
+  void reset() override {}
+  int getChar() override;
+  int lookChar() override;
+  Goffset getPos() override { return str->getPos(); }
+  void setPos(Goffset pos, int dir = 0) override;
+  Goffset getStart() override;
+  void moveStart(Goffset delta) override;
+
+  int getUnfilteredChar () override { return str->getUnfilteredChar(); }
+  void unfilteredReset () override { str->unfilteredReset(); }
 
 
 private:
 
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   Stream *str;
   GBool limited;
@@ -644,14 +644,14 @@ class ASCIIHexStream: public FilterStream {
 public:
 
   ASCIIHexStream(Stream *strA);
-  virtual ~ASCIIHexStream();
-  virtual StreamKind getKind() { return strASCIIHex; }
-  virtual void reset();
-  virtual int getChar()
+  ~ASCIIHexStream();
+  StreamKind getKind() override { return strASCIIHex; }
+  void reset() override;
+  int getChar() override
     { int c = lookChar(); buf = EOF; return c; }
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
 
 private:
 
@@ -667,14 +667,14 @@ class ASCII85Stream: public FilterStream {
 public:
 
   ASCII85Stream(Stream *strA);
-  virtual ~ASCII85Stream();
-  virtual StreamKind getKind() { return strASCII85; }
-  virtual void reset();
-  virtual int getChar()
+  ~ASCII85Stream();
+  StreamKind getKind() override { return strASCII85; }
+  void reset() override;
+  int getChar() override
     { int ch = lookChar(); ++index; return ch; }
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
 
 private:
 
@@ -693,20 +693,20 @@ public:
 
   LZWStream(Stream *strA, int predictor, int columns, int colors,
 	    int bits, int earlyA);
-  virtual ~LZWStream();
-  virtual StreamKind getKind() { return strLZW; }
-  virtual void reset();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual int getRawChar();
-  virtual void getRawChars(int nChars, int *buffer);
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
+  ~LZWStream();
+  StreamKind getKind() override { return strLZW; }
+  void reset() override;
+  int getChar() override;
+  int lookChar() override;
+  int getRawChar() override;
+  void getRawChars(int nChars, int *buffer) override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
 
 private:
 
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   inline int doGetRawChar() {
     if (eof) {
@@ -752,20 +752,20 @@ class RunLengthStream: public FilterStream {
 public:
 
   RunLengthStream(Stream *strA);
-  virtual ~RunLengthStream();
-  virtual StreamKind getKind() { return strRunLength; }
-  virtual void reset();
-  virtual int getChar()
+  ~RunLengthStream();
+  StreamKind getKind() override { return strRunLength; }
+  void reset() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
 
 private:
 
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   char buf[128];		// buffer
   char *bufPtr;			// next char to read
@@ -787,16 +787,16 @@ public:
   CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA,
 		 GBool byteAlignA, int columnsA, int rowsA,
 		 GBool endOfBlockA, GBool blackA);
-  virtual ~CCITTFaxStream();
-  virtual StreamKind getKind() { return strCCITTFax; }
-  virtual void reset();
-  virtual int getChar()
+  ~CCITTFaxStream();
+  StreamKind getKind() override { return strCCITTFax; }
+  void reset() override;
+  int getChar() override
     { int c = lookChar(); buf = EOF; return c; }
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
 
-  virtual void unfilteredReset ();
+  void unfilteredReset () override;
 
   int getEncoding() { return encoding; }
   GBool getEndOfLine() { return endOfLine; }
@@ -977,16 +977,16 @@ public:
 
   FlateStream(Stream *strA, int predictor, int columns,
 	      int colors, int bits);
-  virtual ~FlateStream();
-  virtual StreamKind getKind() { return strFlate; }
-  virtual void reset();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual int getRawChar();
-  virtual void getRawChars(int nChars, int *buffer);
-  virtual GooString *getPSFilter(int psLevel, const char *indent);
-  virtual GBool isBinary(GBool last = gTrue);
-  virtual void unfilteredReset ();
+  ~FlateStream();
+  StreamKind getKind() override { return strFlate; }
+  void reset() override;
+  int getChar() override;
+  int lookChar() override;
+  int getRawChar() override;
+  void getRawChars(int nChars, int *buffer) override;
+  GooString *getPSFilter(int psLevel, const char *indent) override;
+  GBool isBinary(GBool last = gTrue) override;
+  void unfilteredReset () override;
 
 private:
   void flateReset(GBool unfiltered);
@@ -1004,8 +1004,8 @@ private:
     return c;
   }
 
-  virtual GBool hasGetChars() { return true; }
-  virtual int getChars(int nChars, Guchar *buffer);
+  GBool hasGetChars() override { return true; }
+  int getChars(int nChars, Guchar *buffer) override;
 
   StreamPredictor *pred;	// predictor
   Guchar buf[flateWindow];	// output data buffer
@@ -1051,13 +1051,13 @@ class EOFStream: public FilterStream {
 public:
 
   EOFStream(Stream *strA);
-  virtual ~EOFStream();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset() {}
-  virtual int getChar() { return EOF; }
-  virtual int lookChar() { return EOF; }
-  virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/)  { return NULL; }
-  virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
+  ~EOFStream();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override {}
+  int getChar() override { return EOF; }
+  int lookChar() override { return EOF; }
+  GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override  { return NULL; }
+  GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; }
 };
 
 //------------------------------------------------------------------------
@@ -1068,14 +1068,14 @@ class BufStream: public FilterStream {
 public:
 
   BufStream(Stream *strA, int bufSizeA);
-  virtual ~BufStream();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent)
+  ~BufStream();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override;
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override
     { return NULL; }
-  virtual GBool isBinary(GBool last = gTrue);
+  GBool isBinary(GBool last = gTrue) override;
 
   int lookChar(int idx);
 
@@ -1094,13 +1094,13 @@ public:
 
   FixedLengthEncoder(Stream *strA, int lengthA);
   ~FixedLengthEncoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; }
-  virtual GBool isBinary(GBool /*last = gTrue*/);
-  virtual GBool isEncoder() { return gTrue; }
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override;
+  int lookChar() override;
+  GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; }
+  GBool isBinary(GBool /*last = gTrue*/) override;
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
@@ -1116,16 +1116,16 @@ class ASCIIHexEncoder: public FilterStream {
 public:
 
   ASCIIHexEncoder(Stream *strA);
-  virtual ~ASCIIHexEncoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar()
+  ~ASCIIHexEncoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; }
-  virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
-  virtual GBool isEncoder() { return gTrue; }
+  GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; }
+  GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
@@ -1146,16 +1146,16 @@ class ASCII85Encoder: public FilterStream {
 public:
 
   ASCII85Encoder(Stream *strA);
-  virtual ~ASCII85Encoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar()
+  ~ASCII85Encoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; }
-  virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
-  virtual GBool isEncoder() { return gTrue; }
+  GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; }
+  GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
@@ -1176,16 +1176,16 @@ class RunLengthEncoder: public FilterStream {
 public:
 
   RunLengthEncoder(Stream *strA);
-  virtual ~RunLengthEncoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar()
+  ~RunLengthEncoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; }
-  virtual GBool isBinary(GBool /*last = gTrue*/) { return gTrue; }
-  virtual GBool isEncoder() { return gTrue; }
+  GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; }
+  GBool isBinary(GBool /*last = gTrue*/) override { return gTrue; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
@@ -1212,15 +1212,15 @@ class LZWEncoder: public FilterStream {
 public:
 
   LZWEncoder(Stream *strA);
-  virtual ~LZWEncoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar();
-  virtual int lookChar();
-  virtual GooString *getPSFilter(int psLevel, const char *indent)
+  ~LZWEncoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override;
+  int lookChar() override;
+  GooString *getPSFilter(int psLevel, const char *indent) override
     { return NULL; }
-  virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
-  virtual GBool isEncoder() { return gTrue; }
+  GBool isBinary(GBool last = gTrue) override { return gTrue; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
@@ -1244,16 +1244,16 @@ class CMYKGrayEncoder: public FilterStream {
 public:
 
   CMYKGrayEncoder(Stream *strA);
-  virtual ~CMYKGrayEncoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar()
+  ~CMYKGrayEncoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; }
-  virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
-  virtual GBool isEncoder() { return gTrue; }
+  GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; }
+  GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
@@ -1273,16 +1273,16 @@ class RGBGrayEncoder: public FilterStream {
 public:
 
   RGBGrayEncoder(Stream *strA);
-  virtual ~RGBGrayEncoder();
-  virtual StreamKind getKind() { return strWeird; }
-  virtual void reset();
-  virtual int getChar()
+  ~RGBGrayEncoder();
+  StreamKind getKind() override { return strWeird; }
+  void reset() override;
+  int getChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
-  virtual int lookChar()
+  int lookChar() override
     { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
-  virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; }
-  virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; }
-  virtual GBool isEncoder() { return gTrue; }
+  GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; }
+  GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; }
+  GBool isEncoder() override { return gTrue; }
 
 private:
 
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index e0dda08..d9993e9 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -4327,20 +4327,20 @@ TextSelectionVisitor::TextSelectionVisitor (TextPage *page)
 class TextSelectionDumper : public TextSelectionVisitor {
 public:
   TextSelectionDumper(TextPage *page);
-  virtual ~TextSelectionDumper();
+  ~TextSelectionDumper();
 
-  virtual void visitBlock (TextBlock *block, 
+  void visitBlock (TextBlock *block, 
 			   TextLine *begin,
 			   TextLine *end,
-			   PDFRectangle *selection) { };
-  virtual void visitLine (TextLine *line,
+			   PDFRectangle *selection) override { };
+  void visitLine (TextLine *line,
 			  TextWord *begin,
 			  TextWord *end,
 			  int edge_begin,
 			  int edge_end,
-			  PDFRectangle *selection);
-  virtual void visitWord (TextWord *word, int begin, int end,
-			  PDFRectangle *selection);
+			  PDFRectangle *selection) override;
+  void visitWord (TextWord *word, int begin, int end,
+			  PDFRectangle *selection) override;
   void endPage();
 
   GooString *getText(void);
@@ -4498,18 +4498,18 @@ public:
   TextSelectionSizer(TextPage *page, double scale);
   ~TextSelectionSizer() { }
 
-  virtual void visitBlock (TextBlock *block,
+  void visitBlock (TextBlock *block,
 			   TextLine *begin,
 			   TextLine *end,
-			   PDFRectangle *selection) { };
-  virtual void visitLine (TextLine *line, 
+			   PDFRectangle *selection) override { };
+  void visitLine (TextLine *line, 
 			  TextWord *begin,
 			  TextWord *end,
 			  int edge_begin,
 			  int edge_end,
-			  PDFRectangle *selection);
-  virtual void visitWord (TextWord *word, int begin, int end,
-			  PDFRectangle *selection) { };
+			  PDFRectangle *selection) override;
+  void visitWord (TextWord *word, int begin, int end,
+			  PDFRectangle *selection) override { };
 
   GooList *getRegion () { return list; }
 
@@ -4559,18 +4559,18 @@ public:
 		       GfxColor *glyph_color);
   ~TextSelectionPainter();
 
-  virtual void visitBlock (TextBlock *block,
+  void visitBlock (TextBlock *block,
 			   TextLine *begin,
 			   TextLine *end,
-			   PDFRectangle *selection) { };
-  virtual void visitLine (TextLine *line, 
+			   PDFRectangle *selection) override { };
+  void visitLine (TextLine *line, 
 			  TextWord *begin,
 			  TextWord *end,
 			  int edge_begin,
 			  int edge_end,
-			  PDFRectangle *selection);
-  virtual void visitWord (TextWord *word, int begin, int end,
-			  PDFRectangle *selection);
+			  PDFRectangle *selection) override;
+  void visitWord (TextWord *word, int begin, int end,
+			  PDFRectangle *selection) override;
   void endPage();
 
 private:
diff --git a/poppler/TextOutputDev.h b/poppler/TextOutputDev.h
index 005be45..707d8ca 100644
--- a/poppler/TextOutputDev.h
+++ b/poppler/TextOutputDev.h
@@ -745,7 +745,7 @@ public:
 		GBool rawOrderA);
 
   // Destructor.
-  virtual ~TextOutputDev();
+  ~TextOutputDev();
 
   // Check if file was successfully created.
   virtual GBool isOk() { return ok; }
@@ -754,54 +754,54 @@ public:
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gTrue; }
+  GBool upsideDown() override { return gTrue; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gTrue; }
+  GBool useDrawChar() override { return gTrue; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gFalse; }
+  GBool interpretType3Chars() override { return gFalse; }
 
   // Does this device need non-text content?
-  virtual GBool needNonText() { return gFalse; }
+  GBool needNonText() override { return gFalse; }
 
   // Does this device require incCharCount to be called for text on
   // non-shown layers?
-  virtual GBool needCharCount() { return gTrue; }
+  GBool needCharCount() override { return gTrue; }
 
   //----- initialization and control
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   //----- save/restore graphics state
-  virtual void restoreState(GfxState *state);
+  void restoreState(GfxState *state) override;
 
   //----- update text state
-  virtual void updateFont(GfxState *state);
+  void updateFont(GfxState *state) override;
 
   //----- text drawing
-  virtual void beginString(GfxState *state, GooString *s);
-  virtual void endString(GfxState *state);
-  virtual void drawChar(GfxState *state, double x, double y,
-			double dx, double dy,
-			double originX, double originY,
-			CharCode c, int nBytes, Unicode *u, int uLen);
-  virtual void incCharCount(int nChars);
-  virtual void beginActualText(GfxState *state, GooString *text);
-  virtual void endActualText(GfxState *state);
+  void beginString(GfxState *state, GooString *s) override;
+  void endString(GfxState *state) override;
+  void drawChar(GfxState *state, double x, double y,
+		double dx, double dy,
+		double originX, double originY,
+		CharCode c, int nBytes, Unicode *u, int uLen) override;
+  void incCharCount(int nChars) override;
+  void beginActualText(GfxState *state, GooString *text) override;
+  void endActualText(GfxState *state) override;
 
   //----- path painting
-  virtual void stroke(GfxState *state);
-  virtual void fill(GfxState *state);
-  virtual void eoFill(GfxState *state);
+  void stroke(GfxState *state) override;
+  void fill(GfxState *state) override;
+  void eoFill(GfxState *state) override;
 
   //----- link borders
-  virtual void processLink(AnnotLink *link);
+  void processLink(AnnotLink *link) override;
 
   //----- special access
 
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index e5ecd63..2add7dc 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -117,7 +117,7 @@ class ObjectStreamKey : public PopplerCacheKey
     {
     }
 
-    bool operator==(const PopplerCacheKey &key) const
+    bool operator==(const PopplerCacheKey &key) const override
     {
       const ObjectStreamKey *k = static_cast<const ObjectStreamKey*>(&key);
       return objStrNum == k->objStrNum;
diff --git a/poppler/XRef.h b/poppler/XRef.h
index 5ae33e5..0439161 100644
--- a/poppler/XRef.h
+++ b/poppler/XRef.h
@@ -262,8 +262,8 @@ private:
   class XRefTableWriter: public XRefWriter {
   public:
     XRefTableWriter(OutStream* outStrA);
-    void startSection(int first, int count);
-    void writeEntry(Goffset offset, int gen, XRefEntryType type);
+    void startSection(int first, int count) override;
+    void writeEntry(Goffset offset, int gen, XRefEntryType type) override;
   private:
     OutStream* outStr;
   };
@@ -272,8 +272,8 @@ private:
   class XRefStreamWriter: public XRefWriter {
   public:
     XRefStreamWriter(Object *index, GooString *stmBuf, int offsetSize);
-    void startSection(int first, int count);
-    void writeEntry(Goffset offset, int gen, XRefEntryType type);
+    void startSection(int first, int count) override;
+    void writeEntry(Goffset offset, int gen, XRefEntryType type) override;
   private:
     Object *index;
     GooString *stmBuf;
@@ -284,8 +284,8 @@ private:
   class XRefPreScanWriter: public XRefWriter {
   public:
     XRefPreScanWriter();
-    void startSection(int first, int count);
-    void writeEntry(Goffset offset, int gen, XRefEntryType type);
+    void startSection(int first, int count) override;
+    void writeEntry(Goffset offset, int gen, XRefEntryType type) override;
 
     GBool hasOffsetsBeyond4GB;
   };
diff --git a/qt4/CMakeLists.txt b/qt4/CMakeLists.txt
index a364abf..4d34568 100644
--- a/qt4/CMakeLists.txt
+++ b/qt4/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Qt4 headers are not override clean so disable suggest-override if it's there
+string(REPLACE "-Wsuggest-override" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
 add_subdirectory(src)
 add_subdirectory(tests)
 add_subdirectory(demos)
diff --git a/qt4/src/poppler-annotation.h b/qt4/src/poppler-annotation.h
index 5597f12..ac77c42 100644
--- a/qt4/src/poppler-annotation.h
+++ b/qt4/src/poppler-annotation.h
@@ -456,8 +456,8 @@ class POPPLER_QT4_EXPORT TextAnnotation : public Annotation
     enum InplaceIntent { Unknown, Callout, TypeWriter };
 
     TextAnnotation( TextType type );
-    virtual ~TextAnnotation();
-    virtual SubType subType() const;
+    ~TextAnnotation();
+    SubType subType() const override;
 
     /**
        The type of text annotation represented by this object
@@ -542,8 +542,8 @@ class POPPLER_QT4_EXPORT LineAnnotation : public Annotation
 
     /// \since 0.20
     LineAnnotation( LineType type );
-    virtual ~LineAnnotation();
-    virtual SubType subType() const;
+    ~LineAnnotation();
+    SubType subType() const override;
 
     /// \since 0.20
     LineType lineType() const;
diff --git a/qt4/src/poppler-link.h b/qt4/src/poppler-link.h
index d90b698..42a8c1f 100644
--- a/qt4/src/poppler-link.h
+++ b/qt4/src/poppler-link.h
@@ -268,7 +268,7 @@ class POPPLER_QT4_EXPORT LinkGoto : public Link
 		 * The destination to reach.
 		 */
 		LinkDestination destination() const;
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 	private:
 		Q_DECLARE_PRIVATE( LinkGoto )
diff --git a/qt5/demos/abstractinfodock.h b/qt5/demos/abstractinfodock.h
index 08b4a61..d8fa517 100644
--- a/qt5/demos/abstractinfodock.h
+++ b/qt5/demos/abstractinfodock.h
@@ -31,9 +31,9 @@ public:
     AbstractInfoDock(QWidget *parent = 0);
     ~AbstractInfoDock();
 
-    /*virtual*/ void documentLoaded();
-    /*virtual*/ void documentClosed();
-    /*virtual*/ void pageChanged(int page);
+    void documentLoaded() override;
+    void documentClosed() override;
+    void pageChanged(int page) override;
 
 protected:
     virtual void fillInfo() = 0;
diff --git a/qt5/demos/embeddedfiles.h b/qt5/demos/embeddedfiles.h
index 7cd6039..d2fa57b 100644
--- a/qt5/demos/embeddedfiles.h
+++ b/qt5/demos/embeddedfiles.h
@@ -31,11 +31,11 @@ public:
     EmbeddedFilesDock(QWidget *parent = 0);
     ~EmbeddedFilesDock();
 
-    virtual void documentLoaded();
-    /*virtual*/ void documentClosed();
+    void documentLoaded() override;
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private:
     QTableWidget *m_table;
diff --git a/qt5/demos/fonts.h b/qt5/demos/fonts.h
index 81afa57..f0f39ae 100644
--- a/qt5/demos/fonts.h
+++ b/qt5/demos/fonts.h
@@ -31,10 +31,10 @@ public:
     FontsDock(QWidget *parent = 0);
     ~FontsDock();
 
-    /*virtual*/ void documentClosed();
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private:
     QTableWidget *m_table;
diff --git a/qt5/demos/info.h b/qt5/demos/info.h
index d294b43..75bbfb2 100644
--- a/qt5/demos/info.h
+++ b/qt5/demos/info.h
@@ -31,10 +31,10 @@ public:
     InfoDock(QWidget *parent = 0);
     ~InfoDock();
 
-    /*virtual*/ void documentClosed();
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private:
     QTableWidget *m_table;
diff --git a/qt5/demos/metadata.h b/qt5/demos/metadata.h
index 6f1507a..bf2eeb0 100644
--- a/qt5/demos/metadata.h
+++ b/qt5/demos/metadata.h
@@ -31,10 +31,10 @@ public:
     MetadataDock(QWidget *parent = 0);
     ~MetadataDock();
 
-    /*virtual*/ void documentClosed();
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private:
     QTextEdit *m_edit;
diff --git a/qt5/demos/navigationtoolbar.h b/qt5/demos/navigationtoolbar.h
index e249adb..a98ac9b 100644
--- a/qt5/demos/navigationtoolbar.h
+++ b/qt5/demos/navigationtoolbar.h
@@ -35,9 +35,9 @@ public:
     NavigationToolBar(QWidget *parent = 0);
     ~NavigationToolBar();
 
-    /*virtual*/ void documentLoaded();
-    /*virtual*/ void documentClosed();
-    /*virtual*/ void pageChanged(int page);
+    void documentLoaded() override;
+    void documentClosed() override;
+    void pageChanged(int page) override;
 
 Q_SIGNALS:
     void zoomChanged(qreal value);
diff --git a/qt5/demos/optcontent.h b/qt5/demos/optcontent.h
index b933f5c..9ee9ba4 100644
--- a/qt5/demos/optcontent.h
+++ b/qt5/demos/optcontent.h
@@ -31,11 +31,11 @@ public:
     OptContentDock(QWidget *parent = 0);
     ~OptContentDock();
 
-    /*virtual*/ void documentLoaded();
-    /*virtual*/ void documentClosed();
+    void documentLoaded() override;
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private Q_SLOTS:
     void reloadImage();
diff --git a/qt5/demos/pageview.h b/qt5/demos/pageview.h
index 95795a5..ba4330c 100644
--- a/qt5/demos/pageview.h
+++ b/qt5/demos/pageview.h
@@ -34,9 +34,9 @@ public:
     PageView(QWidget *parent = 0);
     ~PageView();
 
-    /*virtual*/ void documentLoaded();
-    /*virtual*/ void documentClosed();
-    /*virtual*/ void pageChanged(int page);
+    void documentLoaded() override;
+    void documentClosed() override;
+    void pageChanged(int page) override;
 
 private Q_SLOTS:
     void slotZoomChanged(qreal value);
diff --git a/qt5/demos/permissions.h b/qt5/demos/permissions.h
index 13bcbbf..9c74d60 100644
--- a/qt5/demos/permissions.h
+++ b/qt5/demos/permissions.h
@@ -31,10 +31,10 @@ public:
     PermissionsDock(QWidget *parent = 0);
     ~PermissionsDock();
 
-    /*virtual*/ void documentClosed();
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private:
     QListWidget *m_table;
diff --git a/qt5/demos/thumbnails.h b/qt5/demos/thumbnails.h
index 076d5ae..d37601b 100644
--- a/qt5/demos/thumbnails.h
+++ b/qt5/demos/thumbnails.h
@@ -33,10 +33,10 @@ public:
     ThumbnailsDock(QWidget *parent = 0);
     ~ThumbnailsDock();
 
-    /*virtual*/ void documentClosed();
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private Q_SLOTS:
     void slotItemActivated(QListWidgetItem *item);
diff --git a/qt5/demos/toc.h b/qt5/demos/toc.h
index bbc9082..4676eb7 100644
--- a/qt5/demos/toc.h
+++ b/qt5/demos/toc.h
@@ -31,10 +31,10 @@ public:
     TocDock(QWidget *parent = 0);
     ~TocDock();
 
-    /*virtual*/ void documentClosed();
+    void documentClosed() override;
 
 protected:
-    /*virtual*/ void fillInfo();
+    void fillInfo() override;
 
 private:
     QTreeWidget *m_tree;
diff --git a/qt5/demos/viewer.h b/qt5/demos/viewer.h
index e1485b7..b36e4b4 100644
--- a/qt5/demos/viewer.h
+++ b/qt5/demos/viewer.h
@@ -39,7 +39,7 @@ public:
     PdfViewer();
     ~PdfViewer();
 
-    /*virtual*/ QSize sizeHint() const;
+    QSize sizeHint() const override;
 
     void loadDocument(const QString &file);
     void closeDocument();
diff --git a/qt5/src/ArthurOutputDev.cc b/qt5/src/ArthurOutputDev.cc
index 7e80b4a..8f3da50 100644
--- a/qt5/src/ArthurOutputDev.cc
+++ b/qt5/src/ArthurOutputDev.cc
@@ -71,7 +71,7 @@ public:
 
   ~SplashOutFontFileID() {}
 
-  GBool matches(SplashFontFileID *id) {
+  GBool matches(SplashFontFileID *id) override {
     return ((SplashOutFontFileID *)id)->r.num == r.num &&
            ((SplashOutFontFileID *)id)->r.gen == r.gen;
   }
diff --git a/qt5/src/ArthurOutputDev.h b/qt5/src/ArthurOutputDev.h
index 9d5e867..61ec929 100644
--- a/qt5/src/ArthurOutputDev.h
+++ b/qt5/src/ArthurOutputDev.h
@@ -67,7 +67,7 @@ public:
   ArthurOutputDev(QPainter *painter );
 
   // Destructor.
-  virtual ~ArthurOutputDev();
+  ~ArthurOutputDev();
 
   void setFontHinting(FontHinting hinting) { m_fontHinting = hinting; }
 
@@ -75,78 +75,78 @@ public:
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gTrue; }
+  GBool upsideDown() override { return gTrue; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gTrue; }
+  GBool useDrawChar() override { return gTrue; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gTrue; }
+  GBool interpretType3Chars() override { return gTrue; }
 
   //----- initialization and control
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   //----- save/restore graphics state
-  virtual void saveState(GfxState *state);
-  virtual void restoreState(GfxState *state);
+  void saveState(GfxState *state) override;
+  void restoreState(GfxState *state) override;
 
   //----- update graphics state
-  virtual void updateAll(GfxState *state);
-  virtual void updateCTM(GfxState *state, double m11, double m12,
-			 double m21, double m22, double m31, double m32);
-  virtual void updateLineDash(GfxState *state);
-  virtual void updateFlatness(GfxState *state);
-  virtual void updateLineJoin(GfxState *state);
-  virtual void updateLineCap(GfxState *state);
-  virtual void updateMiterLimit(GfxState *state);
-  virtual void updateLineWidth(GfxState *state);
-  virtual void updateFillColor(GfxState *state);
-  virtual void updateStrokeColor(GfxState *state);
-  virtual void updateFillOpacity(GfxState *state);
-  virtual void updateStrokeOpacity(GfxState *state);
+  void updateAll(GfxState *state) override;
+  void updateCTM(GfxState *state, double m11, double m12,
+		 double m21, double m22, double m31, double m32) override;
+  void updateLineDash(GfxState *state) override;
+  void updateFlatness(GfxState *state) override;
+  void updateLineJoin(GfxState *state) override;
+  void updateLineCap(GfxState *state) override;
+  void updateMiterLimit(GfxState *state) override;
+  void updateLineWidth(GfxState *state) override;
+  void updateFillColor(GfxState *state) override;
+  void updateStrokeColor(GfxState *state) override;
+  void updateFillOpacity(GfxState *state) override;
+  void updateStrokeOpacity(GfxState *state) override;
 
   //----- update text state
-  virtual void updateFont(GfxState *state);
+  void updateFont(GfxState *state) override;
 
   //----- path painting
-  virtual void stroke(GfxState *state);
-  virtual void fill(GfxState *state);
-  virtual void eoFill(GfxState *state);
+  void stroke(GfxState *state) override;
+  void fill(GfxState *state) override;
+  void eoFill(GfxState *state) override;
 
   //----- path clipping
-  virtual void clip(GfxState *state);
-  virtual void eoClip(GfxState *state);
+  void clip(GfxState *state) override;
+  void eoClip(GfxState *state) override;
 
   //----- text drawing
   //   virtual void drawString(GfxState *state, GooString *s);
-  virtual void drawChar(GfxState *state, double x, double y,
-			double dx, double dy,
-			double originX, double originY,
-			CharCode code, int nBytes, Unicode *u, int uLen);
-  virtual GBool beginType3Char(GfxState *state, double x, double y,
-			       double dx, double dy,
-			       CharCode code, Unicode *u, int uLen);
-  virtual void endType3Char(GfxState *state);
-  virtual void endTextObject(GfxState *state);
+  void drawChar(GfxState *state, double x, double y,
+		double dx, double dy,
+		double originX, double originY,
+		CharCode code, int nBytes, Unicode *u, int uLen) override;
+  GBool beginType3Char(GfxState *state, double x, double y,
+		       double dx, double dy,
+		       CharCode code, Unicode *u, int uLen) override;
+  void endType3Char(GfxState *state) override;
+  void endTextObject(GfxState *state) override;
 
   //----- image drawing
-  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
-			     int width, int height, GBool invert,
-			     GBool interpolate, GBool inlineImg);
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
-			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
+  void drawImageMask(GfxState *state, Object *ref, Stream *str,
+		     int width, int height, GBool invert,
+		     GBool interpolate, GBool inlineImg) override;
+  void drawImage(GfxState *state, Object *ref, Stream *str,
+		 int width, int height, GfxImageColorMap *colorMap,
+		 GBool interpolate, int *maskColors, GBool inlineImg) override;
 
   //----- Type 3 font operators
-  virtual void type3D0(GfxState *state, double wx, double wy);
-  virtual void type3D1(GfxState *state, double wx, double wy,
-		       double llx, double lly, double urx, double ury);
+  void type3D0(GfxState *state, double wx, double wy) override;
+  void type3D1(GfxState *state, double wx, double wy,
+	       double llx, double lly, double urx, double ury) override;
 
   //----- special access
 
diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc
index 5457ef5..dfd5690 100644
--- a/qt5/src/poppler-annotation.cc
+++ b/qt5/src/poppler-annotation.cc
@@ -1823,8 +1823,8 @@ class TextAnnotationPrivate : public AnnotationPrivate
 {
     public:
         TextAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         TextAnnotation::TextType textType;
@@ -2276,8 +2276,8 @@ class LineAnnotationPrivate : public AnnotationPrivate
 {
     public:
         LineAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields (note uses border for rendering style)
         QLinkedList<QPointF> linePoints;
@@ -2882,8 +2882,8 @@ class GeomAnnotationPrivate : public AnnotationPrivate
 {
     public:
         GeomAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields (note uses border for rendering style)
         GeomAnnotation::GeomType geomType;
@@ -3044,8 +3044,8 @@ class HighlightAnnotationPrivate : public AnnotationPrivate
 {
     public:
         HighlightAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         HighlightAnnotation::HighlightType highlightType;
@@ -3333,8 +3333,8 @@ class StampAnnotationPrivate : public AnnotationPrivate
 {
     public:
         StampAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         QString stampIconName;
@@ -3457,8 +3457,8 @@ class InkAnnotationPrivate : public AnnotationPrivate
 {
     public:
         InkAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         QList< QLinkedList<QPointF> > inkPaths;
@@ -3672,8 +3672,8 @@ class LinkAnnotationPrivate : public AnnotationPrivate
     public:
         LinkAnnotationPrivate();
         ~LinkAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         Link * linkDestination;
@@ -3995,8 +3995,8 @@ class CaretAnnotationPrivate : public AnnotationPrivate
 {
     public:
         CaretAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         CaretAnnotation::CaretSymbol symbol;
@@ -4139,8 +4139,8 @@ class FileAttachmentAnnotationPrivate : public AnnotationPrivate
     public:
         FileAttachmentAnnotationPrivate();
         ~FileAttachmentAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         QString icon;
@@ -4243,8 +4243,8 @@ class SoundAnnotationPrivate : public AnnotationPrivate
     public:
         SoundAnnotationPrivate();
         ~SoundAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         QString icon;
@@ -4347,8 +4347,8 @@ class MovieAnnotationPrivate : public AnnotationPrivate
     public:
         MovieAnnotationPrivate();
         ~MovieAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         MovieObject *movie;
@@ -4451,8 +4451,8 @@ class ScreenAnnotationPrivate : public AnnotationPrivate
     public:
         ScreenAnnotationPrivate();
         ~ScreenAnnotationPrivate();
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 
         // data fields
         LinkRendition *action;
@@ -4541,8 +4541,8 @@ Link* ScreenAnnotation::additionalAction( AdditionalActionType type ) const
 class WidgetAnnotationPrivate : public AnnotationPrivate
 {
     public:
-        Annotation * makeAlias();
-        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+        Annotation * makeAlias() override;
+        Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) override;
 };
 
 Annotation * WidgetAnnotationPrivate::makeAlias()
@@ -4945,12 +4945,12 @@ class RichMediaAnnotationPrivate : public AnnotationPrivate
             delete content;
         }
 
-        Annotation * makeAlias()
+        Annotation * makeAlias() override
         {
             return new RichMediaAnnotation( *this );
         }
 
-        Annot* createNativeAnnot( ::Page *destPage, DocumentData *doc )
+        Annot* createNativeAnnot( ::Page *destPage, DocumentData *doc ) override
         {
             Q_UNUSED( destPage );
             Q_UNUSED( doc );
diff --git a/qt5/src/poppler-annotation.h b/qt5/src/poppler-annotation.h
index 5b8e125..bf11390 100644
--- a/qt5/src/poppler-annotation.h
+++ b/qt5/src/poppler-annotation.h
@@ -453,8 +453,8 @@ class POPPLER_QT5_EXPORT TextAnnotation : public Annotation
     enum InplaceIntent { Unknown, Callout, TypeWriter };
 
     TextAnnotation( TextType type );
-    virtual ~TextAnnotation();
-    virtual SubType subType() const;
+    ~TextAnnotation();
+    SubType subType() const override;
 
     /**
        The type of text annotation represented by this object
@@ -500,7 +500,7 @@ class POPPLER_QT5_EXPORT TextAnnotation : public Annotation
   private:
     TextAnnotation( const QDomNode &node );
     TextAnnotation( TextAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     void setTextType( TextType type );
     Q_DECLARE_PRIVATE( TextAnnotation )
     Q_DISABLE_COPY( TextAnnotation )
@@ -526,8 +526,8 @@ class POPPLER_QT5_EXPORT LineAnnotation : public Annotation
 
     /// \since 0.20
     LineAnnotation( LineType type );
-    virtual ~LineAnnotation();
-    virtual SubType subType() const;
+    ~LineAnnotation();
+    SubType subType() const override;
 
     /// \since 0.20
     LineType lineType() const;
@@ -562,7 +562,7 @@ class POPPLER_QT5_EXPORT LineAnnotation : public Annotation
   private:
     LineAnnotation( const QDomNode &node );
     LineAnnotation( LineAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     void setLineType( LineType type );
     Q_DECLARE_PRIVATE( LineAnnotation )
     Q_DISABLE_COPY( LineAnnotation )
@@ -581,8 +581,8 @@ class POPPLER_QT5_EXPORT GeomAnnotation : public Annotation
 
   public:
     GeomAnnotation();
-    virtual ~GeomAnnotation();
-    virtual SubType subType() const;
+    ~GeomAnnotation();
+    SubType subType() const override;
 
     // common enums
     enum GeomType { InscribedSquare, InscribedCircle };
@@ -596,7 +596,7 @@ class POPPLER_QT5_EXPORT GeomAnnotation : public Annotation
   private:
     GeomAnnotation( const QDomNode &node );
     GeomAnnotation( GeomAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( GeomAnnotation )
     Q_DISABLE_COPY( GeomAnnotation )
 };
@@ -613,8 +613,8 @@ class POPPLER_QT5_EXPORT HighlightAnnotation : public Annotation
 
   public:
     HighlightAnnotation();
-    virtual ~HighlightAnnotation();
-    virtual SubType subType() const;
+    ~HighlightAnnotation();
+    SubType subType() const override;
 
     /**
        The type of highlight
@@ -663,7 +663,7 @@ class POPPLER_QT5_EXPORT HighlightAnnotation : public Annotation
   private:
     HighlightAnnotation( const QDomNode &node );
     HighlightAnnotation( HighlightAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( HighlightAnnotation )
     Q_DISABLE_COPY( HighlightAnnotation )
 };
@@ -680,8 +680,8 @@ class POPPLER_QT5_EXPORT StampAnnotation : public Annotation
 
   public:
     StampAnnotation();
-    virtual ~StampAnnotation();
-    virtual SubType subType() const;
+    ~StampAnnotation();
+    SubType subType() const override;
 
     /**
        The name of the icon for this stamp annotation.
@@ -714,7 +714,7 @@ class POPPLER_QT5_EXPORT StampAnnotation : public Annotation
   private:
     StampAnnotation( const QDomNode &node );
     StampAnnotation( StampAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( StampAnnotation )
     Q_DISABLE_COPY( StampAnnotation )
 };
@@ -731,15 +731,15 @@ class POPPLER_QT5_EXPORT InkAnnotation : public Annotation
 
   public:
     InkAnnotation();
-    virtual ~InkAnnotation();
-    virtual SubType subType() const;
+    ~InkAnnotation();
+    SubType subType() const override;
 
     QList< QLinkedList<QPointF> > inkPaths() const;
     void setInkPaths( const QList< QLinkedList<QPointF> > &paths );
 
   private:
     InkAnnotation( const QDomNode &node );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     InkAnnotation(InkAnnotationPrivate &dd);
     Q_DECLARE_PRIVATE( InkAnnotation )
     Q_DISABLE_COPY( InkAnnotation )
@@ -751,8 +751,8 @@ class POPPLER_QT5_EXPORT LinkAnnotation : public Annotation
   friend class AnnotationPrivate;
 
   public:
-    virtual ~LinkAnnotation();
-    virtual SubType subType() const;
+    ~LinkAnnotation();
+    SubType subType() const override;
 
     // local enums
     enum HighlightMode { None, Invert, Outline, Push };
@@ -771,7 +771,7 @@ class POPPLER_QT5_EXPORT LinkAnnotation : public Annotation
     LinkAnnotation();
     LinkAnnotation( const QDomNode &node );
     LinkAnnotation( LinkAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( LinkAnnotation )
     Q_DISABLE_COPY( LinkAnnotation )
 };
@@ -788,8 +788,8 @@ class POPPLER_QT5_EXPORT CaretAnnotation : public Annotation
 
   public:
     CaretAnnotation();
-    virtual ~CaretAnnotation();
-    virtual SubType subType() const;
+    ~CaretAnnotation();
+    SubType subType() const override;
 
     /**
      * The symbols for the caret annotation.
@@ -802,7 +802,7 @@ class POPPLER_QT5_EXPORT CaretAnnotation : public Annotation
   private:
     CaretAnnotation( const QDomNode &node );
     CaretAnnotation( CaretAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( CaretAnnotation )
     Q_DISABLE_COPY( CaretAnnotation )
 };
@@ -819,8 +819,8 @@ class POPPLER_QT5_EXPORT FileAttachmentAnnotation : public Annotation
   friend class AnnotationPrivate;
 
   public:
-    virtual ~FileAttachmentAnnotation();
-    virtual SubType subType() const;
+    ~FileAttachmentAnnotation();
+    SubType subType() const override;
 
     /**
      * Returns the name of the icon of this annotation.
@@ -846,7 +846,7 @@ class POPPLER_QT5_EXPORT FileAttachmentAnnotation : public Annotation
     FileAttachmentAnnotation();
     FileAttachmentAnnotation( const QDomNode &node );
     FileAttachmentAnnotation( FileAttachmentAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( FileAttachmentAnnotation )
     Q_DISABLE_COPY( FileAttachmentAnnotation )
 };
@@ -863,8 +863,8 @@ class POPPLER_QT5_EXPORT SoundAnnotation : public Annotation
   friend class AnnotationPrivate;
 
   public:
-    virtual ~SoundAnnotation();
-    virtual SubType subType() const;
+    ~SoundAnnotation();
+    SubType subType() const override;
 
     /**
      * Returns the name of the icon of this annotation.
@@ -890,7 +890,7 @@ class POPPLER_QT5_EXPORT SoundAnnotation : public Annotation
     SoundAnnotation();
     SoundAnnotation( const QDomNode &node );
     SoundAnnotation( SoundAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( SoundAnnotation )
     Q_DISABLE_COPY( SoundAnnotation )
 };
@@ -907,8 +907,8 @@ class POPPLER_QT5_EXPORT MovieAnnotation : public Annotation
   friend class AnnotationPrivate;
 
   public:
-    virtual ~MovieAnnotation();
-    virtual SubType subType() const;
+    ~MovieAnnotation();
+    SubType subType() const override;
 
     /**
      * Returns the MovieObject of this annotation.
@@ -934,7 +934,7 @@ class POPPLER_QT5_EXPORT MovieAnnotation : public Annotation
     MovieAnnotation();
     MovieAnnotation( const QDomNode &node );
     MovieAnnotation( MovieAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( MovieAnnotation )
     Q_DISABLE_COPY( MovieAnnotation )
 };
@@ -951,9 +951,9 @@ class POPPLER_QT5_EXPORT ScreenAnnotation : public Annotation
   friend class AnnotationPrivate;
 
   public:
-    virtual ~ScreenAnnotation();
+    ~ScreenAnnotation();
 
-    virtual SubType subType() const;
+    SubType subType() const override;
 
     /**
      * Returns the LinkRendition of this annotation.
@@ -988,7 +988,7 @@ class POPPLER_QT5_EXPORT ScreenAnnotation : public Annotation
   private:
     ScreenAnnotation();
     ScreenAnnotation( ScreenAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const; // stub
+    void store( QDomNode &parentNode, QDomDocument &document ) const override; // stub
     Q_DECLARE_PRIVATE( ScreenAnnotation )
     Q_DISABLE_COPY( ScreenAnnotation )
 };
@@ -1008,9 +1008,9 @@ class POPPLER_QT5_EXPORT WidgetAnnotation : public Annotation
   friend class AnnotationPrivate;
 
   public:
-    virtual ~WidgetAnnotation();
+    ~WidgetAnnotation();
 
-    virtual SubType subType() const;
+    SubType subType() const override;
 
     /**
      * Returns the additional action of the given @p type fo the annotation or
@@ -1023,7 +1023,7 @@ class POPPLER_QT5_EXPORT WidgetAnnotation : public Annotation
   private:
     WidgetAnnotation();
     WidgetAnnotation( WidgetAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const; // stub
+    void store( QDomNode &parentNode, QDomDocument &document ) const override; // stub
     Q_DECLARE_PRIVATE( WidgetAnnotation )
     Q_DISABLE_COPY( WidgetAnnotation )
 };
@@ -1040,9 +1040,9 @@ class POPPLER_QT5_EXPORT RichMediaAnnotation : public Annotation
   friend class AnnotationPrivate;
 
   public:
-    virtual ~RichMediaAnnotation();
+    ~RichMediaAnnotation();
 
-    virtual SubType subType() const;
+    SubType subType() const override;
 
     /**
      * The params object of a RichMediaAnnotation::Instance object.
@@ -1349,7 +1349,7 @@ class POPPLER_QT5_EXPORT RichMediaAnnotation : public Annotation
     RichMediaAnnotation();
     RichMediaAnnotation( const QDomNode &node );
     RichMediaAnnotation( RichMediaAnnotationPrivate &dd );
-    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+    void store( QDomNode &parentNode, QDomDocument &document ) const override;
     Q_DECLARE_PRIVATE( RichMediaAnnotation )
     Q_DISABLE_COPY( RichMediaAnnotation )
 };
diff --git a/qt5/src/poppler-form.h b/qt5/src/poppler-form.h
index 5a6b23b..44928b3 100644
--- a/qt5/src/poppler-form.h
+++ b/qt5/src/poppler-form.h
@@ -167,9 +167,9 @@ namespace Poppler {
 	/// \cond PRIVATE
 	FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w);
 	/// \endcond
-	virtual ~FormFieldButton();
+	~FormFieldButton();
 
-	virtual FormType type() const;
+	FormType type() const override;
 
 	/**
 	  The particular type of the button field.
@@ -223,9 +223,9 @@ namespace Poppler {
 	/// \cond PRIVATE
 	FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
 	/// \endcond
-	virtual ~FormFieldText();
+	~FormFieldText();
 
-	virtual FormType type() const;
+	FormType type() const override;
 
 	/**
 	  The text type of the text field.
@@ -295,9 +295,9 @@ namespace Poppler {
 	/// \cond PRIVATE
 	FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w);
 	/// \endcond
-	virtual ~FormFieldChoice();
+	~FormFieldChoice();
 
-	virtual FormType type() const;
+	FormType type() const override;
 
 	/**
 	  The choice type of the choice field.
@@ -454,9 +454,9 @@ namespace Poppler {
 	/// \cond PRIVATE
 	FormFieldSignature(DocumentData *doc, ::Page *p, ::FormWidgetSignature *w);
 	/// \endcond
-	virtual ~FormFieldSignature();
+	~FormFieldSignature();
 
-	virtual FormType type() const;
+	FormType type() const override;
 
 	/**
 	  Validate the signature.
diff --git a/qt5/src/poppler-link-extractor-private.h b/qt5/src/poppler-link-extractor-private.h
index 32ddd03..f91430c 100644
--- a/qt5/src/poppler-link-extractor-private.h
+++ b/qt5/src/poppler-link-extractor-private.h
@@ -34,13 +34,13 @@ class LinkExtractorOutputDev : public OutputDev
 {
   public:
     LinkExtractorOutputDev(PageData *data);
-    virtual ~LinkExtractorOutputDev();
+    ~LinkExtractorOutputDev();
 
     // inherited from OutputDev
-    virtual GBool upsideDown() { return gFalse; }
-    virtual GBool useDrawChar() { return gFalse; }
-    virtual GBool interpretType3Chars() { return gFalse; }
-    virtual void processLink(::AnnotLink *link);
+    GBool upsideDown() override { return gFalse; }
+    GBool useDrawChar() override { return gFalse; }
+    GBool interpretType3Chars() override { return gFalse; }
+    void processLink(::AnnotLink *link) override;
 
     // our stuff
     QList< Link* > links();
diff --git a/qt5/src/poppler-link.h b/qt5/src/poppler-link.h
index 1ada9d3..0753ce9 100644
--- a/qt5/src/poppler-link.h
+++ b/qt5/src/poppler-link.h
@@ -269,7 +269,7 @@ class POPPLER_QT5_EXPORT LinkGoto : public Link
 		 * The destination to reach.
 		 */
 		LinkDestination destination() const;
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 	private:
 		Q_DECLARE_PRIVATE( LinkGoto )
@@ -308,7 +308,7 @@ class POPPLER_QT5_EXPORT LinkExecute : public Link
 		 * Destructor.
 		 */
 		~LinkExecute();
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 	private:
 		Q_DECLARE_PRIVATE( LinkExecute )
@@ -342,7 +342,7 @@ class POPPLER_QT5_EXPORT LinkBrowse : public Link
 		 * Destructor.
 		 */
 		~LinkBrowse();
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 	private:
 		Q_DECLARE_PRIVATE( LinkBrowse )
@@ -393,7 +393,7 @@ class POPPLER_QT5_EXPORT LinkAction : public Link
 		 * Destructor.
 		 */
 		~LinkAction();
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 	private:
 		Q_DECLARE_PRIVATE( LinkAction )
@@ -413,9 +413,9 @@ class POPPLER_QT5_EXPORT LinkSound : public Link
 		/**
 		 * Destructor.
 		 */
-		virtual ~LinkSound();
+		~LinkSound();
 
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 		/**
 		 * The volume to be used when playing the sound.
@@ -489,9 +489,9 @@ class POPPLER_QT5_EXPORT LinkRendition : public Link
 		/**
 		 * Destructor.
 		 */
-		virtual ~LinkRendition();
+		~LinkRendition();
 
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 		/**
 		 * Returns the media rendition object if the redition provides one, @c 0 otherwise
@@ -542,9 +542,9 @@ class POPPLER_QT5_EXPORT LinkJavaScript : public Link
 		/**
 		 * Destructor.
 		 */
-		virtual ~LinkJavaScript();
+		~LinkJavaScript();
 
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 		/**
 		 * The JS code
@@ -588,7 +588,7 @@ class POPPLER_QT5_EXPORT LinkMovie : public Link
 		 * Destructor.
 		 */
 		~LinkMovie();
-		LinkType linkType() const;
+		LinkType linkType() const override;
 		/**
 		 * Returns the operation to be performed on the movie.
 		 */
@@ -620,7 +620,7 @@ class POPPLER_QT5_EXPORT LinkOCGState : public Link
 		 */
 		~LinkOCGState();
 
-		LinkType linkType() const;
+		LinkType linkType() const override;
 
 	private:
 		Q_DECLARE_PRIVATE( LinkOCGState )
diff --git a/qt5/src/poppler-optcontent.h b/qt5/src/poppler-optcontent.h
index 03bac04..4a6e890 100644
--- a/qt5/src/poppler-optcontent.h
+++ b/qt5/src/poppler-optcontent.h
@@ -53,20 +53,20 @@ namespace Poppler
     Q_OBJECT
 
     public:
-    virtual ~OptContentModel();
+    ~OptContentModel();
 
-    QModelIndex index(int row, int column, const QModelIndex &parent) const;
-    QModelIndex parent(const QModelIndex &child) const;
+    QModelIndex index(int row, int column, const QModelIndex &parent) const override;
+    QModelIndex parent(const QModelIndex &child) const override;
 
-    int rowCount(const QModelIndex &parent = QModelIndex()) const;
-    int columnCount(const QModelIndex &parent) const;
+    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+    int columnCount(const QModelIndex &parent) const override;
 
-    QVariant data(const QModelIndex &index, int role) const;
-    virtual bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole );
+    QVariant data(const QModelIndex &index, int role) const override;
+    bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) override;
 
-    Qt::ItemFlags flags ( const QModelIndex & index ) const;
+    Qt::ItemFlags flags ( const QModelIndex & index ) const override;
 
-    virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+    QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
 
     /**
      * Applies the Optional Content Changes specified by that link.
diff --git a/qt5/src/poppler-qiodeviceoutstream-private.h b/qt5/src/poppler-qiodeviceoutstream-private.h
index af0d46b..775344d 100644
--- a/qt5/src/poppler-qiodeviceoutstream-private.h
+++ b/qt5/src/poppler-qiodeviceoutstream-private.h
@@ -31,12 +31,12 @@ class QIODeviceOutStream : public OutStream
 {
   public:
     QIODeviceOutStream(QIODevice* device);
-    virtual ~QIODeviceOutStream();
+    ~QIODeviceOutStream();
 
-    virtual void close();
-    virtual Goffset getPos();
-    virtual void put(char c);
-    virtual void printf(const char *format, ...);
+    void close() override;
+    Goffset getPos() override;
+    void put(char c) override;
+    void printf(const char *format, ...) override;
 
   private:
     QIODevice *m_device;
diff --git a/qt5/src/poppler-qt5.h b/qt5/src/poppler-qt5.h
index 45cc6ff..e44e22d 100644
--- a/qt5/src/poppler-qt5.h
+++ b/qt5/src/poppler-qt5.h
@@ -1732,7 +1732,7 @@ height = dummy.height();
              */
             void setPageConvertedCallback(void (* callback)(int page, void *payload), void *payload);
 
-            bool convert();
+            bool convert() override;
 
         private:
             Q_DECLARE_PRIVATE(PSConverter)
@@ -1761,7 +1761,7 @@ height = dummy.height();
             /**
               Destructor.
             */
-            virtual ~PDFConverter();
+            ~PDFConverter();
 
             /**
               Sets the options for the PDF export.
@@ -1772,7 +1772,7 @@ height = dummy.height();
              */
             PDFOptions pdfOptions() const;
 
-            bool convert();
+            bool convert() override;
 
         private:
             Q_DECLARE_PRIVATE(PDFConverter)
diff --git a/qt5/tests/stress-threads-qt5.cpp b/qt5/tests/stress-threads-qt5.cpp
index 283d014..0dc813e 100644
--- a/qt5/tests/stress-threads-qt5.cpp
+++ b/qt5/tests/stress-threads-qt5.cpp
@@ -21,7 +21,7 @@ class SillyThread : public QThread
 public:
     SillyThread(Poppler::Document* document, QObject* parent = 0);
 
-    void run();
+    void run() override;
 
 private:
     Poppler::Document* m_document;
@@ -34,7 +34,7 @@ class CrazyThread : public QThread
 public:
     CrazyThread(uint seed, Poppler::Document* document, QMutex* annotationMutex, QObject* parent = 0);
 
-    void run();
+    void run() override;
 
 private:
     uint m_seed;
diff --git a/qt5/tests/test-password-qt5.cpp b/qt5/tests/test-password-qt5.cpp
index b8ad3fa..713ce37 100644
--- a/qt5/tests/test-password-qt5.cpp
+++ b/qt5/tests/test-password-qt5.cpp
@@ -13,8 +13,8 @@ public:
     PDFDisplay( Poppler::Document *d );
     ~PDFDisplay();
 protected:
-    void paintEvent( QPaintEvent * );
-    void keyPressEvent( QKeyEvent * );
+    void paintEvent( QPaintEvent * ) override;
+    void keyPressEvent( QKeyEvent * ) override;
 private:
     void display();
     int m_currentPage;
diff --git a/qt5/tests/test-poppler-qt5.cpp b/qt5/tests/test-poppler-qt5.cpp
index d16728b..b1d465f 100644
--- a/qt5/tests/test-poppler-qt5.cpp
+++ b/qt5/tests/test-poppler-qt5.cpp
@@ -19,9 +19,9 @@ public:
     void setShowTextRects(bool show);
     void display();
 protected:
-    void paintEvent( QPaintEvent * );
-    void keyPressEvent( QKeyEvent * );
-    void mousePressEvent( QMouseEvent * );
+    void paintEvent( QPaintEvent * ) override;
+    void keyPressEvent( QKeyEvent * ) override;
+    void mousePressEvent( QMouseEvent * ) override;
 private:
     int m_currentPage;
     QImage image;
diff --git a/splash/SplashFTFont.h b/splash/SplashFTFont.h
index 98cb29d..7d5c1e3 100644
--- a/splash/SplashFTFont.h
+++ b/splash/SplashFTFont.h
@@ -50,19 +50,19 @@ public:
   virtual ~SplashFTFont();
 
   // Munge xFrac and yFrac before calling SplashFont::getGlyph.
-  virtual GBool getGlyph(int c, int xFrac, int yFrac,
-			 SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
+  GBool getGlyph(int c, int xFrac, int yFrac,
+		 SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) override;
 
   // Rasterize a glyph.  The <xFrac> and <yFrac> values are the same
   // as described for getGlyph.
-  virtual GBool makeGlyph(int c, int xFrac, int yFrac,
-			  SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes);
+  GBool makeGlyph(int c, int xFrac, int yFrac,
+		  SplashGlyphBitmap *bitmap, int x0, int y0, SplashClip *clip, SplashClipResult *clipRes) override;
 
   // Return the path for a glyph.
-  virtual SplashPath *getGlyphPath(int c);
+  SplashPath *getGlyphPath(int c) override;
 
   // Return the advance of a glyph. (in 0..1 range)
-  virtual double getGlyphAdvance(int c);
+  double getGlyphAdvance(int c) override;
 
 private:
 
diff --git a/splash/SplashFTFontFile.h b/splash/SplashFTFontFile.h
index d642af0..7a7bb21 100644
--- a/splash/SplashFTFontFile.h
+++ b/splash/SplashFTFontFile.h
@@ -55,12 +55,12 @@ public:
 					  int codeToGIDLenA,
 					  int faceIndexA=0);
 
-  virtual ~SplashFTFontFile();
+  ~SplashFTFontFile();
 
   // Create a new SplashFTFont, i.e., a scaled instance of this font
   // file.
-  virtual SplashFont *makeFont(SplashCoord *mat,
-			       SplashCoord *textMat);
+  SplashFont *makeFont(SplashCoord *mat,
+		       SplashCoord *textMat) override;
 
 private:
 
diff --git a/splash/SplashPattern.h b/splash/SplashPattern.h
index e678c9e..1e2881c 100644
--- a/splash/SplashPattern.h
+++ b/splash/SplashPattern.h
@@ -66,17 +66,17 @@ public:
 
   SplashSolidColor(SplashColorPtr colorA);
 
-  virtual SplashPattern *copy() { return new SplashSolidColor(color); }
+  SplashPattern *copy() override { return new SplashSolidColor(color); }
 
-  virtual ~SplashSolidColor();
+  ~SplashSolidColor();
 
-  virtual GBool getColor(int x, int y, SplashColorPtr c);
+  GBool getColor(int x, int y, SplashColorPtr c) override;
 
-  virtual GBool testPosition(int x, int y) { return gFalse; }
+  GBool testPosition(int x, int y) override { return gFalse; }
 
-  virtual GBool isStatic() { return gTrue; }
+  GBool isStatic() override { return gTrue; }
 
-  virtual GBool isCMYK() { return gFalse; }
+  GBool isCMYK() override { return gFalse; }
 
 private:
 
diff --git a/test/gtk-test.cc b/test/gtk-test.cc
index aab7951..6f5e621 100644
--- a/test/gtk-test.cc
+++ b/test/gtk-test.cc
@@ -55,13 +55,13 @@ public:
   //----- initialization and control
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   // Dump page contents to display.
-  virtual void dump();
+  void dump() override;
 
   //----- update text state
-  virtual void updateFont(GfxState *state);
+  void updateFont(GfxState *state) override;
 
   //----- special access
 
diff --git a/utils/HtmlOutputDev.h b/utils/HtmlOutputDev.h
index c9fd28c..704c16b 100644
--- a/utils/HtmlOutputDev.h
+++ b/utils/HtmlOutputDev.h
@@ -251,28 +251,28 @@ public:
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gTrue; }
+  GBool upsideDown() override { return gTrue; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gTrue; }
+  GBool useDrawChar() override { return gTrue; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gFalse; }
+  GBool interpretType3Chars() override { return gFalse; }
 
   // Does this device need non-text content?
-  virtual GBool needNonText() { return gTrue; }
+  GBool needNonText() override { return gTrue; }
 
   //----- initialization and control
 
-  virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI,
-                               int rotate, GBool useMediaBox, GBool crop,
-                               int sliceX, int sliceY, int sliceW, int sliceH,
-                               GBool printing,
-                               GBool (* abortCheckCbk)(void *data) = NULL,
-                               void * abortCheckCbkData = NULL,
-                               GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
-                               void *annotDisplayDecideCbkData = NULL)
+  GBool checkPageSlice(Page *page, double hDPI, double vDPI,
+                       int rotate, GBool useMediaBox, GBool crop,
+                       int sliceX, int sliceY, int sliceW, int sliceH,
+                       GBool printing,
+                       GBool (* abortCheckCbk)(void *data) = NULL,
+                       void * abortCheckCbkData = NULL,
+                       GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+                       void *annotDisplayDecideCbkData = NULL) override
   {
    docPage = page;
    return gTrue;
@@ -280,29 +280,29 @@ public:
 
 
   // Start a page.
-  virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+  void startPage(int pageNum, GfxState *state, XRef *xref) override;
 
   // End a page.
-  virtual void endPage();
+  void endPage() override;
 
   //----- update text state
-  virtual void updateFont(GfxState *state);
+  void updateFont(GfxState *state) override;
 
   //----- text drawing
-  virtual void beginString(GfxState *state, GooString *s);
-  virtual void endString(GfxState *state);
-  virtual void drawChar(GfxState *state, double x, double y,
-			double dx, double dy,
-			double originX, double originY,
-			CharCode code, int nBytes, Unicode *u, int uLen);
+  void beginString(GfxState *state, GooString *s) override;
+  void endString(GfxState *state) override;
+  void drawChar(GfxState *state, double x, double y,
+		double dx, double dy,
+		double originX, double originY,
+		CharCode code, int nBytes, Unicode *u, int uLen) override;
   
-  virtual void drawImageMask(GfxState *state, Object *ref, 
-			     Stream *str,
-			     int width, int height, GBool invert,
-			     GBool interpolate, GBool inlineImg);
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
-			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
+  void drawImageMask(GfxState *state, Object *ref,
+		     Stream *str,
+		     int width, int height, GBool invert,
+		     GBool interpolate, GBool inlineImg) override;
+  void drawImage(GfxState *state, Object *ref, Stream *str,
+		 int width, int height, GfxImageColorMap *colorMap,
+		 GBool interpolate, int *maskColors, GBool inlineImg) override;
 
   //new feature    
   virtual int DevType() {return 1234;}
diff --git a/utils/ImageOutputDev.h b/utils/ImageOutputDev.h
index 668bb08..2c94037 100644
--- a/utils/ImageOutputDev.h
+++ b/utils/ImageOutputDev.h
@@ -96,56 +96,56 @@ public:
   // Does this device use tilingPatternFill()?  If this returns false,
   // tiling pattern fills will be reduced to a series of other drawing
   // operations.
-  virtual GBool useTilingPatternFill() { return gTrue; }
+  GBool useTilingPatternFill() override { return gTrue; }
 
   // Does this device use beginType3Char/endType3Char?  Otherwise,
   // text in Type 3 fonts will be drawn with drawChar/drawString.
-  virtual GBool interpretType3Chars() { return gFalse; }
+  GBool interpretType3Chars() override { return gFalse; }
 
   // Does this device need non-text content?
-  virtual GBool needNonText() { return gTrue; }
+  GBool needNonText() override { return gTrue; }
 
   // Start a page
-  virtual void startPage(int pageNumA, GfxState *state, XRef *xref) 
+  void startPage(int pageNumA, GfxState *state, XRef *xref)  override
 			{ pageNum = pageNumA; }
  
   //---- get info about output device
 
   // Does this device use upside-down coordinates?
   // (Upside-down means (0,0) is the top left corner of the page.)
-  virtual GBool upsideDown() { return gTrue; }
+  GBool upsideDown() override { return gTrue; }
 
   // Does this device use drawChar() or drawString()?
-  virtual GBool useDrawChar() { return gFalse; }
+  GBool useDrawChar() override { return gFalse; }
 
   //----- path painting
-  virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
-				  double *pmat, int paintType, int tilingType, Dict *resDict,
-				  double *mat, double *bbox,
-				  int x0, int y0, int x1, int y1,
-				  double xStep, double yStep);
+  GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str,
+			  double *pmat, int paintType, int tilingType, Dict *resDict,
+			  double *mat, double *bbox,
+			  int x0, int y0, int x1, int y1,
+			  double xStep, double yStep) override;
 
   //----- image drawing
-  virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
-			     int width, int height, GBool invert,
-			     GBool interpolate, GBool inlineImg);
-  virtual void drawImage(GfxState *state, Object *ref, Stream *str,
-			 int width, int height, GfxImageColorMap *colorMap,
-			 GBool interpolate, int *maskColors, GBool inlineImg);
-  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
-			       int width, int height,
-			       GfxImageColorMap *colorMap,
-			       GBool interpolate,
-			       Stream *maskStr, int maskWidth, int maskHeight,
-			       GBool maskInvert, GBool maskInterpolate);
-  virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
-				   int width, int height,
-				   GfxImageColorMap *colorMap,
-				   GBool interpolate,
-				   Stream *maskStr,
-				   int maskWidth, int maskHeight,
-				   GfxImageColorMap *maskColorMap,
-				   GBool maskInterpolate);
+  void drawImageMask(GfxState *state, Object *ref, Stream *str,
+		     int width, int height, GBool invert,
+		     GBool interpolate, GBool inlineImg) override;
+  void drawImage(GfxState *state, Object *ref, Stream *str,
+		 int width, int height, GfxImageColorMap *colorMap,
+		 GBool interpolate, int *maskColors, GBool inlineImg) override;
+  void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+		       int width, int height,
+		       GfxImageColorMap *colorMap,
+		       GBool interpolate,
+		       Stream *maskStr, int maskWidth, int maskHeight,
+		       GBool maskInvert, GBool maskInterpolate) override;
+  void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+			   int width, int height,
+			   GfxImageColorMap *colorMap,
+			   GBool interpolate,
+			   Stream *maskStr,
+			   int maskWidth, int maskHeight,
+			   GfxImageColorMap *maskColorMap,
+			   GBool maskInterpolate) override;
 
 private:
   // Sets the output filename with a given file extension
diff --git a/utils/pdftohtml.cc b/utils/pdftohtml.cc
index 4b8bd4f..50d8990 100644
--- a/utils/pdftohtml.cc
+++ b/utils/pdftohtml.cc
@@ -162,14 +162,14 @@ public:
   void drawChar(GfxState *state, double x, double y,
       double dx, double dy,
       double originX, double originY,
-      CharCode code, int nBytes, Unicode *u, int uLen) { }
+      CharCode code, int nBytes, Unicode *u, int uLen) override { }
   GBool beginType3Char(GfxState *state, double x, double y,
       double dx, double dy,
-      CharCode code, Unicode *u, int uLen) { return false; }
-  void endType3Char(GfxState *state) { }
-  void beginTextObject(GfxState *state) { }
-  void endTextObject(GfxState *state) { }
-  GBool interpretType3Chars() { return gFalse; }
+      CharCode code, Unicode *u, int uLen) override { return false; }
+  void endType3Char(GfxState *state) override { }
+  void beginTextObject(GfxState *state) override { }
+  void endTextObject(GfxState *state) override { }
+  GBool interpretType3Chars() override { return gFalse; }
 };
 #endif
 
commit da490581b1b4d50efdba1e25115697e17bb0ef51
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Mar 8 22:07:34 2017 +0100

    Compile in C++11 mode
    
    I tried using AX_CXX_COMPILE_STDCXX_11 for the autotools side but could not get it to fill CXXFLAGS or any other variable i could find, help welcome

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d36e06e..e0bdb0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
 project(poppler)
 
-cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
 
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
 
@@ -26,6 +26,8 @@ set(POPPLER_MINOR_VERSION "52")
 set(POPPLER_MICRO_VERSION "0")
 set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
 
+set (CMAKE_CXX_STANDARD 11)
+
 # command line switches
 option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF)
 option(BUILD_GTK_TESTS "Whether compile the GTK+ test programs." ON)
diff --git a/configure.ac b/configure.ac
index 5caa8ae..19bf10d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,7 @@ AC_PROG_CC_STDC
 #fi
 AC_PROG_CXX
 AC_PROG_INSTALL
+CXXFLAGS="$CXXFLAGS -std=c++11"
 
 dnl ##### Check for pkgconfig
 PKG_PROG_PKG_CONFIG


More information about the poppler mailing list