Created attachment 141598 [details]
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
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.
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).
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
Created attachment 141599 [details]
Example mail merge data source with 3000 rows
Created attachment 141602 [details]
Let's save the first three merged document
Created attachment 141603 [details]
Screenshot of the problem: Writer merges all documents even if only a few is requested
Setting to NEW