+++ This bug was initially created as a clone of Bug #128501 +++ Steps to reproduce: 1. Open attachment 46861 [details] from bug 37315 2. Save it as RTF file 3. Open the new created file -> all the images are gone Reproduced in Version: 6.4.0.0.alpha1+ Build ID: 2d0a4182712673d8f7a5abe919cd2a1d5ece4a77 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded [Bug found by office-interoperability-tools]
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=f4ba484183a1e7b9824f10580d633466c266828f author Tamas Bunth <tamas.bunth@collabora.co.uk> 2019-05-13 01:02:07 +0200 committer Tamás Bunth <btomi96@gmail.com> 2019-05-13 18:14:26 +0200 commit f4ba484183a1e7b9824f10580d633466c266828f (patch) tree 5795d2c442e3dbb3496fcfd5ac6f5bd8ddc39e15 parent 8401a26363bf7cb3c30bf783b3f8978f4b69e4c4 (diff) ooxml import: supprt cropping to shape Bisected with: bibisect-linux64-6.3 Adding Cc: to Tamas Bunth
I'm not sure how much I would call this a regression. This is a DOCX file being imported, and the code change is about import. However, the bug report is about RTF export. The image is now imported as a customShape. I assume that RTF doesn't know how to export custom shapes. If true, this would be an enhancement request to start supporting that. The linked bug reports provide export support added for PPT and DOC formats, so that should be rather helpful.
Agreed, a "your regression is my feature" case. :-) RTF export has some support for custom shapes, see code around https://github.com/libreoffice/core/blob/6698f0267496d1b9f625294aaacdd608036b799d/sw/source/filter/ww8/rtfsdrexport.cxx#L368-L377 -- but when I did that, I only had hand-drawing (pencil commands like move-to, line-to, curve-to) in mind, probably that needs extending to handle bitmap fill.
Getting an exception sw/source/filter/ww8/rtfsdrexport.cxx:507: failed to fetch graphic. com.sun.star.beans.UnknownPropertyException message: "Graphic at svx/source/unodraw/unoshape.cxx:1701" A hack fix that at least preserves the pictures (without any fancy cropping) could be a fallback attempt to: xPropertySet->getPropertyValue("FillBitmap") >>= xGraphic;