Issue 119803 - After upgrading to 3.4 RTF User Fields are not saving
Summary: After upgrading to 3.4 RTF User Fields are not saving
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0
Hardware: PC Windows 7
: P3 Critical (vote)
Target Milestone: 3.4.1
Assignee: Oliver-Rainer Wittmann
QA Contact:
Depends on:
Reported: 2012-06-05 14:58 UTC by ej197us
Modified: 2012-07-25 09:05 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 3.4.1_release_blocker+

RTF With User Fields using 3.1 (8.10 KB, application/vnd.oasis.opendocument.text)
2012-06-21 21:05 UTC, ej197us
no flags Details
patch to fix the issue in i119803 (719 bytes, patch)
2012-06-26 06:17 UTC, yuanlin
no flags Details | Diff
patch to fix 119803 (830 bytes, patch)
2012-06-26 14:02 UTC, yuanlin
orw: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description ej197us 2012-06-05 14:58:25 UTC
Document in RTF format from versions < 3.4 have all of the user fields present.  Opening the RTF in version 3.4 initially shows the user fields, however after saving the file in same format and reopening the RTF User Fields are missing.
Comment 1 ej197us 2012-06-07 10:23:13 UTC
To duplicate:

Create a rtf document with a version < 3.4.  
Menu Options
---User Fields

At this point the variable list is shown.

Insert a new variable and click the green check.

The variable shows up in the list and appears to be saving.

Insert the variable into the document to use it.

Close the doc and reopen.  

When the document reopens the variable is not present and is de-referenced in the doc.

This appears to be a critical error.  This function is used by many developers along with UNO to published merged documents.

Resolution:  Downgrade OpenOffice to <3.4.
Comment 2 Terry Yang 2012-06-14 02:18:48 UTC
Check with AOO 3.4, When i create a user fields and save the file to RTF file, then save and reload this file, the user fields missing.

So this should a bug in export in AOO3.4, and this is a build to build regression since OO 3.3 work fine, mark this bug to 3.4.1 release blocker.
Comment 3 jsc 2012-06-21 07:27:21 UTC
set release blocker flag for 3.4.1
Comment 4 Miklos Vajna 2012-06-21 21:00:11 UTC

Can you please attach a sample ODF document, demonstrating the issue?


Comment 5 ej197us 2012-06-21 21:05:23 UTC
Created attachment 78432 [details]
RTF With User Fields using 3.1

If you open this file with 3.4 then save it all user fields are erased.
Comment 6 ej197us 2012-06-25 12:07:19 UTC
Comment on attachment 78432 [details]
RTF With User Fields using 3.1

Your welcome
Comment 7 yuanlin 2012-06-26 06:17:57 UTC
Created attachment 78476 [details]
patch to fix the issue in i119803

Seems in cws sw34bf01, the RTF filter is refactored and the export for user field and DB field is missed. This patch add the export for the two field for RTF filter
Comment 8 yuanlin 2012-06-26 14:02:16 UTC
Created attachment 78498 [details]
patch to fix 119803

In cws vmiklos01, the field export for rtf filter and ms word filter is integrated into AttributeOutputBase::TextField() in sw\source\filter\ww8\ww8atr.cxx . However, processing for user field and db field is different for rtf and ms word filter. And in  AOO3.4 the processing for the two field is missed. In this patch, the processing for the two field for rtf filter is added to RtfAttributeOutput::WriteExpand() in sw\source\filter\ww8\rtfattributeoutput.cxx
Comment 9 Oliver-Rainer Wittmann 2012-06-27 07:28:53 UTC
Taking over for patch review
Comment 10 Oliver-Rainer Wittmann 2012-06-27 10:50:04 UTC
Comment on attachment 78498 [details]
patch to fix 119803

patch looks good, applied and tested under Windows.
--> I will apply this patch to the source code repository - trunk and branch AOO34
Comment 11 Oliver-Rainer Wittmann 2012-06-27 11:08:14 UTC
applied patch on trunk, revision 1354421
Comment 12 Oliver-Rainer Wittmann 2012-06-27 11:17:21 UTC
merged from trunk into branch AOO34, revision 1354426
Comment 13 Terry Yang 2012-07-02 06:32:51 UTC
Verify fixed on Trunk r1355082 and AOO 34 branch 1354891
Close this bug
Comment 14 ej197us 2012-07-03 10:12:06 UTC
Thanks to the aoo team for fixing this bug.
Comment 15 jsc 2012-07-25 09:05:01 UTC
set target milestone AOO 3.4.1