Trianan / TristinManson-BugReports

Assignment #5 "Software Bug Reporting using GitHub" for Software Engineering Fundamentals (PROG1350).
0 stars 0 forks source link

[BUG] Table of Contents Bug - MS Word - 26/03/2024 #1

Open Trianan opened 7 months ago

Trianan commented 7 months ago

[BUG] Software Microsoft Word (v. 2402) - Microsoft 365 Apps for enterprise

Expected behaviour Adding a heading at the top of a table-of-contents is ignored as a heading, so the table of contents does not list itself.

Describe the bug Adding a heading to the top of a table-of-contents element and updating the table results in the Table-of-Contents heading being listed inside the table of contents itself.

To Reproduce Steps to reproduce the behaviour:

  1. Open a multi-page document with page numbers.
  2. Create a new page at the beginning of the document.
  3. In the "References" tab, click "Table of Contents"
  4. Select one of the "Automatic Table" styles to create a new ToC.
  5. Click inside the ToC, then navigate the cursor to the beginning of the first listing.
  6. Type "Table of Contents", then enter; the "Table of Contents" should be on its own line before the page-listings.
  7. Highlight the "Table of Contents" text, then click one of the heading styles under the "Home" tab to apply a heading style to the text.
  8. Click the table-of-contents, then click "Update table..."; when the "Update Table of Contents" popup appears, select the "Update entire table" radio-button, and click "OK".
  9. There will be a "Table of Contents" listing inside the table of contents now.

Screenshots Before adding ToC heading: bugReport_MSWORD_1

Before updating table: bugReport_MSWORD_2

After updating table: bugReport_MSWORD_3

Device (please complete the following information):

Additional context The table of contents element searches the entire document for headings, then puts them in the ToC; it's clear that this search needs to exclude the ToC itself in order to eliminate this issue.

Trianan commented 7 months ago

Added "Priority: Medium" label; this issue can be worked around, but would affect anyone using a table of contents within this version of word, and it's an annoying issue to correct manually each time due to the way Word formats ToC. It also essentially breaks the Update table feature because it requires manual editing to fix, defeating the purpose of the automatic ToCs.