Bug 148442 - [FORMS] Reference value (on) on checkbox always exported as "Yes" to PDF
Summary: [FORMS] Reference value (on) on checkbox always exported as "Yes" to PDF
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.3.2.2 release
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:7.4.0 target:7.3.4
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-07 10:36 UTC by Alfonso
Modified: 2022-05-16 08:52 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice Writer: editing a checkbox (5.79 KB, image/png)
2022-04-08 05:42 UTC, Alfonso
Details
Adobe Acrobat: editing the same checkbox (12.78 KB, image/png)
2022-04-08 05:43 UTC, Alfonso
Details
Sample Document (Writer) (13.08 KB, application/vnd.oasis.opendocument.text)
2022-05-05 05:41 UTC, Alfonso
Details
Sample Document (PDF) (40.34 KB, application/pdf)
2022-05-05 05:41 UTC, Alfonso
Details
MasterPDFEditor - Radio button (120.74 KB, image/png)
2022-05-08 10:08 UTC, Alfonso
Details
MasterPDFEditor - Checkbox (116.78 KB, image/png)
2022-05-08 10:09 UTC, Alfonso
Details
Firefox inspector (203.08 KB, image/png)
2022-05-08 10:14 UTC, Alfonso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alfonso 2022-04-07 10:36:27 UTC
Although the reference value (on) of a checkbox is defined in a certain string (S, in our case), LibreOffice Writer always exports that value as "Yes" in the PDF. In the radio buttons everything works fine with the defined reference value, but not with the checkboxes. Thanks.
Comment 1 Alfonso 2022-04-08 05:42:14 UTC
Created attachment 179393 [details]
LibreOffice Writer: editing a checkbox
Comment 2 Alfonso 2022-04-08 05:43:08 UTC
Created attachment 179394 [details]
Adobe Acrobat: editing the same checkbox
Comment 3 Dieter 2022-05-03 07:36:54 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it)
Comment 4 Alfonso 2022-05-05 05:41:30 UTC
Created attachment 179933 [details]
Sample Document (Writer)
Comment 5 Alfonso 2022-05-05 05:41:50 UTC
Created attachment 179934 [details]
Sample Document (PDF)
Comment 6 Dieter 2022-05-06 13:30:08 UTC
Thank you for the document. Since I don't have Adobe Acrobat I can' test. I hope, somebody else can help.
Comment 7 Alfonso 2022-05-08 10:07:42 UTC
(In reply to Dieter from comment #6)
> Thank you for the document. Since I don't have Adobe Acrobat I can' test. I
> hope, somebody else can help.

Thanks Dieter for your answer. You can use free versions of alternative programs like Master PDF Editor (I will upload two additional screenshots, made with my registered version on Linux). Also, with the Firefox inspector you can view the exportvalue="Yes" in the checkboxes (although not with radio buttons, I don't know why). Please, tell me if I can help. Thanks again.
Comment 8 Alfonso 2022-05-08 10:08:47 UTC
Created attachment 179996 [details]
MasterPDFEditor - Radio button
Comment 9 Alfonso 2022-05-08 10:09:02 UTC
Created attachment 179997 [details]
MasterPDFEditor - Checkbox
Comment 10 Alfonso 2022-05-08 10:14:16 UTC
Created attachment 179998 [details]
Firefox inspector
Comment 11 Xisco Faulí 2022-05-10 11:02:55 UTC
Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 8189d815641c583b5506d482f0b4f1ab47924f6a
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 12 Xisco Faulí 2022-05-10 12:21:56 UTC
I think I know how to fix it
Comment 13 Commit Notification 2022-05-11 21:09:01 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6ee5fb6d32147e180552f66e615d1de932fdcf9c

tdf#148442: map RefValue property to onValue in pdf

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Alfonso 2022-05-12 05:43:04 UTC
Thanks to Xisco and the entire development team. Regards
Comment 15 Alfonso 2022-05-12 05:52:58 UTC
Tested daily build 2022-05-12_05.15.51 and it works fine. Great work. Thanks again!
Comment 16 Xisco Faulí 2022-05-12 07:42:06 UTC
(In reply to Alfonso from comment #15)
> Tested daily build 2022-05-12_05.15.51 and it works fine. Great work. Thanks
> again!

Great to hear. Thanks for the verification. Let's set it to VERIFIED. Meanwhile, I'll backport it to libreoffice-7-3
Comment 17 Commit Notification 2022-05-16 08:51:40 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/2f1e299983379c89e17bd32dbd49a49b3709e606

tdf#148442: map RefValue property to onValue in pdf

It will be available in 7.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2022-05-16 08:52:49 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/9ff32ff939cd88bd5a609ef76fa145671dba44fb

related: tdf#148442: do not replace 'Yes' if onValue is empty

It will be available in 7.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.