[poppler] Form-Reset and Print [patches]

Carlos Garcia Campos carlosgc at gnome.org
Sat Jun 26 01:08:55 PDT 2010


Excerpts from Guillermo Amaral's message of sáb jun 26 06:23:59 +0200 2010:
> 
>   Ok guys,
> 
>   Let's see if I cought all the details ;-)
> 
>   Check it out
> 
> diff --git a/poppler/Link.cc b/poppler/Link.cc
> index b6d7f2d..d2079ea 100644
> --- a/poppler/Link.cc
> +++ b/poppler/Link.cc
>  //------------------------------------------------------------------------
> +// LinkResetForm
> +//------------------------------------------------------------------------
> +
> +LinkResetForm::LinkResetForm(Object *obj) {
> +  Object obj1;
> +
> +  fieldList = new GooList();
> +  flags = 0;
> +
> +  if (obj->dictLookup("Fields", &obj1)->isArray()) {
> +    for (int i = 0; i < obj1.arrayGetLength(); ++i) {
> +      Object obj2;
> +
> +      if (obj1.arrayGetNF(i, &obj2)->isString()) {
> +        fieldList->append(obj2.getString()->copy());
> +      } else {
> +        obj2.free();
> +
> +        if (obj1.arrayGet(i, &obj2)->isDict()) {
> +          Object obj3;
> +
> +          if (obj2.dictLookup("T", &obj3)->isString())
> +            fieldList->append(obj3.getString()->copy());

This is not equivalent, in case of being a text string it represents
the fully qualified name of a field, but T entry in the field
dictionary is the partial filed Name, and it's optional, when it's not
present we are loosing the field. The fully qualified name is not
stored directly in the field dictionary, it should be built using
partial names of fields in the hierarchy.

I think we could just store the objects without parsing them, and let
the frontends handle it. 

Regards, 
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100626/b613e741/attachment.pgp>


More information about the poppler mailing list