Created attachment 173123 [details] file to reproduce the invalid docx document Open attached file and export it to docx. Open the exported file in Word. Word cannot read it. Reason is a duplicate <a:xfrm> element. Some investigation: DMLPresetShapeExporter::WriteShapeWithAVlist() calls WriteShapeTransformation which writes the first <a:xfrm> element. Then it calls GetAdjustmentPointXValue(0) DMLPresetShapeExporter::GetAdjustmentPointXValue() calls GetHandleValueOfModificationPoint(nPoint, u"RangeXMinimum") That has a loop over all Name/Value pairs. In case of "bracePair" the loop will find nothing, because they do not have "RangeXMinimum" but "RangeYMinimum". Thus the return value is empty. Back in GetHandleValueOfModificationPoint it makes a .get() on the empty return value, which gives a runtime error. That is caught in WriteShapeWithAVlist and makes it return 'false'. With this 'false' the part after shapes.cxx#848 is entered. And that will write in #873 the <a:xfrm> element again.
bracketPair fails too.
I think this is expected for now. Proper handling of these shapes is asked in bug 142603 and the initial implementation of the new export class has just not covered those cases. Neither the rest of shapes in bug 142599 bug 142601 bug 142602 bug 142604 - but eventually we shall get there.
Thank you for reporting the bug. Unfortunately, i can reproduce this, however the fix coming soon (test and merge left). Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 90df123cd9ff9fc1c7b991d9ae9a1ed8c9e9f0de CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: CL
Attila Bakos (NISZ) committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/99a459dfdfd9f82ed3506708e131dd52a1a62384 tdf#143028 DOCX: fix corrupt export of shape "bracePair" etc. It will be available in 7.3.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.
Attila Bakos (NISZ) committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e190196f255b7d0147d61fd967a2b2a61a932185 tdf#143028 DOCX export: fix RangeY regression of preset shapes It will be available in 7.3.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.
Attila Bakos (NISZ) committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/a871b36c3ba92e289367096aa0b44416b605d7e8 tdf#143028 DOCX: fix corrupt export of shape "bracePair" etc. It will be available in 7.2.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.