Bug 118947 - FILEOPEN:DOCX: table style is overriding para-style font size
Summary: FILEOPEN:DOCX: table style is overriding para-style font size
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.5.0 target:7.0.0
Keywords: bibisected, bisected, regression
Depends on: 128153
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2018-07-26 09:57 UTC by Justin L
Modified: 2020-02-12 11:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
calendar2b.docx: hand-modified to prove default paragraph style has no impact (9.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-07-26 09:57 UTC, Justin L
Details
noDefault.docx: visually obvious unit test in ooxmlexport11 can be used to prove eventual (9.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-07-27 09:23 UTC, Justin L
Details
debug patch: attempted fix that doesn't work because properties not seen as ::SET (12.65 KB, patch)
2018-07-31 16:31 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2018-07-26 09:57:44 UTC
Created attachment 143776 [details]
calendar2b.docx: hand-modified to prove default paragraph style has no impact

The calendar should easily fit on one page. The size of the table contents should be defined by the table style (14pt), since the paragraph style (MyStyle) only inherits the docDefaults size (32pt). Whether Normal (48pt) is defined or not should be irrelevant.

This example file was first broken in LO 4.1 by commit 23b67c536537c91020cf5a45ab5cb36d7316ed89 
DOCX import: fix import of font size in table styles

and is not fixed by commit 1da6609eb8d3d70bb620d949b1935a5789c2d2ce
DOCX import: default para style has priority over table styles

This example indicates that the entire design of importing table styles needs to be revised because so far all of the focus has been on InStyleSheetImport() when in fact this can only be known at the paragraph level.
Comment 1 Justin L 2018-07-26 11:18:39 UTC
Used bibisect43all to narrow the range and then assumed the obvious commit.
Bibisect41max gives me various different, nonsense commits, but does confirm the identified commit when I directly test that commit.
Comment 2 Justin L 2018-07-27 09:15:24 UTC
bug 103961 has comments starting at comment 9 related to the ability to set document-level paragraph settings, and remove the direct property from the styles, so that we can begin to determine whether a style has a property that should override a suggested table style.
Comment 3 Justin L 2018-07-27 09:23:48 UTC
Created attachment 143800 [details]
noDefault.docx: visually obvious unit test in ooxmlexport11 can be used to prove eventual
Comment 4 Xisco Faulí 2018-07-27 11:16:17 UTC
moving to NEW
Comment 5 Justin L 2018-07-31 16:31:29 UTC
Created attachment 143854 [details]
debug patch: attempted fix that doesn't work because properties not seen as ::SET

I had hoped that ::finishParagraph would have been a good place to pre-emptively add the properties that would be SET by the table-style. I think that the table property only saves if DEFAULT property exists (see bug 117297, where the cell properties are written into paragraph properties).

However, I think that character properties are probably different, and are only SET when applied to specific characters and not to the paragraph generally. In that case, it is probably the same as setting the "default" value and leaving the hints alone. In any case, this patch didn't work, but it has some functions that I would like to add if they are useful anywhere else.
Comment 6 Justin L 2019-10-23 16:24:54 UTC
The following will be proposed for LO 6.5 master
https://gerrit.libreoffice.org/81413 tdf#118947 sw tablestyle: manually scan parents for ::SET
https://gerrit.libreoffice.org/81414 related tdf#118947 sw tablestyle: no need to avoid numbered para

which depends on bug 128153's replacement of an ugly hack.
Comment 7 Commit Notification 2019-11-27 10:58:47 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6bced3c6a1bf8d4652dd6ba75e41b128ce1bfc5c

tdf#118947 sw tablestyle: manually scan parents for ::SET

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-11-29 18:49:51 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a070fb8e87e0712de5336a9683208b6b277ce9b9

tdf#118947 writerfilter: remove obsolete tablestyle fontsize hack

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Justin L 2019-11-30 07:29:04 UTC
Not backporting this one...
Comment 10 Commit Notification 2019-11-30 18:50:14 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6ed87cc5a4f755f360951550cac836e8967fc6bf

related tdf#118947 sw tablestyle: no need to avoid numbered para

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2020-02-12 11:55:00 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/362437b58a1c64be5c6c7a4a6e7a0c16d2eb65a4

Revert "related tdf#118947 sw tablestyle: no need to avoid numbered para"

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2020-02-12 11:56:32 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a9ba8e57a41c5ddf3597272bddab30e51fb3fd38

Revert "tdf#118947 sw tablestyle: manually scan parents for ::SET"

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.