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: VERIFIED 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 target:7.2.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2017-07-14 12:43 UTC by Timur
Modified: 2021-08-31 11:58 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 Comment hidden (obsolete)
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.
Comment 9 Commit Notification 2021-04-22 14:14:32 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7d4506f89eba5c6b4edf1590c87e90d478fd179b

tdf#109120 tdf#117212 count letters starting with 1

It will be available in 7.2.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.
Comment 10 NISZ LibreOffice Team 2021-05-07 11:36:26 UTC
Verified in:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9df3aa7ea72d61462e430643f2a80906dce4e15b
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-GB
Calc: threaded

Thanks for fixing!