Bug 126792

Summary: DOCX legacy drop-downs are only supposed to hold 25 items
Product: LibreOffice Reporter: Aron Budea <aron.budea>
Component: WriterAssignee: Tamás Zolnai <zolnaitamas2000>
Status: RESOLVED FIXED    
Severity: normal CC: zolnaitamas2000
Priority: medium Keywords: filter:docx
Version: 6.4.0.0.alpha1+   
Hardware: All   
OS: All   
Whiteboard: target:6.4.0 target:6.3.2
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104523, 104528    
Attachments: Sample DOCX (corrupted)
Sample DOCX (dropdown with 25 entries)
Sample DOC

Description Aron Budea 2019-08-09 12:01:13 UTC
Created attachment 153262 [details]
Sample DOCX (corrupted)

- In Writer Compatibility options, enable Reorganize Forms menu to have it MS compatible
- Add a Forms -> Legacy Form Fields -> Drop-Down Form Field.
- Double-click on it, and add 26 items, eg. characters from a to z (doesn't matter what).
- Save as DOCX, and open it in Word.

=> Word refuses to open the file, giving a nondescript error (details: Unspecified error).
When adding a similar drop-down in Word, only 25 entries can be added to it.

Likely we should limit number of entries to 25 in a drop-down field (that was specifically added for Word compatibility), and perhaps for existing files we could silently drop the superfluous entries during save (would be nice to give a message, but perhaps too much work that's only relevant for existing buggy files, and this feature is only there since 6.3).

Attaching a sample created in Writer that fails to open in Word.

Observed using LO 6.4.0.0.alpha0+ (d2750b7eb02d6f1c8866199c98fe2e2286639b88) / Windows 7.
Comment 1 Aron Budea 2019-08-17 00:04:41 UTC
Created attachment 153450 [details]
Sample DOCX (dropdown with 25 entries)

To make repro easier, this sample, created in Word has a dropdown with 25 entries.
Roundtrip it in Writer, Word will open it just fine.
Add another entry in Writer, and Word will stop opening the file.
Comment 2 Tamás Zolnai 2019-08-20 13:58:24 UTC
Interestingly, in case of DOC file MSO can open a drop-down form field with more than 25 items.
Comment 3 Tamás Zolnai 2019-08-20 13:58:49 UTC
Created attachment 153537 [details]
Sample DOC
Comment 4 Aron Budea 2019-08-20 15:51:57 UTC
(In reply to Tamás Zolnai from comment #2)
> Interestingly, in case of DOC file MSO can open a drop-down form field with
> more than 25 items.
It still doesn't allow adding more on the UI, so hopefully there's no need to make a special case of that.
Comment 5 Commit Notification 2019-08-20 17:09:20 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d3c8973f54037f915e12cd038a6a76501d237ea4%5E%21

tdf#126792: DOCX legacy drop-downs are only supposed to hold 25 items, GUI

It will be available in 6.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 6 Commit Notification 2019-08-20 18:29:26 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/8d84f32d55df06c2944da78e2b779de2dba21d50%5E%21

tdf#126792: DOCX legacy drop-downs are only supposed to hold 25 items, DOCX

It will be available in 6.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 7 Tamás Zolnai 2019-08-21 12:33:08 UTC
For libreoffice-6-3 branch, I backported only the DOCX related patch (it's on gerrit), because the new GUI dialog contains a new string, which can't be added to a stable branch.
Comment 8 Commit Notification 2019-08-24 20:38:05 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/92f527ef00fe7fa4f84e6577c7249de845be6479%5E%21

tdf#126792: DOCX legacy drop-downs are only supposed to hold 25 items, DOCX

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