summaryrefslogtreecommitdiff
path: root/pdf/pdf_annot.c
diff options
context:
space:
mode:
authorPaul Gardiner <paul@glidos.net>2012-07-09 11:08:32 +0100
committerPaul Gardiner <paul@glidos.net>2012-07-09 11:08:32 +0100
commitef952db0446b755acf81ee3a0349cecd3246f241 (patch)
tree3c3767548ea197643c14d60fb8b47fbce259a3bc /pdf/pdf_annot.c
parenteeaccf8444a4884801a92c0d23f66bd54c986a67 (diff)
downloadmupdf-ef952db0446b755acf81ee3a0349cecd3246f241.tar.xz
Forms: add widget enumeration, and text-widget content type
Now reusing the internal representation of an annotation for widgets to avoid two separate lists
Diffstat (limited to 'pdf/pdf_annot.c')
-rw-r--r--pdf/pdf_annot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c
index 02f91e33..dc31498c 100644
--- a/pdf/pdf_annot.c
+++ b/pdf/pdf_annot.c
@@ -399,6 +399,7 @@ pdf_load_annots(pdf_document *xref, pdf_obj *annots, fz_matrix page_ctm)
annot->rect = pdf_to_rect(ctx, rect);
annot->pagerect = fz_transform_rect(page_ctm, annot->rect);
annot->ap = NULL;
+ annot->type = pdf_field_getType(xref, obj);
if (pdf_is_stream(xref, pdf_to_num(n), pdf_to_gen(n)))
{
@@ -415,6 +416,9 @@ pdf_load_annots(pdf_document *xref, pdf_obj *annots, fz_matrix page_ctm)
annot->next = NULL;
+ if (obj == xref->focus_obj)
+ xref->focus = annot;
+
if (!head)
head = tail = annot;
else