https://bugs.documentfoundation.org/show_bug.cgi?id=143028

            Bug ID: 143028
           Summary: FILESAVE DOCX Export of "bracePair" produces invalid
                    file, that Word cannot read
           Product: LibreOffice
           Version: 7.3.0.0 alpha0+ Master
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Keywords: implementationError
          Severity: normal
          Priority: medium
         Component: filters and storage
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Created attachment 173123
  --> https://bugs.documentfoundation.org/attachment.cgi?id=173123&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to