[Libreoffice] text:class-names and nested text:span/text:style-name
Dag Wieers
dag at wieers.com
Thu Nov 24 07:29:36 PST 2011
Hi,
Since I don't know if I am doing something wrong, or whether LibreOffice
simply doesn't support text:class-names or nested text:span styles.
Can someone verify that LibreOffice incorrectly process the following two
cases ?
The following two styles exists in <office:styles>
<style:style style:name="strong" style:family="text">
<style:text-properties fo:font-weight="bold"/>
</style:style>
<style:style style:name="blue" style:family="text">
<style:text-properties fo:color="#0000ff"/>
</style:style>
And attached is a very basic example .fodt to experiment with yourself.
Case 1: Using text:class-names
<text:span text:class-names="strong">bold <text:span text:class-names="strong blue">blue</text:span> bold</text:span>
No syles seem to have been applied.
Case 2: Using nested text:span/text:style-name
<text:span text:style-name="strong">bold <text:span text:style-name="blue">blue</text:span> bold</text:span>
Bold is bold. Blue is blue, but not bold !
PS If there is a better venue to ask ODF related questions, let me know.
Thanks in advance,
--
-- dag wieers, dag at wieers.com, http://dag.wieers.com/
-- dagit linux solutions, info at dagit.net, http://dagit.net/
[Any errors in spelling, tact or fact are transmission errors]
-------------- next part --------------
<?xml version="1.0" encoding="UTF-8"?>
<office:document
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
office:version="1.2"
office:mimetype="application/vnd.oasis.opendocument.text">
<office:font-face-decls>
<style:font-face style:name="serif" svg:font-family="'Georgia'" style:font-family-generic="roman" style:font-pitch="variable"/>
<style:font-face style:name="sans-serif" svg:font-family="'Arial'" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="article-title" svg:font-family="'Arial Black'" style:font-family-generic="swiss" style:font-pitch="variable"/>
<style:font-face style:name="monospace" svg:font-family="'DejaVu Sans Mono'" style:font-pitch="fixed"/>
</office:font-face-decls>
<office:styles>
<style:style style:name="title" style:family="paragraph" style:class="text">
<style:paragraph-properties fo:margin-top="0mm" fo:margin-bottom="1.8mm" fo:keep-with-next="always"/>
<style:text-properties style:font-name="sans-serif" fo:color="#527bbd" fo:font-weight="bold"/>
</style:style>
<style:default-style style:family="text">
<style:text-properties fo:color="#000000" style:font-name="serif" fo:font-size="12pt"/>
</style:default-style>
<style:style style:name="strong" style:family="text">
<style:text-properties fo:font-weight="bold"/>
</style:style>
<style:style style:name="blue" style:family="text">
<style:text-properties fo:color="#0000ff"/>
</style:style>
</office:styles>
<!-- body -->
<office:body>
<office:text>
<text:p text:style-name="title">Case 1:</text:p>
<text:p><text:span text:class-names="strong">bold <text:span text:class-names="strong blue">blue</text:span> bold</text:span></text:p>
<text:p text:style-name="title">Case 2:</text:p>
<text:p><text:span text:style-name="strong">bold <text:span text:style-name="blue">blue</text:span> bold</text:span></text:p>
</office:text>
</office:body>
</office:document>
More information about the LibreOffice
mailing list