Description: When applying Autofilter to range A1:B17 in the attached document, lines 18 and 19 are considered as well. Steps to Reproduce: 1. Input arbitrary integer data in A2:B17 and some arbitrary column heads in A1:B1. 2. In A18, put SUM(A2:A17), and in B18, SUM(B2:B17). 3. Merge A19:B19 and put A18+B18. 4. Select A1:B17 and click Autofilter. 5. Using the dropdown on A1, click Sort descending. Actual Results: Calc does nothing but complain that the range contains a merged cell. If A19 is unmerged, sorting will pull the A18, B18 and A19 cells to the top. Expected Results: Data in A2:B17 should be sorted with respect to A1:A17 values, leaving A18, B18 and A19 unchanged because integer sum is commutative and associative. Reproducible: Always User Profile Reset: No Additional Info: If step 2 and 3 are done in lines 19 and 20, leaving line 18 empty, things work as expected. Version: 25.2.3.2 (X86_64) / LibreOffice Community Build ID: 520(Build:2) CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Ubuntu package version: 4:25.2.3-0ubuntu0.24.04.1~lo1 Calc: threaded
Created attachment 201124 [details] Example with step 1-3 done
Reproducible Version: 25.2.4.2 (X86_64) / LibreOffice Community Build ID: 508ff62361999404a9d3590fe47df713b5888744 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win Locale: en-US (es_ES); UI: en-US Calc: CL threaded But I think the source of the issue is the same as in tdf#145995 Please if you are not agreed reopen it. *** This bug has been marked as a duplicate of bug 145995 ***