diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-06-27 18:24:07 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-27 20:05:18 +0100 |
commit | 9df3a0615a1fa7745160c099e1ac7cd4dfcbc86e (patch) | |
tree | 3aac206ddce6e4c50229c9e4e79e3429118035aa /source/pdf/pdf-form.c | |
parent | 260e54a956c54058051ce6ff31b36ad0ae1b60aa (diff) | |
download | mupdf-9df3a0615a1fa7745160c099e1ac7cd4dfcbc86e.tar.xz |
Move to using a flags bit rather than "Dirty" dict entries.
Correct the naming scheme for pdf_obj_xxx functions.
Diffstat (limited to 'source/pdf/pdf-form.c')
-rw-r--r-- | source/pdf/pdf-form.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c index 21c27ea7..0e30f1a6 100644 --- a/source/pdf/pdf-form.c +++ b/source/pdf/pdf-form.c @@ -180,21 +180,9 @@ static void pdf_field_mark_dirty(pdf_document *doc, pdf_obj *field) for (i = 0; i < n; i++) pdf_field_mark_dirty(doc, pdf_array_get(kids, i)); } - else if (!pdf_dict_gets(field, "Dirty")) + else { - pdf_obj *nullobj = pdf_new_null(doc); - fz_try(ctx) - { - pdf_dict_puts(field, "Dirty", nullobj); - } - fz_always(ctx) - { - pdf_drop_obj(nullobj); - } - fz_catch(ctx) - { - fz_rethrow(ctx); - } + pdf_dirty_obj(field); } } @@ -1762,7 +1750,7 @@ static void update_text_markup_appearance(pdf_document *doc, pdf_annot *annot, f void pdf_update_appearance(pdf_document *doc, pdf_annot *annot) { pdf_obj *obj = annot->obj; - if (!pdf_dict_gets(obj, "AP") || pdf_dict_gets(obj, "Dirty")) + if (!pdf_dict_gets(obj, "AP") || pdf_obj_is_dirty(obj)) { fz_annot_type type = pdf_annot_obj_type(obj); switch (type) @@ -1815,7 +1803,7 @@ void pdf_update_appearance(pdf_document *doc, pdf_annot *annot) break; } - pdf_dict_dels(obj, "Dirty"); + pdf_clean_obj(obj); } } |