<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 - MAILMERGE: Save/Print Merged Documents command processes every record even when it is unnecessary"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=117212">117212</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MAILMERGE: Save/Print Merged Documents command processes every record even when it is unnecessary
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0.3.2 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>perf
          </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=141598" name="attach_141598" title="Example mail merge file">attachment 141598</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=141598&action=edit" title="Example mail merge file">[details]</a></span>
Example mail merge file

If we have a large data source and we want to save/print the last few or the
first few lines using Save Merged Documents or Print Merged Documents
functions, the unification of the individual documents is unnecessarily slow,
because the process goes through all the records.

Steps to reproduce:
1. Create a large data source in Excel/Calc
2. Create a new *.ods file in LibreOffice Writer and create a Mail Merge with
the “Mail Merge Wizard...”
3. Use the “source.xlsx” table as a data source.
4. Insert some Mail merged fields into the document and pair it with the data
source columns
5. Turn on the “Mail merge” toolbar at the View-→Toolbars.
6. On the Mail merge toolbar click on the “Save Merged Documents” or “Print
Merged Documents” and choose the “From 1 To 3” Save As option in the pop-up
window.
7. Click on the Save Documents


Actual results:
Mail Merge processes on every record when creating letters, even if we want to
use only a subset of the source (e.g.: the first 3 lines from the table). This
makes the mailmerge unnecessarily slow when dealing with large source file,
even when only a few letters are created at a time.

Expected results:
Mail Merged should not processes every record when creating letters, if we want
to use only a subset of the source (e.g.: the first 3 lines from the data
source).

Version: 6.0.4.0.0+
Build ID: 30db8c9b1d9654e62c11657140fac24f0f52c547
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-0, Time: 2018-03-27_01:00:13
Locale: hu-HU (hu_HU); Calc: group</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>