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
This commit is contained in:
drochner 2009-04-06 09:29:27 +00:00
parent 0244c8b352
commit f67467a3a8
4 changed files with 50 additions and 2 deletions

View file

@ -1,8 +1,10 @@
# $NetBSD: Makefile,v 1.37 2009/03/19 12:12:24 drochner Exp $
# $NetBSD: Makefile,v 1.38 2009/04/06 09:29:27 drochner Exp $
#
.include "../../print/poppler/Makefile.common"
PKGREVISION= 1
COMMENT= PDF rendering library
MAINTAINER= reed@reedmedia.net

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.41 2009/03/19 12:12:24 drochner Exp $
$NetBSD: distinfo,v 1.42 2009/04/06 09:29:27 drochner Exp $
SHA1 (poppler-0.10.5.tar.gz) = 720b79adbeb6e7b722d3f0f61e165b9310fe61fc
RMD160 (poppler-0.10.5.tar.gz) = 73e2330c2c874fb58f95c39fcdb5421766b6742c
@ -9,6 +9,8 @@ SHA1 (patch-ag) = 0bf1bc080cad55792fe6cc761bf22ecccba7d13a
SHA1 (patch-ai) = 614a310e9dabbc52e47fb17b116e139ab8880995
SHA1 (patch-aj) = 8bb1fe169bddb76ecc72129cc1dbd32030073dfd
SHA1 (patch-ak) = ab4d0c91a6f2806b405954f8dab6e3d61a03b054
SHA1 (patch-al) = b1d76a92a5ffad01543f0072a1a00e74e751a56f
SHA1 (patch-am) = 2ee61c446ea85acde8c1ee798a0201901e565d55
SHA1 (patch-bc) = d2f51580ae122545a0f9139714d7a7ff94814698
SHA1 (patch-ca) = 5bd31c497c8cbfb6c1d6cb5b9183088113bef6e3
SHA1 (patch-cb) = e8cfb16a0641788759b13cf5fcf97d82f9485adc

View file

@ -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);
}
}

View file

@ -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);