tdf#109120 : Mailmerge filenames starting with 1 (one)
Merged documents when saved as individual documents, the filenames
start from 0. This patch provides a fix for this as it introduces
natural numbering of documents (starting from 1) rather than the
previous 0-based numbering when saving individual merged documents.
e.g. mergedfile_1, mergedfile_2 and so on.
Change-Id: I67275656455788bb5ae935d7d42a349aa0510b36
Reviewed-on: https://gerrit.libreoffice.org/66658
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index dfde8164..318229f 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -638,7 +638,7 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void)
pTargetView->GetWrtShell().EndAction();
//then save it
OUString sOutPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
OUString sCounter = "_" + OUString::number(nDoc);
OUString sCounter = "_" + OUString::number(nDoc + 1);
sOutPath = sOutPath.replaceAt( sOutPath.getLength() - sExtension.getLength() - 1, 0, sCounter);
while(true)