# HG changeset patch # User Thomas Liebetraut # Date 1396197130 -7200 # Sun Mar 30 18:32:10 2014 +0200 # Node ID e1e87caa7cdc9874015d635e28eed02975830a35 # Parent 15b1715682fd6d48ea723619431834214e67701d Add support for POPPLER_ANNOT_STRIKE_OUT https://bugzilla.gnome.org/show_bug.cgi?id=583377 diff -r 15b1715682fd -r e1e87caa7cdc backend/pdf/ev-poppler.cc --- a/backend/pdf/ev-poppler.cc Sun Mar 30 18:14:40 2014 +0200 +++ b/backend/pdf/ev-poppler.cc Sun Mar 30 18:32:10 2014 +0200 @@ -2876,6 +2876,10 @@ ev_annot = ev_annotation_text_markup_highlight_new (page); } break; + case POPPLER_ANNOT_STRIKE_OUT: { + ev_annot = ev_annotation_text_markup_strikeout_new (page); + } + break; case POPPLER_ANNOT_LINK: case POPPLER_ANNOT_WIDGET: /* Ignore link and widgets annots since they are already handled */ @@ -2889,7 +2893,6 @@ case POPPLER_ANNOT_SQUARE: case POPPLER_ANNOT_SQUIGGLY: case POPPLER_ANNOT_STAMP: - case POPPLER_ANNOT_STRIKE_OUT: case POPPLER_ANNOT_UNDERLINE: { /* FIXME: These annotations are unimplemented, but they were already * reported in Evince Bugzilla with test case. We add a special diff -r 15b1715682fd -r e1e87caa7cdc libdocument/ev-annotation.c --- a/libdocument/ev-annotation.c Sun Mar 30 18:14:40 2014 +0200 +++ b/libdocument/ev-annotation.c Sun Mar 30 18:32:10 2014 +0200 @@ -1563,3 +1563,14 @@ return annot; } +EvAnnotation * +ev_annotation_text_markup_strikeout_new (EvPage *page) +{ + EvAnnotation *annot = EV_ANNOTATION(g_object_new (EV_TYPE_ANNOTATION_TEXT_MARKUP, + "page", page, + NULL)); + if (annot) { + annot->type = EV_ANNOTATION_TYPE_STRIKEOUT; + } + return annot; +} diff -r 15b1715682fd -r e1e87caa7cdc libdocument/ev-annotation.h --- a/libdocument/ev-annotation.h Sun Mar 30 18:14:40 2014 +0200 +++ b/libdocument/ev-annotation.h Sun Mar 30 18:32:10 2014 +0200 @@ -113,7 +113,8 @@ EV_ANNOTATION_TYPE_UNKNOWN, EV_ANNOTATION_TYPE_TEXT, EV_ANNOTATION_TYPE_ATTACHMENT, - EV_ANNOTATION_TYPE_HIGHLIGHT + EV_ANNOTATION_TYPE_HIGHLIGHT, + EV_ANNOTATION_TYPE_STRIKEOUT } EvAnnotationType; typedef enum { @@ -207,6 +208,7 @@ gboolean ev_annotation_text_markup_set_quadrilaterals (EvAnnotationTextMarkup *annot, GArray *arr); EvAnnotation *ev_annotation_text_markup_highlight_new (EvPage *page); +EvAnnotation *ev_annotation_text_markup_strikeout_new (EvPage *page); G_END_DECLS