Bug 476959
Summary: | [fix available] Table of Contents level not correctly exported and imported to/from .doc | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Toralf <bugzilla> | ||||||||
Component: | openoffice.org | Assignee: | Caolan McNamara <caolanm> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | desktop-bugs <desktop-bugs> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 5.2 | CC: | llim | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2009-09-02 09:09:08 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Toralf
2008-12-18 10:10:29 UTC
Looks like something came unstuck quite a while ago around this area. Ok, got a patch for the problems I see here on .doc export and .doc import. Just to be sure though I've tackled all the reported problems you mention "this also happens when creating a file with MS Word, setting a similar option for index level", can you attach such a sample document to avoid disappointment. Created attachment 328175 [details]
Example doc file
OK. Here is a file at last.
But actually, I'm a bit confused now, as I see the value 10 in OOo in this case, where I get 9 with some other files. The expected setting is 3, however.
Created attachment 328176 [details]
Another example
Here is another file, where I see 9 in the levels field.
Both attached files are created using MS Word, but the last one has also been saved with OOo. in #4 "TOCTST.DOC" the msword field code is TOC \o "1-9" \t "Heading 9,9,Heading 8,8,Heading 7,7,Heading 6,6,Heading 5,5,Heading 4,4,Heading 3,3,Heading 2,2,Heading 1,1" \h i.e. make a toc from the outline levels 1 to 9 and from styles Heading 1 to Heading 9 assigning Heading 1 to 1, Heading 2 to 2 etc. The use of both \o and \t is a bit redundant and was likely exported from writer, the above patch would cleans up that sort of thing on initial export. Anyway, given the .doc as it is, on loading this into word or writer then 1 to 9 is the correct setting, so that works fine in word and writer. In #3 "TOCTST3.DOC" the code is TOC \o i.e. "make it from all outline styles" writer has 10 such styles, and word has 9 which is why there is the difference. Because word has only 9 styles we should always import that bare "use all outline styles" as evaluate up to level 9 rather than leaving it at our writer default of 10. So I've updated the patch to handle that clip to 9 levels on import rather than 10. In either case though the msword field refers to *9* outline levels, not three. Though the msword UI itself might give the impression in the toc dialog that there are three levels, there really are nine. So I'm confident that the major problem is in the export, with only a little problem in the import and that the new patch "does the right thing" Created attachment 328181 [details]
patch for this problem
committed to >= 2.3.0-6.11 An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1248.html |