https://bugs.documentfoundation.org/show_bug.cgi?id=149978

            Bug ID: 149978
           Summary: ODF import: multiple automatic styles applied via
                    text:span has non-deterministic result
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

ODF import of a document containing these automatic styles:

      <style:style style:family="text" style:name="A25"
style:parent-style-name="">
        <style:text-properties fo:background-color="#d3d3d3"/>
      </style:style>
      <style:style style:family="text" style:name="A26"
style:parent-style-name="">
        <style:text-properties fo:background-color="inherit"
fo:color="inherit"/>
      </style:style>

applied like this:

           <text:p>foo <text:span text:style-name="A25"><text:span
text:style-name="A26">bar</text:span></text:span> baz</text:p>

first, the value "inherit" is invalid and doesn't exist in ODF, but if we use a
real color it would be the same problem.

on ODF import, the 2 nested applied automatic styles are handled properly in
xmloff as XMLStyleHint_Impl, but inserting into Writer may order them in any
order depending on random chance, so the color that's visible may be from any
applied style.

this is due to an optimization in SwpHints::TryInsertHint().

LO doesn't write files like this, but probably it should be able to import them
deterministically.

weirdly, i can never reproduce the bug the 1st time i load the bugdoc, but from
the 2nd time the problem happens randomly.

reproduced in OOo 3.3 so ancient bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to