Created attachment 182270 [details] The example file saved as RTF by Writer This is related to bug 140302 When the example file there attachment 169630 [details] is saved to RTF format and opened in Word, the two images in the table on the first page jump out of the table and appear incorrectly on top of each other. 1, Open attachment 169630 [details] in Writer 2, Save as RTF, then open it in Word 3, Compare how the two blue images in the table on the first page appear in Word. Note: in Word, turning on the "Layout in table cell" option (Format Picture - Layout tab - Advanced - Position tab) seems to put them back in their original place in the table. Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: dc92a4d973086ce8a6a5f75ba0f4d4c9ca05537a CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: en-US (hu_HU); UI: en-US Calc: threaded Also happens with 7.0, 6.0, 5.0, 4.0. In 3.6 all the images were exported anchored as character, which looked more like the original in case of these, but not in case of the other images in the file. Wouldn't call this a regression.
Created attachment 182271 [details] The original file in Writer, with its RTF version in Word
I didn't test, waiting for a fix to come to repo, please test with fix.
Repro and confirmed with office.com Arch Linux 64-bit, X11 Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 52ebc632b3cfa122dcb178cf28d8dbc7c7c57007 CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 3 February 2023
This is the RTF equivalent of DOC export bug 157637. In LO, the default for tables/shapes is NOT to follow text flow, while the default for Word is to layoutInCell. This problem is compounded by the fact that when layoutInCell is not true, Word does NOT treat the cell paragraph that the image is anchored in as "the paragraph", but instead it treats the paragraph containing the entire table as "the paragraph", and so any positioning is done relative to "column/para" are done outside of the table. But there are so many exceptions and special cases with layoutInCell that any kind of mapping would be extremely hard to do. Plus layoutInCell is not a native RTF capability, but is handled via an application-specific-extension name/value pair. Basically, if LO's shape is (fully contained within the cell OR is wrap-through) AND is vertically and horizontally oriented "to entire paragraph", then export should flag it as "layoutInCell". It is worth noting that DOCX compat15 ALWAYS treats everything as layoutInCell, even if it is set to false. That suggests the best solution might be to always flag as layoutInCell if vertical/horizontal orientation is related to paragraph instead of page.
(In reply to Justin L from comment #4) > That suggests the best solution might be to always flag as layoutInCell if > vertical/horizontal orientation is related to paragraph instead of page. Unfortunately, at the time of export where this is being calculated, we don't even know if it is in a table, let alone whether it fits inside the cell or not. So while certain documents will look better, others will turn into disasters.