Below I report the conversion in opendocument format of the text Paragraph containing the text:
oParRef.charStylenames = array (“stylename 1”, “stylename 2”) in the event of a conflict of attributes, the last one applied prevails (here: “stylename 2”)
The formatting of the character styles was then applied to the charStylenames property of the paragraph, assigning them as a value array (“stylename 1”, “stylename 2”)
After saving the file, only references to styles appear in the content.xml in the xml encoding of the paragraph
<text:p text:style-name="P1">
<text:span text:style-name="stylename 1">
<text:span text:style-name="stylename 2">
oParRef.charStylenames=array("stylename 1","stylename 2")
in the event of a conflict of attributes, the last one applied prevails (here: "stylename 2")
</text:span>
</text:span>
</text:p>
Note that only the last applied style appears in the style inspector, while in the UNO object inspector it correctly reports that the charStylenames property of the paragraph contains an array with the names of the two styles