Bug 140486 - forms "empty string is null" setting not loaded; always "no"
Summary: forms "empty string is null" setting not loaded; always "no"
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.2 target:7.1.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-02-17 18:30 UTC by Lionel Elie Mamane
Modified: 2021-02-24 13:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
reproduction case in Writer (8.40 KB, application/vnd.oasis.opendocument.text)
2021-02-17 18:31 UTC, Lionel Elie Mamane
Details
reproduction case in Base (11.20 KB, application/vnd.oasis.opendocument.database)
2021-02-17 18:36 UTC, Lionel Elie Mamane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2021-02-17 18:30:52 UTC
Description:
the setting "empty string is null" of text box controls is always "no", as opposed to the state saved in the XML file as form:convert-empty-to-null="true" attribute to the form:textarea XML tag.

Steps to Reproduce:
1. open attached writer file
2. menu "Form", enter Design mode
3. right click on the text box
4. "control properties"
5. tab "data", look at setting "Empty String is NULL"
6. set it to "Yes"
7. save
8. close file
9. open saved file
10. look at the setting

Actual Results:
LibreOffice 7.1

step 5: state is "no"
step 10: state is "no"

LibreOffice 6.4

step 5: state is "yes"
step 10: state is "yes"

Expected Results:
state is "yes" in all versions


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.utf8); UI: en-GB
Calc: threaded
Comment 1 Lionel Elie Mamane 2021-02-17 18:31:20 UTC
Created attachment 169836 [details]
reproduction case in Writer
Comment 2 Lionel Elie Mamane 2021-02-17 18:36:45 UTC
Created attachment 169837 [details]
reproduction case in Base
Comment 3 Lionel Elie Mamane 2021-02-17 18:40:33 UTC
For the base version:

Steps to Reproduce:
1. open attached base (odb) file
2. left part of the main screen, click on "forms"
3. bottom-right, right-click on "Tasks"
4. In pop-up menu, take "edit"
5. ctrl-click on the gray area next to "description" to select it
6. right click on the same gray area
7. control properties
8. data / empty string is null
9. observe the value
10. set it to "Yes"
11. save the form
12. close the form (not the odb file)
13. repeat steps 3 to 9

Actual Results:
LibreOffice 7.1

step 9: state is "no"
step 13: state is "no"

LibreOffice 6.4

step 9: state is "yes"
step 13: state is "yes"

Expected Results:
state is "yes" in all versions
Comment 4 Xisco Faulí 2021-02-18 11:55:27 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=3de38e95561ab7ca114d9f3307702ba89c4e3e9a

author	Noel Grandin <noelgrandin@gmail.com>	2020-11-10 19:20:06 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2020-11-11 06:33:53 +0100
commit 3de38e95561ab7ca114d9f3307702ba89c4e3e9a (patch)
tree 5d4c84a81e68897f325f67bc92b326ae48805f9a
parent cc1e6ee2dd4609c27cb7a09aa47a779592a3e22c (diff)
use fastparser in forms

Bisected with: bibisect-linux64-7.1

Adding Cc: to Noel Grandin

Note: the issue is reproducible at import time. No need to follow all the steps in the description
Comment 5 Noel Grandin 2021-02-18 11:56:46 UTC
this appears to be a duplicate of #140198, which I have just fixed
Comment 6 Xisco Faulí 2021-02-18 12:06:47 UTC
(In reply to Noel Grandin from comment #5)
> this appears to be a duplicate of #140198, which I have just fixed

oh nice, closing as duplicated then

*** This bug has been marked as a duplicate of bug 140198 ***
Comment 7 Xisco Faulí 2021-02-18 12:27:22 UTC
it seems the issue is still reproducible even with https://cgit.freedesktop.org/libreoffice/core/commit/?id=63d14566ba93b87f23a7ba68f8ea733cf19be101, reopening
Comment 8 Commit Notification 2021-02-18 16:35:08 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/67db5b7c8df4aa0fab08ac2d11b732dbc28c4c62

tdf#140486 forms "empty string is null" setting not loaded

It will be available in 7.2.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 9 Commit Notification 2021-02-19 12:32:27 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/e8a598aae891a4789e770566b87e11a47015c530

tdf#140486 forms "empty string is null" setting not loaded

It will be available in 7.1.2.

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 10 Xisco Faulí 2021-02-19 15:51:52 UTC
Verified in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 7b649f835cc00ed76927c6821a135605609bed4e
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Noel, thanks for fixing this issue!!
Comment 11 Commit Notification 2021-02-23 16:08:42 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1-1":

https://git.libreoffice.org/core/commit/0caab7456935b3ce4eeaae4dec919d7407a32af9

tdf#140486 forms "empty string is null" setting not loaded

It will be available in 7.1.1.

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 12 Commit Notification 2021-02-24 13:17:17 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/04718c6c7ffa80416dd1d44bde3f3842fb9e979f

tdf#140486: sw: Add UItest

It will be available in 7.2.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.