Created attachment 102261 [details] Steps 1-7 Situation: Users have thousands of RTF files which are used as main document in mail merge, having the fields filled from a text file (txt). Issue: Repeated fields are shown as plain text (except the first one). Steps to reproduce(or use the attached document: test.rtf or test.docx).: 1. Create a Word document with MS Office. 2. Insert two MergeField field with the same Field name (eg. TEST). 3. Save the file in RTF or/and DOCX format. 4. Open the file with LibO. Result: - First field is shown as a field, but the second field is shown as a plain text. Further steps (or use the attached document: test2.rtf or test2.docx): 5. Open the file with MS Office. 6. Insert a new MergeField field before the fields with the same field name and save it. 7. Open the file with LibO. Result: - The first field is shown as a field but the second and the third are shown as plain text. Expected result: - all of the fields should be shown as fields (with grey background). - If you create a .doc file instead of .rtf or .docx, it works fine.
Hi Gergely, Thanks for the issue. In 3.5.x to 4.0.0 I see no fields at all, only text. In 3.3.x and 3.4.x all the fields are shown. regards, Cor (searching for duplicates and related issues appreciated)
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d0a7a60cfa1a34ec7218656489b7463cd9eb1aad fdo#80905 SwXTextFieldMasters::hasByName(): sync with SwXFieldMaster The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This is a bug in the UNO API impl, and in <= 3.4.x the RTF import used the internal API, so it wasn't affected. In >= 3.5.x, it uses the UNO API, so the existing problem can be easily noticed.
-4-3 review: https://gerrit.libreoffice.org/10269
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4fd1b2eafcc49486cb6a360d792f779659b68e2&h=libreoffice-4-3 fdo#80905 SwXTextFieldMasters::hasByName(): sync with SwXFieldMaster It will be available in LibreOffice 4.3.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.