Created attachment 141721 [details]
TableGrid table style.docx: example document created in Word 2013
There are several examples of the same problem being exhibited in this document. The problem area is the second table-column.
-The green text paragraph should be size 9, but is actually size 11.
-The TableGrid paragraph also is size 11, is black instead of blue, and the spacing is 108% instead of double.
The main problem is in sw/source/core/unocore/unotext.cxx:lcl_ApplyCellProperties
if (state == beans::PropertyState_DEFAULT_VALUE)
then apply table-style/cell properties
In these cases, state = AMBIGUOUS_VALUE, so the TableGrid properties are not applied, and the system defaults (size 11, 108% spacing, black color) are used instead.
Table styles are a relatively new feature, no regression here. Things starting looking decent in 4.1 and 4.2. Bug 80800 (4.4) dealt with a similar problem - focusing only on LINE_SPACING.
Created attachment 141722 [details]
TableGrid table style.pdf: exported from Word 2013
Created attachment 141724 [details]
117297_debugging.diff: debugging patch with fix ideas. Use with SW_DEBUG_WRITERFILTER=1
My biggest failure is not correctly enumerating the paragraphs and getting proper DIRECT/DEFAULT values for the various character and paragraph properties.
No really a bug - just a missing "emulation" where table styles properties are not converted into paragraph properties (which isn't a great solution anyway).
Created attachment 141780 [details]
fdo80800b.docx: document that shows DEFAULT_VALUE when DIRECT_VALUE expected
This document proves that my fix is inadequate. Even though the text in Cell1 has directly applied properties of 150% spacing, xCellTextProp reports state == DEFAULT_VALUE. However, if you enumerate the paragraph instead, then it reports DIRECT_VALUE.
(In my debugging patch, the ambiguous section enumerates the paragraphs. Could this ALWAYS be used, not just when ambiguous? But that only works for paragraph attrs, not IsCHRATR.)
proposed fix (for 6.2 branch) at https://gerrit.libreoffice.org/54511
Justin Luth committed a patch related to this issue.
It has been pushed to "master":
tdf#117297 sw unotbl XCell: apply char/para style props to text
It will be available in 6.1.0.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
This is actually in 6.2. No intention to backport.
*** Bug 84680 has been marked as a duplicate of this bug. ***