Description: If a document with hidden sections are merged as a single document the hidden sections are stripped form the document. This is the expected result. But if the document is merged as individual documents the hidden sections are present in the document. This is a bug. Steps to Reproduce: 1. Create a document with this content (automatically numbered list) 1. first element 2. second element 3. third element 2. Insert 3 sections -- 1st section 1. first element -- 2nd section 2. second element -- 3rd section 3. third element 3. Create a mail merge database with some fields: Id, name and some boolean fields. For example: ID Name Item1 Item2 Istem3 1 John true false false 2 Peter false true true 3 Paul false false true 4. Add "hidden" condition to the all sections: Format > Sections > Hidden: !HiddenDatabase.Sheet.Item1 !HiddenDatabase.Sheet.Item2 !HiddenDatabase.Sheet.Item3 5. Choose File > Print and respond with Yes in the message box. Create a merged file as a single document. 6. Choose File > Print and respond with Yes in the message box. Create merged files as individual documents. Actual Results: The file created with as a single document options: OK The files created with option as individual documents: is fails. For example. The output is: Peter 2. second element 3. third element Expected Results: The expected result is: Peter 1. second element 2. third element Reproducible: Always User Profile Reset: No Additional Info: Why is the ouput for single document good? - Open the document. - See Format > Sections: There are no hidden sections. Only the visible sections are in the document structure. The sections are named in this way: MailMergeSection[datetime][original section name] Why are ouputs for individual documents wrong? - Open a document. - See Format > Sections: All sections are present in the document structure and there are hidden sections!
Created attachment 183139 [details] Test file
Created attachment 183140 [details] Test database file
Created attachment 183141 [details] Test ouput in one (merged as a single document) - ouput is OK
Created attachment 183142 [details] Test ouput 1 (merged as individual documents) - ouput is wrong
Created attachment 183143 [details] Test output 1 (merged as individual documents) - output is wrong
Created attachment 183144 [details] Test output in one (merged as a single document) - output is OK
Created attachment 183145 [details] Test output 1 (merged as individual documents) - output is wrong
Created attachment 183146 [details] Test output 2 (merged as individual documents) - output is wrong
Created attachment 183147 [details] Test output 3 (merged as individual documents) - output is wrong
I confirm it with Version: 7.4.3.1 (x64) / LibreOffice Community Build ID: 3793858a34d8fef5b92f8fee233f97766f05e281 CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL Steps: 1. Open attachment 183139 [details] 2. File > Print and respond with Yes in the message box (use database in attachment 183140 [details]). Create a merged file as a single document. 3. File > Print and respond with Yes in the message box. Create merged files as individual documents. 4. Compare results from step 2 and step 3
Created attachment 187038 [details] Version tests 1) I guess this bug is a regression. I made some version checks: - 4.0.0.3 - works well as expected - 4.0.6.2 - works well as expected - 5.2.0.4 - bug is present - 6.0.0.1 - bug is present - 7.0.0.3 - bug is present - 7.3.7.2 - bug is present - 7.4.0.3 - bug is present - 7.4.6.2 - bug is present - 7.5.0.3 - works well as expected - 7.5.2.2 - works well as expected - 7.5.2.2 - works well as expected (See attached results) 2) Bug is fixed/disappeared first in 7.5. I tried to find related commit. Maybe this is it: https://gerrit.libreoffice.org/c/core/+/141520
(In reply to Gellért Gyuris from comment #11) > 2) Bug is fixed/disappeared first in 7.5. => RESOLVED WORKSFORME
This got fixed by the following commit in particular: https://cgit.freedesktop.org/libreoffice/core/commit/?id=b1d13c48b57633c156e7d76fe81fc5828d1e3e20 author Henry Castro <hcastro@collabora.com> 2022-10-18 16:57:45 -0400 committer Miklos Vajna <vmiklos@collabora.com> 2022-11-03 16:45:22 +0100 "sw: fix merge mail multiple files" The fix as a whole was the following series of commits: https://cgit.freedesktop.org/libreoffice/core/commit/?id=7bd657b5dac270dae09cd0fe2b22d23fd2fc7245 https://cgit.freedesktop.org/libreoffice/core/commit/?id=b1d13c48b57633c156e7d76fe81fc5828d1e3e20 https://cgit.freedesktop.org/libreoffice/core/commit/?id=fb8d94e77f16e0f9d3af42d64756bd771de9d17c https://cgit.freedesktop.org/libreoffice/core/commit/?id=1e007e8f1703851b01c68884e87c906f6bae5a5e https://cgit.freedesktop.org/libreoffice/core/commit/?id=c400c36018e8d89bbf8e551258a480c8f6571efe https://cgit.freedesktop.org/libreoffice/core/commit/?id=a828e6adbb334282b8405a42f20826f5924c58a2