D13172: Add AFNumber_Format and l10n AFSimple_Calculate

Andre Heinecke noreply at phabricator.kde.org
Mon Jun 18 11:31:55 UTC 2018


aheinecke added a comment.


  Apologies for the delay. Some travel, some sick days and some other work and the weeks fly by ;-)
  I'm getting back to this now.

INLINE COMMENTS

> aacid wrote in builtin.js:99
> Not having a document to test makes this a bit harder, but let's say i write a number in a form, the form then changes that number to have dots as separator format and then i just go and add a number at the beginning/end of the "text" of that form. When it comes back here stringToNumber will expect commas and not dots and then everything will break?

I'm not sure I understand the question. I understand it that you are concerned that the actual value of the field is changed by formatting and the user is then confused if he mixes the format when entering additional values.

The trick for that is that the number is not actually changed. As soon as you focus in on the text field the text will change to the actual value. This is also what Acrobat does.

So if you enter with dots but the form want's commas the number is transformed according to your locale for formatting. But as soon as you edit it to add more text it will be changed right back to what you originally entered.

Here is an example that has most "predefined" format settings:

F5918086: FieldFormat.pdf <https://phabricator.kde.org/F5918086>

Only the first three lines work in okular as they use the number format.

Another example would be:
https://www.pbeakk.de/fileadmin/redakteure/contents/PDF/Formulare/form_01.pdf

REPOSITORY
  R223 Okular

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

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


More information about the Okular-devel mailing list