Bug 57716 - Word FORMTEXT field in RTF file is shown after opening, but lost after writing the file
Summary: Word FORMTEXT field in RTF file is shown after opening, but lost after writin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: filter:rtf
Depends on:
Blocks: Fields RTF-Fields
  Show dependency treegraph
 
Reported: 2012-11-30 03:52 UTC by trent.schafer
Modified: 2022-08-09 22:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
A document created with MS Word with a single field with default text as TEST and help text as <?TEST?>. Opening in LibreOffice and saving causes the field to be removed. (2.02 KB, application/rtf)
2012-11-30 03:52 UTC, trent.schafer
Details
RTF file with form field created in MS Word (31.16 KB, application/rtf)
2014-03-12 03:15 UTC, trent.schafer
Details
The second file saved in current master, opened in MSO (50.27 KB, image/png)
2022-01-24 08:54 UTC, Gabor Kelemen (allotropia)
Details
The fields Text Form Field Options dialog of the original example file in Word 2010 (58.43 KB, image/png)
2022-01-24 08:55 UTC, Gabor Kelemen (allotropia)
Details
RTF Bookmarks in Writer after resaving the file a few times (131.21 KB, image/png)
2022-01-24 08:58 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description trent.schafer 2012-11-30 03:52:07 UTC
Created attachment 70810 [details]
A document created with MS Word with a single field with default text as TEST and help text as <?TEST?>. Opening in LibreOffice and saving causes the field to be removed.

Problem description: 

I can create a RTF document with MS Word (2010), with a legacy text form field (accessed through the developer toolbar -> controls -> legacy tools -> text form field), and save it as RTF format. When I open this document in LibreOffice, this field doesn't seem to persist (based on not being able to access the field properties and the field being lost are saving the document in LibreOffice). 

Is there a good way to handle RTF documents with form text fields? (I also tried creating a document in LibreOffice with a form formatted field, but it also doesnt persist after saving as RTF).

Steps to reproduce:
1. Create RTF document in MS Word with a legacy text form field
2. Open document in LibreOffice
3. Make some changes
3. Save document

Current behavior:

Form text field is lost after saving the document in LibreOffice

Expected behavior:

The form field should persist after saving in LibreOffice. Ideally, the ability to create these fields in a document from LibreOffice.
Operating System: Windows 7
Comment 1 retired 2013-11-23 17:40:37 UTC
Unsure what to make of this. When opening the test document with LO 4.3 latest nightly or MS Word all I see is the word test. I'm unable to spot any differences in the way this is displayed.

Is this bug still valid / reproducible with the latest LO release?  Currently 4.1.3.2: http://www.libreoffice.org/download/

Could you please attach the document in question? That would help speed up the process of confirming and successively fixing this bug a lot. Thanks :)

Setting to NEEDINFO until more detail is provided.

After providing the requested info, please reset this bug to UNCONFIRMED. Thanks :)
Comment 2 trent.schafer 2014-03-12 03:15:29 UTC
Created attachment 95635 [details]
RTF file with form field created in MS Word
Comment 3 trent.schafer 2014-03-12 03:17:17 UTC
@Foss, Should have provided the original file (with the form field) as a comparison. Here's the file with the field, created in MS Word. Just to summarise: When opening the file in LibreOffice, saving some changes, the form fields are lost - the text is still there, but it is no longer a form field.

At the time of the original bug report, it was version 4.0.4.2, I've just tested this with the latest version: 4.2.1.1, and it still behaves as described.
Comment 4 Aron Budea 2017-09-26 22:59:50 UTC
Still repro with LO 6.0 daily build (2017-09-22_22:54:52, 0db08432c69adc36ed464c1f7c8e672acb3752d) / Windows 7.
Comment 5 QA Administrators 2018-09-27 02:43:04 UTC Comment hidden (obsolete)
Comment 6 Roman Kuznetsov 2018-09-27 06:34:59 UTC
still repro in 

Version: 6.2.0.0.alpha0+
Build ID: 1aa37aa6bee19099b57555a6d839992b054aa405
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-09-23_10:17:54
Locale: ru-RU (ru_RU); Calc: threaded
Comment 7 QA Administrators 2019-09-28 03:05:03 UTC Comment hidden (obsolete)
Comment 8 trent.schafer 2019-10-10 03:35:24 UTC
Confirm the issue is still present.

Tested on latest version grabbed from website
Version: 6.3.2.2
Build ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Comment 9 QA Administrators 2021-10-10 03:44:13 UTC Comment hidden (obsolete)
Comment 10 Gabor Kelemen (allotropia) 2022-01-24 08:54:03 UTC
Created attachment 177732 [details]
The second file saved in current master, opened in MSO

Now the field is exported back to RTF as field, however it's a bit broken according to MSO. Double clicking on the field brings up a Properties dialog with the original attachment  95635 [details] but after LO roundtrip MSO says:

This command is unavailable because the form field was not inserted with the Forms toolbar or by using the Insert Form Field dialog box.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4a388f5e01ebb5a512931d11e48c4380382239c8
CPU threads: 13; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded
Comment 11 Gabor Kelemen (allotropia) 2022-01-24 08:55:12 UTC
Created attachment 177733 [details]
The fields Text Form Field Options dialog of the original example file in Word 2010
Comment 12 Gabor Kelemen (allotropia) 2022-01-24 08:58:28 UTC
Created attachment 177734 [details]
RTF Bookmarks in Writer after resaving the file a few times

Another slight issue is that MSO defines a bookmark "Text1" for this form field, as seen on the previous screenshot.
When saving the example file as RTF then re-saving it again, this bookmark multiplies so each save adds one extra bookmark to the file.
This may or may not be the cause of the Word error message on my firs screenshot.
Comment 13 Gabor Kelemen (allotropia) 2022-01-24 09:04:55 UTC
The field started to be saved in 6.4.0 with the issues above.