Issue 120576 - [From Symphony]the background color from table style are lost for table in the docx file
[From Symphony]the background color from table style are lost for table in th...
Status: VERIFIED FIXED
Product: Writer
Classification: Application
Component: open-import
4.0.0-dev
All Windows XP
: P3 normal (vote)
: 4.0.0
Assigned To: AOO issues mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-15 06:04 UTC by bjcheny
Modified: 2012-10-09 05:44 UTC (History)
4 users (show)

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


Attachments
Sample docx has table style applied (155.37 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-08-15 06:04 UTC, bjcheny
no flags Details
patch for i120576 to fix background color in table style in docx (3.54 KB, patch)
2012-08-16 03:03 UTC, bjcheny
no flags Details | Diff
patch for background color in table style in docx (3.65 KB, patch)
2012-08-21 08:17 UTC, bjcheny
zhangjf: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description bjcheny 2012-08-15 06:04:40 UTC
Created attachment 78945 [details]
Sample docx has table style applied

Check all tables in the sample file "test document formatting.docx", and background color from table styles in some tables are different from MS.
Comment 1 bjcheny 2012-08-16 03:03:19 UTC
Created attachment 78970 [details]
patch for i120576 to fix background color in table style in docx

Patch for i120576 to fix background color in table style in docx.

It is based on the knowledge of background color from wiki on table style as below:
http://wiki.openoffice.org/wiki/Table_Style_in_Writerfilter

The change is composed of below parts:
1. For the w:tcPr under w:style, it's used for whole table. It should be sprmed.
2. On how to apply different kinds of table styles, it follows the sequence from wiki as below. That means ne/nw/se/sw table style can overwrite all other types if existing.

wholeTable
band1Horz band2Horz
band1Vert band2Vert
firstCol lastCol
firstRow lastRow
neCell nwCell seCell swCell

3. Fix a typo for resetRowProp. It's related to all row properties.
Comment 2 bjcheny 2012-08-21 08:17:29 UTC
Created attachment 79033 [details]
patch for background color in table style in docx

Change path for patch from writerfilter to main when creating.
Comment 3 zhang jianfang 2012-08-26 12:41:19 UTC
Comment on attachment 79033 [details]
patch for background color in table style in docx

Thanks, the wiki document explain the fix clearly. I will deliver it.
Comment 4 SVN Robot 2012-08-26 12:55:41 UTC
"zhangjf" committed SVN revision 1377430 into trunk:
#i120576#, the background color from table style are lost for table in the do...
Comment 5 zhang jianfang 2012-08-26 12:56:21 UTC
Change to resolved state
Comment 6 Du Jing 2012-08-28 01:51:53 UTC
verified on the build 1377620
Comment 7 Shenfeng Liu 2012-10-09 05:44:00 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.