Apache OpenOffice (AOO) Bugzilla – Issue 120832
Test for bug 120578: some of the font color is not correct
Last modified: 2012-09-21 02:41:46 UTC
Some of the font color is not correct in sample files.
I'm working on it.
Created attachment 79317 [details] Sample docx has text in table whose color is incorrect Upload sample file.
Created attachment 79319 [details] patch for font color in table Both table style and color you set in table will affect last font color for text in table. In this sample, the color set manually should have higher priority than that from table style. The patch involves: 1. In unotext.cxx::lcl_ApplyCellProperties(), when the char color fails to be set on cell object, it will throw an exception. When the exception is caught, we should check whether the char color is already existing or not, instead of replacing it directly. Because if the color is already existing, it means color comes from manually customization. 2. In DomainMapper.cxx, the table style's text properties will go to table's properties in DomainMapperTableHandler::endTableGetTableStyle(). Thus, it shouldn't be merged here. Otherwise, it will be considered as those set manually, and confuses logic mentioned above.
Created attachment 79321 [details] UT docx has text in table The sample's font color in table is decided by whole table type from table style. w:type="table" w:styleId="MediumList1-Accent2"> <w:rPr> <w:color w:val="00FF00"/> <w:kern w:val="0"/> <w:sz w:val="22"/> </w:rPr>
take the bug
Comment on attachment 79319 [details] patch for font color in table The fix works fine.
"zhangjf" committed SVN revision 1383383 into trunk: #i120832#, the style and color set on table text by user should have higher p...
change to resolved state
verified on the build AOO3.5_r1387482