X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fpdf%2Fev-poppler.cc;h=fa669fa170cc30dd48e072267ed1dcc227de0cd3;hb=2c027febd41098f2b2157d30210cc386fbbfdef8;hp=1fa235431dd7f05c92c07b7b416f6f5fddb75438;hpb=b3e9c25c9bdbe47af1b79ab109c71382d6aa0e6d;p=evince.git diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 1fa23543..fa669fa1 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -19,10 +19,6 @@ #include "config.h" -#ifdef HAVE_POPPLER_FORM_FIELD_BUTTON_GET_BUTTON_TYPE -#define HAVE_FORMS -#endif - #include #include #include @@ -127,7 +123,6 @@ static EvLink *ev_link_from_action (PdfDocument *pdf_document, static void pdf_document_search_free (PdfDocumentSearch *search); static void pdf_print_context_free (PdfPrintContext *ctx); -#ifdef HAVE_FORMS G_DEFINE_TYPE_WITH_CODE (PdfDocument, pdf_document, G_TYPE_OBJECT, { G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT, @@ -153,31 +148,6 @@ G_DEFINE_TYPE_WITH_CODE (PdfDocument, pdf_document, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_TRANSITION, pdf_document_page_transition_iface_init); }); -#else /* !HAVE_FORMS */ -G_DEFINE_TYPE_WITH_CODE (PdfDocument, pdf_document, G_TYPE_OBJECT, - { - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT, - pdf_document_document_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_SECURITY, - pdf_document_security_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS, - pdf_document_document_thumbnails_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_LINKS, - pdf_document_document_links_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_IMAGES, - pdf_document_document_images_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FONTS, - pdf_document_document_fonts_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FIND, - pdf_document_find_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER, - pdf_document_file_exporter_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_SELECTION, - pdf_selection_iface_init); - G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_TRANSITION, - pdf_document_page_transition_iface_init); - }); -#endif /* HAVE_FORMS */ static void set_rc_data (PdfDocument *pdf_document, @@ -1871,9 +1841,7 @@ pdf_selection_get_selected_text (EvSelection *selection, r.y2 = height - points->y1; retval = poppler_page_get_text (poppler_page, -#if 0 (PopplerSelectionStyle)style, -#endif &r); g_object_unref (poppler_page); @@ -1896,9 +1864,7 @@ pdf_selection_get_selection_region (EvSelection *selection, retval = poppler_page_get_selection_region ((PopplerPage *)rc->data, rc->scale, -#if 0 (PopplerSelectionStyle)style, -#endif (PopplerRectangle *) points); return retval; } @@ -1920,9 +1886,7 @@ pdf_selection_get_selection_map (EvSelection *selection, points.y1 = 0.0; poppler_page_get_size (poppler_page, &(points.x2), &(points.y2)); retval = poppler_page_get_selection_region (poppler_page, 1.0, -#if 0 POPPLER_SELECTION_GLYPH, -#endif &points); g_object_unref (poppler_page); @@ -1989,7 +1953,6 @@ pdf_document_get_crop_box (EvDocument *document, rect->y2 = poppler_rect.y2; } -#ifdef HAVE_FORMS static EvFormField * ev_form_field_from_poppler_field (PopplerFormField *poppler_field) { @@ -2026,10 +1989,7 @@ ev_form_field_from_poppler_field (PopplerFormField *poppler_field) field_text->do_scroll = poppler_form_field_text_do_scroll (poppler_field); field_text->is_rich_text = poppler_form_field_text_is_rich_text (poppler_field); field_text->is_password = poppler_form_field_text_is_password (poppler_field); - -#ifdef HAVE_POPPLER_FORM_FIELD_TEXT_GET_MAX_LEN field_text->max_len = poppler_form_field_text_get_max_len (poppler_field); -#endif field_text->text = poppler_form_field_text_get_text (poppler_field); } @@ -2358,4 +2318,4 @@ pdf_document_document_forms_iface_init (EvDocumentFormsIface *iface) iface->form_field_choice_set_text = pdf_document_forms_form_field_choice_set_text; iface->form_field_choice_get_text = pdf_document_forms_form_field_choice_get_text; } -#endif /* HAVE_FORMS */ +