Description: The attached document is protected with password "test". In comparison to Office 2010, a lot of additional fields are shown. I tried to anonymize the file. Original Email is "test@test.test" and numbers are 1234567890. Some fallback(?) fields are present in the docx-file. I changed these to "x.x@x.x" and the numbers to "XXXXXXXXXX". MSO shows only the main fields while LO shows everything at once. Steps to Reproduce: 1. open the file Actual Results: all entries are shown Expected Results: only the main entries are shown Reproducible: Always User Profile Reset: No Additional Info:
Created attachment 151085 [details] sample docx
Created attachment 151086 [details] LO Writer result
Created attachment 151087 [details] MSO result
Created attachment 151092 [details] sample docx
I just noticed that the issue does not depend on password protection of the docx file. I uploaded an unprotected version.
I confirm the described differences with MSO 2016 in comparison to Version: 6.3.0.0.alpha0+ (x64) Build ID: 421e6fc3cd2e6fe37afbef341e2d0ad7b8edde37 CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; TinderBox: Win-x86_64@42, Branch:master, Time: 2019-04-07_01:12:58 Locale: en-US (de_DE); UI-Language: en-US Calc: threaded
Also reproduced in Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Inherited from OO. Repro 6.4+. Inspect in Word found no hidden text nor invisible content. Source shows MERGEFIELD which is Merge Field Formatting in Microsoft Word. Word shows: Telefon (dienstl.): 1234567890 Fax: 1234567890 E-Mail: test@test.test Alt+F9 in Word shows: {IF{MERGEFIELD Kun_Telefon_Dienst}="" "" "Telefon (dienstl.): {MERGEFIELD Kun_Telefon_Dienst} "}{IF{MERGEFIELD Kun_Telefon_Privat}="" "" "Telefon (privat): {MERGEFIELD Kun_Telefon_Privat} "}{IF{MERGEFIELD Kun_Mobil } = "" "" "Telefon (mobil): {MERGEFIELD Kun_Mobil} "}{IF{MERGEFIELD Kun_Fax}="" "" "Fax: {MERGEFIELD Kun_Fax} "}{IF{MERGEFIELD Kun_Mail}="" "" "E-Mail: {MERGEFIELD Kun_Mail} "} "Update Field" shows fields. Probably because there's no source. LO shows: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Telefon (dienstl.): 1234567890123456 «Kun_Mobil» XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Fax: 1234567890x.x@x.xx.x@x.x test@test.test E-Mail:
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7b0534cb70e96028c8525285c42a71415704cede Related: tdf#125038 DOCX import: fix unexpected MERGEFIELD result inside IF 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.
Created attachment 155407 [details] Sample DOCX compared MSO LO Looks better, but still somewhat different from MSO.
Timur: thanks, this is expected. I'll set the bug state to resolved when I believe the bug is fixed, then Patrick will probably test the result. :-)
(In reply to Miklos Vajna from comment #11) > then Patrick will probably test the result. :-) That's right ;)
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/97f9af714ea1c46e498fa99f7ca34fc1708d38a6 Related: tdf#125038 DOCX import: fix unexpected linebreak inside IF condition 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d09336fbdceaafd9320466b660a2b32a07dcc16a tdf#125038 DOCX import: fix lost MERGEFIELD result inside an IF field 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d40c2be38aaf56116f4dc7be9e78f4e9695407fc tdf#125038 DOCX import: better support for linebreaks in IF 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.
I think this is now fixed on master.
I can confirm the bug is fixed in master! Thanks! Can we get a backport to 6.3?
Sure, I'll post backports for review to gerrit soon.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/commit/58d798ea44b9e2a57681e990a8acc747bc287c0b tdf#125038 DOCX import: fix various issues with MERGEFIELD inside IF fields It will be available in 6.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c6cf80af60d23fc52502f88f24dc23ad85462e77 related tdf#125038 FORMTEXT/REF:fix spurious text outside IF field It will be available in 7.6.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.
Created attachment 185448 [details] IsFieldNestingAllowed.assert.zip: new examples picked up from crashtesting In https://gerrit.libreoffice.org/c/core/+/145931/2 I created an assert looking for new example documents that used fields other than the ones already investigated. Those are attached in this zip file.
(In reply to Justin L from comment #21) > IsFieldNestingAllowed.assert.zip: new examples picked up from crashtesting Most of the IF FIELDS in these are very complex. I didn't find any document that pointed a clear path. Some looked better when returning true, others looked better when returning false.