[poppler] glib/poppler-action.cc poppler/Link.cc poppler/Link.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 26 21:39:10 UTC 2020


 glib/poppler-action.cc |    2 +-
 poppler/Link.cc        |    2 +-
 poppler/Link.h         |    6 +-----
 3 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 170aa09affc7637cdc8087bb7ae8012b37a80025
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Mar 18 17:51:18 2020 +0100

    Simplify LinkRendition

diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index 2fcbb05d..f9228897 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -528,7 +528,7 @@ build_rendition (PopplerAction *action,
 		 const LinkRendition *link)
 {
 	action->rendition.op = link->getOperation();
-	if (link->hasRenditionObject())
+	if (link->getMedia())
 		action->rendition.media = _poppler_media_new (link->getMedia());
 	// TODO: annotation reference
 }
diff --git a/poppler/Link.cc b/poppler/Link.cc
index cc3ebf2a..23d4c99d 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -688,7 +688,7 @@ LinkRendition::LinkRendition(const Object *obj) {
         error(errSyntaxWarning, -1, "Invalid Rendition Action: unrecognized operation valued: {0:d}", operationCode);
       } else {
         // retrieve rendition object
-        renditionObj = obj->dictLookup("R");
+        Object renditionObj = obj->dictLookup("R");
         if (renditionObj.isDict()) {
           media = new MediaRendition(&renditionObj);
 	} else if (operationCode == 0 || operationCode == 4) {
diff --git a/poppler/Link.h b/poppler/Link.h
index 57c169ea..d3ebafcf 100644
--- a/poppler/Link.h
+++ b/poppler/Link.h
@@ -17,7 +17,7 @@
 // Copyright (C) 2008 Hugo Mercier <hmercier31 at gmail.com>
 // Copyright (C) 2010, 2011 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2012 Tobias Koening <tobias.koenig at kdab.com>
-// Copyright (C) 2018, 2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2018-2020 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by the LiMux project of the city of Munich
 // Copyright (C) 2018 Intevation GmbH <intevation at intevation.de>
 // Copyright (C) 2019, 2020 Oliver Sander <oliver.sander at tu-dresden.de>
@@ -352,9 +352,6 @@ public:
 
   LinkActionKind getKind() const override { return actionRendition; }
 
-  bool hasRenditionObject() const { return renditionObj.isDict(); }
-  const Object* getRenditionObject() const { return &renditionObj; }
-
   bool hasScreenAnnot() const { return screenRef != Ref::INVALID(); }
   Ref getScreenAnnot() const { return screenRef; }
 
@@ -367,7 +364,6 @@ public:
 private:
 
   Ref screenRef;
-  Object renditionObj;
   RenditionOperation operation;
 
   MediaRendition* media;


More information about the poppler mailing list