| Summary: | Reference field to text field in DOCX becomes broken after save | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Aron Budea <aron.budea> |
| Component: | Writer | Assignee: | Justin L <jluth> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jluth |
| Priority: | medium | Keywords: | filter:docx |
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=120225 | ||
| Whiteboard: | target:6.2.0 target:6.4.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 104523, 107905, 112969 | ||
| Attachments: |
Sample DOCX
Roundtripped broken DOCX |
||
|
Description
Aron Budea
2018-10-01 02:41:50 UTC
Created attachment 145285 [details]
Roundtripped broken DOCX
Reproduced with 6.2.0.0.alpha0+ (x64) Build ID: 89a60912bba7ffd6f65ea99f4664f343c5025c95 CPU threads: 8; OS: Windows 10.0; UI render: GL; TinderBox: Win-x86_64@42, Branch:master, Time: 2018-10-01_03:18:33 Locale: de-AT (de_AT); Calc: CL For me there is no difference if I edit the docx file (e.g. to force field updated with F9) or to only open the docx and save it without doing anything. After reopening, pressing F9 makes the reference field empty. BTW the Text Form Field (Legacy Form control) isn't editable in Writer. confirmed likely inherited from OOo based on bibisect-43all. Spot checks suggest this has never worked. To play around with this document, you can unprotect it via tools-options-Writer-Compatibility and unchecking Protect Form. It appears that the bookmark (or whatever terminology is correct) is still there, because if I Insert->CrossReference->Type=Bookmark,InsertRefTo=Reference,Selection=Text111 then I again get the contents of the text form field (and this time it is preserved across round-trips, although two more bookmarks are again added...) The commit comments clearly show that I am not at all confident in working on this bug. But the results of these patches work very nicely on this test document, and don't break any of the two existing unit tests featuring text controls (fdo53985.docx and tdf111964.docx) - which is all I have to work with. https://gerrit.libreoffice.org/61615 tdf120224 writerfilter: consume excess bookmark from fields https://gerrit.libreoffice.org/61616 tdf120224 docx export: don't double up field bookmarks fixed in 6.2 with commits 579c0749bef8c980507229439715e72060c1b077 and 0a452b5005744d96f37fcb29b37a84e23a04bf8e. Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ae97beb73efca8e31a7b2d93d55bdb118711d72a tdf#120224 writerfilter: don't suppress all bookmarks inside fields 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. |