[Poppler-bugs] [Bug 64821] [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 5 00:07:56 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=64821

--- Comment #26 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 86684
  --> https://bugs.freedesktop.org/attachment.cgi?id=86684
[PATCH v8 11/15] glib: Expose inline attributes of structure elements

Review of attachment 86684:
-----------------------------------------------------------------

::: glib/poppler-structure-element.cc
@@ +784,5 @@
> +  GList *glist;
> +  char buf[8];
> +  Guint flags;
> +  Guint color;
> +};

I think this implementation could go to the core so that other frontends could
use it. Using the goo types (or C++ ones) instead of glib ones. Frontends would
only need to iterate a list to build their own list.

@@ +796,5 @@
> + * structures. Each item in the list is a piece of text which share the same
> + * attributes, plus its attributes.
> + *
> + * Return value: (transfer none) (element-type PopplerTextSpan): A #GList
> + *    of #PopplerTextSpan structures.

Since: 0.26

@@ +798,5 @@
> + *
> + * Return value: (transfer none) (element-type PopplerTextSpan): A #GList
> + *    of #PopplerTextSpan structures.
> + */
> +GList*

GList* -> GList *. If we get a list from the core and we know its size
beforehand, maybe we could return an array instead of a GList.

@@ +819,5 @@
> +
> +/**
> + * poppler_text_span_is_fixed_width:
> + * @poppler_text_span: a #PopplerTextSpan
> + */

This is missing a bried description, Return value and Since tags.

@@ +829,5 @@
> +
> +/**
> + * poppler_text_span_is_serif_font:
> + * @poppler_text_span: a #PopplerTextSpan
> + */

Ditto.

@@ +837,5 @@
> +  return (poppler_text_span->flags & POPPLER_TEXT_SPAN_SERIF_FONT);
> +}
> +
> +/**
> + * poppler_text_span_is_bols:

bols ->bold

@@ +839,5 @@
> +
> +/**
> + * poppler_text_span_is_bols:
> + * @poppler_text_span: a #PopplerTextSpan
> + */

Ditto.

@@ +849,5 @@
> +
> +/**
> + * poppler_text_span_is_link:
> + * @poppler_text_span: a #PopplerTextSpan
> + */

Ditto.

::: glib/poppler-structure-element.h
@@ +87,5 @@
> +  gchar *text;
> +  gchar *font_name;
> +  gchar *link_target;
> +  guint  flags;
> +  guint  color; /* 0x00RRGGBB */

We could conver this to a PopplerColor when building the span to make it more
convenient to use for users.

@@ +88,5 @@
> +  gchar *font_name;
> +  gchar *link_target;
> +  guint  flags;
> +  guint  color; /* 0x00RRGGBB */
> +};

Maybe we could make this private and add getters for all other members as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20131105/31b61d83/attachment-0001.html>


More information about the Poppler-bugs mailing list