| Summary: | FILESAVE: RTF: Cropped images are lost after RT | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Xisco Faulí <xiscofauli> |
| Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | NEW --- | ||
| Severity: | major | CC: | aron.budea, btomi96, gerald, jluth, vmiklos, xiscofauli |
| Priority: | medium | Keywords: | bibisected, bisected, dataLoss, regression |
| Version: | 6.3.0.4 release | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=128501 | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 137753 | ||
|
Description
Xisco Faulí
2020-12-02 16:38:28 UTC
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;
|