summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-11-03 21:48:37 +0100
committerMichael Stahl <mstahl@redhat.com>2017-11-03 22:50:26 +0100
commit2e39e519767d58a20829baca2fb0a2418b70f772 (patch)
treee0c0b5aacfac457b1ff29aaf90ecfec1aa85b736 /sc/source
parentfdcd11ff68fcd9e46aad6efc20779a063f4f6182 (diff)
sw: ODF import: prevent shapes from inheriting paragraph default margins
The problem is that even with the vertical-pos default fix, we don't render ShapesWithWrapping.odt the same as Word does: https://beta.opendocumentformat.org/rendercompare/upload/223/86/191/1 The shape still has a spurious bottom margin, which should not exist. This has a surprising cause: the default-style family="paragraph" has the attribute fo:margin-bottom="0.1388in" on paragraph-properties, which gets imported as the pool's default item of RES_UL_SPACE; there is nothing that prevents the shape from using this pool default item if it doesn't have a margin set on itself. Prevent that by overriding the pool default in SwDoc::mpDfltFrameFormat, which already carries a XFillStyleItem for similar reasons. The mpDfltFrameFormat is used by a lot more than just shapes, but none of that stuff should inherit paragraph defaults. As an aside the fo:margin-* properties are also allowed on style:graphic-properties, but it turns out that the implementation of the default-style family="graphic", in SvxUnoDrawPool/SwSvxUnoDrawPool, does not have the corresponding properties, hence cannot import these. Not sure if it would be better to have multiple SvxULSpace items with different IDs, so the paragraphs and shapes and etc. can have separate defaults. Change-Id: Ie6a196db567beb7a48b4176f383c88490dcfb8e7
Diffstat (limited to 'sc/source')
0 files changed, 0 insertions, 0 deletions