[poppler] poppler/Lexer.cc poppler/Lexer.h poppler/Object.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 22 17:45:04 UTC 2019


 poppler/Lexer.cc |    4 ++--
 poppler/Lexer.h  |    6 +++---
 poppler/Object.h |    4 ----
 3 files changed, 5 insertions(+), 9 deletions(-)

New commits:
commit df84cd5c349de7a46abf1d0f5431b4da2e5eed95
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Nov 22 18:36:31 2019 +0100

    Remove Object::streamGetPos

diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc
index de95e6dd..7a6e58e9 100644
--- a/poppler/Lexer.cc
+++ b/poppler/Lexer.cc
@@ -13,7 +13,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2006-2010, 2012-2014, 2017, 2018 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2010, 2012-2014, 2017-2019 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk at gmail.com>
 // Copyright (C) 2010 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2012, 2013 Adrian Johnson <ajohnson at redneon.com>
@@ -377,7 +377,7 @@ Object Lexer::getObj(int objNum) {
 	  // we are growing see if the document is not malformed and we are growing too much
 	  if (objNum > 0 && xref != nullptr)
 	  {
-	    int newObjNum = xref->getNumEntry(curStr.streamGetPos());
+	    const int newObjNum = xref->getNumEntry(getPos());
 	    if (newObjNum != objNum)
 	    {
 	      error(errSyntaxError, getPos(), "Unterminated string");
diff --git a/poppler/Lexer.h b/poppler/Lexer.h
index e553b440..3e062f11 100644
--- a/poppler/Lexer.h
+++ b/poppler/Lexer.h
@@ -13,7 +13,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2006, 2007, 2010, 2013, 2017, 2018 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006, 2007, 2010, 2013, 2017-2019 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk at gmail.com>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
@@ -72,8 +72,8 @@ public:
 
   // Get current position in file.  This is only used for error
   // messages.
-  Goffset getPos()
-    { return curStr.isStream() ? curStr.streamGetPos() : -1; }
+  Goffset getPos() const
+    { return curStr.isStream() ? curStr.getStream()->getPos() : -1; }
 
   // Set position in file.
   void setPos(Goffset pos, int dir = 0)
diff --git a/poppler/Object.h b/poppler/Object.h
index c01a191f..b839c71c 100644
--- a/poppler/Object.h
+++ b/poppler/Object.h
@@ -299,7 +299,6 @@ public:
   int streamGetChars(int nChars, unsigned char *buffer) const;
   int streamLookChar() const;
   char *streamGetLine(char *buf, int size) const;
-  Goffset streamGetPos() const;
   void streamSetPos(Goffset pos, int dir = 0);
   Dict *streamGetDict() const;
 
@@ -423,9 +422,6 @@ inline int Object::streamLookChar() const
 inline char *Object::streamGetLine(char *buf, int size) const
   { OBJECT_TYPE_CHECK(objStream); return stream->getLine(buf, size); }
 
-inline Goffset Object::streamGetPos() const
-  { OBJECT_TYPE_CHECK(objStream); return stream->getPos(); }
-
 inline void Object::streamSetPos(Goffset pos, int dir)
   { OBJECT_TYPE_CHECK(objStream); stream->setPos(pos, dir); }
 


More information about the poppler mailing list