[poppler] poppler/Annot.cc poppler/Annot.h
Inigo Martinez
inigomartinez at kemper.freedesktop.org
Sat Apr 12 15:48:43 PDT 2008
poppler/Annot.cc | 9 +++------
poppler/Annot.h | 5 +++--
2 files changed, 6 insertions(+), 8 deletions(-)
New commits:
commit ca52830e9519ae7b778f98e5c2547daef7da5f09
Author: Iñigo MartÃnez <inigomartinez at gmail.com>
Date: Sun Apr 13 00:54:13 2008 +0200
Added OptionalContent support to Annots.
Signed-off-by: Iñigo MartÃnez <inigomartinez at gmail.com>
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index bb71b13..641dc72 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -30,6 +30,7 @@
#include "Page.h"
#include "XRef.h"
#include "Movie.h"
+#include "OptionalContent.h"
#include <string.h>
#define annotFlagHidden 0x0002
@@ -876,17 +877,13 @@ void Annot::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) {
treeKey = 0;
}
obj1.free();
-
- /* TODO: optional content should be parsed */
- optionalContent = NULL;
- /*if (dict->lookup("OC", &obj1)->isDict()) {
- optionalContent = NULL;
+ if (dict->lookup("OC", &obj1)->isDict()) {
+ optionalContent = new OCGs(&obj1, xrefA);
} else {
optionalContent = NULL;
}
obj1.free();
- */
}
double Annot::getXMin() {
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 6ec3bfd..17c3c8f 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -23,6 +23,7 @@ class Form;
class FormWidget;
class PDFRectangle;
class Movie;
+class OCGs;
enum AnnotLineEndingStyle {
annotLineEndingSquare, // Square
@@ -482,7 +483,7 @@ public:
AnnotBorder *getBorder() const { return border; }
AnnotColor *getColor() const { return color; }
int getTreeKey() const { return treeKey; }
- Dict *getOptionalContent() const { return optionalContent; }
+ OCGs *getOptionalContent() const { return optionalContent; }
int getId() { return ref.num; }
@@ -515,7 +516,7 @@ protected:
// for the normal appearance
GooString *appearState; // AS
int treeKey; // Struct Parent;
- Dict *optionalContent; // OC
+ OCGs *optionalContent; // OC
XRef *xref; // the xref table for this PDF file
Ref ref; // object ref identifying this annotation
More information about the poppler
mailing list