[poppler] [qt4] Question on the use of the FormFieldChoice class

Albert Astals Cid aacid at kde.org
Wed Oct 17 13:50:46 PDT 2012


El Dimecres, 17 d'octubre de 2012, a les 20:45:05, Fabio D'Urso va escriure:
> On Wednesday, October 17, 2012 08:51:37 AM Adam Reichold wrote:
> > Just noticed something odd: When I save a modified copy of a PDF file
> > with a custom text entered into a combo box form field and reload it,
> > the new file still shows the custom text but
> > FormWidgetChoice::getEditChoice returns a null string...
> > 
> > Could this be a problem with the parsing in FormFieldChoice?
> 
> Seems like it's not been implemented.
> 
> In FormFieldChoice::FormFieldChoice (poppler/Form.cc), editedChoice is
> initially assigned NULL and never changed.
> I think it should be given the value in /V if /V is a string and doesn't
> match any of the predefined choices. Note that the piece of code that
> parses /V is one of the things that I'm working on (thread: "Patches for
> form choice fields").
> 
> By the way, I noticed that FormFieldChoice::setEditChoice internally calls
> unselectAll to deselect predefined options. Maybe select/selectAll/etc..
> should similarly set editedChoice to NULL?

Sounds correct.

Cheers,
  Albert

> 
> Fabio
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list