[Poppler-bugs] [Bug 70901] Add getter and setter for annotation's rectangle

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Nov 17 01:08:47 PST 2013


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

--- Comment #10 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 89305
  --> https://bugs.freedesktop.org/attachment.cgi?id=89305
glib: Add getter and setter for annotation's rectangle

Review of attachment 89305:
-----------------------------------------------------------------

I've pushed it to git master with some modifications. Thanks.

::: glib/poppler-annot.cc
@@ +686,5 @@
> + *
> + * Retrieves the rectangle representing the page coordinates where the
> + * annotation @poppler_annot is placed.
> + *
> + * If @poppler_annot is an invalid annotation, then @poppler_rect is not set.

I've removed this, because passing an invalid annot is not something expected,
and the sentence is not true if g_return macros are disabled, in that case it
will crash.

@@ +696,5 @@
> +                             PopplerRectangle *poppler_rect)
> +{
> +  PDFRectangle *annot_rect;
> +
> +  g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot));

We should also check here that poppler_rect passed is not NULL.

@@ +717,5 @@
> + * Since: 0.26
> + */
> +void
> +poppler_annot_set_rectangle (PopplerAnnot    *poppler_annot,
> +                             PopplerRectangle poppler_rect)

I still think this should receive a pointer, so I've changed this too.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20131117/2a209bbd/attachment.html>


More information about the Poppler-bugs mailing list