summaryrefslogtreecommitdiff
path: root/xpdf/XPDFCore.cc
diff options
context:
space:
mode:
Diffstat (limited to 'xpdf/XPDFCore.cc')
-rw-r--r--xpdf/XPDFCore.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/xpdf/XPDFCore.cc b/xpdf/XPDFCore.cc
index b98bc37..9a3725f 100644
--- a/xpdf/XPDFCore.cc
+++ b/xpdf/XPDFCore.cc
@@ -493,7 +493,7 @@ void XPDFCore::doAction(LinkAction *action) {
}
s = ((LinkGoToR *)action)->getFileName()->getCString();
//~ translate path name for VMS (deal with '/')
- if (isAbsolutePath(s)) {
+ if (isAbsolutePath(s) || !doc->getFileName()) {
fileName = new GString(s);
} else {
fileName = appendToPath(grabPath(doc->getFileName()->getCString()), s);
@@ -531,7 +531,7 @@ void XPDFCore::doAction(LinkAction *action) {
if (!strcmp(s + fileName->getLength() - 4, ".pdf") ||
!strcmp(s + fileName->getLength() - 4, ".PDF")) {
//~ translate path name for VMS (deal with '/')
- if (isAbsolutePath(s)) {
+ if (isAbsolutePath(s) || !doc->getFileName()) {
fileName = fileName->copy();
} else {
fileName = appendToPath(grabPath(doc->getFileName()->getCString()), s);
@@ -640,7 +640,8 @@ void XPDFCore::doAction(LinkAction *action) {
if (movieAnnot.dictLookup("Movie", &obj1)->isDict()) {
if (obj1.dictLookup("F", &obj2)) {
if ((fileName = LinkAction::getFileSpecName(&obj2))) {
- if (!isAbsolutePath(fileName->getCString())) {
+ if (!isAbsolutePath(fileName->getCString()) &&
+ doc->getFileName()) {
fileName2 = appendToPath(
grabPath(doc->getFileName()->getCString()),
fileName->getCString());
@@ -658,6 +659,13 @@ void XPDFCore::doAction(LinkAction *action) {
movieAnnot.free();
break;
+ // unsupported action types
+ case actionJavaScript:
+ case actionSubmitForm:
+ case actionHide:
+ error(errSyntaxError, -1, "Unsupported link action type");
+ break;
+
// unknown action type
case actionUnknown:
error(errSyntaxError, -1, "Unknown link action type: '{0:t}'",
@@ -1124,6 +1132,9 @@ void XPDFCore::inputCbk(Widget widget, XtPointer ptr, XtPointer callData) {
case actionMovie:
s = "[movie]";
break;
+ case actionJavaScript:
+ case actionSubmitForm:
+ case actionHide:
case actionUnknown:
s = "[unknown link]";
break;
@@ -1356,6 +1367,8 @@ void XPDFCore::redrawRect(PDFCoreTile *tileA, int xSrc, int ySrc,
XFillRectangle(display, drawAreaWin, drawAreaGC,
xDest, yDest, width, height);
}
+
+ XFlush(display);
}
void XPDFCore::updateScrollbars() {