Description: 1. Given the following character styles hierarchy: style1 |__ style2 |__ style3 2. When deleting style2, you'll get: style1 style3 3. You should get instead: style1 |__ style3 Right behaviour (3) exists until LibreOffice 24.2.5.2. Bad behaviour (2) appears with LibreOffice 24.2.6.1. Steps to Reproduce: Create the following character styles, respecting the hierarchy: style1 |__ style2 |__ style3 2. Delete character style "style2". Actual Results: Hierarchy is lost: style1 style3 Expected Results: Hierarchy should be kept: style1 |__ style3 Reproducible: Always User Profile Reset: No Additional Info: Observed from LibreOffice 24.2.6.1.
Maybe this can help. Trying to retrieve by code the ParentStyle property of the character style "style3" after deleting "style2", we get these error messages: [basic macro] An exception occurred Type: com.sun.star.container.ElementExistException Message: at /home/buildslave/source/libo-core/sw/source/core/unocore/unostyle.cxx:1082. [python script] 'ooo_script_framework.com.sun.star.beans.UnknownPropertyException'>: cannot get value ParentStyle at /home/buildslave/source/libo-core/stoc/source/invocation/invocation.cxx:498
I think something is wrong with the inheritance of character styles. According to previous versions, if a child style was in use, the parent style also appeared as the style in use, even if it was not used. - This prevented deleting a parent style with dependent styles in use. Now if the parent style is not in use but it does have child styles in use, the parent style appears as not used