[poppler] Form Reset Patches
Albert Astals Cid
aacid at kde.org
Sun Aug 28 13:18:45 PDT 2011
A Diumenge, 28 d'agost de 2011, vàreu escriure:
> Excerpts from Albert Astals Cid's message of jue ago 25 02:12:07 +0200 2011:
> > More than a year ago Guillermo Amaral posted some patches for enabling
> > form reset, i've reworked them to the final requirements Carlos and I
> > gave.
> >
> > I've integrated them + a Okular patch and it "works for me" but I'd like
> > a review before commiting to master.
>
> How do you reset the forms in okular? Reset action affects the
> document, not only the view.
>
> "Upon invocation of a reset-form action, a conforming processor shall
> reset selected interactive form fields to their default values; that
> is, it shall set the value of the V entry in the field dictionary to
> that of the DV entry (see Table 220). If no default value is defined
> for a field, its V entry shall be removed"
We do it wrongly :D
> So, I guess we should add FormField::reset() method to do that.
Yep
>
> > But as the feature freeze triggers in 4 days you have that time to
> > review :D
> >
> > In the core there is a new LinkResetForm that is LinkAction and has the
> > flags and the field list
>
> Even though there's only one flag I think we should expose it as an
> enum in the core too, or as a boolean, but if more flags are added in
> future versions of pdf using a boolean might be a problem.
Personally i do not like using a boolean, i can add a enum if you want but it
is pretty difficult to name given how the flag behaves, i can name it
IncludeExcludeFlag that is something similar as what the spec uses (too lazy
to open it)
>
> > In the qt4 frontend there is the mirror public structure but the field
> > list is a list of fully qualified names instead of a list of field *
>
> I think frontends should do the opposite, I mean, return a list of
> Field objects, so that viewers can simply call reset method on every
> form field when reset action is triggered.
That is architecturally hard in the Qt4 frontend and gives not advantage to
how the code works with the current patch, so no, i'm not going to change
that.
Albert
>
> > Albert
>
> Regards,
> --
> Carlos Garcia Campos
> PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
More information about the poppler
mailing list