https://bugs.documentfoundation.org/show_bug.cgi?id=133459
--- Comment #10 from Maxim Monastirsky <[email protected]> ---
What I found so far: The field code indeed seems to use automatic styles, with
one exception: During the import of <office:automatic-styles>, there is a
special code in the SvXMLImport::SetAutoStyles method that inserts already
existing number styles into automatic styles as well. But for this to happen,
the mnImportFlags member must include the SvXMLImportFlags::CONTENT flag.
For the fodt import, this method is called just once with mnImportFlags ==
SvXMLImportFlags::ALL. That's when the number style from <office:styles> is
inserted into automatic styles, and later consumed from there by the header
field.
But for odt, this method is called twice, because there is
<office:automatic-styles> in both styles.xml and content.xml:
- For styles.xml, it's called with mnImportFlags == (SvXMLImportFlags::STYLES |
SvXMLImportFlags::MASTERSTYLES | SvXMLImportFlags::AUTOSTYLES |
SvXMLImportFlags::FONTDECLS), so the number style isn't inserted into automatic
styles, and later can't be found by the header.
- For content.xml, it's finally called with mnImportFlags ==
(SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::CONTENT |
SvXMLImportFlags::SCRIPTS | SvXMLImportFlags::FONTDECLS). But while the number
style is inserted, it has no use here, as the header is defined in styles.xml,
and was processed already.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs