<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 - FILESAVE DOCX Writer saves images anchored to header/footer multiple times"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=118535">118535</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FILESAVE DOCX Writer saves images anchored to header/footer multiple times
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.2.0.0.alpha0+ Master
          </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>kelemeng@ubuntu.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=143304" name="attach_143304" title="Example file from Writer">attachment 143304</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=143304&action=edit" title="Example file from Writer">[details]</a></span>
Example file from Writer

Writer saves copies of images belonging to different header/footer styles only
once to odt, but multiple times to docx, increasing file size unnecessarily.
Word saves such images only once too.

To reproduce:
1, Create a custom page style in Writer
2, Insert an image into the default page header, make sure to anchor it to the
paragraph in the header
3, Insert a page break, set the custom page style to the new page
4, Insert the *same* image into the second pages header, make sure to anchor it
to the paragraph in the header
5, Save the document to odt and docx.

If you rename the files to zip and unpack them, you should see one instance of
the image in the odt's Pictures directory, and two instances of the docx's
word\media directory.

Expected results:
Docx export should contain the image only once.


Version: 6.2.0.0.alpha0+
Build ID: bb1d5780226bb1b9156580972eea9aa849178742
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-07-03_05:56:48
Locale: hu-HU (hu_HU); Calc: group threaded</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>