Bug 152250 - Copying conditional formatting creates unmodifiable styles (save/load fixes it)
Summary: Copying conditional formatting creates unmodifiable styles (save/load fixes it)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords: notBibisectable, regression
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
 
Reported: 2022-11-27 17:37 UTC by Peter Gervai
Modified: 2023-04-02 08:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (9.75 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-03-31 13:44 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gervai 2022-11-27 17:37:38 UTC
Description:
Despite serious underdocumentedness copying conditional formatting between separate sheets works pretty well.

One slight imperfection: the referenced styles are copied over (though their hierarchy is lost), but after copying they are non-modifiable: all the options are grayed out.

Saving, closing and loading again shows them editable again.


Steps to Reproduce:
1. Create some new styles, and create conditional formatting using them.
2. Copy.
3. Create a new sheet, paste -> paste special -> paste formatting only
4. Try to modify one of the new styles created by the copy: it's grayed out

Actual Results:
Can't modify the style (and they lose hierarchy, though that's a separate problem).

Expected Results:
They're editable. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.4.2.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF8); UI: en-US
Debian package version: 1:7.4.2-3
Calc: threaded
Comment 1 m_a_riosv 2022-11-27 21:36:28 UTC
I can't repro
Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL
Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5b18eebc2c95321ce7e6edf10f4df81557382a48
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

Please test with a clean profile, Menu/Help/Restart in Safe Mode
Comment 2 Peter Gervai 2023-03-15 21:57:54 UTC
Reproduced in 7.4.5.1 as well.

More detailed steps:
1. create a new sheet document
2. create new style "test1", set font color to octarine or whatever
3. create a column from 1..10 numbers
4. select column
5. Fromat >> Conditional >> Condition
6. Set "Cell Value // is less than // 5", Apply style "test1". Half of the cell colors shall change.

7. select cells with values; edit >> copy

8. create a new sheet document (where "test1" does not exist)
9. create a few numbers, select them
10. Edit >> Paste special >> Paste special >> Formats Only (button)

This will color some cells and ALSO creates "test1" style.

11. open styles sidebar (F11), right click on "test1"
12. Modify is grayed out.
Comment 3 Peter Gervai 2023-03-15 22:00:29 UTC
Same happens in safe mode.

Version: 7.4.5.1 / LibreOffice Community
Build ID: 40(Build:1)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF8); UI: en-US
Debian package version: 4:7.4.5-2
Calc: threaded
Comment 4 QA Administrators 2023-03-16 03:28:36 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2023-03-31 13:43:45 UTC
Already seen in last41onmaster in Linux 43all repo.

However, in oldest (3.5) the style can be modified. Unfortunately, a regression appeared in between and made it so paste special does not work at all. In last40onmaster, paste special works, but does not actually paste the formatting/add the style.

I bibisected the inability to paste special to the range:
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=a44dda4b7d71f8d2b4e0cca79d732eab89588c3a..a705aec5117fe9123236ebdeb0d6f271b83f8af4

It contains several pasting related commits from Kohei.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2ca71b5c6e0374254e7c75c75e54fa6a8caebfde
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 30 March 2023
Comment 6 Buovjaga 2023-03-31 13:44:08 UTC
Created attachment 186367 [details]
Example file
Comment 7 Maxim Monastirsky 2023-03-31 14:18:25 UTC
I wonder if commit 685a864cfc40227559ed55f6273fd118174e8e6e makes any difference here?
Comment 8 Buovjaga 2023-03-31 14:32:34 UTC
(In reply to Maxim Monastirsky from comment #7)
> I wonder if commit 685a864cfc40227559ed55f6273fd118174e8e6e makes any
> difference here?

Yes, what a cool coincidence! I was only testing on Linux without that commit. Now I confirm that I see the problem on older Windows version, but not with the latest:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1b463f697405e64a03378fb38a32172c4d3c25e6
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded

So I'll call this fixed.
Comment 9 Commit Notification 2023-04-02 08:12:15 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7fed5d046f1c7c9e8caa2e80c020ea8f8ff6df66

Related: tdf#152250 Copy also style hierarchy

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