D12665: Support additional widget actions in PDF Forms

Albert Astals Cid noreply at phabricator.kde.org
Mon May 28 14:13:32 UTC 2018


aacid added inline comments.

INLINE COMMENTS

> aheinecke wrote in CMakeLists.txt:97
> Out of curiosity: Why is this and the other "check compiles" tests for released versions of poppler not:
> 
>   if (Poppler_VERSION VERSION_GREATER "0.64.99")
>     set (HAVE_POPPLER_0_65 1)
>   endif()

In this case you could do it (i assume the syntax is correct), but most of the times the feature is developed both here and in poppler so at that point there's no actual poppler version out yet, so you can't depend on a version number that doesn't exist.

> aheinecke wrote in formwidgets.cpp:1078
> > Are you sure this should be an else? Why should activation action only be signaled if there's no mouse release action?
> 
> Good question. I checked in the spec and it should be the other way around. I was confused because Adobe Acrobat DC sets the "Mouse Released" action as the "A" entry of the annotation dictonary. This is parsed by poppler as the "Additional Action"
> 
> Page 649 (Table 8.44) in the spec Says about the mouse released event:
> Note: For backward compatibility the A entry in an annotation dictionary, if present, takes precedence over this entry.
> 
> So it should be the other way around. Only execute the mouseReleased action if there is no activation action and execute the activation action otherwise.
> I'll change it.
> 
> Checkboxes are handled differently because they trigger in the "doActivateAction" so that the action can also be triggered by scripts changing the checked state.
> 
> > Also, before we only did activation action for buttons, but now we do for lots of other forms, is that on purpose?
> 
> Yes this is on purpose. The activation action is not bound to buttons. I did not find it clearly stated in the spec but If I add a Mouse Release action on a textfield in Acrobat DC it is added as a Mouse Release action.
> 
> And the Example from bug306818 uses a mouse action on a read only text field to hide the warning in there.

Can you please add that explanation either as a comment somewhere in the code or as part of the git commit? It'll make it easier to find next time someone looks at the code and wonders why it has an "else " like i did.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12665

To: aheinecke, #okular
Cc: okular-devel, aacid, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180528/7aca9f2b/attachment.html>


More information about the Okular-devel mailing list