<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 - FILEOPEN DOCX Shape anchored to paragraph with page break falls to next page"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=138027">138027</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FILEOPEN DOCX Shape anchored to paragraph with page break falls to next page
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>4.1.0.4 release
          </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>Keywords</th>
          <td>filter:docx
          </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>libreoffice@nisz.hu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>nemeth@numbertext.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>104442
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=167049" name="attach_167049" title="Example file from Word with shape anchored to the non-last paragraph - good">attachment 167049</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=167049&action=edit" title="Example file from Word with shape anchored to the non-last paragraph - good">[details]</a></span>
Example file from Word with shape anchored to the non-last paragraph - good

Attached document was minimized from <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=83023" name="attach_83023" title="MS .docx file fails to import correctly">attachment #83023</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=83023&action=edit" title="MS .docx file fails to import correctly">[details]</a></span> (the Hayden Management
document in DOCX).
Looks like the first page shapes are anchored to the last paragraph that also
has the page break. 
This causes Writer to add a new paragraph after the page break and anchor the
shapes to that, moving them to the second page.

Adding another paragraph to the first page and anchoring the shape to that
however makes the shape stay on the first page.

However there must be something else to this since I can’t reproduce the
problematic behavior with a new file from scratch.

Steps to reproduce:
    1. Open attached file

Actual results:
Shape is on the second page.

Expected results:
Shape on the first page.

LibreOffice details:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: eeed9103350d886f5913aed9b525d863a421dffa
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Already in:
Verzió: 4.1.0.4
Build az.: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

Page break was not yet imported in:
Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89)</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [META] OOXML shape (DrawingML and VML) related issues"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=104442">Bug 104442</a>] [META] OOXML shape (DrawingML and VML) related issues
              </li>
          </ul>
        </div>
        <br>

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

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