Update Odt tests
This commit is contained in:
@@ -1,81 +1,82 @@
|
||||
<?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:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:document xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta>
|
||||
<meta:creation-date>2023-02-12T15:10:11</meta:creation-date>
|
||||
<meta:generator>novelWriter/2.0.4</meta:generator>
|
||||
<meta:creation-date>2023-05-29T19:49:56</meta:creation-date>
|
||||
<meta:generator>novelWriter/2.0.7</meta:generator>
|
||||
<meta:initial-creator>Jane Smith</meta:initial-creator>
|
||||
<meta:editing-cycles>1234</meta:editing-cycles>
|
||||
<meta:editing-duration>P42DT12H34M56S</meta:editing-duration>
|
||||
<dc:title>Test Project</dc:title>
|
||||
<dc:date>2023-02-12T15:10:11</dc:date>
|
||||
<dc:date>2023-05-29T19:49:56</dc:date>
|
||||
<dc:creator>Jane Smith</dc:creator>
|
||||
</office:meta>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="Liberation Serif" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" style:font-pitch="variable" />
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:language="nb" fo:country="NO"/>
|
||||
<style:paragraph-properties style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:language="nb" fo:country="NO" />
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt"/>
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"/>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra" />
|
||||
<style:style style:name="Text_20_body" style:family="paragraph" style:display-name="Text body" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%" fo:text-align="left"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt"/>
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%" fo:text-align="left" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_Meta" style:family="paragraph" style:display-name="Text Meta" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:color="#813709" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:color="#813709" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:display-name="Title" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:text-align="center"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="30pt" fo:font-weight="bold"/>
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:text-align="center" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="30pt" fo:font-weight="bold" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:family="paragraph" style:display-name="Heading 1" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="24pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="24pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:family="paragraph" style:display-name="Heading 2" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.353cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="19pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.353cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="19pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:family="paragraph" style:display-name="Heading 3" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="16pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="16pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_4" style:family="paragraph" style:display-name="Heading 4" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="4" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:display-name="Header" style:parent-style-name="Header_20_and_20_Footer">
|
||||
<style:paragraph-properties fo:text-align="right"/>
|
||||
<style:paragraph-properties fo:text-align="right" />
|
||||
</style:style>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:page-layout style:name="PM1">
|
||||
<style:page-layout-properties fo:margin-top="2.000cm" fo:margin-bottom="2.000cm" fo:margin-left="2.000cm" fo:margin-right="2.000cm"/>
|
||||
<style:page-layout-properties fo:margin-top="2.000cm" fo:margin-bottom="2.000cm" fo:margin-left="2.000cm" fo:margin-right="2.000cm" />
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0.600cm" fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:margin-bottom="0.500cm"/>
|
||||
<style:header-footer-properties fo:min-height="0.600cm" fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:margin-bottom="0.500cm" />
|
||||
</style:header-style>
|
||||
</style:page-layout>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Heading_20_2">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
<style:paragraph-properties fo:break-before="page" />
|
||||
</style:style>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="PM1">
|
||||
<style:header>
|
||||
<text:p text:style-name="Header">Test Project / Jane Smith / <text:page-number text:select-page="current">2</text:page-number></text:p>
|
||||
<text:p text:style-name="Header">Test Project / Jane Smith / <text:page-number text:select-page="current">2</text:page-number>
|
||||
</text:p>
|
||||
</style:header>
|
||||
<style:header-first>
|
||||
<text:p text:style-name="Header"/>
|
||||
<text:p text:style-name="Header" />
|
||||
</style:header-first>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" office:version="1.3">
|
||||
<office:document-content xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 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" office:version="1.3">
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="Liberation Serif" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" style:font-pitch="variable" />
|
||||
</office:font-face-decls>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Heading_20_2">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
<style:paragraph-properties fo:break-before="page" />
|
||||
</style:style>
|
||||
</office:automatic-styles>
|
||||
<office:body>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.3">
|
||||
<manifest:file-entry manifest:full-path="/" manifest:version="1.3" manifest:media-type="application/vnd.oasis.opendocument.text"/>
|
||||
<manifest:file-entry manifest:full-path="settings.xml" manifest:media-type="text/xml"/>
|
||||
<manifest:file-entry manifest:full-path="content.xml" manifest:media-type="text/xml"/>
|
||||
<manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/>
|
||||
<manifest:file-entry manifest:full-path="styles.xml" manifest:media-type="text/xml"/>
|
||||
<manifest:file-entry manifest:full-path="/" manifest:version="1.3" manifest:media-type="application/vnd.oasis.opendocument.text" />
|
||||
<manifest:file-entry manifest:full-path="settings.xml" manifest:media-type="text/xml" />
|
||||
<manifest:file-entry manifest:full-path="content.xml" manifest:media-type="text/xml" />
|
||||
<manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml" />
|
||||
<manifest:file-entry manifest:full-path="styles.xml" manifest:media-type="text/xml" />
|
||||
</manifest:manifest>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" office:version="1.3">
|
||||
<office:document-meta xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3">
|
||||
<office:meta>
|
||||
<meta:creation-date>2023-02-12T15:09:03</meta:creation-date>
|
||||
<meta:generator>novelWriter/2.0.4</meta:generator>
|
||||
<meta:creation-date>2023-05-29T19:48:33</meta:creation-date>
|
||||
<meta:generator>novelWriter/2.0.7</meta:generator>
|
||||
<meta:initial-creator>Jane Smith</meta:initial-creator>
|
||||
<meta:editing-cycles>1234</meta:editing-cycles>
|
||||
<meta:editing-duration>P42DT12H34M56S</meta:editing-duration>
|
||||
<dc:title>Test Project</dc:title>
|
||||
<dc:date>2023-02-12T15:09:03</dc:date>
|
||||
<dc:date>2023-05-29T19:48:33</dc:date>
|
||||
<dc:creator>Jane Smith</dc:creator>
|
||||
</office:meta>
|
||||
</office:document-meta>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<office:document-settings xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3"/>
|
||||
<office:document-settings xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3" />
|
||||
|
||||
@@ -1,68 +1,69 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<office:document-styles xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" office:version="1.3">
|
||||
<office:document-styles xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" 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" office:version="1.3">
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="Liberation Serif" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Liberation Serif" style:font-pitch="variable" />
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:language="en" fo:country="GB"/>
|
||||
<style:paragraph-properties style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:language="en" fo:country="GB" />
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt"/>
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"/>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra" />
|
||||
<style:style style:name="Text_20_body" style:family="paragraph" style:display-name="Text body" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%" fo:text-align="left"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt"/>
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%" fo:text-align="left" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_Meta" style:family="paragraph" style:display-name="Text Meta" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:color="None" loext:opacity="None"/>
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.247cm" fo:line-height="115%" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="12pt" fo:color="None" loext:opacity="None" />
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:display-name="Title" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:text-align="center"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="30pt" fo:font-weight="bold"/>
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:text-align="center" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="30pt" fo:font-weight="bold" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:family="paragraph" style:display-name="Heading 1" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="24pt" fo:font-weight="bold" fo:color="None" loext:opacity="None"/>
|
||||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="24pt" fo:font-weight="bold" fo:color="None" loext:opacity="None" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:family="paragraph" style:display-name="Heading 2" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.353cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="19pt" fo:font-weight="bold" fo:color="None" loext:opacity="None"/>
|
||||
<style:paragraph-properties fo:margin-top="0.353cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="19pt" fo:font-weight="bold" fo:color="None" loext:opacity="None" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:family="paragraph" style:display-name="Heading 3" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="16pt" fo:font-weight="bold" fo:color="None" loext:opacity="None"/>
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="16pt" fo:font-weight="bold" fo:color="None" loext:opacity="None" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_4" style:family="paragraph" style:display-name="Heading 4" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="4" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt" fo:font-weight="bold" fo:color="None" loext:opacity="None"/>
|
||||
<style:paragraph-properties fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" />
|
||||
<style:text-properties style:font-name="Liberation Serif" fo:font-family="'Liberation Serif'" fo:font-size="14pt" fo:font-weight="bold" fo:color="None" loext:opacity="None" />
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:display-name="Header" style:parent-style-name="Header_20_and_20_Footer">
|
||||
<style:paragraph-properties fo:text-align="right"/>
|
||||
<style:paragraph-properties fo:text-align="right" />
|
||||
</style:style>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:page-layout style:name="PM1">
|
||||
<style:page-layout-properties fo:margin-top="2.000cm" fo:margin-bottom="2.000cm" fo:margin-left="2.000cm" fo:margin-right="2.000cm"/>
|
||||
<style:page-layout-properties fo:margin-top="2.000cm" fo:margin-bottom="2.000cm" fo:margin-left="2.000cm" fo:margin-right="2.000cm" />
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0.600cm" fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:margin-bottom="0.500cm"/>
|
||||
<style:header-footer-properties fo:min-height="0.600cm" fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:margin-bottom="0.500cm" />
|
||||
</style:header-style>
|
||||
</style:page-layout>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="PM1">
|
||||
<style:header>
|
||||
<text:p text:style-name="Header">Test Project / Jane Smith / <text:page-number text:select-page="current">2</text:page-number></text:p>
|
||||
<text:p text:style-name="Header">Test Project / Jane Smith / <text:page-number text:select-page="current">2</text:page-number>
|
||||
</text:p>
|
||||
</style:header>
|
||||
<style:header-first>
|
||||
<text:p text:style-name="Header"/>
|
||||
<text:p text:style-name="Header" />
|
||||
</style:header-first>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
|
||||
@@ -1,106 +1,110 @@
|
||||
<?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:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:document xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta>
|
||||
<meta:creation-date>2023-02-12T14:52:03</meta:creation-date>
|
||||
<meta:generator>novelWriter/2.0.4</meta:generator>
|
||||
<meta:creation-date>2023-05-29T20:00:01</meta:creation-date>
|
||||
<meta:generator>novelWriter/2.0.7</meta:generator>
|
||||
<meta:initial-creator>lipsum.com</meta:initial-creator>
|
||||
<meta:editing-cycles>38</meta:editing-cycles>
|
||||
<meta:editing-duration>P0DT0H31M40S</meta:editing-duration>
|
||||
<meta:editing-cycles>40</meta:editing-cycles>
|
||||
<meta:editing-duration>P0DT0H31M45S</meta:editing-duration>
|
||||
<dc:title>Lorem Ipsum</dc:title>
|
||||
<dc:date>2023-02-12T14:52:03</dc:date>
|
||||
<dc:date>2023-05-29T20:00:01</dc:date>
|
||||
<dc:creator>lipsum.com</dc:creator>
|
||||
</office:meta>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="DejaVu Sans" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="DejaVu Sans" style:font-pitch="variable" />
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt" fo:language="en" fo:country="GB"/>
|
||||
<style:paragraph-properties style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt" fo:language="en" fo:country="GB" />
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text">
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.227cm" fo:margin-bottom="0.194cm" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="13pt"/>
|
||||
<style:paragraph-properties fo:margin-top="0.227cm" fo:margin-bottom="0.194cm" fo:keep-with-next="always" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="13pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"/>
|
||||
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra" />
|
||||
<style:style style:name="Text_20_body" style:family="paragraph" style:display-name="Text body" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.227cm" fo:line-height="115%" fo:text-align="left"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt"/>
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.227cm" fo:line-height="115%" fo:text-align="left" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt" />
|
||||
</style:style>
|
||||
<style:style style:name="Text_20_Meta" style:family="paragraph" style:display-name="Text Meta" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.227cm" fo:line-height="115%"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt" fo:color="#813709" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.227cm" fo:line-height="115%" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="11pt" fo:color="#813709" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Title" style:family="paragraph" style:display-name="Title" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
|
||||
<style:paragraph-properties fo:margin-top="0.388cm" fo:margin-bottom="0.194cm" fo:text-align="center"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="28pt" fo:font-weight="bold"/>
|
||||
<style:paragraph-properties fo:margin-top="0.388cm" fo:margin-bottom="0.194cm" fo:text-align="center" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="28pt" fo:font-weight="bold" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_1" style:family="paragraph" style:display-name="Heading 1" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.388cm" fo:margin-bottom="0.194cm"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="22pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.388cm" fo:margin-bottom="0.194cm" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="22pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_2" style:family="paragraph" style:display-name="Heading 2" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.324cm" fo:margin-bottom="0.194cm"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="18pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.324cm" fo:margin-bottom="0.194cm" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="18pt" fo:font-weight="bold" fo:color="#2a6099" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_3" style:family="paragraph" style:display-name="Heading 3" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.227cm" fo:margin-bottom="0.194cm"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="14pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.227cm" fo:margin-bottom="0.194cm" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="14pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Heading_20_4" style:family="paragraph" style:display-name="Heading 4" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="4" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0.227cm" fo:margin-bottom="0.194cm"/>
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="13pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%"/>
|
||||
<style:paragraph-properties fo:margin-top="0.227cm" fo:margin-bottom="0.194cm" />
|
||||
<style:text-properties style:font-name="DejaVu Sans" fo:font-family="'DejaVu Sans'" fo:font-size="13pt" fo:font-weight="bold" fo:color="#444444" loext:opacity="100%" />
|
||||
</style:style>
|
||||
<style:style style:name="Header" style:family="paragraph" style:display-name="Header" style:parent-style-name="Header_20_and_20_Footer">
|
||||
<style:paragraph-properties fo:text-align="right"/>
|
||||
<style:paragraph-properties fo:text-align="right" />
|
||||
</style:style>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:page-layout style:name="PM1">
|
||||
<style:page-layout-properties fo:margin-top="2.000cm" fo:margin-bottom="2.000cm" fo:margin-left="2.000cm" fo:margin-right="2.000cm"/>
|
||||
<style:page-layout-properties fo:margin-top="2.000cm" fo:margin-bottom="2.000cm" fo:margin-left="2.000cm" fo:margin-right="2.000cm" />
|
||||
<style:header-style>
|
||||
<style:header-footer-properties fo:min-height="0.600cm" fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:margin-bottom="0.500cm"/>
|
||||
<style:header-footer-properties fo:min-height="0.600cm" fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:margin-bottom="0.500cm" />
|
||||
</style:header-style>
|
||||
</style:page-layout>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Text_20_body">
|
||||
<style:paragraph-properties fo:text-align="center"/>
|
||||
<style:paragraph-properties fo:text-align="center" />
|
||||
</style:style>
|
||||
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Heading_20_2">
|
||||
<style:paragraph-properties fo:break-before="page"/>
|
||||
<style:paragraph-properties fo:break-before="page" />
|
||||
</style:style>
|
||||
<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Heading_20_1">
|
||||
<style:paragraph-properties fo:text-align="center" fo:break-before="page"/>
|
||||
<style:paragraph-properties fo:text-align="center" fo:break-before="page" />
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties fo:font-weight="bold"/>
|
||||
<style:text-properties fo:font-weight="bold" />
|
||||
</style:style>
|
||||
<style:style style:name="T2" style:family="text">
|
||||
<style:text-properties fo:font-style="italic"/>
|
||||
<style:text-properties fo:font-style="italic" />
|
||||
</style:style>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="PM1">
|
||||
<style:header>
|
||||
<text:p text:style-name="Header">Lorem Ipsum / lipsum.com / <text:page-number text:select-page="current">2</text:page-number></text:p>
|
||||
<text:p text:style-name="Header">Lorem Ipsum / lipsum.com / <text:page-number text:select-page="current">2</text:page-number>
|
||||
</text:p>
|
||||
</style:header>
|
||||
<style:header-first>
|
||||
<text:p text:style-name="Header"/>
|
||||
<text:p text:style-name="Header" />
|
||||
</style:header-first>
|
||||
</style:master-page>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text>
|
||||
<text:p text:style-name="Title">Lorem Ipsum</text:p>
|
||||
<text:p text:style-name="P1"><text:span text:style-name="T1">By lipsum.com</text:span></text:p>
|
||||
<text:p text:style-name="P1">
|
||||
<text:span text:style-name="T1">By lipsum.com</text:span>
|
||||
</text:p>
|
||||
<text:p text:style-name="P1">“Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…”</text:p>
|
||||
<text:p text:style-name="P1">“There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain…”</text:p>
|
||||
<text:p text:style-name="Text_20_body">Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of “de Finibus Bonorum et Malorum” (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, “Lorem ipsum dolor sit amet..”, comes from a line in section 1.10.32.</text:p>
|
||||
<text:p text:style-name="Text_20_body">The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from “de Finibus Bonorum et Malorum” by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</text:p>
|
||||
<text:h text:style-name="P2" text:outline-level="2">Prologue</text:h>
|
||||
<text:p text:style-name="Text_20_body"><text:span text:style-name="T2">Lorem Ipsum</text:span> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</text:p>
|
||||
<text:p text:style-name="Text_20_body">
|
||||
<text:span text:style-name="T2">Lorem Ipsum</text:span> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</text:p>
|
||||
<text:h text:style-name="P3" text:outline-level="1">Act One</text:h>
|
||||
<text:p text:style-name="P1">“Fusce maximus felis libero”</text:p>
|
||||
<text:h text:style-name="P2" text:outline-level="2">Chapter 1: Chapter One</text:h>
|
||||
|
||||
@@ -21,12 +21,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import pytest
|
||||
import zipfile
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from lxml import etree
|
||||
from shutil import copyfile
|
||||
|
||||
from tools import ODT_IGNORE, cmpFiles
|
||||
|
||||
from novelwriter.common import xmlIndent
|
||||
from novelwriter.core.toodt import ToOdt, ODTParagraphStyle, ODTTextStyle, XMLParagraph, _mkTag
|
||||
from novelwriter.core.project import NWProject
|
||||
|
||||
@@ -44,7 +45,7 @@ XML_NS = [
|
||||
def xmlToText(xElem):
|
||||
"""Get the text content of an XML element.
|
||||
"""
|
||||
rTxt = etree.tostring(xElem, encoding="utf-8", xml_declaration=False).decode()
|
||||
rTxt = ET.tostring(xElem, encoding="utf-8", xml_declaration=False).decode()
|
||||
for nSpace in XML_NS:
|
||||
rTxt = rTxt.replace(nSpace, "")
|
||||
return rTxt
|
||||
@@ -113,7 +114,7 @@ def testCoreToOdt_TextFormatting(mockGUI):
|
||||
theDoc = ToOdt(theProject, isFlat=True)
|
||||
|
||||
theDoc.initDocument()
|
||||
assert xmlToText(theDoc._xText) == "<office:text/>"
|
||||
assert xmlToText(theDoc._xText) == "<office:text />"
|
||||
|
||||
# Paragraph Style
|
||||
# ===============
|
||||
@@ -147,7 +148,7 @@ def testCoreToOdt_TextFormatting(mockGUI):
|
||||
theDoc._addTextPar("Standard", oStyle, "")
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
"<office:text>"
|
||||
"<text:p text:style-name=\"Standard\"></text:p>"
|
||||
"<text:p text:style-name=\"Standard\" />"
|
||||
"</office:text>"
|
||||
)
|
||||
|
||||
@@ -217,7 +218,7 @@ def testCoreToOdt_TextFormatting(mockGUI):
|
||||
assert theDoc.getErrors() == []
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
"<office:text>"
|
||||
"<text:p text:style-name=\"Standard\">Hello<text:line-break/><text:tab/>World</text:p>"
|
||||
"<text:p text:style-name=\"Standard\">Hello<text:line-break /><text:tab />World</text:p>"
|
||||
"</office:text>"
|
||||
)
|
||||
|
||||
@@ -366,7 +367,7 @@ def testCoreToOdt_Convert(mockGUI):
|
||||
assert theDoc.getErrors() == []
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
'<office:text>'
|
||||
'<text:p text:style-name="Text_20_body">Some text.<text:line-break/>Next line</text:p>'
|
||||
'<text:p text:style-name="Text_20_body">Some text.<text:line-break />Next line</text:p>'
|
||||
'</office:text>'
|
||||
)
|
||||
|
||||
@@ -379,7 +380,7 @@ def testCoreToOdt_Convert(mockGUI):
|
||||
assert theDoc.getErrors() == []
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
'<office:text>'
|
||||
'<text:p text:style-name="Text_20_body"><text:tab/>Item 1<text:tab/>Item 2</text:p>'
|
||||
'<text:p text:style-name="Text_20_body"><text:tab />Item 1<text:tab />Item 2</text:p>'
|
||||
'</office:text>'
|
||||
)
|
||||
|
||||
@@ -393,7 +394,7 @@ def testCoreToOdt_Convert(mockGUI):
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
'<office:text>'
|
||||
'<text:p text:style-name="Text_20_body">Some <text:span text:style-name="T4">'
|
||||
'bold<text:tab/>text</text:span></text:p>'
|
||||
'bold<text:tab />text</text:span></text:p>'
|
||||
'</office:text>'
|
||||
)
|
||||
|
||||
@@ -413,8 +414,8 @@ def testCoreToOdt_Convert(mockGUI):
|
||||
'<office:text>'
|
||||
'<text:h text:style-name="Heading_20_3" text:outline-level="3">Scene</text:h>'
|
||||
'<text:p text:style-name="Text_20_body">Hello World</text:p>'
|
||||
'<text:p text:style-name="Text_20_body">Hello <text:s/>World</text:p>'
|
||||
'<text:p text:style-name="Text_20_body">Hello <text:s text:c="2"/>World</text:p>'
|
||||
'<text:p text:style-name="Text_20_body">Hello <text:s />World</text:p>'
|
||||
'<text:p text:style-name="Text_20_body">Hello <text:s text:c="2" />World</text:p>'
|
||||
'</office:text>'
|
||||
)
|
||||
|
||||
@@ -474,9 +475,9 @@ def testCoreToOdt_Convert(mockGUI):
|
||||
assert theDoc.getErrors() == []
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
'<office:text>'
|
||||
'<text:p text:style-name="Text_20_body"></text:p>'
|
||||
'<text:p text:style-name="Text_20_body" />'
|
||||
'<text:p text:style-name="Text_20_body">Text</text:p>'
|
||||
'<text:p text:style-name="Text_20_body"></text:p>'
|
||||
'<text:p text:style-name="Text_20_body" />'
|
||||
'<text:p text:style-name="Text_20_body">Text</text:p>'
|
||||
'</office:text>'
|
||||
)
|
||||
@@ -540,7 +541,7 @@ def testCoreToOdt_Convert(mockGUI):
|
||||
'<office:text>'
|
||||
'<text:h text:style-name="Heading_20_3" text:outline-level="3">Scene</text:h>'
|
||||
'<text:p text:style-name="Text_20_body">Regular paragraph</text:p>'
|
||||
'<text:p text:style-name="P9">with<text:line-break/>break</text:p>'
|
||||
'<text:p text:style-name="P9">with<text:line-break />break</text:p>'
|
||||
'<text:p text:style-name="P9">Left Align</text:p>'
|
||||
'</office:text>'
|
||||
)
|
||||
@@ -592,7 +593,7 @@ def testCoreToOdt_ConvertDirect(mockGUI):
|
||||
assert (
|
||||
'<style:style style:name="P1" style:family="paragraph" '
|
||||
'style:parent-style-name="Text_20_body">'
|
||||
'<style:paragraph-properties fo:text-align="justify"/>'
|
||||
'<style:paragraph-properties fo:text-align="justify" />'
|
||||
'</style:style>'
|
||||
) in xmlToText(theDoc._xAuto)
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
@@ -613,7 +614,7 @@ def testCoreToOdt_ConvertDirect(mockGUI):
|
||||
assert (
|
||||
'<style:style style:name="P1" style:family="paragraph" '
|
||||
'style:parent-style-name="Text_20_body">'
|
||||
'<style:paragraph-properties fo:break-after="page"/>'
|
||||
'<style:paragraph-properties fo:break-after="page" />'
|
||||
'</style:style>'
|
||||
) in xmlToText(theDoc._xAuto)
|
||||
assert xmlToText(theDoc._xText) == (
|
||||
@@ -723,15 +724,10 @@ def testCoreToOdt_SaveFull(mockGUI, fncPath, tstPaths):
|
||||
stylOut = tstPaths.outDir / "coreToOdt_SaveFull" / "styles.xml"
|
||||
|
||||
def prettifyXml(inFile, outFile):
|
||||
with open(outFile, mode="wb") as fileStream:
|
||||
fileStream.write(
|
||||
etree.tostring(
|
||||
etree.parse(str(inFile)),
|
||||
pretty_print=True,
|
||||
encoding="utf-8",
|
||||
xml_declaration=True
|
||||
)
|
||||
)
|
||||
with open(outFile, mode="wb") as fStream:
|
||||
xml = ET.parse(inFile)
|
||||
xmlIndent(xml, space=" ")
|
||||
xml.write(fStream, encoding="utf-8", xml_declaration=True)
|
||||
|
||||
prettifyXml(maniOut, maniFile)
|
||||
prettifyXml(settOut, settFile)
|
||||
@@ -949,20 +945,16 @@ def testCoreToOdt_ODTParagraphStyle():
|
||||
|
||||
# Pack XML
|
||||
# ========
|
||||
xStyle = etree.Element("test", nsmap={
|
||||
"style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
|
||||
"loext": "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0",
|
||||
"fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
|
||||
})
|
||||
xStyle = ET.Element("test")
|
||||
parStyle.packXML(xStyle, "test")
|
||||
assert xmlToText(xStyle) == (
|
||||
'<test>'
|
||||
'<style:style style:name="test" style:family="paragraph" style:display-name="Name" '
|
||||
'style:parent-style-name="Name" style:next-style-name="Name">'
|
||||
'<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.000cm" '
|
||||
'fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:line-height="1.15"/>'
|
||||
'fo:margin-left="0.000cm" fo:margin-right="0.000cm" fo:line-height="1.15" />'
|
||||
'<style:text-properties style:font-name="Verdana" fo:font-family="Verdana" '
|
||||
'fo:font-size="12pt" fo:color="#000000" loext:opacity="1.00"/>'
|
||||
'fo:font-size="12pt" fo:color="#000000" loext:opacity="1.00" />'
|
||||
'</style:style>'
|
||||
'</test>'
|
||||
)
|
||||
@@ -1059,15 +1051,12 @@ def testCoreToOdt_ODTTextStyle():
|
||||
txtStyle.setFontStyle("italic")
|
||||
txtStyle.setStrikeStyle("solid")
|
||||
txtStyle.setStrikeType("single")
|
||||
xStyle = etree.Element("test", nsmap={
|
||||
"style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
|
||||
"fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
|
||||
})
|
||||
xStyle = ET.Element("test")
|
||||
txtStyle.packXML(xStyle, "test")
|
||||
assert xmlToText(xStyle) == (
|
||||
'<test><style:style style:name="test" style:family="text"><style:text-properties '
|
||||
'fo:font-weight="bold" fo:font-style="italic" style:text-line-through-style="solid" '
|
||||
'style:text-line-through-type="single"/></style:style></test>'
|
||||
'style:text-line-through-type="single" /></style:style></test>'
|
||||
)
|
||||
|
||||
# END Test testCoreToOdt_ODTTextStyle
|
||||
@@ -1077,20 +1066,11 @@ def testCoreToOdt_ODTTextStyle():
|
||||
def testCoreToOdt_XMLParagraph():
|
||||
"""Test XML encoding of paragraph.
|
||||
"""
|
||||
nsMap = {
|
||||
"office": "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
|
||||
"style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
|
||||
"loext": "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0",
|
||||
"text": "urn:oasis:names:tc:opendocument:xmlns:text:1.0",
|
||||
"meta": "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
|
||||
"fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
|
||||
}
|
||||
|
||||
# Stage 1 : Text
|
||||
# ==============
|
||||
|
||||
xRoot = etree.Element("root", nsmap=nsMap)
|
||||
xElem = etree.SubElement(xRoot, "{%s}p" % nsMap["text"])
|
||||
xRoot = ET.Element("root")
|
||||
xElem = ET.SubElement(xRoot, _mkTag("text", "p"))
|
||||
xmlPar = XMLParagraph(xElem)
|
||||
|
||||
# Plain Text
|
||||
@@ -1126,15 +1106,15 @@ def testCoreToOdt_XMLParagraph():
|
||||
# Stage 2 : Line Breaks
|
||||
# =====================
|
||||
|
||||
xRoot = etree.Element("root", nsmap=nsMap)
|
||||
xElem = etree.SubElement(xRoot, "{%s}p" % nsMap["text"])
|
||||
xRoot = ET.Element("root")
|
||||
xElem = ET.SubElement(xRoot, _mkTag("text", "p"))
|
||||
xmlPar = XMLParagraph(xElem)
|
||||
|
||||
# Plain Text w/Line Break
|
||||
xmlPar.appendText("Hello\nWorld\n!!")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello<text:line-break/>World<text:line-break/>!!</text:p>'
|
||||
'<text:p>Hello<text:line-break />World<text:line-break />!!</text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1142,8 +1122,8 @@ def testCoreToOdt_XMLParagraph():
|
||||
xmlPar.appendSpan("spanned\ntext", "T1")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello<text:line-break/>World<text:line-break/>!!'
|
||||
'<text:span text:style-name="T1">spanned<text:line-break/>text</text:span></text:p>'
|
||||
'<text:p>Hello<text:line-break />World<text:line-break />!!'
|
||||
'<text:span text:style-name="T1">spanned<text:line-break />text</text:span></text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1151,9 +1131,9 @@ def testCoreToOdt_XMLParagraph():
|
||||
xmlPar.appendText("more\ntext")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello<text:line-break/>World<text:line-break/>!!'
|
||||
'<text:span text:style-name="T1">spanned<text:line-break/>text</text:span>'
|
||||
'more<text:line-break/>text</text:p>'
|
||||
'<text:p>Hello<text:line-break />World<text:line-break />!!'
|
||||
'<text:span text:style-name="T1">spanned<text:line-break />text</text:span>'
|
||||
'more<text:line-break />text</text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1162,15 +1142,15 @@ def testCoreToOdt_XMLParagraph():
|
||||
# Stage 3 : Tabs
|
||||
# ==============
|
||||
|
||||
xRoot = etree.Element("root", nsmap=nsMap)
|
||||
xElem = etree.SubElement(xRoot, "{%s}p" % nsMap["text"])
|
||||
xRoot = ET.Element("root")
|
||||
xElem = ET.SubElement(xRoot, _mkTag("text", "p"))
|
||||
xmlPar = XMLParagraph(xElem)
|
||||
|
||||
# Plain Text w/Line Break
|
||||
xmlPar.appendText("Hello\tWorld\t!!")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello<text:tab/>World<text:tab/>!!</text:p>'
|
||||
'<text:p>Hello<text:tab />World<text:tab />!!</text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1178,8 +1158,8 @@ def testCoreToOdt_XMLParagraph():
|
||||
xmlPar.appendSpan("spanned\ttext", "T1")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello<text:tab/>World<text:tab/>!!'
|
||||
'<text:span text:style-name="T1">spanned<text:tab/>text</text:span></text:p>'
|
||||
'<text:p>Hello<text:tab />World<text:tab />!!'
|
||||
'<text:span text:style-name="T1">spanned<text:tab />text</text:span></text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1187,9 +1167,9 @@ def testCoreToOdt_XMLParagraph():
|
||||
xmlPar.appendText("more\ttext")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello<text:tab/>World<text:tab/>!!'
|
||||
'<text:span text:style-name="T1">spanned<text:tab/>text</text:span>'
|
||||
'more<text:tab/>text</text:p>'
|
||||
'<text:p>Hello<text:tab />World<text:tab />!!'
|
||||
'<text:span text:style-name="T1">spanned<text:tab />text</text:span>'
|
||||
'more<text:tab />text</text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1198,15 +1178,15 @@ def testCoreToOdt_XMLParagraph():
|
||||
# Stage 4 : Spaces
|
||||
# ================
|
||||
|
||||
xRoot = etree.Element("root", nsmap=nsMap)
|
||||
xElem = etree.SubElement(xRoot, "{%s}p" % nsMap["text"])
|
||||
xRoot = ET.Element("root")
|
||||
xElem = ET.SubElement(xRoot, _mkTag("text", "p"))
|
||||
xmlPar = XMLParagraph(xElem)
|
||||
|
||||
# Plain Text w/Spaces
|
||||
xmlPar.appendText("Hello World !!")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello <text:s/>World <text:s text:c="2"/>!!</text:p>'
|
||||
'<text:p>Hello <text:s />World <text:s text:c="2" />!!</text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1214,8 +1194,8 @@ def testCoreToOdt_XMLParagraph():
|
||||
xmlPar.appendSpan("spanned text", "T1")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello <text:s/>World <text:s text:c="2"/>!!'
|
||||
'<text:span text:style-name="T1">spanned <text:s text:c="3"/>text</text:span></text:p>'
|
||||
'<text:p>Hello <text:s />World <text:s text:c="2" />!!'
|
||||
'<text:span text:style-name="T1">spanned <text:s text:c="3" />text</text:span></text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1223,9 +1203,9 @@ def testCoreToOdt_XMLParagraph():
|
||||
xmlPar.appendText("more text")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p>Hello <text:s/>World <text:s text:c="2"/>!!'
|
||||
'<text:span text:style-name="T1">spanned <text:s text:c="3"/>text</text:span>'
|
||||
'more <text:s text:c="4"/>text</text:p>'
|
||||
'<text:p>Hello <text:s />World <text:s text:c="2" />!!'
|
||||
'<text:span text:style-name="T1">spanned <text:s text:c="3" />text</text:span>'
|
||||
'more <text:s text:c="4" />text</text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1234,15 +1214,15 @@ def testCoreToOdt_XMLParagraph():
|
||||
# Stage 5 : Lots of Spaces
|
||||
# ========================
|
||||
|
||||
xRoot = etree.Element("root", nsmap=nsMap)
|
||||
xElem = etree.SubElement(xRoot, "{%s}p" % nsMap["text"])
|
||||
xRoot = ET.Element("root")
|
||||
xElem = ET.SubElement(xRoot, _mkTag("text", "p"))
|
||||
xmlPar = XMLParagraph(xElem)
|
||||
|
||||
# Plain Text w/Many Spaces
|
||||
xmlPar.appendText(" \t A \n B ")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p><text:s text:c="2"/><text:tab/> A <text:line-break/> <text:s/>B </text:p>'
|
||||
'<text:p><text:s text:c="2" /><text:tab /> A <text:line-break /> <text:s />B </text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1250,9 +1230,9 @@ def testCoreToOdt_XMLParagraph():
|
||||
xmlPar.appendSpan(" C \t D \n E ", "T1")
|
||||
assert xmlToText(xRoot) == (
|
||||
'<root>'
|
||||
'<text:p><text:s text:c="2"/><text:tab/> A <text:line-break/> <text:s/>B '
|
||||
'<text:span text:style-name="T1"> <text:s/>C <text:s/><text:tab/> <text:s/>D '
|
||||
'<text:line-break/> E </text:span></text:p>'
|
||||
'<text:p><text:s text:c="2" /><text:tab /> A <text:line-break /> <text:s />B '
|
||||
'<text:span text:style-name="T1"> <text:s />C <text:s /><text:tab /> <text:s />D '
|
||||
'<text:line-break /> E </text:span></text:p>'
|
||||
'</root>'
|
||||
)
|
||||
|
||||
@@ -1261,8 +1241,8 @@ def testCoreToOdt_XMLParagraph():
|
||||
# Check Error
|
||||
# ===========
|
||||
|
||||
xRoot = etree.Element("root", nsmap=nsMap)
|
||||
xElem = etree.SubElement(xRoot, "{%s}p" % nsMap["text"])
|
||||
xRoot = ET.Element("root")
|
||||
xElem = ET.SubElement(xRoot, _mkTag("text", "p"))
|
||||
xmlPar = XMLParagraph(xElem)
|
||||
|
||||
xmlPar.appendText("A")
|
||||
|
||||
Reference in New Issue
Block a user