Created attachment 175136 [details] Screenshot of the dialog before changes in Writer When the Mail merge toolbar is opened and the Mail Merge E-mail options are set, those options can be lost. Steps to reproduce: 1. View – Toolbars – Mail Merge. This problem does not happen if the MM toolbar is not visible. 2. Go to Options – Writer – Mail Merge Email 3. Enter something in any of the Your name, Email address, Server name fields 4. Press OK to close the dialog. Note: Pressing Apply first and then OK does not trigger the problem. 5. Open Options – Writer – Mail Merge Email again. Actual results: The values entered in step 3 are not retained, the previous values are present. This is very visible when one opens a MM document with embedded data source, which autoshows the Mail Merge toolbar since 6.1. Opening an existing document on a colleagues machine and then setting up e-mail credentials is a valid use case that makes this issue visible (at least this is how I noticed this issue). Expected results: The values entered in step 3 should be kept. LibreOffice details: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 770dcb1f717d576facf31efed14bee403e1a7155 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL and back to 5.3 Not yet in: Version: 5.2.5.0.0+ Build ID: 78223678b7513ffe46804cb08f2dc5bc899b2bab CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Locale: hu-HU (hu_HU); Calc: CL Additional Information: Bibisected using bibisect-win32-5.3 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=53423cb1f177369f72938ad45aa8a24568104e8e author Caolán McNamara <caolanm@redhat.com> 2016-07-28 16:23:53 +0100 committer Caolán McNamara <caolanm@redhat.com> 2016-07-28 16:23:56 +0100 commit 53423cb1f177369f72938ad45aa8a24568104e8e (patch) Resolves: tdf#98793 create a MailMergeConfigItem if toolbar is active... Adding CC to: Caolán McNamara
Created attachment 175137 [details] Screenshot of the dialog after changes in Writer – this would reset to the original values
I think there are two SwMailMergeConfigItem involved. One SwMailMergeConfigItem from the toolbar created and modified but not commited to the config. Then the other SwMailMergeConfigItem is created by the options dialog and commited on ok, but after that there in cui/source/options/treeopt.cxx at line 723 there is a utl::ConfigManager::storeConfigItems() to flush all outstanding config items, so the one belonging to the toolbar is now flushed after the options dialog one was written.
I see that SwMailMergeConfigItem right after ctor has IsModified() of true which doesn't seem right and seems to be an accidental side effect of using some convenience modifiers during the ctlr
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/45e8b85a50bf153b6c9f627e731eecee1cf966f2 Resolves: tdf#144620 toolbar config item overwrites options dialog one 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.
fixed in trunk and 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/b8700e9d29e0ec2b8a91dd5a360ceee57a1f3c3d Resolves: tdf#144620 toolbar config item overwrites options dialog one It will be available in 7.2.2. 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.