After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750548 - Changing subtype of text markup annotations looses author
Changing subtype of text markup annotations looses author
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: pdf annotations
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-08 09:42 UTC by Philipp Reinkemeier
Modified: 2015-06-08 11:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pdf: Fixed wrong type-check in copy_poppler_annot (974 bytes, patch)
2015-06-08 09:48 UTC, Philipp Reinkemeier
committed Details | Review

Description Philipp Reinkemeier 2015-06-08 09:42:37 UTC
When changing the subtype of a text markup annotation (say from highlight to underline), then the author is not saved when saving a copy of the pdf.

Steps to reproduce:
1. Create a highlight annotation.
2. Save a copy of the pdf.
3. Open the copy created in step 2.
4. Change the subtype of the annotation created in step 1 to underline.
5. Save another copy of the pdf.
6. Open the copy created in step 5.
7. Observe that the author is NULL.
Comment 1 Philipp Reinkemeier 2015-06-08 09:43:45 UTC
In fact it is not just the author, which is not saved, but also any additional popup annotation gets lost.
Comment 2 Philipp Reinkemeier 2015-06-08 09:48:40 UTC
Created attachment 304755 [details] [review]
pdf: Fixed wrong type-check in copy_poppler_annot

The problem is that the wrong function is used when checking the types of the parameters passed to copy_poppler_annot().

EV_IS_ANNOTATION_MARKUP is used, while it should be POPPLER_IS_ANNOT_MARKUP. The attached patch fixes this issue.
Comment 3 Carlos Garcia Campos 2015-06-08 11:53:17 UTC
Comment on attachment 304755 [details] [review]
pdf: Fixed wrong type-check in copy_poppler_annot

Good catch! thanks