Created attachment 186534 [details] n592908-frameC.docx: top frame border spacing copied to paragraph border spacing Currently the only time that framePr is exported is if framePr settings are grabbaged on import. Otherwise (most) frames are exported as a DrawingML shape - which is imported as an editeng drawing object. An exploration into exporting textboxes and captions using framePr can be found at https://gerrit.libreoffice.org/c/core/+/150114. FramePr PROs: • simple xml • imports as SW native – not a synchronized editeng monstrosity, better styles, text area is already MS Word compatible. FramePr CONs • no overlap setting – layout decision to overlap sequential framePRs is somewhat arbitrary. • limited wrapping choices. No before/after/through • relatively poor export support currently – missing background/shadow/links • not allowed in header/footer (at least, that is LO export rule) • layout loops might occur: regression danger from making a change. DrawingML PROs: • encourages code improvements to editeng • full wrapping support DrawingML CONs: • LO imports as draw frame sync’d to hidden SW frame. Causes layout issues • poor anchor import - only TO-CHAR or AS-CHAR – often translates to poor placement emulation This is a META kind of report. My intention is to add documents that highlight a specific issue so that the CONs (of both types) can be alleviated. This first attachment shows top/left margins being duplicated on framePr import (I assume). It bibisects to 3.3.1 (3.3.0 was OK). [Note - prior to 4.4, you need to look at the number in the dialog box, not at the layout.]. Duplicate left/right margins tend to be (mostly) absorbed in LO for some reason, but top margins are applied twice.
attachment 186535 [details] n592908-frameC_word2010.pdf: how it looks in MS Word proposed temporary import fix for the extra top/bottom margins at https://gerrit.libreoffice.org/c/core/+/150157. But really the export should be fixed first, so that a proper import can be done.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/31ea6305b6a763ee48f639562313d9bd109a2923 tdf#154703 writerfilter framePr: avoid exception with hasValue It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e4b1be58db73f5a3c483b40b5615c1c764bbe1d3 tdf#154703 writerfilter framePr: don't duplicate top/bot spacing It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/499247966af565071542f1cdfa882d6b8e6c33f0 NFC tdf#154703 docx export framePr: cleanup prep before patch It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/996d264dd4ca37c869e5109296de6ae306f740d9 tdf#154703 docx export framePr: export frame background It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/02c902bde09984a87f19ac0eb63942724056c982 tdf#154703 docx export framePr: merge para/frame FormatBox It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a24d461d736de0a29bb8ef2a20b57db4836cda3e tdf#154703 writerfilter framePr: RTF != INVERT_BORDER_SPACING It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 186668 [details] ooo39250-1-minB.rtf : table in framePr RTF can also import as framePr, although the export as RTF loses the framePr status I believe, and exports as a different kind of frame. Lots of things don't export nicely into RTF, so I won't spend much time with that format. I'm not sure if this attachment is much value. It doesn't import the table nicely, but I assume that is just an RTF import issue, and not a framePR specific issue. LO has an INVERT_BORDER_SPACING compat setting for DOC/X, but not for RTF. The setting just ignores paragraph border spacing (inside a frame only I assume). I have to assume that it was put in place simply to handle these framePrs - in the strange cases where the frame contains paragraphs with differing border spacings. In that case it probably shouldn't apply to non-framePr frames but I expect that LO doesn't know the difference. In any case, I didn't dare to apply it to RTF as well - too many import/export implications to consider in an already bad starting place.
ooxmlexport frame-wrap-auto.docx is an example where the frame was centred, but now is "from left". Bisected to LO 4.4 commit 1c876f5616522ab695de8c0316cdb0c601081815 Author: Rohit Deshmukh on Fri Jun 13 11:39:56 2014 +0530 fdo#78590: Fix for Corruption of para with framePr & drawing object into para
Created attachment 186669 [details] wrapExample.odt: captions are a prime candidate for using framePr Although this example primarily shows wrap problems, it also demonstrates the problems (probably wrap related) that plague synchronized draw-frames when round-tripped to DOCX format. There are two images on the first page - but the captioned one often seems to be missing in DOCX until you click in the right spot. The layout problem became evident in 7.2.2 when GraphicImport.cxx marked drawing-objects as AT-CHAR instead of AT-PARA. Obviously the layout is just exposed by the change. commit c0b951024c2ec815f1ef70d59d31860df2434d28 Author: Miklos Vajna on Mon Sep 20 19:56:37 2021 +0200 tdf#143591 DOCX import: handle anchored objects as at-char
Created attachment 186670 [details] wrapExample2.odt: comment 10 round-tripped to DOCX, then RT to ODT Saving as ODT format lets this be tested prior to 7.2. Almost certainly the problem with comment 10's document is that the frame is trying to be on a different page than the anchor. There are lots of bug reports about that kind of behaviour. (In this case, it seems like the character anchor is at the end of the paragraph. There can't be right answer because other documents would be better served as anchored at the end of the paragraph I'm sure.) However, in this particular document it really shouldn't matter where the character anchor is, because the position is based on the "entire paragraph area". So it is just a layout problem.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e07d5c089ab2e8fe8a5cfa2a11cef3f1cf3afab3 tdf#154703 docx export framePr: export xAlign/yAlign It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1d12d12598927ef8a74dd648632112ceb16bdf78 tdf#154703 DOCX {im,ex}port framePr: adjust framesize by para spacing It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/1cebe3ef85b4b1f7c34263a2da38f4e1d269ae4b tdf#154703 docx export framePr: export xAlign/yAlign It will be available in 7.5.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Justin L from comment #11) > wrapExample2.odt: comment 10 round-tripped to DOCX, then RT to ODT https://gerrit.libreoffice.org/c/core/+/150637 is debug statements for this layout issue. Too many pathways for my brain to handle, and to much wrong on a grand scale - not just a minor wrong calculation but fundamental issues here. Fundamental issues on a fragile base is not somewhere I should be. This topic is covered by bug 135225.
(In reply to Justin L from comment #0) > An exploration into exporting textboxes and captions using framePr can be > found at https://gerrit.libreoffice.org/c/core/+/150114. Abandoned. Too fragile. Cannot easily target captions or any other specific instance or situation. Next idea: add bool "ParaFrameProperties" to grabbag at SwView::InsertCaption dialog.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/981c5b5421b5fc728e2b8140d7d52d8c8eb465e7 NFC tdf#154703 docx export: optimize/reorder "if TextBoxIsFramePr" It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/006b35d50024b1932d84380b5d2fec1f7066bccd tdf#154703 NFC sw framePr: flatten TextBoxIsFramePr and fix typo It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d3a121cecfa8fb3c6f81b05822ba3309d77ab85d tdf#154703 sw framePr: export knowing import wrap spacing limitations It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/deb1a14adb115710b5e40dd305dc5da4a4e3b065 tdf#97128 tdf#154703 docx export framePr: export frame textDirection It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Justin L from comment #16) > Next idea: add framePr hint at InsertCaption dialog. https://gerrit.libreoffice.org/c/core/+/150795 In that code review, Gabor commented: This is related to bug 131302 (which has an idea how to solve it) and bug 96579 (which collects duplicates) and all the See also ones. There were several other attempts to fix this over the years, but somehow all were inadequate and reverted. Also bug 121378 has some ideas how to improve this.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/05e637b36043fac83265bbdfbdba97632a8e939e tdf#154703 writerfilter framePr: avoid unexpected frame borders It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/3c0a6102ce26c546c0c448a8d7468dea92623273 tdf#154703 writerfilter framePr: avoid unexpected frame borders It will be available in 24.2.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
tdf#154703 writerfilter framePr: avoid unexpected frame borders This addresses a regression caused by comment 2's patch, fixing bug 159207, and should have used that bug number in the comment...