Bug 169108 - Creating a pivot table changes selection to different area
Summary: Creating a pivot table changes selection to different area
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.2.2 release
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:26.2.0 target:25.8.3.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Pivot-Table
  Show dependency treegraph
 
Reported: 2025-10-28 08:13 UTC by Saburo
Modified: 2025-11-08 12:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
testfile (10.15 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-10-28 08:13 UTC, Saburo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Saburo 2025-10-28 08:13:43 UTC
Created attachment 203578 [details]
testfile

I select a range on Sheet 1 and try to create a pivot table, but the selected range changes to d4.
This also changes the selection range for the subtotal function.

Steps to Reproduce
1. Open attachment file.
2. Selection range "A1:C8".
3. Insert > Pivot table.

Actual Results
Current selection is "D4"

Expected Results
Current selection is "A1:C8"

Other Information
Version: 25.8.2.2 (X86_64)
Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

and with
2025-10-26
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

not repro
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8ea8e254a3151f5390f3a10ff156fcaf8e7c5d5c
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: threaded

Duplicating the sheet works fine on "Sheet1_2".
Comment 1 raal 2025-10-28 08:24:22 UTC
Confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2595f031fa93c1eb89fb4dce6f337de9be813e15
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 2 raal 2025-10-28 11:42:05 UTC
This seems to have begun at the below commit in bibisect repository/OS XXXX.
Adding Cc: to Andreas Heinisch ; Could you possibly take a look at this one?
Thanks
 108746604babec6363d89ada31a325a14ad9660c is the first bad commit
commit 108746604babec6363d89ada31a325a14ad9660c
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Tue Sep 23 22:18:13 2025 +0200

    source 6f68c46d0aa5fe872de0dec8777d35ff91886043

191245: tdf#168478 - Use the previously found range rather than returning an empty one | https://gerrit.libreoffice.org/c/core/+/191245
Comment 3 Andreas Heinisch 2025-10-28 20:24:58 UTC
May I ask how do you created this test file? I cannot reproduce the error from scratch. Only using this test file I can reproduce the error.
Comment 4 Andreas Heinisch 2025-10-28 20:53:33 UTC
I think I figured it out: https://gerrit.libreoffice.org/c/core/+/193096

I hope this regression chain the auto filter somehow stops now. The implementation is somehow quite strange.
Comment 5 Saburo 2025-10-28 23:44:20 UTC
(In reply to Andreas Heinisch from comment #3)
> May I ask how do you created this test file? I cannot reproduce the error
> from scratch. Only using this test file I can reproduce the error.

I don't remember exactly, but I think I created it after using the standard filter because I was looking for untranslated UI.

I've tested different steps to reproduce the issue.

step
1. Create new data for the pivot table.
2. [Data] > [MoreFilters] > [Standard Filter...]
3. Cancel the "Standard Filter" dialog
4. add a row of data.
5. Select data range
6. [Insert] > [Pivot Table...]
Comment 6 Commit Notification 2025-10-29 09:33:04 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2a50c7fbb85941a2c50ac01257af36f132b07006

tdf#169108 - Create anonymous database range or data

It will be available in 26.2.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.
Comment 7 Commit Notification 2025-10-29 10:43:16 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/465e7fddb34fe06d9464ee534c79a02dd72707d4

tdf#169108 - Create anonymous database range or data

It will be available in 25.8.4.

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.
Comment 8 Commit Notification 2025-11-04 17:12:28 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-25-8-3":

https://git.libreoffice.org/core/commit/bbd19f18077882d5945063e77f3ae0db3085a934

tdf#169108 - Create anonymous database range or data

It will be available in 25.8.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.