Issue 119466 - [From Symphony]All tables in the sample file are converted to frames, and the display is ugly.
[From Symphony]All tables in the sample file are converted to frames, and the...
Status: RESOLVED FIXED
Product: Writer
Classification: Application
Component: ui
3.4.0
All All
: P3 normal (vote)
: 4.0.0
Assigned To: AOO issues mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 02:14 UTC by louqle
Modified: 2013-07-11 13:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
sample file (62.50 KB, application/msword)
2012-05-29 02:14 UTC, louqle
no flags Details
snapshot in Aoo (45.80 KB, image/png)
2012-05-29 02:18 UTC, louqle
no flags Details
snapshot in MS word (52.76 KB, image/png)
2012-05-29 02:19 UTC, louqle
no flags Details
patch for i119466 (661 bytes, patch)
2012-09-29 08:55 UTC, zjchen
debin.lei: review+
Details | Diff
test case for i119466 (41.50 KB, application/msword)
2012-09-29 09:02 UTC, zjchen
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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.