Bug 57551 - landscape/portrait sequence lost in FILESAVE as .doc
Summary: landscape/portrait sequence lost in FILESAVE as .doc
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.3.2 release
Hardware: All All
: high normal
Assignee: Luke Deller
URL:
Whiteboard: target:4.1.0 target:4.0.0.0.beta2 tar...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-26 10:56 UTC by Luke Deller
Modified: 2013-11-13 20:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example document to reproduce issue (9.12 KB, application/vnd.oasis.opendocument.text)
2012-11-26 10:56 UTC, Luke Deller
Details
Example document to reproduce issue (fixed mime type) (9.12 KB, application/vnd.oasis.opendocument.text)
2012-11-26 11:35 UTC, Luke Deller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Deller 2012-11-26 10:56:59 UTC
Created attachment 70580 [details]
Example document to reproduce issue

Steps to reproduce:
1) open the attached document
2) observe that page 1 is Landscape and page 2 is Portrait
3) save as .doc or .docx
4) close & reopen .doc / .docx
5) observe that both pages are now Portait!

Explanation:
In Word, distinct headers/footers may be set for the first page of the section vs subsequent pages.  In LibreOffice this maps to a chain of two page styles, the first page style having "Next Style" set to the second page style.

When exporting back to Word format, this pattern is detected in reverse: if two page styles are linked together, and they look compatible (eg same margins), then they are combined into a single output section with the "Different First Page" header/footer setting enabled.

The problem is that page orientation is not considered when deciding if the two page styles look compatible, so this combination of page styles gets triggered when it should not.

(BTW this example was constructed from noticing the problem in the code).
Comment 1 Luke Deller 2012-11-26 11:35:36 UTC
Created attachment 70583 [details]
Example document to reproduce issue (fixed mime type)
Comment 2 Joel Madero 2012-12-06 21:41:41 UTC
Verified on older version of LibreOffice.

Adjusting version to reflect oldest tested version  (3.6.3.2)
New (Verified)
Normal (can prevent high quality/professional work)
High (big problem if you don't close document and reopen you could end up showing this to other people and they see the document differently, no workaround other than not using .doc/.docx)

Might be a duplicate but I couldn't find the other bug that I think had similar situation. If someone finds it please close this as a dupe.

Thanks for reporting Luke, I see that you're really active on FDO bug reporting, if you're interested in helping out QA email me and we'll help you get involved.
Comment 3 Not Assigned 2012-12-07 13:27:46 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7d88aac6029353c293dfdacbfa462d62c0da69ea

fix for fdo#57551: landscape/portrait sequence lost in FILESAVE as .doc



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Not Assigned 2012-12-18 09:09:17 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f15b317a7c081dc0601805ffb07cb6778a2bf122&g=libreoffice-4-0

fix for fdo#57551: landscape/portrait sequence lost in FILESAVE as .doc


It will be available in LibreOffice 4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Not Assigned 2012-12-18 09:15:52 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5220a3615a806224d3a54283da4abdaae4b15795&g=libreoffice-3-6

fix for fdo#57551: landscape/portrait sequence lost in FILESAVE as .doc


It will be available in LibreOffice 3.6.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.