Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Test for bug 120578: some of the font color is not correct | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | wujinlong | ||||||||
Component: | code | Assignee: | zhang jianfang <zhangjf> | ||||||||
Status: | CLOSED FIXED | QA Contact: | |||||||||
Severity: | Normal | ||||||||||
Priority: | P3 | CC: | bjdujing, companycy, zhangjf | ||||||||
Version: | 4.0.0-dev | ||||||||||
Target Milestone: | 4.0.0 | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||||
Developer Difficulty: | --- | ||||||||||
Attachments: |
|
Description
wujinlong
2012-09-06 08:12:52 UTC
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 |