Commit 0af54643 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

Save parent reference of popup annotations

parent fc4bc43d
......@@ -1306,22 +1306,16 @@ AnnotPopup::AnnotPopup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) :
}
AnnotPopup::~AnnotPopup() {
/*
if (parent)
delete parent;
*/
parent.free();
}
void AnnotPopup::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) {
Object obj1;
/*
if (dict->lookup("Parent", &obj1)->isDict()) {
parent = NULL;
} else {
parent = NULL;
if (!dict->lookupNF("Parent", &parent)->isRef()) {
parent.initNull();
}
obj1.free();
*/
if (dict->lookup("Open", &obj1)->isBool()) {
open = obj1.getBool();
} else {
......
......@@ -585,13 +585,13 @@ public:
AnnotPopup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj);
~AnnotPopup();
Dict *getParent() const { return parent; }
Object *getParent(Object *obj) { return parent.fetch (xref, obj); }
GBool getOpen() const { return open; }
protected:
void initialize(XRef *xrefA, Dict *dict, Catalog *catalog);
Dict *parent; // Parent
Object parent; // Parent
GBool open; // Open
};
......
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