Bug 72462 - VIEWING: Unable to delete custom styles in Hierarchical view of styles list, even crash
Summary: VIEWING: Unable to delete custom styles in Hierarchical view of styles list, ...
Status: RESOLVED DUPLICATE of bug 69195
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-08 02:36 UTC by Ryan Duan
Modified: 2014-04-03 13:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Duan 2013-12-08 02:36:50 UTC
* 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]
Debian 7.2
Windows Vista

[LibreOffice canonical releases]
4.1.2,
4.1.3,
4.0.6,
4.1.4 (pre-release)
4.2.0 (pre-release)
   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 4.1.4.1]
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: 4.1.2.3 release
Comment 1 Ryan Duan 2013-12-08 06:14:11 UTC
TEST 3 should be done after TEST 1.  All the current behaviors described above are for version 4.1.4.1.
Comment 2 luke 2013-12-08 18:19:50 UTC
I can confirm this bug.

Environment:

Windows 8 64 bit system, x86 build of Libreoffice.

Problem:

In Writer, custom styles cannot be deleted. This bug seems to only happen in hierarchical view.

Expected behaviour:

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).

Versions:

Based on my testing, I know this bug affects at least 4.1.2.3 and also 4.1.3.2
Comment 3 Cor Nouws 2013-12-09 21:03:32 UTC
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 ?
thanks again,
Cor
Comment 4 Ryan Duan 2013-12-11 11:38:34 UTC
(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,
> Cor

Hi Cor,

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!
Comment 5 Ryan Duan 2013-12-20 04:28:29 UTC

*** This bug has been marked as a duplicate of bug 69195 ***
Comment 6 Ryan Duan 2013-12-20 04:34:08 UTC
I suggest that the fix should be pushed to 4.1 line.  Thanks a lot!
Comment 7 Mohamed-Ali BEN MANSOUR 2014-04-03 13:08:03 UTC
Patch proposed for 4.1.4 version (fdo#69195)