Created attachment 184625 [details] shapes and screenshots Open attached files. It contains the preset text warp shapes from index 24 to 31 and to each one a screenshot how it looks in Word. The shapes are imported with a correct Type value, but they are wrongly rendered. The error is likely in mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType ) method in https://opengrok.libreoffice.org/xref/core/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx?r=4cfe4699#8350 That method maps the MSO_SPT number to the mso_CustomShape shape description. For the shapes in question you see the comment // Don't know, simply mapping to TextSimple The shapes are specified in https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-odraw/9c0c5c01-9e90-41aa-ba15-477dacb4cc8e The shapes here are special, as they will not be correctly rendered in Word 2010 and earlier, see the comments in the above given link for these shapes. The specification shows only images but has no exact path description. Comparing the results in Word shows, that Word maps these shapes in this way: (24) msosptTextSimple -> (136) msosptTextPlainText (25) msosptTextOctagon -> (137) msosptTextStop (26) msosptTextHexagon -> (138) msosptTextTriangle (27) msosptTextCurve -> (175) msosptTextCanDown (28) msosptTextWave -> (156) msosptTextWave1 (29) msosptTextRing -> (148) msosptTextArchUpPour (30) msosptTextOnCurve -> (175) msosptTextCanDown (31) msosptTextOnRing ->(144) msosptTextArchUpCurve So we should do the same. The shapes (24)..(31) are not available in the UI. Therefore "Minor" severity. But they can be created with XEnhancedCustomShapeDefaulter interface. The attached file was created by Word from a manually changed .rtf file.
Created attachment 184635 [details] Side by side how the attached looks with word vs writer With Microsoft® Word para Microsoft 365 MSO (versión 2212 compilación 16.0.15928.20196) de 64 bits vs Version: 7.4.4.2 (x64) / LibreOffice Community Build ID: 85569322deea74ec9134968a29af2df5663baa21 CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL BTW seems t24 it's only a size issue.
Created attachment 184638 [details] patch On pc Debian x86-64 with master sources updated today, I could reproduce this. I attached a patch, is it what you meant or did I miss something? (except the 3D rendering).
Created attachment 184640 [details] similar file in RichTextFormat The wrong size is a different problem and is specific for docx. Import von RTF has the correct size, but the handle position is wrong. Both problems should go to new bugreports. BTW, the shapes are in VML format in docx.
I gave a try on the rtf file with the patch, it's not perfect but it's far better.
(In reply to Julien Nabet from comment #2) > I attached a patch, is it what you meant or did I miss something? (except > the 3D rendering). That is exactly what I meant.
Ok then I've submitted the patch here: https://gerrit.libreoffice.org/c/core/+/145491 As I indicated in it, you're the one who did the work! :-)
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/11319f419988443af85cf3c60dbed12d67fc183f tdf#153000: file types MSO_SPT=25 to 31 are wrongly rendered 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.
Is it ok now and I can cherry-pick this on 7.5 or is there still something to do here?
In this place is nothing more to do. The wrong size in docx and the wrong handle position in rtf have to be solved somewhere else. Unit test will come, but I first need to update and build my repository, which takes some time.
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e21053ef1113eb32d6d364b6c69470570a6846fe tdf#153000 Unittest file types MSO_SPT=25 to 31 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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/115ea63a67c8d8e9efffd95450922902171cb1a8 tdf#153000: file types MSO_SPT=25 to 31 are wrongly rendered It will be available in 7.5.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.