diff options
author | drochner <drochner@pkgsrc.org> | 2009-04-06 09:29:27 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2009-04-06 09:29:27 +0000 |
commit | f67467a3a86dff1dcacafcddac5d85907b2d62bc (patch) | |
tree | 5b60ec97d58205dbda124d2ad68cd121e2609368 /print/poppler/patches | |
parent | 0244c8b352286a2ce3b9e358060fc3f1e5857369 (diff) | |
download | pkgsrc-f67467a3a86dff1dcacafcddac5d85907b2d62bc.tar.gz |
fix some problems with interactive forms:
-if a choice field defines both an "export value" and a "name", use the
latter as "value" if selected (according to the PDF spec) -- makes
that I can fill in my company's travel expenses form correctly
(there is still an issue with captions of check boxes / radio
buttons which looks like a font problem)
-where iconv() is called to fill in a text field, use "UTF-8" and
"UTF-16BE" as encoding names rather than the less portable
"UTF8" and "UTF16BE" -- this makes it work on NetBSD
bump PKGREVISION
Diffstat (limited to 'print/poppler/patches')
-rw-r--r-- | print/poppler/patches/patch-al | 22 | ||||
-rw-r--r-- | print/poppler/patches/patch-am | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/print/poppler/patches/patch-al b/print/poppler/patches/patch-al new file mode 100644 index 00000000000..ecfea3969a6 --- /dev/null +++ b/print/poppler/patches/patch-al @@ -0,0 +1,22 @@ +$NetBSD: patch-al,v 1.3 2009/04/06 09:29:27 drochner Exp $ + +--- poppler/Form.cc.orig 2009-01-28 22:56:21.000000000 +0100 ++++ poppler/Form.cc +@@ -546,7 +546,7 @@ void FormWidgetChoice::_updateV () + } else if (numSelected == 1) { + for(int i=0; i<parent->getNumChoices(); i++) { + if (parent->isSelected(i)) { +- obj1.initString(new GooString(parent->getExportVal(i))); ++ obj1.initString(new GooString(parent->getChoice(i))); + break; + } + } +@@ -555,7 +555,7 @@ void FormWidgetChoice::_updateV () + for(int i=0; i<parent->getNumChoices(); i++) { + if (parent->isSelected(i)) { + Object obj2; +- obj2.initString(new GooString(parent->getExportVal(i))); ++ obj2.initString(new GooString(parent->getChoice(i))); + obj1.arrayAdd(&obj2); + } + } diff --git a/print/poppler/patches/patch-am b/print/poppler/patches/patch-am new file mode 100644 index 00000000000..8ed0c2a0f2a --- /dev/null +++ b/print/poppler/patches/patch-am @@ -0,0 +1,22 @@ +$NetBSD: patch-am,v 1.1 2009/04/06 09:29:27 drochner Exp $ + +--- glib/poppler-form-field.cc.orig 2008-10-09 22:30:34.000000000 +0200 ++++ glib/poppler-form-field.cc +@@ -279,7 +279,7 @@ poppler_form_field_text_set_text (Popple + + g_return_if_fail (field->widget->getType () == formText); + +- tmp = text ? g_convert (text, -1, "UTF16BE", "UTF8", NULL, &length, NULL) : NULL; ++ tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL; + goo_tmp = new GooString (tmp, length); + g_free (tmp); + static_cast<FormWidgetText*>(field->widget)->setContent (goo_tmp); +@@ -552,7 +552,7 @@ poppler_form_field_choice_set_text (Popp + + g_return_if_fail (field->widget->getType () == formChoice); + +- tmp = text ? g_convert (text, -1, "UTF16BE", "UTF8", NULL, &length, NULL) : NULL; ++ tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL; + goo_tmp = new GooString (tmp, length); + g_free (tmp); + static_cast<FormWidgetChoice*>(field->widget)->setEditChoice (goo_tmp); |