Description: Image not exported to rtf/doc/docx Steps to Reproduce: 1. open the attached file 2. Save as RTF/DOC/DOCX 3. File reload Actual Results: Image on second page gone Expected Results: Not so.. even if this bit of funny document with the image on the second page.. try to drag it :-) Reproducible: Always User Profile Reset: No Additional Info: Version: 7.1.0.0.alpha0+ (x64) Build ID: <buildversion> CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); GI: nl-NL Calc: CL and in 3.3.0
Please attach the file
Created attachment 163863 [details] Example file
@Justin, Sorry to bother again. As the whole DOC/DOCX export being a mystery for me. The bottom image at page 2 doesn't behave 'normally'. Some eccentric anchoring problem which can happen on bad days. Is this also they reason why to DOCX/DOC/RTF filter is through the image out of the window (not exporting)
It is worse round-tripping it to ODT format - it crashes a dev build with vcl/source/image/ImplImage.cxx:101: Size ImplImage::getSizePixel(): Assertion `maBitmapChecksum == 0' failed. So I'd guess there is something fundamentally wrong with the image itself, or the code that is handling it.
@Tomaž You're the image handling expert, as far I'm know. Any developer wisdom here? FWIW: assert is introduced by: https://gerrit.libreoffice.org/64040 (but the problem is older) (In reply to Justin L from comment #4) > It is worse round-tripping it to ODT format - it crashes a dev build with > vcl/source/image/ImplImage.cxx:101: Size ImplImage::getSizePixel(): > Assertion `maBitmapChecksum == 0' failed. > > So I'd guess there is something fundamentally wrong with the image itself, > or the code that is handling it.
(In reply to Justin L from comment #4) > It is worse round-tripping it to ODT format - it crashes a dev build Oh, I'm getting that with every document I save to ODT - nothing special about this particular file. (I just created a new blank document, inserted a png image, saved, and assert-crashed.)
(In reply to Justin L from comment #6) > (In reply to Justin L from comment #4) > > It is worse round-tripping it to ODT format - it crashes a dev build > Oh, I'm getting that with every document I save to ODT - nothing special > about this particular file. (I just created a new blank document, inserted > a png image, saved, and assert-crashed.) Is it limited to your build or? [Can't test]
(In reply to Telesto from comment #7) > Is it limited to your build or? [Can't test] Probably not. I see Stephan has commented on the gerrit commit link in comment 5
Created attachment 164025 [details] 131729_lostImage.odt: minimalized version of the document. In this minimized version, the second picture is to-character anchored on the last word "vulputa|te." Some observations about the documents: -if you delete the first picture, the second one is there in .docx -this is one huge paragraph. If you add a paragraph, the second picture is there. -if you do anything that creates character traits, the second picture is there. I think the lack of a character run before the picture anchor is the root of the problem. wrtw8nds.cxx tries to write out the entire text in one shot, jumping right over the to-character anchor point?
(In reply to Justin L from comment #9) > I think the lack of a character run before the picture anchor is the root of > the problem. wrtw8nds.cxx tries to write out the entire text in one shot, > jumping right over the to-character anchor point? I'm only knowing that anchors + large paragraphs don't go well together. Or smaller paragraphs split across a page and try to insert a shape on the second page. So not sure if this a side-effect of they large anchoring issues, or a problem at the DOC/DOCX/RTF filter specific
(In reply to Telesto from comment #10) > I'm only knowing that anchors + large paragraphs don't go well together. So not sure if this a side-effect of they large anchoring > issues, or a problem at the DOC/DOCX/RTF filter specific This looks very much like a MAJOR export failure. From what I can see, ONLY pictures anchored AT THE STARTING POINT OF A CHARACTER RUN are exported. All others are ignored. ::OutFlys(nCurrentPos)
Since LO 6.4 (bug 87720 comment 43), the default is at-char positioning, so this is really bad...
FWIW: Cut the image on the second page (minimized example) & past it again. Both images will be present (layout is different, but not the point)
OK - not as bad as I thought. It seems like just an edge case of searching for the next position before any flies had been processed. But lots of things here are not matching up in my mind. Especially this one: commit dce1d0766c5013e35762ab85f263df312901f5f4 Author: Caolán McNamara on Mon Oct 14 13:24:31 2002 +0000 #i2916# integrate markm character anchoring export impl http://gerrit.libreoffice.org/c/core/+/100375 tdf# 135329 sw MS export: prevent skipping at-char anchors http://gerrit.libreoffice.org/c/core/+/100386 tdf#135329 sw MS export: remove effectively dead anchoring code http://gerrit.libreoffice.org/c/core/+/100387 tdf#135329 sw MS export: don't miss nextAttr fly position
(In reply to Telesto from comment #13) > FWIW: Cut the image on the second page (minimized example) & past it again. Well, pasting puts it at the end of the paragraph for me. If you move it back to the original character anchor, it is lost again.
(In reply to Justin L from comment #15) > (In reply to Telesto from comment #13) > > FWIW: Cut the image on the second page (minimized example) & past it again. > Well, pasting puts it at the end of the paragraph for me. If you move it > back to the original character anchor, it is lost again. True, but the whole anchoring is quirky. 1. Open the minimal example 2. CTRL+CUT the image on the second page 3. Undo (expected, same result). 4. Save As DOCX 5. File reload: Image is present, but image over text (wrap broken) There is something quite wrong with anchoring handling itself, IMHO (look at my whole list of bug I posted against Meta Wrap/Anchoring). And lets maybe there is an issue at the DOCX/DOC side too. I only do know that the behavior is pretty quirky. It can produce all sorts of unpredictable results (from my perspective). There might be a totally logical explanation for this from DEV point of view.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a5ada62f564b90cf211929baf7694f477a53a445 tdf#135329 sw MS export: prevent skipping at-char anchors It will be available in 7.1.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 164063 [details] Example file (third) 1. open the attached file 2. Press Enter at top of the page 3. Save AS DOCX 4. Notice the image gone 5. Save AS ODT will result in a different 'on screen' vs file reload situation (did report this separately)
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/245470582c91e9ebb84e53a80afd86b7978e5650 tdf#135329 sw MS export: remove effectively dead anchoring code It will be available in 7.1.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/c8a95925ca316c2656c81696b1e87c7d5767883d tdf#135329 sw MS export: don't miss nextAttr fly position It will be available in 7.1.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/9a8126262a8afba46efbfac5160b5f8cf13c9bd6 tdf#135329 revert sw MS export: prevent skipping at-char anchors It will be available in 7.2.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-1": https://git.libreoffice.org/core/commit/d6fe7099092ed74b3a2580e0d95ed9229e262212 tdf#135329 revert sw MS export: prevent skipping at-char anchors It will be available in 7.1.0.0.beta2. 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.