[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-poppler
Subject: [poppler] poppler/Annot.cc
From: gitlab-mirror () kemper ! freedesktop ! org (GitLab Mirror)
Date: 2018-11-14 14:06:09
Message-ID: 20181114140609.0CAD7761D7 () kemper ! freedesktop ! org
[Download RAW message or body]
poppler/Annot.cc | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
New commits:
commit 09952b05990a4c5bcd9763dd6701cefb13ab8e69
Author: Albert Astals Cid <aacid@kde.org>
Date: Wed Nov 14 15:05:52 2018 +0100
AnnotFileAttachment::initialize: Save a Object::copy()
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index e6530d2d..0732de92 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -5853,19 +5853,17 @@ AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, Object *dictObject, Objec
AnnotFileAttachment::~AnnotFileAttachment() = default;
void AnnotFileAttachment::initialize(PDFDoc *docA, Dict* dict) {
- Object obj1;
-
- obj1 = dict->lookup("FS");
- if (obj1.isDict() || obj1.isString()) {
- file = obj1.copy();
+ Object objFS = dict->lookup("FS");
+ if (objFS.isDict() || objFS.isString()) {
+ file = std::move(objFS);
} else {
error(errSyntaxError, -1, "Bad Annot File Attachment");
ok = false;
}
- obj1 = dict->lookup("Name");
- if (obj1.isName()) {
- name = std::make_unique<GooString>(obj1.getName());
+ Object objName = dict->lookup("Name");
+ if (objName.isName()) {
+ name = std::make_unique<GooString>(objName.getName());
} else {
name = std::make_unique<GooString>("PushPin");
}
_______________________________________________
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic