Commit 54892b13 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

[annots] Save the action already parsed in AnnotScreen

parent 5a84a2d7
......@@ -59,6 +59,7 @@
#include "Sound.h"
#include "FileSpec.h"
#include "DateInfo.h"
#include "Link.h"
#include <string.h>
#define fieldFlagReadOnly 0x00000001
......@@ -4214,8 +4215,9 @@ AnnotScreen::~AnnotScreen() {
delete title;
if (appearCharacs)
delete appearCharacs;
if (action)
delete action;
action.free();
additionAction.free();
}
......@@ -4228,7 +4230,10 @@ void AnnotScreen::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) {
}
obj1.free();
dict->lookup("A", &action);
action = NULL;
if (dict->lookup("A", &obj1)->isDict()) {
action = LinkAction::parseAction(&obj1, catalog->getBaseURI());
}
dict->lookup("AA", &additionAction);
......
......@@ -45,6 +45,7 @@ class Form;
class FormWidget;
class PDFRectangle;
class Movie;
class LinkAction;
class OCGs;
class Sound;
......@@ -730,7 +731,7 @@ class AnnotScreen: public Annot {
GooString* getTitle() { return title; }
AnnotAppearanceCharacs *getAppearCharacs() { return appearCharacs; }
Object* getAction() { return &action; }
LinkAction* getAction() { return action; }
Object* getAdditionActions() { return &additionAction; }
private:
......@@ -741,7 +742,7 @@ class AnnotScreen: public Annot {
AnnotAppearanceCharacs* appearCharacs; // MK
Object action; // A
LinkAction *action; // A
Object additionAction; // AA
};
......
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