Bug 163888 - When replacing cell styles, the target address of the active sheet is also applied to other sheets
Summary: When replacing cell styles, the target address of the active sheet is also ap...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Styles
  Show dependency treegraph
 
Reported: 2024-11-14 03:17 UTC by Saburo
Modified: 2024-11-19 06:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
testsample (12.11 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-11-17 23:31 UTC, Saburo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Saburo 2024-11-14 03:17:48 UTC
Description:
In Calc, when you try to use the "Find and Replace" dialog to search for a "Cell Style" in all sheets and replace it with another style, the style is mistakenly applied to the corresponding cell addresses in the active sheet of sheets that contain the searched style, in addition to the corresponding cells in the active sheet.

Steps to Reproduce:
1.Enter ”AAA” in Sheet1.A1
2.Apply style “Heading 1”
3.Copy Sheet (-> sheet1_2)
4.Insert a row above.(sheet1_2.A2 is AAA)
5.Activate Sheet1 & Ctrl + H
6.Check "Cell styles" and "All sheets".
7.Find: “Heading 1”, Replace: “Accent 1”
8.[Replace All] 2 times.(tdf#112321)
If the button is grayed out, you can enable it by checking/unchecking "Formatted display".

Actual Results:
The "Accent 1" style is applied to sheet1.A1 (correct)
The "Accent 1" style is applied to sheet1_2.A1 (incorrect)
The "Heading 1" style remains on sheet1_2.A2


Expected Results:
The "Accent 1" style will be applied to sheet1.A1 and sheet1_2.A2.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: ee3885777aa7032db5a9b65deec9457448a91162
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

good
LibreOffice 3.4.5 
OOO340m1 (Build:502)

bad
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 m_a_riosv 2024-11-14 21:16:46 UTC
For me, none is replace
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

same with
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Saburo 2024-11-14 23:46:34 UTC
Sorry,
After step 4, Sheet1_2.A1 may also have the "Heading 1" style applied.
Change the style of cell A1 back to default, or drag it to another cell without inserting a row.

Steps to Reproduce:
1.Enter ”AAA” in Sheet1.A1
2.Apply style “Heading 1”
3.Copy Sheet (-> sheet1_2)
4.Insert a row above.(sheet1_2.A2 is AAA)
5.Reset the style of Sheet1_2.A1 to the default.
6.Activate Sheet1 & Ctrl + H
7.Check "Cell styles" and "All sheets".
8.Find: “Heading 1”, Replace: “Accent 1”
9.[Replace All] 2 times.(tdf#112321)
Comment 3 Saburo 2024-11-17 23:31:04 UTC
Created attachment 197672 [details]
testsample

A sample file is attached.

In Sheet 1, Heading 1 is applied to five cells: A1, A5, A10, A14, and A18.
On Sheet 2, Heading 1 is applied only to A2.
Sheet 3 does not have any cells with styles applied.

When you use "Find and Replace" to "Replace All" the style on Sheet 1, it also applies to A1, A5, A10, A14, and A18 on Sheet 2.
Comment 4 m_a_riosv 2024-11-18 12:55:17 UTC
The same as in my comment#1