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

            Bug ID: 170686
           Summary: FILESAVE DOCX: corrupt document report by MS Word when
                    certain content controls contain a fly
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: bisected, filter:docx
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
            Blocks: 104528

Created attachment 205432
  --> https://bugs.documentfoundation.org/attachment.cgi?id=205432&action=edit
forum-mso-de-101258_minimal.docx

The plainText-y content controls are not allowed to contain an anchored fly -
i.e. no floating/text-wrapping shapes or frames.

I assume that this is actually more of an import bug than an export bug
(because on export we DO have a bPararaphHasDrawing flag that tries to prevent
this situation from happening.) So my guess is that on import we anchor the fly
too soon - before the content control's ending dummy character
CH_TXTATR_BREAKWORD.

In this minimized file, we have a checkbox content control. It is immediately
followed by an anchored textbox.
<w:p>
  <w:sdt>
    <w:sdtPr>
      <w:checkbox>
   ... ☐ ...
  </w:sdt>
  <w:r>
    <mc:AlternateContent> containing w:drawing and w:pict
  <w:r>
</w:p>

However, after LO round-trips this, the AlternateContent has moved into the
w:sdt.

Steps to reproduce:
1.) open forum-mso-de-101258_minimal.docx in LO and save as DOCX
2.) try to open in MS Word. It complains the document is corrupt.

NOTE: there is also a grabbagged SDT that contains all this. However, I don't
expect that to be a complicating factor in this case.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=104528
[Bug 104528] [META] Saved DOCX files that MS Word can't open
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to