* PROBLEM DESCRIPTION
In Writer, Drawing and Calc, in Hierarchical view, we cannot delete any user defined styles, it can even make LibreOffice crashes.
[My testing environment]
[LibreOffice canonical releases]
Only 4.0.6 behaves correctly. It seems that this bug was introduced in 4.1.
(There must be some fault in the software engineering that introduced such a bug, which keeps the end users worring about whether the normal functions still works in the new releases. No regression testing?)
* STEPS TO REPRODUCE
TEST 1 (simplest case)
[Tested in 220.127.116.11]
1. Create a new text document.
2. Create a custom style which can be a paragraph style or of any other type. Here I created "Untitled1" which is located at "Default Style"->"Caption"->"Untitled1".
3. Right click the new style, choose "Delete...".
* CURRENT BEHAVIOR
1. It remains in the list and can be applied to appropriate objects such as paragraphs, nothing happens;
2. The view name changed to "All Styles" but the hierarchical view is still there. (It seems to change the name of view to its PREVIOUS view state.)
The good news is that it can be deleted perfectly in other views which are not tree structures but sequential lists.
* EXPECTED BEHAVIOR
The custom style can be deleted perfectly.
* ADDITIONAL TESTS AND BAD BEHAVIORS
TEST 2 (make it crash easily)
1. Create a new text document.
2. Create two new styles in "All Styles", for example, "Default Style"->"Untitled1", "Default Style"->"Untitled2".
3. Switch to "Hierarchical".
4. Delete "Untitled1".
==> It pops up a dialog saying "One or more of the selected styles is in use in this document. If you delete these styles, text will revert to the parent style. Styles in use: Default Style".
5. Choose "Yes".
==> Crash. LO exits quickly, without any words in commandline.
TEST 3 (chaos)
1. Continuing the above test, switch to other views, e.g. "All Styles", then change back to "Hierarchical", then delete the new created style.
==> It pops up a dialog saying something like this "One or more of the selected styles is in use in this document. If you delete these styles, text will revert to the parent style. Styles in use: Default Style".
2. Choose "Yes" expecting to delete it perfectly. But...
==> Its parent style (in this case "Default Style") seems deleted!
==> In the Undo list, it logs "Delete paragraph style: Default Style", but it cannot be undone actually.
==> "Heading", "Text Body", "Caption", "Index" styles are raised to the top level.
==> "Default Style" is still in the hierarchy, but in parallel to "Caption" and others; it is not deleted actually.
Operating System: All
Version: 18.104.22.168 release
TEST 3 should be done after TEST 1. All the current behaviors described above are for version 22.214.171.124.
I can confirm this bug.
Windows 8 64 bit system, x86 build of Libreoffice.
In Writer, custom styles cannot be deleted. This bug seems to only happen in hierarchical view.
If you delete a custom style, it should disappear from the list.
Steps to reproduce:
Open a new document, open styles box and ensure hierarchical mode is selected. Add a custom style, click OK to close the box, then right click on the newly created style (e.g. 'Untitled1') > delete, it just remains in the list. When attempting to delete, Writer sometimes crashes (process terminates).
Based on my testing, I know this bug affects at least 126.96.36.199 and also 188.8.131.52
Hi Ryan, Luke
thanks for reporting/testing.
I can confirm that the style cannot be deleted in hierachical view.
However, in 4.2.0 beta2 it is fixed.
Looking at bug 69195, I expect that this has been improved somwhere along that line.
Could you pls check in beta2 4.2.0 ?
(In reply to comment #3)
> However, in 4.2.0 beta2 it is fixed.
> Looking at bug 69195, I expect that this has been improved somwhere along
> that line.
> Could you pls check in beta2 4.2.0 ?
> thanks again,
Yes. It has been fixed in 4.2.0 beta2.
Sorry, I said this bug occured in 4.2.0, I made a mistake - after downloading 4.2.0, I forgot to test againt that version before I reported this bug.
Do you plan to fix it along 4.1.x line? (I am learning the development process of LO. Please help me.) Thank you!
*** This bug has been marked as a duplicate of bug 69195 ***
I suggest that the fix should be pushed to 4.1 line. Thanks a lot!
Patch proposed for 4.1.4 version (fdo#69195)