Download it now!
Bug 47951 - Mailmerge creates some duplicates with old Mail merge dialog (only for flat text file driver .?)
Summary: Mailmerge creates some duplicates with old Mail merge dialog (only for flat t...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.0 Beta1
Hardware: x86 (IA32) All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:4.1.0 target:3.6.7 target:4.0.4
Keywords: regression
Depends on: 64283
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-27 10:10 UTC by ron gregor
Modified: 2013-05-24 18:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
4 files - odt, odb(datasource), txt(used to create odb),jpg(print screen) (81.58 KB, application/zip)
2012-03-27 10:10 UTC, ron gregor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ron gregor 2012-03-27 10:10:58 UTC
Created attachment 59117 [details]
4 files - odt, odb(datasource), txt(used to create odb),jpg(print screen)

When printing a odt with a mailmerge field the it was showing more items to print than it should have. The datasource had 371 item but mailmerge was showing 401. When I scrolled down the list at about item 40 I noticed some entries from the beginning of the list had been duplicated. See print screen that shows the datasource having 371 but the mailmerge is showing 401 for the same table. If you try and print you get the 401 items.

I found that if you click on another table than back to original mailmerge then shows the 371 correctly. Also if you do any sorting or filtering it seems to remove the duplicates.

I have attached a sample odt, odb, txt, and jpg.
Comment 1 Cor Nouws 2012-04-16 11:41:15 UTC
Hi Rn,

thanks for the report.
Some things I notice:

the number of 401 indeed shows up in the old mail merge dialoge (File > Print <question ...> Yes )
It does not show when I choose Tools > Mail merge and then jump to step 8.

( The second method also is about 15 to 20 times faster by the way ;-) )

Nevertheles: indeed there are to much records shown. Was OK in 3.4.6.

Could you pls try to find out which rows are bupleicated, what exactly happens? Maybe there are some line feeds instead of returns, or special characters that make the listing go wrong?
thanks
Comment 2 Cor Nouws 2012-04-16 11:46:51 UTC
I see the problem also in 3.5.0-beta1
Comment 3 ron gregor 2012-04-17 07:55:05 UTC
(In reply to comment #1)
> Hi Rn,
> 
> thanks for the report.
> Some things I notice:
> 
> the number of 401 indeed shows up in the old mail merge dialoge (File > Print
> <question ...> Yes )
> It does not show when I choose Tools > Mail merge and then jump to step 8.
> 
> ( The second method also is about 15 to 20 times faster by the way ;-) )
> 
> Nevertheles: indeed there are to much records shown. Was OK in 3.4.6.
> 
> Could you pls try to find out which rows are bupleicated, what exactly happens?
> Maybe there are some line feeds instead of returns, or special characters that
> make the listing go wrong?
> thanks

Records 12 to 41 are repeated in records 42 to 71
Comment 4 ron gregor 2012-09-12 19:03:35 UTC
This bug still exists in 3.6.1.2
Comment 5 Robert Locke 2013-05-15 20:29:01 UTC
I am experiencing (and have been) this same problem in version 3.6.6.2 on Fedora 18 x86_64. Is there any progress on this?
Comment 6 Cor Nouws 2013-05-15 22:36:58 UTC
@lionel: looking at the numbers at the bottom of comment #3 ... makes that ring a bell with you?
thanks!
Comment 7 Lionel Elie Mamane 2013-05-16 04:13:49 UTC
Cannot test/debug in my master build because of bug 64283
Comment 8 Lionel Elie Mamane 2013-05-16 06:41:13 UTC
Most probably a bug in the driver for flat text file.

Should not happen with any other database driver.

The mail merge code opens two connections to the table (.txt file), and the two stomp over each other.
Comment 9 Cor Nouws 2013-05-16 13:08:42 UTC
thanks for your comment Lionel.
It's  not Windows only, by the way
Comment 10 Commit Notification 2013-05-19 12:10:41 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6b946f228397c370e09f487c470bafd9d046eee5

fdo#47951 flat text table: update m_nRowPos when moving by bookmark



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.
Comment 11 Commit Notification 2013-05-21 17:48:14 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8f3147df3c309127382f800f9a2b19f355bd9d15&h=libreoffice-3-6

fdo#47951 flat text table: update m_nRowPos when moving by bookmark


It will be available in LibreOffice 3.6.7.

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.
Comment 12 Commit Notification 2013-05-21 17:48:32 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=08a9b322ae0069d563730cfd7d61f2dfa0af3a26&h=libreoffice-3-6

fdo#47951 work around underlying cause


It will be available in LibreOffice 3.6.7.

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.
Comment 13 Commit Notification 2013-05-21 17:48:49 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fd3e9a136da6f119e6f722ac409ff32bd52c8ea0&h=libreoffice-4-0

fdo#47951 flat text table: update m_nRowPos when moving by bookmark


It will be available in LibreOffice 4.0.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.
Comment 14 Commit Notification 2013-05-21 17:49:05 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=500aa2b680c036f0d171b274423ab8a832459572&h=libreoffice-4-0

fdo#47951 work around underlying cause


It will be available in LibreOffice 4.0.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.
Comment 15 ron gregor 2013-05-24 18:32:33 UTC
I downloaded and tested

libreoffice-4-0~2013-05-24_06.51.45_LibO-Dev_4.0.4.0_Win_x86.msi

and can confirm the bug has been fixed for the test files on win xp.

Thanks for the fix Lionel
Ron Gregor