Issue 119466

Summary: [From Symphony]All tables in the sample file are converted to frames, and the display is ugly.
Product: Writer Reporter: louqle <louqingle>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: debin.lei, zjchen, zjchencdl
Version: 3.4.0   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
sample file
none
snapshot in Aoo
none
snapshot in MS word
none
patch for i119466
debin.lei: review+
test case for i119466 none

Description louqle 2012-05-29 02:14:17 UTC
Created attachment 77651 [details]
sample file

Build: AOO3.4

open the sample file in Aoo and compare it with that in MS word

All tables are converted to frames.

and the lines position changed and the whole display is ugly
Comment 1 louqle 2012-05-29 02:18:22 UTC
Created attachment 77652 [details]
snapshot in Aoo

add snapshot in Aoo
Comment 2 louqle 2012-05-29 02:19:16 UTC
Created attachment 77653 [details]
snapshot in MS word
Comment 3 zjchen 2012-06-05 06:24:55 UTC
Notice that the default table wrap mode is not compatible with MS Word. There are also other factors result in the abnormal tables.
Comment 4 Lei Debin 2012-06-14 06:44:07 UTC
one part of the issue is caused by the frame wrap value.
If change the Frame--wrap value from "Optimal" to "Parallel", the result will much better.
For other issue need more investigation
Comment 5 zjchen 2012-09-29 08:53:51 UTC
The problem is that table wrap mode in Writer is not compatible with MS Word.
Table in MS Word can be wrapped around with text, while it has no such property in Writer. So loading table from doc, it should be wrapped by a fly frame to implement the wrap property in Writer.


The wrap setting for frame could be "None","Before","After","Parallel",and "Optimal", while table in MS Word has two kinds of wrap setting, such as "Around" and "None". And Writer map "Around" table to "Optimal" frame wrap for interoperability.

Currently the setting "Optimal" for frame will lead to the table layout display improperly. since it would reassign the frame wrap setting to one of "Before","After","Parallel". The "Before" and "After" frame setting is NOT compatible with table wrapping from my investigation. 

So the solution is mapping the "Around" table wrap setting to "Parallel" frame wrap setting which is more likely as shown in the Word. The patch choose sprmPFInTable <0x2416> to determine whether the paragraph is in a table.
Comment 6 zjchen 2012-09-29 08:55:18 UTC
Created attachment 79679 [details]
patch for i119466
Comment 7 zjchen 2012-09-29 09:02:51 UTC
Created attachment 79680 [details]
test case for i119466

test case for difference between table wrap and frame wrap.
Comment 8 Lei Debin 2012-10-08 06:10:10 UTC
the solution is workable, it is ok for me, review +1
Comment 9 SVN Robot 2012-10-08 13:22:16 UTC
"zjchen" committed SVN revision 1395547 into trunk:
#i119466# Doc file loaded by AOO, table with incorrect text wrapping property...
Comment 10 hdu@apache.org 2013-07-11 13:08:43 UTC
Updated status to FIXED and the target to the release containing the fix.