Created attachment 92936 [details] testcase to do mail merging from basic the OutputURL member of the MailMerge service controls the directory in which the files creted by a mailmerge action from basic will be placed. the behaviour of this is buggy in 4.2, if I specify a OutputURL being 'file:///home/me/test' the file created by the merging must be something like: /home/me/test/resultmerging0.odt instead of that I obtain a file called: /home/me/testresultmerging0.odt this bug is introduced in 4.2 previous versions work ok I add a testcase, edit the code to change the destination folder (Const theFolder) and place the two files of the testcase in it
I've encountered the same problem. I've had to go back to using LO 4.1.4. Alex
(In reply to comment #1) > I've encountered the same problem. I've had to go back to using LO 4.1.4. Thanks for confirming Alex - set this one to new. (You must be a heavy user of mail-merge that you reverted ;) ) Cheers, Cor
Cor Thanks for the comment. Yes I am a heavy user of MailMerge. I now have a workaround. In 4.1.4 and all previous releases I had these 3 lines in a Macro - DirectoryName = DirectoryNameoutofPath(DataSource.Name, "/") oMailMerge.OutputUrl = ConvertToUrl(DirectoryName) oMailMerge.FileNamePrefix = "White" & "Merged" resulting in the variable DirectoryName holding the value "/home/alex/Documents/openoffice" MailMerge would create a file called - /home/alex/Documents/openoffice/WhiteMerged0.odt In 4.2.0 the same code produces a file called /home/alex/Documents/openofficeWhiteMerged0.odt Whic was what Pasquel observed too. Even though my code was working in 4.1.4 and all previous versions I've now changed it to - DirectoryName = DirectoryNameoutofPath(DataSource.Name, "/") & "/" oMailMerge.OutputUrl = ConvertToUrl(DirectoryName) oMailMerge.FileNamePrefix = "White" & "Merged" Note the new trailing forward slash in the DirectoryName This results in the variable DirectoryName holding the value "/home/alex/Documents/openoffice/" MailMerge now creates the correctly named file - /home/alex/Documents/openoffice/WhiteMerged0.odt i.e. back to where it was in 4.1.4 and all previous releases. Hope this helps someone to fix it, or gives an explanation as to why we now see a different behaviour in MailMerge. Also provides a work around to others whilst waiting for the fix (if any). Alex
Hi Alex, thanks for your nice work around and explanation! So apparently something in the code changed so that Directoryname in MailMerge doesn't get a tailing slash added when it doesn't have one. I would say that's a bug. Cor
Actually making this an EasyHack: Once you bibisected this as per https://wiki.documentfoundation.org/QA/HowToBibisect -- it is likely trivial to identify the issue and fix it.
Andras Timar committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f0ec98c18999495152719260a32d4f83572bda10 fdo#74155 mailmerge output path fix The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Andras Timar committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6181b3fe2c11d55f46eaaf657877aa9396c16374&h=libreoffice-4-2 fdo#74155 mailmerge output path fix It will be available in LibreOffice 4.2.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Andras Timar committed a patch related to this issue. It has been pushed to "libreoffice-4-2-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=027e8b126b85d1c7abf458f2b37b61f76e7d3d47&h=libreoffice-4-2-3 fdo#74155 mailmerge output path fix It will be available already in LibreOffice 4.2.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.