poppler/GfxFont.h          |   10 +++++-----
 poppler/PSOutputDev.cc     |    2 +-
 poppler/PSOutputDev.h      |    2 +-
 poppler/SplashOutputDev.cc |   11 ++++++-----
 qt5/src/ArthurOutputDev.cc |    3 ++-
 5 files changed, 15 insertions(+), 13 deletions(-)

New commits:
commit 6bb508acd9a79671e5e9defc7b92a943fb880cda
Author: Albert Astals Cid <[email protected]>
Date:   Thu Apr 5 14:19:51 2018 +0200

    More const in GfxFont methods

diff --git a/poppler/GfxFont.h b/poppler/GfxFont.h
index 09d54244..4719de69 100644
--- a/poppler/GfxFont.h
+++ b/poppler/GfxFont.h
@@ -193,26 +193,26 @@ public:
   const GooString *getTag() const { return tag; }
 
   // Get font dictionary ID.
-  Ref *getID() { return &id; }
+  const Ref *getID() const { return &id; }
 
   // Does this font match the tag?
-  GBool matches(char *tagA) { return !tag->cmp(tagA); }
+  GBool matches(const char *tagA) const { return !tag->cmp(tagA); }
 
   // Get font family name.
   GooString *getFamily() { return family; }
   
   // Get font stretch.
-  Stretch getStretch() { return stretch; }
+  Stretch getStretch() const { return stretch; }
   
   // Get font weight.
-  Weight getWeight() { return weight; }
+  Weight getWeight() const { return weight; }
 
   // Get the original font name (ignornig any munging that might have
   // been done to map to a canonical Base-14 font name).
   const GooString *getName() const { return name; }
 
   // Get font type.
-  GfxFontType getType() { return type; }
+  GfxFontType getType() const { return type; }
   virtual GBool isCIDFont() const { return gFalse; }
 
   // Get embedded font ID, i.e., a ref for the font file stream.
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 3aab7de7..dec0e80c 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -2866,7 +2866,7 @@ void PSOutputDev::setupType3Font(GfxFont *font, GooString 
*psName,
 
 // Make a unique PS font name, based on the names given in the PDF
 // font object, and an object ID (font file object for 
-GooString *PSOutputDev::makePSFontName(GfxFont *font, Ref *id) {
+GooString *PSOutputDev::makePSFontName(GfxFont *font, const Ref *id) {
   GooString *psName;
   const GooString *s;
 
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index b85c28d8..0e62840b 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -373,7 +373,7 @@ private:
                                    GBool needVerticalMetrics);
   void setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, GooString *psName);
   void setupType3Font(GfxFont *font, GooString *psName, Dict *parentResDict);
-  GooString *makePSFontName(GfxFont *font, Ref *id);
+  GooString *makePSFontName(GfxFont *font, const Ref *id);
   void setupImages(Dict *resDict);
   void setupImage(Ref id, Stream *str, GBool mask);
   void setupForms(Dict *resDict);
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index efc0aaec..253df7f0 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -38,6 +38,7 @@
 // Copyright (C) 2015 Kenji Uno <[email protected]>
 // Copyright (C) 2016 Takahiro Hashimoto <[email protected]>
 // Copyright (C) 2017 Even Rouault <[email protected]>
+// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, 
<[email protected]>. Work sponsored by the LiMux project of the city of Munich
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -1196,7 +1197,7 @@ static const SplashBlendFunc splashOutBlendFuncs[] = {
 class SplashOutFontFileID: public SplashFontFileID {
 public:
 
-  SplashOutFontFileID(Ref *rA) { r = *rA; }
+  SplashOutFontFileID(const Ref *rA) { r = *rA; }
 
   ~SplashOutFontFileID() {}
 
@@ -1222,14 +1223,14 @@ struct T3FontCacheTag {
 class T3FontCache {
 public:
 
-  T3FontCache(Ref *fontID, double m11A, double m12A,
+  T3FontCache(const Ref *fontID, double m11A, double m12A,
              double m21A, double m22A,
              int glyphXA, int glyphYA, int glyphWA, int glyphHA,
              GBool aa, GBool validBBoxA);
   ~T3FontCache();
   T3FontCache(const T3FontCache &) = delete;
   T3FontCache& operator=(const T3FontCache &) = delete;
-  GBool matches(Ref *idA, double m11A, double m12A,
+  GBool matches(const Ref *idA, double m11A, double m12A,
                double m21A, double m22A)
     { return fontID.num == idA->num && fontID.gen == idA->gen &&
             m11 == m11A && m12 == m12A && m21 == m21A && m22 == m22A; }
@@ -1246,7 +1247,7 @@ public:
   T3FontCacheTag *cacheTags;   // cache tags, i.e., char codes
 };
 
-T3FontCache::T3FontCache(Ref *fontIDA, double m11A, double m12A,
+T3FontCache::T3FontCache(const Ref *fontIDA, double m11A, double m12A,
                         double m21A, double m22A,
                         int glyphXA, int glyphYA, int glyphWA, int glyphHA,
                         GBool validBBoxA, GBool aa) {
@@ -2501,7 +2502,7 @@ GBool SplashOutputDev::beginType3Char(GfxState *state, 
double x, double y,
                                      double dx, double dy,
                                      CharCode code, Unicode *u, int uLen) {
   GfxFont *gfxFont;
-  Ref *fontID;
+  const Ref *fontID;
   double *ctm, *bbox;
   T3FontCache *t3Font;
   T3GlyphStack *t3gs;
diff --git a/qt5/src/ArthurOutputDev.cc b/qt5/src/ArthurOutputDev.cc
index 9af32ae5..640634d0 100644
--- a/qt5/src/ArthurOutputDev.cc
+++ b/qt5/src/ArthurOutputDev.cc
@@ -25,6 +25,7 @@
 // Copyright (C) 2013 Mihai Niculescu <[email protected]>
 // Copyright (C) 2017, 2018 Oliver Sander <[email protected]>
 // Copyright (C) 2017 Adrian Johnson <[email protected]>
+// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, 
<[email protected]>. Work sponsored by the LiMux project of the city of Munich
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -70,7 +71,7 @@
 class SplashOutFontFileID: public SplashFontFileID {
 public:
 
-  SplashOutFontFileID(Ref *rA) { r = *rA; }
+  SplashOutFontFileID(const Ref *rA) { r = *rA; }
 
   ~SplashOutFontFileID() {}
 
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to