diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2015-10-12 11:35:56 -0700 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2015-10-14 08:02:10 -0700 |
commit | 74dac977aedf60e1fdd0ce4165828cf24c52c1d7 (patch) | |
tree | 8b91f4bc182baf79de51fc83bcbfc304068d52f1 /platform/ios | |
parent | a4e5c65145e5cbf2b89fd77e93acbc208b8a43a1 (diff) | |
download | mupdf-74dac977aedf60e1fdd0ce4165828cf24c52c1d7.tar.xz |
Add proper support for when a combobox widget has options that are 2-element arrays
The list box and combo box can have values that are 2-element arrays. The first element
is the "export" value and the second element is the value that should be shown
in the list box UI. This fix ensures that we get the proper value to show in the UI.
Also, it adds the option to get the export values. These are needed if you wish to
update the field dictionary's V (value) entry, which is the currently selected values(s).
This fix works well with gsview. The other viewers will now display the proper content
in their UI, (unlike before this fix) but may need a bit more work to ensure that the
proper V (value) is updated with changes in the selections. In addition, we add
selection rectangles to the selected list box items.
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/Classes/MuPageViewNormal.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/Classes/MuPageViewNormal.m b/platform/ios/Classes/MuPageViewNormal.m index 671702fe..429785fe 100644 --- a/platform/ios/Classes/MuPageViewNormal.m +++ b/platform/ios/Classes/MuPageViewNormal.m @@ -1301,9 +1301,9 @@ static void updatePixmap(fz_document *doc, fz_display_list *page_list, fz_displa case PDF_WIDGET_TYPE_LISTBOX: case PDF_WIDGET_TYPE_COMBOBOX: { - int nopts = pdf_choice_widget_options(ctx, idoc, focus, NULL); + int nopts = pdf_choice_widget_options(ctx, idoc, focus, 0, NULL); opts = fz_malloc(ctx, nopts * sizeof(*opts)); - (void)pdf_choice_widget_options(ctx, idoc, focus, opts); + (void)pdf_choice_widget_options(ctx, idoc, focus, 0, opts); NSMutableArray *arr = [[NSMutableArray arrayWithCapacity:nopts] retain]; for (int i = 0; i < nopts; i++) { |