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

            Bug ID: 171038
           Summary: FILESAVE ODT->DOCX: corrupt file / pageAfter break is
                    lost with follow page styles
           Product: LibreOffice
           Version: 3.3.0 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: bibisectNotNeeded, filter:docx
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 104528

Created attachment 205808
  --> https://bugs.documentfoundation.org/attachment.cgi?id=205808&action=edit
pageAfter2.odt: minimal example - page break lost when exporting to DOCX

A corrupt file (still without a page break) is created if the file in bug
171025 has header/footer text.

The difference in that case is that m_bParagraphOpened has been reset by the
header text. Since DocxAttributeOutput::SectionBreak thinks the paragraph
hasn't started, it creates a dummy paragraph for the sectPr. Actually, however,
the context is StartParagraphProperties (w:pPr), so m_bOpenedParaPr and
m_bParagraphOpened ought to be true. 

Steps to reproduce (using a document-in-the-wild):
1.) open attachment 70582 (57550_LoadingStylesToThisDocCauseCrash.odt from bug
57550) in LO and save as DOCX format. Notice that in the ODT, page 2 is an
empty page.

2.) reload the docx file in LO. Notice that the empty page 2 is missing.

3.) try to load the docx file in MS Word. It complains about a corrupt file.

Found by Collabora's mso-test


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