diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-01-18 17:04:14 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-01-19 09:11:31 +0100 |
commit | 4a7281fa206c0a82cfc2ba23f25c31ae775d8777 (patch) | |
tree | a40e886cd9b57d59074d5b468a451e0c2cac5481 /cppuhelper/source/paths.cxx | |
parent | dc503bfebf8a9d4dc512d46bfcb01e8c8b4bbb93 (diff) |
sw: fix unexpected paragraph border inside table cells
The bug document has a table cell, which contains a paragraph with
borders. Its left/right/bottom borders are rendered in Writer, but not
in Word.
The reason for the left/right border is that it's outside the
paragraph's frame area, which is not rendered in Word. Fix this by
clipping the rendered borders so they don't go outside the paragraph's
frame area. (Normally the frame area is the larger rectangle, and then
margins may cause a smaller "print area", but in this case we have a
negative right margin, so clipping the print area to fit into the frame
area actually does something.)
This is quite similar to what commit
1e21902106cbe57658bed03ed24d4d0863685cfd (tdf#117884: intersect border
with paint area of upper frame., 2018-05-26) did for table borders.
The bottom border is a different problem: the cell has a fixed height
and enough content so the paragraph is cut off vertically. This means
that technically the bottom border would be inside the frame area, but
Word cuts it off, because they apply clipping on the not-yet-cut-off
rectangle. Fix this by dropping the bottom margin when the frame is cut
off.
Change-Id: I7f65b68997330b247db65839db8a484e74f78c64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128569
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'cppuhelper/source/paths.cxx')
0 files changed, 0 insertions, 0 deletions