Bug 131190 - Can not delete pagestyle in Calc
Summary: Can not delete pagestyle in Calc
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.1.2 release
Hardware: All All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.0.0 target:6.4.4 target:7.4....
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2020-03-06 15:11 UTC by Theo
Modified: 2022-05-11 07:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screen shot when trying to delete a pagestyle (27.56 KB, image/png)
2020-03-06 15:11 UTC, Theo
Details
test_pagestyle.ods (7.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-03-06 18:46 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Theo 2020-03-06 15:11:57 UTC
Created attachment 158455 [details]
screen shot when trying to delete a pagestyle

In LO 6.4.2.1 and 6.4.1.2 I can not delete a pagestyle in Calc. Rightclicking on the pagestyle only gives the options "New" and "Modify" and not "Delete". Zie screeenshot attached. Going back to 6.3.x.x solves the problem.
Comment 1 Oliver Brinzing 2020-03-06 18:45:44 UTC
reproducible with:

Version: 6.4.1.2 (x64)
Build-ID: 4d224e95b98b138af42a64d84056446d09082932
CPU-Threads: 4; BS: Windows 10.0 Build 18363; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: 

but *not* reproducible with:

Version: 6.3.5.2 (x64)
Build-ID: dd0751754f11728f69b42ee2af66670068624673
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc:
Comment 2 Oliver Brinzing 2020-03-06 18:46:12 UTC
Created attachment 158456 [details]
test_pagestyle.ods
Comment 3 Oliver Brinzing 2020-03-07 06:37:20 UTC
seems to have started with:

https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=9cbc55167301cefe9889ad8e604439e0118b627f

tdf#128557 Only show delete menu item when custom style is not in use
or it has a parent style so when a custom paragraph style is in use it 
can be deleted and the style will revert to the parent

I think the problem is:
Bug 108188 - PageStyle property "isInUse" is always true


/cygdrive/d/sources/bibisect/bibisect-win64-6.4
$ git bisect good c5d11eba2bd1031fd6ef2cc85d959b167d7c4a34 is the first bad commit
commit c5d11eba2bd1031fd6ef2cc85d959b167d7c4a34
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Nov 26 05:43:13 2019 -0800

    source 9cbc55167301cefe9889ad8e604439e0118b627f
    source 9cbc55167301cefe9889ad8e604439e0118b627f

:040000 040000 141135c044433ba1a22e82a37703da5a3ac61843 3ec897f966ae6f7cf910de91afa31f30cbc4a27f M      instdir

/cygdrive/d/sources/bibisect/bibisect-win64-6.4
$ git bisect log
# bad: [75af2782b7f006d1c31ad11e84d5ab6bd7f74ed0] source 20be5cd0bdc57d812bf34a2debfe48caa51de881
# good: [8d1eaf05d47fd1c56ddecbe57a9a7c8289ede7f4] source c98b1f1cd43b3e109bcaf6324ef2d1f449b34099
git bisect start 'master' 'oldest'
# good: [e13037966b62b9d258d5cf6d96586de5e2bafea8] source 4a0b2b8024fa6fb8a0ab3e474b7d64fc455028b5
git bisect good e13037966b62b9d258d5cf6d96586de5e2bafea8
# good: [7cba838374e1acd7b8a6e114d7b12bf6370cd7ab] source d6ea967e040d01ec69649ac689472018e477db34
git bisect good 7cba838374e1acd7b8a6e114d7b12bf6370cd7ab
# good: [39293e77bf2d89be2f2f7afeb4c0c65f7231ff3a] source 9b400e84b1689997378f6738b97b71b09cdb7be6
git bisect good 39293e77bf2d89be2f2f7afeb4c0c65f7231ff3a
# good: [e312d3a1be007a0fc008d7d39270cec23d31859c] source 8bd15459527b527454900dd781f1226dade5b118
git bisect good e312d3a1be007a0fc008d7d39270cec23d31859c
# bad: [2597df5132e9b5daee0008c022050fc3c55b6dd3] source fd212d59d7cf9fb8c46bb73f4c21148b61c5c53e
git bisect bad 2597df5132e9b5daee0008c022050fc3c55b6dd3
# good: [6ee62b8c59266830077e378a1d946804ebaf23c1] source 4d7a66f24dfbe4b97f88dd79b020025ebcd48f1c
git bisect good 6ee62b8c59266830077e378a1d946804ebaf23c1
# good: [b3c855959deaed6bfc8fe201efc9301ed7c862e5] source 1908393e7861f45aea616a192059ccbd9b62b5a4
git bisect good b3c855959deaed6bfc8fe201efc9301ed7c862e5
# good: [6fb58d40603d7d90b10995ff895041fa983ccb50] source 5d7be7fdbd1f94b2056f8b4adc7722addb9e7fc9
git bisect good 6fb58d40603d7d90b10995ff895041fa983ccb50
# good: [b73c79bb7cad88ff5c74fbed38d0f5686f2ee00b] source 8a18bed665bfc081a728c017e27a925c914c97f6
git bisect good b73c79bb7cad88ff5c74fbed38d0f5686f2ee00b
# good: [b885129965c88e1515f98cd17c29f32d478c3647] source 509732f06df3d9ddef535daaeb9e6780b14c8431
git bisect good b885129965c88e1515f98cd17c29f32d478c3647
# bad: [c5d11eba2bd1031fd6ef2cc85d959b167d7c4a34] source 9cbc55167301cefe9889ad8e604439e0118b627f
git bisect bad c5d11eba2bd1031fd6ef2cc85d959b167d7c4a34
# good: [c927bced147dd414cad9317393c549d0ab0b08a9] source de0924073824e1e38d35f78f5f8de2a4feceae8e
git bisect good c927bced147dd414cad9317393c549d0ab0b08a9
# first bad commit: [c5d11eba2bd1031fd6ef2cc85d959b167d7c4a34] source 9cbc55167301cefe9889ad8e604439e0118b627f
Comment 4 Jim Raykowski 2020-03-16 07:53:07 UTC
(In reply to Oliver Brinzing from comment #3)
> seems to have started with:
> 
> https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;
> h=9cbc55167301cefe9889ad8e604439e0118b627f
> 
> tdf#128557 Only show delete menu item when custom style is not in use
> or it has a parent style so when a custom paragraph style is in use it 
> can be deleted and the style will revert to the parent
> 
> I think the problem is:
> Bug 108188 - PageStyle property "isInUse" is always true
> 

I agree this is the problem.

Here is a patch to return the ability to delete custom page styles in Calc. It doesn't solve the "isInUse" problem, it just changes all page style is in use queries to return as not in use. It will cause your macro to not report any page style in use instead of reporting all page styles in use.

https://gerrit.libreoffice.org/c/core/+/90547
Comment 5 Jim Raykowski 2020-03-17 04:23:44 UTC
(In reply to Jim Raykowski from comment #4)
> (In reply to Oliver Brinzing from comment #3)

> Here is a patch to return the ability to delete custom page styles in Calc.
> It doesn't solve the "isInUse" problem, it just changes all page style is in
> use queries to return as not in use. It will cause your macro to not report
> any page style in use instead of reporting all page styles in use.
> 

My first approach, of returning page style queries as not in use, does not pass the CppunitTest_sc_subsequent_export_test ScExportTest::testHeaderImageODS test.

I've taken a new approach that keeps the page style "isInUse" always true, as before.

https://gerrit.libreoffice.org/c/core/+/90547
Comment 6 Commit Notification 2020-03-31 17:58:00 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#131190 Make custom page styles deletable again in Calc

It will be available in 7.0.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 2020-04-07 13:52:18 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#131190 Make custom page styles deletable again in Calc

It will be available in 7.0.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 8 Commit Notification 2020-04-07 14:48:45 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#131190 Make custom page styles deletable again in Calc

It will be available in 6.4.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 9 Xisco Faulí 2020-06-09 10:03:51 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: e0f058bcd5e185b89e4b7c680a7901bc7eb2a790
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Jim R, thanks for fixing this issue!!
Comment 10 Commit Notification 2022-05-10 18:32:13 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

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

tdf#108188, tdf#131190 - Verify that the page style is actually used

It will be available in 7.4.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 11 Commit Notification 2022-05-11 07:57:34 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/10c07e001da992cff4078c1cb1f49fdb16673ac3

tdf#108188, tdf#131190 - Verify that the page style is actually used

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