Created attachment 175049 [details] Screenshot of the attachment 174941 [details] in Writer When a mail merge document contains embedded data source information, opening the file registers the data source. Opening the Mail Merge wizard and closing it with Cancel removes this registration from the Data Sources panel and Registered Databases dialog. Even after this the displayed records can be changed with the left-right icons on the MM toolbar. Saving and reloading the file loses the data source connection information permanently. Steps to reproduce: 1. Download attachment 174941 [details] from bug 144425 and save ODS attachment 174942 [details] to the Documents folder 2. On the Mail Merge toolbar open the Data Sources view, you should see the Teszt-level data source 3. Open the Mail Merge wizard from the Tools menu or MM tollbar 4. Close it immediately Actual results: The Teszt-level data source is gone from the Data Sources view. Expected results: The Teszt-level data source should be kept. LibreOffice details: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 80a47aae1419842f4496f02028e2b49763aea25b CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL Additional Information: Bibisected using bibisect-win64-6.4 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=8c66efa030e98cfdf5da20be368566d64e43c5d1 author Caolán McNamara <caolanm@redhat.com> Thu Sep 05 12:22:38 2019 +0100 committer Caolán McNamara <caolanm@redhat.com> Thu Sep 12 20:28:14 2019 +0200 weld OCopyTableWizard cluster Adding CC to: Caolán McNamara
Created attachment 175050 [details] Opening the Mail Merge wizard
Created attachment 175051 [details] Screenshot of the problem in Writer with the data source gone
Created attachment 175052 [details] attachment 174941 [details] saved without the data source
reverting that patch a 6-4 tree does change how it behaves so I can confirm that
looks like its the preview widget which uses a writer document deregisters it but it also looks like this just didn't happen before this commit because of a leak and a missing dtor call for the preview widget
https://gerrit.libreoffice.org/c/core/+/122763 is my stab at resolving this
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c9a405b3bcc0d3f5fdb6b4386831a4d4b2897c74 tdf#144532 closing mail merge wizard preview removed document's data source It will be available in 7.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.
this appears to work in trunk, backport to 7-2 in gerrit
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/83876642498b0203b25b8b95e612603d46addd62 tdf#144532 closing mail merge wizard preview removed document's data source It will be available in 7.2.3. 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.