Fixing a .doc header regression

Luke Deller luke at
Wed Oct 31 06:58:43 PDT 2012


I am new to the LibreOffice code, and am trying to fix a regression I 
encountered with headers in a .doc file, reported as fdo#56513

Using gdb I traced the problem back to code in 
wwSectionManager::GetPageULData in

This code checks whether the first page in the section has a header with 
the condition:
(rSection.maSep.grpfIhdt & WW8_HEADER_FIRST) !=0

 From experimenting with Word 2010 output, I see that this bit is set 
only if the first page header does not have "Link to Previous" selected 
in Word.  If "Link to Previous" is selected (the default for sections 
other than the first section), then this logic breaks, and the page top 
margin is calculated wrongly for the first page in the section.

Consequently (re)export to .doc will decide that the two page styles in 
this section do not match, resulting in the headers from the second page 
style in the section not being exported to .doc

Anyone know about this, or want to review the patch I attached to that item?


More information about the LibreOffice mailing list