diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2021-07-05 22:21:23 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-07-14 11:34:43 +0200 |
commit | af99c01570adc0c9205e1650d10866f80bb8118a (patch) | |
tree | 97d146fc8e1904efccd00552d427554bcdd8dd03 /sw/inc/unoframe.hxx | |
parent | 3f618170b8474b4a4e97aa7685daf064d0413a57 (diff) |
tdf#143219 improve docx import/export of contour wrap
The current solution has some problems:
(1)
Currently effectExtent is used on import to increase the wrap margins
for fat stroke and effects like shadow and glow in case of contour
wrap.
Problems:
Word writes these values, but actually the wrap polygon is authorative
and third party applications might not write these values at all.
The wrap margins were increased on import, but not decreased on export.
The effectExtent values by Word contain in addition the amount for
rotation as needed in wrapSquare. That part was not removed.
(2)
To avoid negative values in dist* values they were compensated with
effectExtent. For that, the complete effectExtent was shifted to dist*
and effectExtent was set to zero.
Problems:
Contour wrap does not use effectExtent but a wrap polygon. This is set
by Word in a way, that it includes the effect extents. LO uses the
original wrap polygon if available. So moving the effectExtent values
to dist* gives too large 'distance to text' in case of contour wrap,
because effects were considered twice.
The solution here replaces the way, how the margins are calculated in
case of contour wrap. Now the range used by the wrap polygon is
compared with the range used by the shape geometry. The difference is
added to 'distance to text'. To be able to remove these values on
export, they are put into the InteropGrabBag.
LO and Word use different concepts for contour wrap. Any solution gives
only an approximation. But adapting 'distance to text' brings
rendering in LO nearer to the way Word renders contour wrap.
Change-Id: Ic3c1c075fedfa7f79e4fe1f3c095da12cf274e36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118538
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/inc/unoframe.hxx')
0 files changed, 0 insertions, 0 deletions