https://bz.apache.org/ooo/show_bug.cgi?id=127218
Calvin <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #9 from Calvin <[email protected]> --- I was able to replicate this issue on two configurations (macOS Mojave and Windows 10). Further, I was able to spot the issue reflected in the unzipped ODT file. Configurations: macOS Version 10.14.4 OpenOffice 4.1.6 AOO416m1(Build:9790) - Rev. 1844436 2018-10-22 14:11:36 (Mon, 22 Oct 2018) - Darwin x86_64 Windows 10 Version 1803 OS build 17134.706 OpenOffice 4.5.0 AOO450m1(Build:9900) - Rev. 1858450 Rev.1858450 Replication Steps: 1. Create a blank document 2. Create three paragraphs (specifically, three separate lines saying “Line of text”) 3. Open the Styles and Formatting tab (F11 or Command+T) 4. Apply a different style A, B, and C to each of the three paragraphs (by dragging the paragraph into the Styles and Formatting tab, or clicking New Style from Selection) 5. Save as ODT file 6. Select the entirety of the lines styled by A and B, and apply the Italic property (through Properties or Command/Control+I) 7. Save 8. Rename style A to D (see previous comments for detailed instructions) 9. Save In steps 5, 7 and 9, I unzipped the ODT file and observed the content.xml file. The files can be observed here: https://gist.github.com/calvinszeto/3ceb211536a6177a9329f43d0d7086ae. In step 5 (content-1.xml: https://gist.github.com/calvinszeto/3ceb211536a6177a9329f43d0d7086ae#file-content-1-xml), you can see how styles are applied to paragraphs on lines 18, 20 and 22 by the attribute text:style-name="A". In step 7, (content-2.xml: https://gist.github.com/calvinszeto/3ceb211536a6177a9329f43d0d7086ae#file-content-2-xml), you can see how a property is applied to an entire paragraph which also has a style. OpenOffice creates an automatic style (lines 10, 13) whose parent is the paragraph’s original style (style:parent-style-name="A"), and with the overriding property added (in this case, italic). The automatic style replaces the previous style (lines 25, 27). In step 9, (content-3.xml: https://gist.github.com/calvinszeto/3ceb211536a6177a9329f43d0d7086ae#file-content-3-xml), you can see that line 26, originally with style A and later with style P1, has no style name attached to it. Line 27 has a style named P2 attached to it, and line 29 has style named C attached to it. Further, you can see in the automatic styles (line 10, 13) that P1 is still an italic style applied on top of parent style named A, and P2 is an italic style applied on top of parent style named B. With no background in ODT/OpenOffice development, I can surmise based solely on the content.xml examples shown that when applying a property to an entire paragraph that already has a style attached to it, OpenOffice creates an automatic style with the original style as it’s parent and the new property as a style property (see how style P2 is applied to the line formerly styled as B). However, when renaming a style, OpenOffice is not correspondingly renaming the parent styles of any automatic styles (see how style P1 still has parent style A), and further, removes any automatic styles which had the original style as it’s parent (see how style P1 is removed from the first line). Finally, I was also able to replicate the notes by Midia Elena Sierra Dumitrescu: * only replicable with Paragraph Styles * affected by any properties applied on an entire paragraph * does not affect other paragraphs with the same style, if there is not an additional property applied to them -- You are receiving this mail because: You are the assignee for the issue.
