[Poppler-bugs] [Bug 58015] [PATCH] Add wrapper for Annot::setFlags

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Dec 8 08:12:05 PST 2012


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

--- Comment #5 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 71197
  --> https://bugs.freedesktop.org/attachment.cgi?id=71197
patch: add poppler_annot_set_flags

Review of attachment 71197:
-----------------------------------------------------------------

Patch looks good to me. Albert, the patch is simple and not risky, I think it
can go in 0.22.

::: glib/poppler-annot.cc
@@ +513,5 @@
> + * @flags: a #PopplerAnnotFlag
> + *
> + * Sets the flag field specifying various characteristics of the
> + * @poppler_annot.
> + *

Please add a Since: tag here 0.22 or 0.24

@@ +520,5 @@
> +poppler_annot_set_flags (PopplerAnnot *poppler_annot, PopplerAnnotFlag flags)
> +{
> +  g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot));
> +
> +  return poppler_annot->annot->setFlags ((guint) flags);

Remove the return, since the method is void. Also, add an early return if flags
don't change, since Annot::setFlags doesn't check it and the xref will be
updated and the document marked as modified.

-- 
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/20121208/88f24354/attachment.html>


More information about the Poppler-bugs mailing list