Skip to content

Convert to system locale string before passing to Javascript for execution

The issue mainly arises in the case where the locale used for storing numbers differs from the system locale. To resolve this, the locale for the current text has been stored as en_US for calculation event as a new attribute in FormFieldText. Then before passing the data for execution to JS, convert the data to system locale if there is an associated locale with the FormFieldText. In case the toDouble fails (this might happen for other data types other than double), the execution defaults to earlier behavior, thus at least not creating any new issues.

Another change involves setting the output format for AFSimple_Calculate to en_US format. This involves the assumption that AFNumber_Format is called after every calculate event. Similar to how performing 133.34 * 0.25 yields 33.325 in en_US format currently. Cross validated with the Acrobat reference page 118, where nothing regarding the output format is mentioned.

BUG: 474661

Merge request reports