diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp index 80d2d97c5..7e44ebe98 100644 --- a/gb.pdf/src/CPdfDocument.cpp +++ b/gb.pdf/src/CPdfDocument.cpp @@ -99,7 +99,7 @@ END_PROPERTY ****************************************************************************/ -static void return_unicode_string(Unicode *unicode, int len) +static void return_unicode_string(const Unicode *unicode, int len) { static UnicodeMap *uMap = NULL; @@ -128,7 +128,7 @@ static void aux_return_string_info(void *_object, const char *key) { Object obj; Object dst; - GooString *goo_value; + const GooString *goo_value; Dict *info_dict; char *tmpstr; @@ -170,7 +170,7 @@ static void aux_return_date_info(void *_object, const char *key) GB_DATE ret; Object obj; Object dst; - GooString *goo; + const GooString *goo; Dict *info_dict; char *datestr=NULL,*tofree=NULL; int nnum; @@ -221,7 +221,7 @@ static void aux_return_date_info(void *_object, const char *key) #endif } -static LinkDest *get_dest(LinkAction *act) +static const LinkDest *get_dest(LinkAction *act) { if (!act) return 0; @@ -237,9 +237,9 @@ static LinkDest *get_dest(LinkAction *act) static uint32_t aux_get_page_from_action(void *_object, LinkAction *act) { Ref pref; - LinkDest *dest = get_dest(act); + const LinkDest *dest = get_dest(act); #if POPPLER_VERSION_0_6 - GooString *name; + const GooString *name; #else UGooString *name; #endif @@ -272,7 +272,7 @@ static uint32_t aux_get_page_from_action(void *_object, LinkAction *act) static void aux_get_dimensions_from_action(LinkAction *act, CPDFRECT *rect) { - LinkDest *dest = get_dest(act); + const LinkDest *dest = get_dest(act); if (!dest) return; @@ -284,7 +284,7 @@ static void aux_get_dimensions_from_action(LinkAction *act, CPDFRECT *rect) static double aux_get_zoom_from_action(LinkAction *act) { - LinkDest *dest = get_dest(act); + const LinkDest *dest = get_dest(act); if (dest) return dest->getZoom(); else @@ -295,7 +295,7 @@ static char* aux_get_target_from_action(LinkAction *act) { char *vl=NULL; char *uni=NULL; - GooString *tmp=NULL; + const GooString *tmp=NULL; switch (act->getKind()) { @@ -480,7 +480,7 @@ int32_t open_document (void *_object, char *sfile, int32_t lfile) #endif outline=THIS->doc->getOutline(); - if (outline) THIS->index=outline->getItems(); + if (outline) THIS->index=(GooList*)outline->getItems(); //if (THIS->index) // if (!THIS->index->getLength()) THIS->index=NULL; @@ -715,7 +715,7 @@ BEGIN_PROPERTY(PDFDOCUMENT_index) if (!THIS->index) { GB.ReturnNull(); return; } - THIS->action=((OutlineItem*)THIS->index->get(THIS->currindex))->getAction(); + THIS->action=(LinkAction*)((OutlineItem*)THIS->index->get(THIS->currindex))->getAction(); RETURN_SELF(); END_PROPERTY @@ -764,7 +764,7 @@ BEGIN_METHOD_VOID(PDFINDEX_root) Outline *outline; outline=THIS->doc->getOutline(); - if (outline) THIS->index=outline->getItems(); + if (outline) THIS->index=(GooList*)outline->getItems(); THIS->currindex=0; if (THIS->pindex) { GB.FreeArray(POINTER(&THIS->pindex)); THIS->pindex=NULL; } if (THIS->oldindex) { GB.FreeArray(POINTER(&THIS->oldindex)); THIS->oldindex=NULL; } @@ -812,7 +812,7 @@ BEGIN_METHOD_VOID(PDFINDEX_child) if (!item->isOpen()) item->open(); THIS->pindex[GB.Count(POINTER(THIS->pindex))-1]=(void*)THIS->index; THIS->oldindex[GB.Count(POINTER(THIS->pindex))-1]=THIS->currindex; - THIS->index=item->getKids(); + THIS->index=(GooList*)item->getKids(); THIS->currindex=0; GB.ReturnBoolean(false);