From: kramm Date: Fri, 6 Jan 2006 20:39:53 +0000 (+0000) Subject: fixed treatment of "launch" links without params X-Git-Tag: release-0-8-0~262 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=d1d0f643486c9c6901a9146e6cfa10f8558378a2 fixed treatment of "launch" links without params --- diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 871dbac..6bb12bb 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -1461,10 +1461,11 @@ void SWFOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, doubl void SWFOutputDev::drawLink(Link *link, Catalog *catalog) { - msg(" drawlink\n"); double x1, y1, x2, y2, w; gfxline_t points[5]; int x, y; + + msg(" drawlink\n"); link->getRect(&x1, &y1, &x2, &y2); cvtUserToDev(x1, y1, &x, &y); @@ -1562,7 +1563,9 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) type = "Launch"; LinkLaunch*l = (LinkLaunch*)action; GString * str = new GString(l->getFileName()); - str->append(l->getParams()); + GString * params = l->getParams(); + if(params) + str->append(params); s = strdup(str->getCString()); delete str; } @@ -1588,6 +1591,7 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) break; } } + if(!s) s = strdup("-?-"); if(!linkinfo && (page || url))