[poppler] 2 commits - glib/poppler-action.cc poppler/FileSpec.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sat Feb 21 08:48:15 PST 2009
glib/poppler-action.cc | 3 +--
poppler/FileSpec.cc | 14 +++++++-------
2 files changed, 8 insertions(+), 9 deletions(-)
New commits:
commit 3ea5f45ad3e5a55e577a2e45f61b55932ed17013
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sat Feb 21 17:46:30 2009 +0100
[glib] Make sure filename is valid utf-8 for remote dests
diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index f23b343..24e1651 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -299,8 +299,7 @@ build_goto_remote (PopplerAction *action,
return;
}
- if (link->getFileName()->getCString ())
- action->goto_remote.file_name = g_strdup (link->getFileName()->getCString ());
+ action->goto_remote.file_name = _poppler_goo_string_to_utf8 (link->getFileName());
link_dest = link->getDest ();
named_dest = link->getNamedDest ();
commit b5989e4ffece6c1831610ee163d05fd80386a001
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sat Feb 21 17:45:18 2009 +0100
Use the UF entry when present in Filespec dictionary
diff --git a/poppler/FileSpec.cc b/poppler/FileSpec.cc
index 7ef759e..07a5ed8 100644
--- a/poppler/FileSpec.cc
+++ b/poppler/FileSpec.cc
@@ -75,13 +75,13 @@ GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName)
if (!fileSpec->dictLookup("Unix", &obj1)->isString()) {
#endif
obj1.free();
- fileSpec->dictLookup("F", &obj1);
- }
-
- if (obj1.isString()) {
- name = obj1.getString()->copy();
- } else {
- error(-1, "Illegal file spec in link");
+ if (fileSpec->dictLookup("UF", &obj1)->isString ()) {
+ name = obj1.getString()->copy();
+ } else if (fileSpec->dictLookup("F", &obj1)->isString ()) {
+ name = obj1.getString()->copy();
+ } else {
+ error(-1, "Illegal file spec in link");
+ }
}
obj1.free();
More information about the poppler
mailing list