Bug 109120 - MAILMERGE: Merged documents saved as individual documents - filenames should start from 1 (one), not 0 (zero)
Summary: MAILMERGE: Merged documents saved as individual documents - filenames should ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium trivial
Assignee: Aditya Sahu
URL:
Whiteboard: target:6.3.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2017-07-14 12:43 UTC by Timur
Modified: 2019-02-02 09:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2017-07-14 12:43:52 UTC
When mail merged documents are saved as individual documents, filenames should start from 1, not 0. 0 comes from OO, not clear why. Natural counting is from 1.

Steps to Reproduce (example documents in Bug 106959):
1. create a new empty writer document (odt);
2. with Tools -> "Mail Merge Wizard" select an  "Address List" (a simple ods file with a field of data);
3. open "Data Sources" (CTRL+SHIFT+F4);
4. insert the field in the document with drag and drop after the table position;
5. on the "Mail Merge toolbar" select "Save merged documents" -> "Save as individual document" -> Save Documents;
6. select a name for merged individual files.

Reproduced: name_0, name_1....
Expected: name_1, name_2.....
Comment 1 Timur 2017-07-14 14:30:03 UTC Comment hidden (obsolete)
Comment 2 Alex Thurgood 2017-07-21 11:46:13 UTC Comment hidden (obsolete)
Comment 3 Timur 2017-07-21 13:17:35 UTC
(In reply to Alex Thurgood from comment #2)
> This is a duplicate of an already reported bug. Need to find it.
Couldn't find and really tried. Please confirm this one.
Comment 4 Alex Thurgood 2017-07-21 15:52:16 UTC
Hmm, yes, I couldn't find anything either after searching for a while, even among the really old closed stuff.

Confirming with LO5432 OSX 10.12.6
Comment 5 Alex Thurgood 2017-07-21 15:53:50 UTC Comment hidden (no-value)
Comment 6 Mike Kaganski 2018-06-13 03:27:44 UTC
A code pointer: see construction of sOutPath in IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void) in sw/source/ui/dbui/mmresultdialogs.cxx.
Comment 7 Aditya Sahu 2019-01-20 23:34:31 UTC
(In reply to Mike Kaganski from comment #6)
> A code pointer: see construction of sOutPath in
> IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&,
> void) in sw/source/ui/dbui/mmresultdialogs.cxx.

Thank you for the code pointer. Please review the change: https://gerrit.libreoffice.org/#/c/66658/
Comment 8 Commit Notification 2019-02-02 05:51:07 UTC
Aditya committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/29db6427ea6e3f24fbacfd6ac053231106518749%5E%21

tdf#109120 : Mailmerge filenames starting with 1 (one)

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.