[poppler] Branch 'poppler-0.10' - 2 commits - glib/poppler-action.cc poppler/FileSpec.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sat Feb 21 08:53:07 PST 2009
glib/poppler-action.cc | 3 +--
poppler/FileSpec.cc | 14 +++++++-------
2 files changed, 8 insertions(+), 9 deletions(-)
New commits:
commit c64e848b71be7efe30070fbaae08e78a6e133a34
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 080eb27..ed45efe 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -321,8 +321,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 468147014568d7b97db8d159b6a389833e95165e
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