Bug 133555 - <text:drop-down> is not valid in ODF 1.2
Summary: <text:drop-down> is not valid in ODF 1.2
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf odf_validation target:7.1.0 targe...
Keywords:
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2020-05-31 13:23 UTC by Regina Henschel
Modified: 2020-06-04 13:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example Input List (8.83 KB, application/vnd.oasis.opendocument.text)
2020-05-31 13:23 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2020-05-31 13:23:34 UTC
Created attachment 161458 [details]
Example Input List

Start a text document. Insert an input list. You get it with Ctrl+F2 to open the Fields dialog. Then tab Functions, item 'Input List'. Add a name in the field 'Name'. Then enter a text in field 'Item' and click on button 'Add'. Add a second item same way. Click on button 'Insert' and then 'Close'.

Save the document in file format 'ODF 1.2' and validate the saved file with https://odfvalidator.org/

Saving the document in format 'ODF 1.2 extended' produces an invalid document too.

The element <text:drop-down> is available in ODF 1.3. Therefore my suggestion:
LibreOffice 7 should not write this element in strict 'ODF 1.2' but use the current selected value instead, for to produce valid 'ODF 1.2 strict'. Someone who needs it in 'strict' ODF, can save in 'ODF 1.3'.

LibreOffice 7 should not change the behavior for 'ODF 1.2 extended' because it is not worth changing it now since LibreOffice 7 will be released soon and "extended confirming" can be achieved by 'ODF 1.3 extended'.

The invalid element is written since OOo2.
Comment 1 Regina Henschel 2020-05-31 13:29:30 UTC
@Michael: Do you agree with my proposal? [I don't expect You to fix it.]
Comment 2 Michael Stahl (allotropia) 2020-06-02 12:16:26 UTC
hmm i was sort of overlooking this one because it was there always in OOo, but i don't see a reason why we shouldn't limit it to at least Extended versions...

so that sounds reasonable... 

(also should take just half an hour or so to fix)
Comment 3 Commit Notification 2020-06-02 16:32:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#133555 xmloff: ODF export: don't produce text:drop-down in ODF 1.2

It will be available in 7.1.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 4 Michael Stahl (allotropia) 2020-06-02 16:36:31 UTC
fixed on master
Comment 5 Commit Notification 2020-06-03 10:54:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/02b577f2f2f8bfea144ad156a55eec6e2b06ad7b

tdf#133555 xmloff: ODF export: don't produce text:drop-down in ODF 1.2

It will be available in 7.0.0.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 6 Regina Henschel 2020-06-04 13:48:45 UTC
It does not follow the suggestion to write the current value of the drop-down instead of the drop-down but writes nothing. But this solution is OK too.

Seen OK in Version: 7.1.0.0.alpha0+ (x64)
Build ID: 95e5d37b6e62eb39f2d5337e124e86b3d0c3f399
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: threaded

and in Version: 7.0.0.0.beta1+ (x64)
Build ID: 8c08eefeb512d4cbc86c4c5308d86a59bd232beb
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL