https://bugs.freedesktop.org/show_bug.cgi?id=72462

          Priority: medium
            Bug ID: 72462
          Assignee: libreoffice-bugs@lists.freedesktop.org
           Summary: VIEWING: Unable to delete custom styles in
                    Hierarchical view of styles list, even crash
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: duanpa...@gmail.com
          Hardware: Other
        Whiteboard: BSA
            Status: UNCONFIRMED
           Version: 4.1.2.3 release
         Component: UI
           Product: LibreOffice

* 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

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to