Bug 51924 - FILEOPEN particular .doc: Table of contents not recognized correctly, too few levels
Summary: FILEOPEN particular .doc: Table of contents not recognized correctly, too few...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-09 18:26 UTC by Buovjaga
Modified: 2014-02-14 18:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Document with problematic TOC (93.50 KB, application/msword)
2012-07-09 18:26 UTC, Buovjaga
Details
screenshot (56.23 KB, image/png)
2012-07-14 18:20 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2012-07-09 18:26:47 UTC
Created attachment 64046 [details]
Document with problematic TOC

Document created with Microsoft Word 2003, edited with Word 2010 (displays ok in 2003 after editing anyhow).
Tested with 3.6.0 beta3 on Windows 7 64-bit and also with 3.5.4.2 on Ubuntu 11.10.
Comment 1 Julien Nabet 2012-07-14 18:20:42 UTC
Created attachment 64216 [details]
screenshot

On pc Debian x86-64, with master sources updated today + 3.6 branch updated today with a brand new profile for each test, it seems ok.
I attach the screenshot of TOC part. (it's the same in 3.6 or master).
Comment 2 Julien Nabet 2012-07-14 19:53:58 UTC
Sorry, I hadn't noticed that all the headings weren't on TOC.

However, those which don't appear in TOC have "Default" style instead of "Heading 1" for those which appear.

I asked to the reportee to confirm that in Word, those which don't appear in TOC have same style than others in Word.
Comment 3 Buovjaga 2012-07-14 20:20:10 UTC
Thanks to Julian, I checked in Word and realized only chapters II and III have the style Heading 1. After applying Heading 1 to a chapter missing from TOC, LibreOffice accepts it in the TOC. But Word has had no problem updating the TOC even with these inconsistent styles.
So I don't know, if this Word quirk should be taken into consideration or not. A dev can mark this as RESOLVED, if they want.
Comment 4 Julien Nabet 2012-07-15 08:16:53 UTC
Rainer: what do you think ? Should we put this RESOLVED/NOTOURBUG and create a new bugtracker for "enhancement" (take into account a kind of bug from Word)
Comment 5 Rainer Bielefeld Retired 2012-07-15 11:50:52 UTC
<http://wiki.documentfoundation.org/BugReport#General_information> item 4,
so I reduce reporter's a little meaningless Summary to the most visible bug.

[Reproducible] with "LibreOffice  3.5.5.3.  German UI/Locale [Build-ID: 7122e39-92ed229-498d286-15e43b4-d70da21] on German WIN7 Home Premium (64bit) 

Main Problem:
Editing the TOC I see that the type is not recognized In TAB 'Index/Table' picker contents "Table of Contents" is greyed out and can not be modified. This might cause most of the problem

One reason for missing headings below level 1 is caused by wrong contents of 'Evaluate up to level' =1. Modifying that to 10 immediately shows much more headings, but the list still is incomplete, there might be more reasons. OOo 1.1.5 has 'Evaluate up to level' =3, so some more headings are shown there, but still incomplete.

Already in 3.3.0, so I assume problem is more or less inherited from OOo. 

At least a big part of problems in the document are real Bugs, and there might be more problems for what additional enhancement requests should be submitted.

I still want to do some further research concerning reasons of the problem. Any Ideas?
Comment 6 Rainer Bielefeld Retired 2012-07-16 17:45:00 UTC
I would like to get this one NEW ans limit bug to main problem (see Comment 5). 

I am pretty sure that the other missing TOC entries have been added manually (As LibO can add do in TOC dialog with "Create from Index Marks", but we should split away that for an additional report. Can someone create a very simple sample document with WORD?

@Michael:
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug or forward the Bug if it's not your turf.
Comment 7 Buovjaga 2012-07-16 19:27:33 UTC
(In reply to comment #6)
> I am pretty sure that the other missing TOC entries have been added manually
> (As LibO can add do in TOC dialog with "Create from Index Marks", but we should
> split away that for an additional report. Can someone create a very simple
> sample document with WORD?
> 

No, they have not been added manually in Word (not sure what you mean exactly, though). 

I'm not the author of the original document, so I have no idea how/when Word decided to start freaking with the TOC. It was edited with versions 2003 and 2010. But I asked, and got confirmation that no entries have been added manually to the TOC.
Comment 8 Julien Nabet 2012-07-17 19:41:32 UTC
todventtu: what's happening in Word (2003 or 2010, both if you can) if you :
- update your TOC
- recreate from scratch a TOC
?
Does it keep the parts which have the Default style ?
Comment 9 Buovjaga 2012-07-18 16:06:45 UTC
(In reply to comment #8)
> todventtu: what's happening in Word (2003 or 2010, both if you can) if you :
> - update your TOC
> - recreate from scratch a TOC
> ?
> Does it keep the parts which have the Default style ?

Word 2010 - update entire table or update numbers only: nothing happens, nothing gets removed.
Word 2010 - create TOC anew: with the default options a complete and correct TOC is created (including Hizzle, the front page header). The default options have "Build table of contents from": "Styles" is ticked, Heading 1, 2 and 3 have TOC levels defined, Default style does not have a TOC level defined. Yet it works.

Word 2003 - update entire table removes the Hizzle (the front page header).
Word 2003 - create TOC anew: with the default options a complete and correct TOC is created (excluding Hizzle, the front page header).
Comment 10 Teo91 2013-09-30 13:53:53 UTC
I can confirm this with LO 4.1.1 on Windows 7 SP1: the document is shown as in the LO 3.x screenshot.
Comment 11 Buovjaga 2014-02-14 18:30:09 UTC
Just tested with LO 4.2 and now the TOC is displayed completely!