]> www.fi.muni.cz Git - evince.git/blobdiff - backend/pdf/ev-poppler.cc
Bump requirements to poppler 0.5.9 and drop all ifdefs used.
[evince.git] / backend / pdf / ev-poppler.cc
index 715226add1a8e3592cd66f3aaf9a9843040e3c5f..a3549b248b55d949ce44909763c049bda84c2cd6 100644 (file)
@@ -190,6 +190,8 @@ pdf_document_dispose (GObject *object)
        if (pdf_document->fonts_iter) {
                poppler_fonts_iter_free (pdf_document->fonts_iter);
        }
+
+       G_OBJECT_CLASS (pdf_document_parent_class)->dispose (object);
 }
 
 static void
@@ -1133,7 +1135,6 @@ pdf_document_images_get_images (EvDocumentImages *document_images,
                                gint              page)
 {
        GList *retval = NULL;
-#ifdef HAVE_POPPLER_PAGE_GET_IMAGE_MAPPING
        PdfDocument *pdf_document;
        PopplerPage *poppler_page;
        GList *mapping_list;
@@ -1162,7 +1163,7 @@ pdf_document_images_get_images (EvDocumentImages *document_images,
 
        poppler_page_free_image_mapping (mapping_list);
        g_object_unref (poppler_page);
-#endif /* HAVE_POPPLER_PAGE_GET_IMAGE_MAPPING */
+
        return retval;
 }
 
@@ -1621,13 +1622,14 @@ pdf_selection_render_selection (EvSelection      *selection,
                                           TRUE, 8,
                                           width, height);
        }
-       
-       poppler_page_render_selection (POPPLER_PAGE (rc->data),
-                                      rc->scale, rc->rotation, *pixbuf,
-                                      (PopplerRectangle *)points,
-                                      (PopplerRectangle *)old_points,
-                                      text,
-                                      base);
+
+       poppler_page_render_selection_to_pixbuf (POPPLER_PAGE (rc->data),
+                                                rc->scale, rc->rotation, *pixbuf,
+                                                (PopplerRectangle *)points,
+                                                (PopplerRectangle *)old_points,
+                                                POPPLER_SELECTION_NORMAL, /* SelectionStyle */
+                                                text,
+                                                base);
 }
 
 
@@ -1683,7 +1685,6 @@ static gdouble
 pdf_document_get_page_duration (EvDocumentTransition *trans,
                                gint                  page)
 {
-#ifdef HAVE_POPPLER_PAGE_GET_DURATION  
        PdfDocument *pdf_document;
        PopplerPage *poppler_page;
        gdouble      duration = -1;
@@ -1697,9 +1698,6 @@ pdf_document_get_page_duration (EvDocumentTransition *trans,
        g_object_unref (poppler_page);
 
        return duration;
-#else
-       return -1;
-#endif /* HAVE_POPPLER_PAGE_GET_DURATION */
 }
 
 static void