Description: While placing at least 2 images, anchored as a character, on the same line and assigning them a caption, after saving and reopening the DOCX document, the last image is duplicated with the caption and the frame on the very next line. Version: 7.1.4.2 (x64) / LibreOffice Community Build ID: a529a4fab45b75fefc5b6226684193eb000654f6 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: ro-RO (ro_RO); UI: en-US Calc: CL Steps to Reproduce: 1. Create a new LO document. 2. Place two images on the same line (make them just about half-row each), separating them with some spaces. Make sure that the image anchor is set As Character. 3. Insert a Caption for each one. (This will create a frame for each one.) 4. Save the document as DOCX and close. 5. Reopen the document and notice that the second picture is duplicated under the first one, copying the frame and the Figure 2 designator. Actual Results: After reopening the document, the second picture is duplicated under the first picture. Expected Results: There must be no change to the document. Reproducible: Always User Profile Reset: No Additional Info: I can always reproduce this behaviour if the images have captions (and frames) and if the images occupy about half of the line each one. It reproduces only when saving the document as DOCX.
Created attachment 173248 [details] This is a document containing 2 images on the first line. When saving the document, LO Writer creates a copy of the second picture.
Further information: It seems that LO Writer duplicates the images on SAVING as DOCX and closing, as if I open the document in Microsoft Word, there are already 3 pictures there instead of only 2. If you continue to "Save As..." the document, it will duplicate the picture even more 2 times, 3 times etc.
Created attachment 173264 [details] Example file (ODT) Based on the source. Deleted 1 image frame saved to ODT. If you export to DOCX you get additional frame Confirm Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: c38d0d501f5eca648bdf0fd2914b57e06f505f7e CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL
No repro with Version: 7.1.0.0.beta1+ (x64) Build ID: f9fab4203c1aa0b9a3f27ce2713b6d5addc7df19 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: nl-NL Calc: CL
Bibisected with win64-7.2 to: https://git.libreoffice.org/core/+/3eced2d52415abeac266804ab682bee022322a19 author Michael Stahl <michael.stahl@allotropia.de> Wed Mar 10 11:26:07 2021 +0100 committer Michael Stahl <michael.stahl@allotropia.de> Wed Mar 10 16:55:05 2021 +0100 sw: DOCX export: put fly before fieldmark start into its own run Adding CC to: Michael Stahl
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f261fae4af72b1328bc3e93fc52a9a24ce0975b3 tdf#143039 tdf#143106 sw: DOCX export: don't export duplicate flys It will be available in 7.4.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.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/eb88b41c15f6451e06b34e2ec0ef5ec4359c200c tdf#143039 tdf#143106 sw: DOCX export: don't export duplicate flys It will be available in 7.3.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.
OK now when reoped in LO and MSO. I guess this should be marked as Fixed. Thanks Michael.
Verified with Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: 2761545769ef564b14fc8cd854a35c42bc269f02 CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded