Bug 157161 - FILEOPEN DOCX: textbox (anchored in table, but NOT layout-in-cell) has wrong horizontal placement
Summary: FILEOPEN DOCX: textbox (anchored in table, but NOT layout-in-cell) has wrong ...
Status: RESOLVED DUPLICATE of bug 162541
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low normal
Assignee: Not Assigned
URL:
Whiteboard: compatibilityMode14
Keywords: filter:doc, filter:docx
Depends on:
Blocks: DOCX-Frames
  Show dependency treegraph
 
Reported: 2023-09-08 21:31 UTC by Justin L
Modified: 2024-08-26 10:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
anchoredInCellTextbox2.docx: textbox anchored in table cell, but not set to "Layout in cell" (15.79 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-09-08 21:31 UTC, Justin L
Details
anchoredInCellTextbox2_mso2010.pdf (4.89 KB, application/pdf)
2023-09-08 21:32 UTC, Justin L
Details
anchoredInCellTextbox2_2019.docx: a compat14 problem only as seen by this compat15 version (14.49 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-09-09 22:39 UTC, Justin L
Details
anchoredInCellTextbox2_2019.pdf: how this compat15 version looks in Word 2019 (39.04 KB, application/pdf)
2023-09-09 23:00 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2023-09-08 21:31:19 UTC
Created attachment 189442 [details]
anchoredInCellTextbox2.docx: textbox anchored in table cell, but not set to "Layout in cell"

In MS Word, the textbox is placed over-top of the table.

Steps to reproduce:
1.) open anchoredInCellTextbox2.docx

Notice that the textbox is positioned on the side of the table. Although that looks nice, it should be positioned relative to the paragraph margin, not the table cell.

This is inherited from OOo. This document didn't load both the table and the textbox until 3.6, where the position was already wrong.
Comment 1 Justin L 2023-09-08 21:32:51 UTC
Created attachment 189443 [details]
anchoredInCellTextbox2_mso2010.pdf
Comment 2 Justin L 2023-09-09 15:40:00 UTC
moving the table should not affect the textbox placement: it doesn't in Word...
Comment 3 m_a_riosv 2023-09-09 19:21:50 UTC
Reproducible
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: beaea2e992912b4747d790070b26371f557b1f57
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 4 Justin L 2023-09-09 22:39:53 UTC
Created attachment 189464 [details]
anchoredInCellTextbox2_2019.docx: a compat14 problem only as seen by this compat15 version

When a modern MS Word resaves the document (not as compatible), then it acts like LibreOffice. So it is only old documents that are affected. Low priority.

I have seen notes in the code that indicate that compat15 ALWAYS treats an anchor in a table as "layout-in-cell".

Layout in cell normally translates into PROP_FOLLOW_TEXT_FLOW, but LO in that mode forces the textbox to actually fully reside in the cell, instead of just basing its positioning on the cell. So there might be a difference between how images and textboxes are treated in MS Word when LayoutInCell.

This is starting to look like a rather ugly layout beast - perhaps not worth tackling.
Comment 5 Justin L 2023-09-09 23:00:39 UTC
Created attachment 189465 [details]
anchoredInCellTextbox2_2019.pdf: how this compat15 version looks in Word 2019

LO natively handles this like modern MS Word, and looks like this PDF for both versions.
Comment 6 Justin L 2023-09-11 20:54:46 UTC Comment hidden (obsolete)
Comment 7 Justin L 2024-08-26 10:47:29 UTC

*** This bug has been marked as a duplicate of bug 162541 ***