X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2FSWFOutputDev.cc;h=251cd04a676d4af960138e2ed66dfe2a84e28744;hb=1bc632448cd804201098dc4f70700a813d5f6795;hp=fc295eb3c32b6e9f7408a5b7118fa6ed2fd4bdcf;hpb=2732d70502f6158be2ad81fce2f9899755b645bc;p=swftools.git diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index fc295eb..251cd04 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -22,7 +22,9 @@ #include #include #include +#include "../config.h" //xpdf header files +#include "config.h" #include "gfile.h" #include "GString.h" #include "gmem.h" @@ -35,7 +37,6 @@ #include "Page.h" #include "PDFDoc.h" #include "Error.h" -#include "config.h" #include "OutputDev.h" #include "GfxState.h" #include "GfxFont.h" @@ -743,24 +744,27 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) LinkNamed*l = (LinkNamed*)action; GString*name = l->getName(); if(name) { - s = name->lowerCase()->getCString(); - named = name->getCString(); - if(strstr(s, "next") || strstr(s, "forward")) - { - page = currentpage + 1; - } - else if(strstr(s, "prev") || strstr(s, "back")) - { - page = currentpage - 1; - } - else if(strstr(s, "last") || strstr(s, "end")) - { - page = pages[pagepos-1]; //:) - } - else if(strstr(s, "first") || strstr(s, "top")) - { - page = 1; - } + s = name->lowerCase()->getCString(); + named = name->getCString(); + if(!strchr(s,':')) + { + if(strstr(s, "next") || strstr(s, "forward")) + { + page = currentpage + 1; + } + else if(strstr(s, "prev") || strstr(s, "back")) + { + page = currentpage - 1; + } + else if(strstr(s, "last") || strstr(s, "end")) + { + page = pages[pagepos-1]; //:) + } + else if(strstr(s, "first") || strstr(s, "top")) + { + page = 1; + } + } } } break; @@ -1773,6 +1777,11 @@ void pdfswf_insertstop() insertstoptag = 1; } +void pdfswf_setversion(int n) +{ + flashversion = n; +} + int closed=0; void pdfswf_close() {