diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-10-03 17:24:21 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-10-09 16:38:48 +0200 |
commit | 04dbe930d6805de70e30e1c42b27752ae6ef27dc (patch) | |
tree | 35a9bc711b3bc4f311395ee3217fc4835c4877d5 /sw/source/core/unocore/unodraw.cxx | |
parent | d2bc7fa9b35ef2a00ab4ebb2264c5fbc519ab6ea (diff) |
DOCX import: fix interaction of table and paragraph style in table cells
Both table and paragraph styles can define paragraph properties for the
content of table cells, e.g. line spacing. The intended behavior is that
direct formatting has priority, then paragraph style, then the table
styles.
But in practice table style had priority: table style is turned into a
set of property name-value pairs by writerfilter/ code, then this is
applied to the content of a cell using SwXCell::setPropertyValue(). To
make sure that direct-format-from-table-style doesn't override
direct-format, there was already a check to not replace properties which
are set directly.
The problem is that in case the property value comes from a paragraph
style, that's not direct and still should have priority over
direct-format-from-table-style.
Fix this by checking for custom values not only in the paragraph's item
set, but also in its parents. Unless the parent would be the default
style, which doesn't count. Or in case the paragraph is numbered, which
complicates the situation, so leave that case unchanged.
Reviewed-on: https://gerrit.libreoffice.org/80146
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit c424a1f509205cfbaa3421bddfd6514b340a798a)
Change-Id: Ib554247cdc51fee0d9a6c7a26aecd38442dfa692
Reviewed-on: https://gerrit.libreoffice.org/80294
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
0 files changed, 0 insertions, 0 deletions