<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Wrong chapter in header's Chapter field when a page starts with a section's endnotes"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=123917">123917</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wrong chapter in header's Chapter field when a page starts with a section's endnotes
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.2.1.1 rc
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Writer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mikekaganski@hotmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=149780" name="attach_149780" title="A sample with endnotes at the section's end and wrong chapter field">attachment 149780</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=149780&action=edit" title="A sample with endnotes at the section's end and wrong chapter field">[details]</a></span>
A sample with endnotes at the section's end and wrong chapter field

When a chapter is enclosed into a section, *and* the section has endnotes
collected at the end of that section, *and* the endnotes flow to a new page,
*and* that new page has a header with Chapter field in it, then the Chapter
field on that page which is started with a section's endnotes shows wrong
chapter information.

Steps to reproduce:

1. Create a new text document.
2. Add a header to the used page style (i.e., "Default Style" in pristine
configuration).
3. Add Chapter field to the header, displaying Chapter Name of level 1.
4. In the page body, type "FirstHeading" and apply Heading 1 paragraph style.
5. Add some chapter text.
6. Add a new paragraph with text "SecondHeading" and Heading 1 style.
7. Add second chapter text enough to see that it flows to a next page, and it's
clear that the next page's header shows "SecondHeading" in the Chapter field.
8. Select "SecondHeading" and the following chapter, and add a section; in the
section properties, make sure to collect endnotes at the end of section.
9. Add some endnotes to the second chapter text (now in section), so that
endnotes (also in that section) start to flow to a new page.

Expected: the new page starting with the rest of second chapter's endnotes
should have "SecondHeading" in the header.

Actual: that page has "FirstHeading" in the header.

See: <a href="https://ask.libreoffice.org/en/question/182657">https://ask.libreoffice.org/en/question/182657</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>