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

            Bug ID: 164748
           Summary: FILEOPEN DOCX: copied even/odd page style missing
                    header properties - dynamic height etc.
           Product: LibreOffice
           Version: 4.4 all versions
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: bibisected, bisected, filter:docx
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 112874

Created attachment 198597
  --> https://bugs.documentfoundation.org/attachment.cgi?id=198597&action=edit
bnc519228_odd-breaksB.docx: unit test from sw/qa/core/header_footer

When a DOCX/RTF file with alternating even/odd sections is loaded, the process
creating the style fails to copy over some of the header/footer properties.
This can be seen by the lack of header spacing provided to the odd pages in the
unit test submitted during the initial implementation in LO 4.4

commit b32881b6723072c8d1a652ea147d12e75766d504
Author: Luboš Luňák on Sun Aug 17 21:35:48 2014 +0200
    fix reading even/odd page breaks from .docx (bnc#519228)

Steps to reproduce:
1.) open bnc519228_odd-breaksB.docx

Notice the difference in the headers on page 1 and page 2. On page 1
(Converted1 page style), there is no space underneath the header - the body
text starts immediately. On page 2 (Default Page style) the header is half an
inch tall.

Going into the header properties, we see significant differences (from what was
supposed to be a "copied" style).
Converted1 : spacing = 0; use dynamic spacing = false; Height = 0.5cm
(defaults)
Default PS : spacing = 1.19cm, use dynamic spacing = true; Height = 0.10cm 

The problem is that the header has not yet been turned on when those properties
attempt to be copied over - so they were just ignored.

Bug found by Collabora's mso-test.

-------------- code analysis ---------------

sw/source/writerfilter/dmapper/PropertyMap.cxx's CloseSectionGroup()
- createPageStyle
- copy (except staticDenyList) properties of current page style to new
- sets the FollowStyle to the current name
- *** inserts the new style into LO page styles ***
- completeCopyHeaderFooter (which turns on H/F and first/left/right settings)

There is something special that must happen when activating the page style by
inserting it into the list of usable styles. (Perhaps it is impossible to
actually turn on the H/F until that happens?)


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=112874
[Bug 112874] [META] Bugs related with odd and even pages, header and footer
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to