Apache OpenOffice (AOO) Bugzilla – Issue 23961
TOC not fully updated if custom template doesn't use headings
Last modified: 2013-08-07 14:38:26 UTC
Problem: In OpenOffice 1.1.0 Writer, if you use a custom template (user-created .stw file) that includes a TOC and only level-1 headings (Heading 1), when you add any subordinate heading levels (Heading 2, etc.) and update the TOC, the TOC does not include any added subordinate headings. (Only added or deleted level-1 headings are reflected in the TOC.) How to duplicate the problem: 1. Create a Writer document with an empty paragraph on the first page. 2. Insert a manual page break. 3. On the second page, create a Heading 1 paragraph (a title for the first major section, such as "First Major Section Title"), and press Enter. 4. Put some text in the first paragraph. For example: "[Replace the preceding heading and this paragraph with the start of the first major section of your document.]" 5. Go back to the first page, and insert a Table of Contents. (It will include only the Heading 1 text that you created in step 3.) 6. Save the file as a template (.stw). Give it a distinctive name, and put it in the default templates directory. 7. Create a new document based on that template (File > New > Templates and Documents). 8. At the end of the existing text, add a section title and make it a Heading 2 paragraph. 9. Optionally, add text and additional Heading 2 and some Heading 3 paragraphs. 10. Update the TOC (right-click, select Update Index). The updated TOC does not contain any added Heading 2 or Heading 3 paragraphs. My guess as to the nature of the problem: for a custom template, the TOC will only get updated for paragraph styles that are actually applied to one or more paragraphs in the template. When I created a custom template that had a Heading 1, Heading 2, and Heading 3 paragraph, and then created a new document based on that template, the TOC updated as expected when I added, deleted, and replaced different levels of headings.
Reassigned to ES
It's a dupicate of issue 12228 *** This issue has been marked as a duplicate of 12228 ***
closed