[poppler] Form-Reset and Print [patches]

Albert Astals Cid aacid at kde.org
Sun Jun 27 08:42:41 PDT 2010


A Dissabte, 26 de juny de 2010, vàreu escriure:
> 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.

I´m not sure i agree here, the more things we have in the core the better, 
what do we win with each frontend doing the job instead of the core doing it?

Albert

> 
> Regards,


More information about the poppler mailing list