Bug 167714 - FILEOPEN RTF Horizontal line shape anchored in table cell has wrong width
Summary: FILEOPEN RTF Horizontal line shape anchored in table cell has wrong width
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: RTF-Shapes
  Show dependency treegraph
 
Reported: 2025-07-29 10:08 UTC by Gabor Kelemen (allotropia)
Modified: 2025-07-29 16:48 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Similar file with colored horizontal lines as docx (11.82 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-07-29 10:25 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2025-07-29 10:08:47 UTC
This is another part of bug 167713 documents issues.

When horizontal lines are anchored inside table cells, their width matches the table cells width in Word (and dynamically resizes with the cell...).

When opened in Writer, the lines have the full pages width within the margins.

1. Open attachment 202055 [details]
-> The line shapes in the tables are too wide.

For a screenshot see attachment 202056 [details]

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7f4868348c14b305fcd75744e1e3544d0d3a5d61
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: de-DE (fr_FR); UI: en-US
Calc: threaded

Seems to have started in 6.1, but before this it was even worse (size reported as 0.04 by 0.05 cm, yet even longer than the page width):

https://cgit.freedesktop.org/libreoffice/core/commit/?id=b360322c63d62b54b5e6adac4def3f8b761dc1da

author	Justin Luth <justin_luth@sil.org>	2017-09-18 14:57:47 -0400
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-12-04 15:05:01 +0100
commit b360322c63d62b54b5e6adac4def3f8b761dc1da (patch)

tdf#97648 ooxmlimport: calculate percentage-based widths
Comment 1 Gabor Kelemen (allotropia) 2025-07-29 10:25:00 UTC
Created attachment 202057 [details]
Similar file with colored horizontal lines as docx

A similar example using colored lines and saved as docx, seems to have the line widths correctly handled since 6.0 commit:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c14be5f5545768fc06bd1e3900e076dc28be2649

author	Justin Luth <justin_luth@sil.org>	2017-09-07 21:07:40 -0400
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-09-11 12:31:19 +0200
commit c14be5f5545768fc06bd1e3900e076dc28be2649 (patch)

tdf#97648 vml import: fix horizontalLine percentage

Maybe this can be helpful.
Comment 2 Mike Kaganski 2025-07-29 15:02:36 UTC
Note that both RTF and DOCX have their lines very long - check that by selecting the lines, and see that they extend beyond the cell on both sides. So the fix for DOCX seems wrong - it gives an incorrect width, that happens to be inside the cell.

The problem here is getting the object cropped visually to the cell.