Commit 170aa09a authored by Albert Astals Cid's avatar Albert Astals Cid Committed by Albert Astals Cid

Simplify LinkRendition

parent 535db3f8
......@@ -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
}
......
......@@ -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) {
......
......@@ -17,7 +17,7 @@
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2012 Tobias Koening <tobias.koenig@kdab.com>
// Copyright (C) 2018, 2019 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2018-2020 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
// Copyright (C) 2018 Intevation GmbH <intevation@intevation.de>
// Copyright (C) 2019, 2020 Oliver Sander <oliver.sander@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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment