Bug 101776

Summary: [PATCH] add author member to annotation
Product: poppler Reporter: Jannick <thirdedition>
Component: cpp frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED NOTABUG QA Contact:
Severity: enhancement    
Priority: medium CC: thirdedition
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: patch adding author member to annotation
patch adding author member to annotation (ignoring EOL changes)
patch adding author and creation date member to annotation (ignoring EOL changes)

Description Jannick 2017-07-13 07:48:16 UTC
Created attachment 132658 [details] [review]
patch adding author member to annotation

Please find attached a proposed patch to add an author member to a poppler annotation. (poppler version - 0.56.0).

Thanks,
J.
Comment 1 oliver.sander 2017-07-14 08:38:05 UTC
Comment on attachment 132658 [details] [review]
patch adding author member to annotation

Review of attachment 132658 [details] [review]:
-----------------------------------------------------------------

::: Annot.cc
@@ -581,4 @@
>  
>    // Sets the annot contents to new_content
>    // new_content should never be NULL
> -  virtual void setContents(GooString *new_content);

You are apparently doing whitespace changes to this line.  Please don't do that.

@@ -602,4 @@
>    AnnotSubtype getType() const { return type; }
>    PDFRectangle *getRect() const { return rect; }
>    void getRect(double *x1, double *y1, double *x2, double *y2) const;
> -  GooString *getContents() const { return contents; }

Whitespace changes again

@@ -660,4 @@
>    PDFRectangle *rect;               // Rect
>  
>    // optional data
> -  GooString *contents;              // Contents

Whitespace?
Comment 2 Jannick 2017-07-14 09:28:15 UTC
Created attachment 132684 [details] [review]
patch adding author member to annotation (ignoring EOL changes)

This is du to the eternal EOL issue. The new patch attached ignores the still existing EOL changes.
Comment 3 Jannick 2017-07-14 14:15:31 UTC
Created attachment 132686 [details] [review]
patch adding author and creation date member to annotation (ignoring EOL changes)

Additionally added the creation date member to an annotation.
Comment 4 Albert Astals Cid 2017-08-15 22:06:05 UTC
We already parse "T" and "CreationDate" in AnnotMarkup::initialize where it actually belongs and also have setters, so this is something we already have and don't need at all?
Comment 5 Jannick 2017-08-16 15:15:53 UTC
Agree, no, we don't. I don't know why I overlooked that - thanks. Please ignore the patch then.

Is the modified date defined for AnnotMarkup? Just asking since I cannot see it right now ... after my bad overlooking experience in the first place. I think this would be right place for the mod date as well, no?
Comment 6 Albert Astals Cid 2017-08-16 21:19:47 UTC
> Is the modified date defined for AnnotMarkup?

I don't see it defined in the specification.
Comment 7 Jannick 2017-08-18 09:41:07 UTC
Just checked in the specs: The modified date is defined for an Annot:: object and consistently implemented with Annot::, thus AnnotMarkup:: inherits it from Annot::. ... I think this ticket can be closed from my side.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.