<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64821#c26">Comment # 26</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [TAGGEDPDF] Expose the structure tree and attributes in poppler-glib"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64821">bug 64821</a>
from <span class="vcard"><a class="email" href="mailto:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=86684" name="attach_86684" title="[PATCH v8 11/15] glib: Expose inline attributes of structure elements">attachment 86684</a> <a href="attachment.cgi?id=86684&action=edit" title="[PATCH v8 11/15] glib: Expose inline attributes of structure elements">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=64821&attachment=86684'>[review]</a>
[PATCH v8 11/15] glib: Expose inline attributes of structure elements
Review of <span class=""><a href="attachment.cgi?id=86684" name="attach_86684" title="[PATCH v8 11/15] glib: Expose inline attributes of structure elements">attachment 86684</a> <a href="attachment.cgi?id=86684&action=edit" title="[PATCH v8 11/15] glib: Expose inline attributes of structure elements">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=64821&attachment=86684'>[review]</a>:
-----------------------------------------------------------------
::: glib/poppler-structure-element.cc
@@ +784,5 @@
<span class="quote">> + GList *glist;
> + char buf[8];
> + Guint flags;
> + Guint color;
> +};</span >
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 @@
<span class="quote">> + * 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.</span >
Since: 0.26
@@ +798,5 @@
<span class="quote">> + *
> + * Return value: (transfer none) (element-type PopplerTextSpan): A #GList
> + * of #PopplerTextSpan structures.
> + */
> +GList*</span >
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 @@
<span class="quote">> +
> +/**
> + * poppler_text_span_is_fixed_width:
> + * @poppler_text_span: a #PopplerTextSpan
> + */</span >
This is missing a bried description, Return value and Since tags.
@@ +829,5 @@
<span class="quote">> +
> +/**
> + * poppler_text_span_is_serif_font:
> + * @poppler_text_span: a #PopplerTextSpan
> + */</span >
Ditto.
@@ +837,5 @@
<span class="quote">> + return (poppler_text_span->flags & POPPLER_TEXT_SPAN_SERIF_FONT);
> +}
> +
> +/**
> + * poppler_text_span_is_bols:</span >
bols ->bold
@@ +839,5 @@
<span class="quote">> +
> +/**
> + * poppler_text_span_is_bols:
> + * @poppler_text_span: a #PopplerTextSpan
> + */</span >
Ditto.
@@ +849,5 @@
<span class="quote">> +
> +/**
> + * poppler_text_span_is_link:
> + * @poppler_text_span: a #PopplerTextSpan
> + */</span >
Ditto.
::: glib/poppler-structure-element.h
@@ +87,5 @@
<span class="quote">> + gchar *text;
> + gchar *font_name;
> + gchar *link_target;
> + guint flags;
> + guint color; /* 0x00RRGGBB */</span >
We could conver this to a PopplerColor when building the span to make it more
convenient to use for users.
@@ +88,5 @@
<span class="quote">> + gchar *font_name;
> + gchar *link_target;
> + guint flags;
> + guint color; /* 0x00RRGGBB */
> +};</span >
Maybe we could make this private and add getters for all other members as well.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>