[Libreoffice-bugs] [Bug 118812] FILEOPEN: Direct formatting overwriting style in DOCX tables, wrong spacing

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Feb 4 11:27:14 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=118812

--- Comment #17 from Justin L <jluth at mail.com> ---
(In reply to NISZ LibreOffice Team from comment #16)
> Seems like the 8 pt font size here is taken from the table style in Word
> (but not the font color), and from the paragraph style in Writer.
Fontsize is very tricky with table styles, because of this compat setting:
---------------------------------------------------------------
2.3.1 overrideTableStyleFontSizeAndJustification

A compatSetting element whose name attribute has the value
"overrideTableStyleFontSizeAndJustification" and whose uri attribute has the
value "http://schemas.microsoft.com/office/word" specifies how the style
hierarchy of the document is evaluated.

If this value is true, then the style hierarchy of the document is evaluated as
specified in [ISO/IEC29500-1:2016] section 17.7.2.

If this value is false, which is the default, then the following additional
rules apply:

    If the default paragraph style (as specified in [ISO/IEC29500-1:2016]
section 17.7.4.17) specifies a font size of 11pt or 12pt, then that setting
will not override the font size specified by the table style for paragraphs in
tables.

    If the default paragraph style (as specified in [ISO/IEC29500-1:2016]
section 17.7.4.17) specifies a justification of left, then that setting will
not override the justification specified by the table style for paragraphs in
tables.
---------------------------------------------------------------
Things get very interesting if the table style itself does not specify a
fontsize, but a docDefault does.  In that case, the tableStyle apparently picks
up the docDefault fontsize and seems to consider it part of the tableStyle
specifications. So in the compatible case:
1.) even though the tableStyle has no fontsize property, it ought to pick up
the docDefault size of 8.
2.) if the default style has a fontsize of 11 or 12, then the 8pt tableStyle
will win out (only in the compatible mode).

So it seems like we ought to merge the table style with docDefaults properties
before evaluating anything. In the non-compatible case, we would match or be
overridden by style properties. In the compatible case, we can override
left-justification or fontsize11/12.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200204/e7219e0f/attachment.htm>


More information about the Libreoffice-bugs mailing list