summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/odfimport
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /sw/qa/extras/odfimport
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/qa/extras/odfimport')
-rw-r--r--sw/qa/extras/odfimport/data/BibliographyEntryField.odtbin0 -> 9194 bytes
-rw-r--r--sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt120
-rw-r--r--sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt120
-rw-r--r--sw/qa/extras/odfimport/data/PageBackground.odtbin0 -> 13301 bytes
-rw-r--r--sw/qa/extras/odfimport/data/Word2010AsCharShape.odtbin0 -> 4604 bytes
-rw-r--r--sw/qa/extras/odfimport/data/annotation-formatting.odtbin0 -> 11215 bytes
-rw-r--r--sw/qa/extras/odfimport/data/bnc800714.fodt35
-rw-r--r--sw/qa/extras/odfimport/data/borders_ooo33.odtbin0 -> 9890 bytes
-rw-r--r--sw/qa/extras/odfimport/data/dateFormFormats.odtbin0 -> 10664 bytes
-rw-r--r--sw/qa/extras/odfimport/data/empty-svg-family-name.odtbin0 -> 12527 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo37606.odtbin0 -> 11389 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo47267-3.odtbin0 -> 223670 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo53210.odtbin0 -> 11355 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo55814.odtbin0 -> 10200 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo56272.odtbin0 -> 10522 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo60842.odtbin0 -> 4300 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo68839.odtbin0 -> 17657 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo69862.odtbin0 -> 9743 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo69979.odtbin0 -> 9462 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo75872_aoo40.odtbin0 -> 8625 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo75872_ooo33.odtbin0 -> 8348 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo79269.odtbin0 -> 8883 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo79269_header.odtbin0 -> 8913 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo81223.odtbin0 -> 9428 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo82165.odtbin0 -> 10663 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo90130-1.odtbin0 -> 8606 bytes
-rw-r--r--sw/qa/extras/odfimport/data/fdo90130-2.odtbin0 -> 9148 bytes
-rw-r--r--sw/qa/extras/odfimport/data/forcepoint101.fodt13
-rw-r--r--sw/qa/extras/odfimport/data/forcepoint108.fodt67
-rw-r--r--sw/qa/extras/odfimport/data/hello.odtbin0 -> 8159 bytes
-rw-r--r--sw/qa/extras/odfimport/data/i61225.sxwbin0 -> 53844 bytes
-rw-r--r--sw/qa/extras/odfimport/data/ooo32780-1.odtbin0 -> 34072 bytes
-rw-r--r--sw/qa/extras/odfimport/data/ooo77837-1.odtbin0 -> 15724 bytes
-rw-r--r--sw/qa/extras/odfimport/data/paste-first-para-direct-format.odtbin0 -> 8313 bytes
-rw-r--r--sw/qa/extras/odfimport/data/space.odtbin0 -> 3839 bytes
-rw-r--r--sw/qa/extras/odfimport/data/spellmenu-redline.odtbin0 -> 7959 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf100033_1.odtbin0 -> 9367 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf100033_2.odtbin0 -> 9401 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf101729.odtbin0 -> 23049 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf103025.odtbin0 -> 5694 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf107392.odtbin0 -> 43338 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf107776.fodt29
-rw-r--r--sw/qa/extras/odfimport/data/tdf108482.odtbin0 -> 9421 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf109080_loext_ns.odtbin0 -> 9217 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf109080_style_ns.odtbin0 -> 9219 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf109228.odtbin0 -> 13753 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf113289.odtbin0 -> 8768 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf115079.odtbin0 -> 22717 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf116195.odtbin0 -> 123370 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf120677.fodt13
-rw-r--r--sw/qa/extras/odfimport/data/tdf123829.odtbin0 -> 10676 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf123968.odtbin0 -> 9591 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf128737.odtbin0 -> 18111 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf133459.odtbin0 -> 8061 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf134971a.odtbin0 -> 9960 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf134971b.odtbin0 -> 8599 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf138879.odtbin0 -> 9347 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf146257.odtbin0 -> 12148 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf146597.odtbin0 -> 13307 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf149978.fodt53
-rw-r--r--sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odtbin0 -> 15669 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf74524.odtbin0 -> 9015 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf75221.odtbin0 -> 9131 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docxbin0 -> 11357 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf76349_1columnBreak.odtbin0 -> 8561 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf89802.fodt56
-rw-r--r--sw/qa/extras/odfimport/data/tdf92586.odtbin0 -> 10517 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf94882.odtbin0 -> 9704 bytes
-rw-r--r--sw/qa/extras/odfimport/data/tdf96113.odtbin0 -> 13364 bytes
-rw-r--r--sw/qa/extras/odfimport/data/timeFormFormats.odtbin0 -> 9518 bytes
-rw-r--r--sw/qa/extras/odfimport/data/vmerge-cell-border.odtbin0 -> 8996 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx1355
72 files changed, 1861 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/BibliographyEntryField.odt b/sw/qa/extras/odfimport/data/BibliographyEntryField.odt
new file mode 100644
index 000000000..067827bb5
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/BibliographyEntryField.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt b/sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt
new file mode 100644
index 000000000..6acb5e6d8
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Devanagari1" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="&apos;Noto Serif CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph">
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0.145cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0.046cm, 0cm, 0.046cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.452cm" fo:min-width="1.637cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.515cm" fo:min-width="2.18cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <draw:frame draw:style-name="fr1" draw:name="Image2" text:anchor-type="page" text:anchor-page-number="1" svg:x="9.14cm" svg:y="7.703cm" svg:width="8.62cm" svg:height="8.652cm" draw:z-index="1">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABcQERQRDhcUEhQaGBcbIjklIh8fIkYyNSk5UkhX
+ VVFIUE5bZoNvW2F8Yk5QcptzfIeLkpSSWG2grJ+OqoOPko3/2wBDARgaGiIeIkMlJUONXlBe
+ jY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY3/wAAR
+ CAARABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDmbO2a6uBEpx3J9BU2oWBsypDbkbuR0NJp
+ lyttdhpOFYbSfSrGsXkU4SOJg2DkkdKxcp+0SWxulD2bb3MyiiitjA//2Q==</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:frame draw:style-name="fr2" draw:name="Image1" text:anchor-type="page" text:anchor-page-number="1" svg:x="7.541cm" svg:y="0.123cm" svg:width="11.536cm" svg:height="6.879cm" draw:z-index="0">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEARwBHAAD/2wBDABMNDhAODBMQDxAVFBMWHC4eHBoaHDkpKyIuQztH
+ RkI7QUBKVGtaSk9lUEBBXX5eZW5yd3l3SFmDjIJ0i2t1d3P/2wBDARQVFRwYHDceHjdzTUFN
+ c3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3P/wAAR
+ CAANABYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDjYImnnSJerkAZre/4R6ARf62Tfj73GPyr
+ nkZkcOpIZTkEdq1P7fu/L27Y9397Fc9aNVtezZ0UZUknzozp4mgmeJiCUODiimu7O5ZjlmOS
+ T3oroW2pg7X0P//Z</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="1" draw:z-index="3" draw:name="Shape2" draw:style-name="gr1" draw:text-style-name="P4" svg:width="1.638cm" svg:height="1.452cm" svg:x="13.571cm" svg:y="8.13cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">2</text:span>
+ </text:p>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="1" draw:z-index="2" draw:name="Shape1" draw:style-name="gr2" draw:text-style-name="P4" svg:width="2.181cm" svg:height="1.516cm" svg:x="16.718cm" svg:y="0.187cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">1</text:span>
+ </text:p>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt b/sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt
new file mode 100644
index 000000000..e335eee44
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Devanagari1" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="&apos;Noto Serif CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph">
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0.145cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0.046cm, 0cm, 0.046cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.452cm" fo:min-width="1.637cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.515cm" fo:min-width="2.18cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <draw:frame draw:style-name="fr1" draw:name="Image2" text:anchor-type="page" text:anchor-page-number="2" svg:x="9.14cm" svg:y="7.703cm" svg:width="8.62cm" svg:height="8.652cm" draw:z-index="1">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABcQERQRDhcUEhQaGBcbIjklIh8fIkYyNSk5UkhX
+ VVFIUE5bZoNvW2F8Yk5QcptzfIeLkpSSWG2grJ+OqoOPko3/2wBDARgaGiIeIkMlJUONXlBe
+ jY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY3/wAAR
+ CAARABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDmbO2a6uBEpx3J9BU2oWBsypDbkbuR0NJp
+ lyttdhpOFYbSfSrGsXkU4SOJg2DkkdKxcp+0SWxulD2bb3MyiiitjA//2Q==</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:frame draw:style-name="fr2" draw:name="Image1" text:anchor-type="page" text:anchor-page-number="2" svg:x="7.541cm" svg:y="0.123cm" svg:width="11.536cm" svg:height="6.879cm" draw:z-index="0">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEARwBHAAD/2wBDABMNDhAODBMQDxAVFBMWHC4eHBoaHDkpKyIuQztH
+ RkI7QUBKVGtaSk9lUEBBXX5eZW5yd3l3SFmDjIJ0i2t1d3P/2wBDARQVFRwYHDceHjdzTUFN
+ c3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3P/wAAR
+ CAANABYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDjYImnnSJerkAZre/4R6ARf62Tfj73GPyr
+ nkZkcOpIZTkEdq1P7fu/L27Y9397Fc9aNVtezZ0UZUknzozp4mgmeJiCUODiimu7O5ZjlmOS
+ T3oroW2pg7X0P//Z</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="2" draw:z-index="3" draw:name="Shape2" draw:style-name="gr1" draw:text-style-name="P4" svg:width="1.638cm" svg:height="1.452cm" svg:x="13.571cm" svg:y="8.13cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">2</text:span>
+ </text:p>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="2" draw:z-index="2" draw:name="Shape1" draw:style-name="gr2" draw:text-style-name="P4" svg:width="2.181cm" svg:height="1.516cm" svg:x="16.718cm" svg:y="0.187cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">1</text:span>
+ </text:p>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/PageBackground.odt b/sw/qa/extras/odfimport/data/PageBackground.odt
new file mode 100644
index 000000000..3733d5bae
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/PageBackground.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/Word2010AsCharShape.odt b/sw/qa/extras/odfimport/data/Word2010AsCharShape.odt
new file mode 100644
index 000000000..06c917f6a
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/Word2010AsCharShape.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/annotation-formatting.odt b/sw/qa/extras/odfimport/data/annotation-formatting.odt
new file mode 100644
index 000000000..ce8d98f40
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/annotation-formatting.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/bnc800714.fodt b/sw/qa/extras/odfimport/data/bnc800714.fodt
new file mode 100644
index 000000000..a759b7c84
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/bnc800714.fodt
@@ -0,0 +1,35 @@
+<?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:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph"/>
+ <style:style style:name="P2" style:family="paragraph">
+ <style:paragraph-properties fo:keep-with-next="always"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties text:dont-balance-text-columns="false" style:editable="false">
+ <style:columns fo:column-count="3" fo:column-gap="0cm">
+ <style:column style:rel-width="21845*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+ <style:column style:rel-width="21845*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+ <style:column style:rel-width="21845*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+ </style:columns>
+ </style:section-properties>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1">Before.</text:p>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="P2"><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="as-char" svg:width="2cm" draw:z-index="0">
+ <draw:text-box fo:min-height="0.439cm">
+ <text:p/>
+ </draw:text-box>
+ </draw:frame></text:p>
+ <text:p text:style-name="P1">Frame.</text:p>
+ </text:section>
+ <text:p text:style-name="P1">After.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/borders_ooo33.odt b/sw/qa/extras/odfimport/data/borders_ooo33.odt
new file mode 100644
index 000000000..b4ba91658
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/borders_ooo33.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/dateFormFormats.odt b/sw/qa/extras/odfimport/data/dateFormFormats.odt
new file mode 100644
index 000000000..ef99e70f4
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/dateFormFormats.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/empty-svg-family-name.odt b/sw/qa/extras/odfimport/data/empty-svg-family-name.odt
new file mode 100644
index 000000000..b4b5516e9
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/empty-svg-family-name.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo37606.odt b/sw/qa/extras/odfimport/data/fdo37606.odt
new file mode 100644
index 000000000..462984f11
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo37606.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo47267-3.odt b/sw/qa/extras/odfimport/data/fdo47267-3.odt
new file mode 100644
index 000000000..a30fbc6eb
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo47267-3.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo53210.odt b/sw/qa/extras/odfimport/data/fdo53210.odt
new file mode 100644
index 000000000..cfa504409
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo53210.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo55814.odt b/sw/qa/extras/odfimport/data/fdo55814.odt
new file mode 100644
index 000000000..890fa4b9f
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo55814.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo56272.odt b/sw/qa/extras/odfimport/data/fdo56272.odt
new file mode 100644
index 000000000..57241d3a7
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo56272.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo60842.odt b/sw/qa/extras/odfimport/data/fdo60842.odt
new file mode 100644
index 000000000..dc2bfbeef
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo60842.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo68839.odt b/sw/qa/extras/odfimport/data/fdo68839.odt
new file mode 100644
index 000000000..92a25b8f7
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo68839.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo69862.odt b/sw/qa/extras/odfimport/data/fdo69862.odt
new file mode 100644
index 000000000..aec48fd13
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo69862.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo69979.odt b/sw/qa/extras/odfimport/data/fdo69979.odt
new file mode 100644
index 000000000..8f7d77ec6
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo69979.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo75872_aoo40.odt b/sw/qa/extras/odfimport/data/fdo75872_aoo40.odt
new file mode 100644
index 000000000..549a56706
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo75872_aoo40.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo75872_ooo33.odt b/sw/qa/extras/odfimport/data/fdo75872_ooo33.odt
new file mode 100644
index 000000000..4cc3de7cc
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo75872_ooo33.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo79269.odt b/sw/qa/extras/odfimport/data/fdo79269.odt
new file mode 100644
index 000000000..638293600
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo79269.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo79269_header.odt b/sw/qa/extras/odfimport/data/fdo79269_header.odt
new file mode 100644
index 000000000..8a9702d7f
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo79269_header.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo81223.odt b/sw/qa/extras/odfimport/data/fdo81223.odt
new file mode 100644
index 000000000..21343d3dd
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo81223.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo82165.odt b/sw/qa/extras/odfimport/data/fdo82165.odt
new file mode 100644
index 000000000..65a4084b7
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo82165.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo90130-1.odt b/sw/qa/extras/odfimport/data/fdo90130-1.odt
new file mode 100644
index 000000000..6839b3635
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo90130-1.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/fdo90130-2.odt b/sw/qa/extras/odfimport/data/fdo90130-2.odt
new file mode 100644
index 000000000..6cf089505
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo90130-2.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/forcepoint101.fodt b/sw/qa/extras/odfimport/data/forcepoint101.fodt
new file mode 100644
index 000000000..721088826
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/forcepoint101.fodt
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <draw:custom-shape text:anchor-type="page" texnumber="1" draw:z-index="1" draw:name="Shape2" svg:width="2.276cm" svg:height="2.276cm" svg:x="4.752cm" svg:y="2.902cm">
+ <text:p/>
+ </draw:custom-shape>
+ <text:p>
+ <draw:custom-shape draw:z-index="0" draw:name="Shape1" svg:width="3.44cm" svg:height="2.065cm" svg:x="-1.337cm" svg:y="0.912cm"><text:p/></draw:custom-shape>
+ <field:fieldmark-start text:name="__Fieldmark__0_1348794289" field:type="vnd.oasis.opendocument.field.FORMTEXT"/>foobar<field:fieldmark-end/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/forcepoint108.fodt b/sw/qa/extras/odfimport/data/forcepoint108.fodt
new file mode 100644
index 000000000..4328ea65f
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/forcepoint108.fodt
@@ -0,0 +1,67 @@
+<?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:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>ms </meta:initial-creator><meta:creation-date>2015-08-24T21:49:45.305718699</meta:creation-date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/><meta:generator>LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Regular" svg:font-family="&apos;Source Han Sans CN Regular&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+
+ <text:tracked-changes>
+ <text:changed-region xml:id="ct58510944" text:id="ct58510944">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>ms </dc:creator>
+ <dc:date>2015-09-10T15:36:00</dc:date>
+ </office:change-info>
+ <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="char" svg:width="2cm" draw:z-index="-0"><draw:text-box fo:min-height="1.158cm"><text:p text:style-name="P1">foo<text:change text:change-id="ct58510944"/></text:p>
+
+ </office:text>
+ </office:body>
diff --git a/sw/qa/extras/odfimport/data/hello.odt b/sw/qa/extras/odfimport/data/hello.odt
new file mode 100644
index 000000000..23ce6a4db
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/hello.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/i61225.sxw b/sw/qa/extras/odfimport/data/i61225.sxw
new file mode 100644
index 000000000..4f4354199
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/i61225.sxw
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/ooo32780-1.odt b/sw/qa/extras/odfimport/data/ooo32780-1.odt
new file mode 100644
index 000000000..e7185b669
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/ooo32780-1.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/ooo77837-1.odt b/sw/qa/extras/odfimport/data/ooo77837-1.odt
new file mode 100644
index 000000000..7be4f2b3e
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/ooo77837-1.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/paste-first-para-direct-format.odt b/sw/qa/extras/odfimport/data/paste-first-para-direct-format.odt
new file mode 100644
index 000000000..866d29c5f
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/paste-first-para-direct-format.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/space.odt b/sw/qa/extras/odfimport/data/space.odt
new file mode 100644
index 000000000..66b5109ef
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/space.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/spellmenu-redline.odt b/sw/qa/extras/odfimport/data/spellmenu-redline.odt
new file mode 100644
index 000000000..268d15c2c
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/spellmenu-redline.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf100033_1.odt b/sw/qa/extras/odfimport/data/tdf100033_1.odt
new file mode 100644
index 000000000..b7f3ae7aa
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf100033_1.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf100033_2.odt b/sw/qa/extras/odfimport/data/tdf100033_2.odt
new file mode 100644
index 000000000..98ae7bd6b
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf100033_2.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf101729.odt b/sw/qa/extras/odfimport/data/tdf101729.odt
new file mode 100644
index 000000000..3afd2d001
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf101729.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf103025.odt b/sw/qa/extras/odfimport/data/tdf103025.odt
new file mode 100644
index 000000000..bd1e57314
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf103025.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf107392.odt b/sw/qa/extras/odfimport/data/tdf107392.odt
new file mode 100644
index 000000000..c8a05a9ee
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf107392.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf107776.fodt b/sw/qa/extras/odfimport/data/tdf107776.fodt
new file mode 100644
index 000000000..b59f12617
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf107776.fodt
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ooo="http://openoffice.org/2004/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="gr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="3.847cm" fo:min-width="7.207cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" style:flow-with-text="false"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p><draw:custom-shape text:anchor-type="paragraph" draw:z-index="0" draw:name="Shape1" draw:style-name="gr1" svg:width="7.621cm" svg:height="4.261cm" svg:x="1.554cm" svg:y="2.235cm">
+ <text:p>Simple content.</text:p>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:path-stretchpoint-x="10800" draw:path-stretchpoint-y="10800" draw:text-areas="?f3 ?f4 ?f5 ?f6" draw:type="round-rectangle" draw:modifiers="3600" draw:enhanced-path="M ?f7 0 X 0 ?f8 L 0 ?f9 Y ?f7 21600 L ?f10 21600 X 21600 ?f9 L 21600 ?f8 Y ?f10 0 Z N">
+ <draw:equation draw:name="f0" draw:formula="45"/>
+ <draw:equation draw:name="f1" draw:formula="$0 *sin(?f0 *(pi/180))"/>
+ <draw:equation draw:name="f2" draw:formula="?f1 *3163/7636"/>
+ <draw:equation draw:name="f3" draw:formula="left+?f2 "/>
+ <draw:equation draw:name="f4" draw:formula="top+?f2 "/>
+ <draw:equation draw:name="f5" draw:formula="right-?f2 "/>
+ <draw:equation draw:name="f6" draw:formula="bottom-?f2 "/>
+ <draw:equation draw:name="f7" draw:formula="left+$0 "/>
+ <draw:equation draw:name="f8" draw:formula="top+$0 "/>
+ <draw:equation draw:name="f9" draw:formula="bottom-$0 "/>
+ <draw:equation draw:name="f10" draw:formula="right-$0 "/>
+ <draw:handle draw:handle-position="$0 top" draw:handle-switched="true" draw:handle-range-x-minimum="0" draw:handle-range-x-maximum="10800"/>
+ </draw:enhanced-geometry>
+ </draw:custom-shape></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/tdf108482.odt b/sw/qa/extras/odfimport/data/tdf108482.odt
new file mode 100644
index 000000000..c3ce2fc42
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf108482.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf109080_loext_ns.odt b/sw/qa/extras/odfimport/data/tdf109080_loext_ns.odt
new file mode 100644
index 000000000..ac7b3e272
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf109080_loext_ns.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf109080_style_ns.odt b/sw/qa/extras/odfimport/data/tdf109080_style_ns.odt
new file mode 100644
index 000000000..ada290dc5
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf109080_style_ns.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf109228.odt b/sw/qa/extras/odfimport/data/tdf109228.odt
new file mode 100644
index 000000000..0f3368e1b
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf109228.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf113289.odt b/sw/qa/extras/odfimport/data/tdf113289.odt
new file mode 100644
index 000000000..01aa5700c
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf113289.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf115079.odt b/sw/qa/extras/odfimport/data/tdf115079.odt
new file mode 100644
index 000000000..6c1039e71
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf115079.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf116195.odt b/sw/qa/extras/odfimport/data/tdf116195.odt
new file mode 100644
index 000000000..21a601f69
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf116195.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf120677.fodt b/sw/qa/extras/odfimport/data/tdf120677.fodt
new file mode 100644
index 000000000..b2006828f
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf120677.fodt
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:p><draw:frame draw:name="Frame1" text:anchor-type="char" svg:width="0cm" svg:height="2cm">
+ <draw:text-box>
+ <text:p>. </text:p><!-- The "space" here is non-breaking space -->
+ </draw:text-box>
+ </draw:frame></text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/odfimport/data/tdf123829.odt b/sw/qa/extras/odfimport/data/tdf123829.odt
new file mode 100644
index 000000000..3219b4156
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf123829.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf123968.odt b/sw/qa/extras/odfimport/data/tdf123968.odt
new file mode 100644
index 000000000..1c081619e
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf123968.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf128737.odt b/sw/qa/extras/odfimport/data/tdf128737.odt
new file mode 100644
index 000000000..85f2c32c6
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf128737.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf133459.odt b/sw/qa/extras/odfimport/data/tdf133459.odt
new file mode 100644
index 000000000..9468d7918
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf133459.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf134971a.odt b/sw/qa/extras/odfimport/data/tdf134971a.odt
new file mode 100644
index 000000000..ee9fa6823
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf134971a.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf134971b.odt b/sw/qa/extras/odfimport/data/tdf134971b.odt
new file mode 100644
index 000000000..9bfadda69
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf134971b.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf138879.odt b/sw/qa/extras/odfimport/data/tdf138879.odt
new file mode 100644
index 000000000..801fe32a2
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf138879.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf146257.odt b/sw/qa/extras/odfimport/data/tdf146257.odt
new file mode 100644
index 000000000..2431fc0a8
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf146257.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf146597.odt b/sw/qa/extras/odfimport/data/tdf146597.odt
new file mode 100644
index 000000000..6dcc379ce
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf146597.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf149978.fodt b/sw/qa/extras/odfimport/data/tdf149978.fodt
new file mode 100644
index 000000000..5c4840c25
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf149978.fodt
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:font-family-generic="roman" style:font-pitch="variable" style:name="Times New Roman" svg:font-family="'Times New Roman'"/>
+ <style:font-face style:font-family-generic="system" style:font-pitch="variable" style:name="Lucida Sans Unicode" svg:font-family="'Lucida Sans Unicode'"/>
+ <style:font-face style:font-family-generic="system" style:font-pitch="variable" style:name="Tahoma" svg:font-family="Tahoma"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:line-break="strict" style:punctuation-wrap="hanging" style:tab-stop-distance="1.251cm" style:text-autospace="ideograph-alpha" style:writing-mode="page"/>
+ <style:text-properties fo:country="DE" fo:font-size="12pt" fo:hyphenate="false" fo:hyphenation-push-char-count="2" fo:hyphenation-remain-char-count="2" fo:language="de" style:country-asian="none" style:country-complex="none" style:font-name="Times New Roman" style:font-name-asian="Lucida Sans Unicode" style:font-name-complex="Tahoma" style:font-size-asian="12pt" style:font-size-complex="12pt" style:language-asian="zxx" style:language-complex="zxx" style:letter-kerning="true" style:use-window-font-color="true"/>
+ </style:default-style>
+ </office:styles>
+
+ <office: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>
+
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt
new file mode 100644
index 000000000..9585041de
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf74524.odt b/sw/qa/extras/odfimport/data/tdf74524.odt
new file mode 100644
index 000000000..df6f2e8fe
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf74524.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf75221.odt b/sw/qa/extras/odfimport/data/tdf75221.odt
new file mode 100644
index 000000000..6ef117c24
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf75221.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docx b/sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docx
new file mode 100644
index 000000000..6c050ae80
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf76322_columnBreakInHeader.docx
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf76349_1columnBreak.odt b/sw/qa/extras/odfimport/data/tdf76349_1columnBreak.odt
new file mode 100644
index 000000000..0ec406052
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf76349_1columnBreak.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf89802.fodt b/sw/qa/extras/odfimport/data/tdf89802.fodt
new file mode 100644
index 000000000..3d8601b5a
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf89802.fodt
@@ -0,0 +1,56 @@
+<?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:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>ms </meta:initial-creator><meta:creation-date>2015-04-07T22:24:25.374012080</meta:creation-date><dc:date>2015-04-07T22:25:28.460806924</dc:date><dc:creator>ms </dc:creator><meta:editing-duration>PT1M3S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="1" meta:character-count="3" meta:non-whitespace-character-count="3"/><meta:generator>LibreOfficeDev/4.5.0.0.alpha0$Linux_X86_64 LibreOffice_project/52ae345470d8fa657817cf87b3e8e8c1b51bd7da</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Normal" svg:font-family="&apos;Source Han Sans CN Normal&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Normal" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Normal" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Frame_20_contents">
+ <style:text-properties officeooo:rsid="0007f24f" officeooo:paragraph-rsid="0007f24f"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties fo:margin-left="0.3cm" fo:margin-right="0.3cm" fo:margin-top="1.9cm" fo:margin-bottom="0.3cm" style:run-through="background" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" fo:background-color="#004586" style:background-transparency="25%" draw:fill="solid" draw:fill-gradient-name="">
+ <style:background-image/>
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:graphic-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="paragraph" svg:width="2cm" draw:z-index="0">
+ <draw:text-box fo:min-height="2.168cm">
+ <text:p text:style-name="P1">foo</text:p>
+ </draw:text-box>
+ </draw:frame></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/tdf92586.odt b/sw/qa/extras/odfimport/data/tdf92586.odt
new file mode 100644
index 000000000..894571b62
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf92586.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf94882.odt b/sw/qa/extras/odfimport/data/tdf94882.odt
new file mode 100644
index 000000000..2aacb9836
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf94882.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/tdf96113.odt b/sw/qa/extras/odfimport/data/tdf96113.odt
new file mode 100644
index 000000000..ede7b0781
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf96113.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/timeFormFormats.odt b/sw/qa/extras/odfimport/data/timeFormFormats.odt
new file mode 100644
index 000000000..9b39aec57
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/timeFormFormats.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/vmerge-cell-border.odt b/sw/qa/extras/odfimport/data/vmerge-cell-border.odt
new file mode 100644
index 000000000..bf387bcb1
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/vmerge-cell-border.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
new file mode 100644
index 000000000..c25ff3409
--- /dev/null
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -0,0 +1,1355 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <config_features.h>
+
+#include <com/sun/star/awt/XTextComponent.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/awt/XWindowPeer.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/style/PageStyleLayout.hpp>
+#include <com/sun/star/style/FootnoteLineStyle.hpp>
+#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextSection.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/PageNumberType.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/view/XControlAccess.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#include <com/sun/star/document/XDocumentInsertable.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+
+#include <comphelper/propertysequence.hxx>
+#include <editeng/boxitem.hxx>
+
+#include <IDocumentSettingAccess.hxx>
+#include <wrtsh.hxx>
+#include <ndtxt.hxx>
+#include <swdtflvr.hxx>
+#include <view.hxx>
+#include <edtwin.hxx>
+#include <olmenu.hxx>
+#include <hintids.hxx>
+#include <docsh.hxx>
+#include <unotxdoc.hxx>
+#include <frmatr.hxx>
+
+typedef std::map<OUString, css::uno::Sequence< css::table::BorderLine> > AllBordersMap;
+typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > StringSequencePair;
+
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/odfimport/data/";
+
+class Test : public SwModelTestBase
+{
+ public:
+ Test() : SwModelTestBase(DATA_DIRECTORY, "writer8") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testEmptySvgFamilyName)
+{
+ load(mpTestDocumentPath, "empty-svg-family-name.odt");
+ // .odt import did crash on the empty font list (which I think is valid according SVG spec)
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testHideAllSections)
+{
+ load(mpTestDocumentPath, "fdo53210.odt");
+ // This document has a section that is conditionally hidden, but has no empty paragraph after it.
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xMasters = xTextFieldsSupplier->getTextFieldMasters();
+ // Set _CS_Allgemein to 0
+ uno::Reference<beans::XPropertySet> xMaster(xMasters->getByName("com.sun.star.text.fieldmaster.User._CS_Allgemein"), uno::UNO_QUERY);
+ xMaster->setPropertyValue("Content", uno::Any(OUString("0")));
+ // This used to crash
+ uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOdtBorders)
+{
+ load(mpTestDocumentPath, "borders_ooo33.odt");
+ AllBordersMap map;
+
+ map.insert(StringSequencePair(OUString("B2"), { table::BorderLine(0, 2, 2, 35), // left
+ table::BorderLine(0, 2, 2, 35), // right
+ table::BorderLine(0, 2, 2, 35), // top
+ table::BorderLine(0, 2, 2, 35) })); // bottom
+
+ map.insert(StringSequencePair(OUString("D2"), { table::BorderLine(0, 0, 2, 0),
+ table::BorderLine(0, 0, 2, 0),
+ table::BorderLine(0, 0, 2, 0),
+ table::BorderLine(0, 0, 2, 0) }));
+
+ map.insert(StringSequencePair(OUString("B4"), { table::BorderLine(0, 2, 2, 88),
+ table::BorderLine(0, 2, 2, 88),
+ table::BorderLine(0, 2, 2, 88),
+ table::BorderLine(0, 2, 2, 88) }));
+
+ map.insert(StringSequencePair(OUString("D4"), { table::BorderLine(0, 0, 18, 0),
+ table::BorderLine(0, 0, 18, 0),
+ table::BorderLine(0, 0, 18, 0),
+ table::BorderLine(0, 0, 18, 0) }));
+
+ map.insert(StringSequencePair(OUString("B6"), { table::BorderLine(0, 35, 35, 35),
+ table::BorderLine(0, 35, 35, 35),
+ table::BorderLine(0, 35, 35, 35),
+ table::BorderLine(0, 35, 35, 35) }));
+
+ map.insert(StringSequencePair(OUString("D6"), { table::BorderLine(0, 0, 35, 0),
+ table::BorderLine(0, 0, 35, 0),
+ table::BorderLine(0, 0, 35, 0),
+ table::BorderLine(0, 0, 35, 0) }));
+
+ map.insert(StringSequencePair(OUString("B8"), { table::BorderLine(0, 88, 88, 88),
+ table::BorderLine(0, 88, 88, 88),
+ table::BorderLine(0, 88, 88, 88),
+ table::BorderLine(0, 88, 88, 88) }));
+
+ map.insert(StringSequencePair(OUString("D8"), { table::BorderLine(0, 0, 88, 0),
+ table::BorderLine(0, 0, 88, 0),
+ table::BorderLine(0, 0, 88, 0),
+ table::BorderLine(0, 0, 88, 0) }));
+
+ map.insert(StringSequencePair(OUString("B10"), { table::BorderLine(0, 2, 35, 88),
+ table::BorderLine(0, 2, 35, 88),
+ table::BorderLine(0, 2, 35, 88),
+ table::BorderLine(0, 2, 35, 88) }));
+
+ map.insert(StringSequencePair(OUString("D10"), { table::BorderLine(0, 0, 141, 0),
+ table::BorderLine(0, 0, 141, 0),
+ table::BorderLine(0, 0, 141, 0),
+ table::BorderLine(0, 0, 141, 0) }));
+
+ map.insert(StringSequencePair(OUString("B12"), { table::BorderLine(0, 2, 88, 88),
+ table::BorderLine(0, 2, 88, 88),
+ table::BorderLine(0, 2, 88, 88),
+ table::BorderLine(0, 2, 88, 88) }));
+
+ map.insert(StringSequencePair(OUString("D12"), { table::BorderLine(0, 0, 176, 0),
+ table::BorderLine(0, 0, 176, 0),
+ table::BorderLine(0, 0, 176, 0),
+ table::BorderLine(0, 0, 176, 0) }));
+
+ map.insert(StringSequencePair(OUString("B14"), { table::BorderLine(0, 2, 141, 88),
+ table::BorderLine(0, 2, 141, 88),
+ table::BorderLine(0, 2, 141, 88),
+ table::BorderLine(0, 2, 141, 88) }));
+
+ map.insert(StringSequencePair(OUString("B16"), { table::BorderLine(0, 35, 88, 88),
+ table::BorderLine(0, 35, 88, 88),
+ table::BorderLine(0, 35, 88, 88),
+ table::BorderLine(0, 35, 88, 88) }));
+
+ map.insert(StringSequencePair(OUString("B18"), { table::BorderLine(0, 88, 35, 35),
+ table::BorderLine(0, 88, 35, 35),
+ table::BorderLine(0, 88, 35, 35),
+ table::BorderLine(0, 88, 35, 35) }));
+
+ map.insert(StringSequencePair(OUString("B20"), { table::BorderLine(0, 88, 141, 88),
+ table::BorderLine(0, 88, 141, 88),
+ table::BorderLine(0, 88, 141, 88),
+ table::BorderLine(0, 88, 141, 88) }));
+
+ map.insert(StringSequencePair(OUString("B22"), { table::BorderLine(0, 141, 88, 88),
+ table::BorderLine(0, 141, 88, 88),
+ table::BorderLine(0, 141, 88, 88),
+ table::BorderLine(0, 141, 88, 88) }));
+
+ uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY);
+ // list of paragraphs
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ do
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo;
+ if (xParaEnum->nextElement() >>= xServiceInfo)
+ {
+ if (xServiceInfo->supportsService("com.sun.star.text.TextTable"))
+ {
+ uno::Reference<text::XTextTable> const xTextTable(xServiceInfo, uno::UNO_QUERY_THROW);
+ uno::Sequence<OUString> const cells = xTextTable->getCellNames();
+ sal_Int32 nLength = cells.getLength();
+
+ AllBordersMap::iterator it = map.begin();
+
+ for (sal_Int32 i = 0; i < nLength; ++i)
+ {
+ if(i%10==6 || (i%10==8 && i<60)) // only B and D cells have borders, every 2 rows
+ {
+ uno::Reference<table::XCell> xCell = xTextTable->getCellByName(cells[i]);
+ uno::Reference< beans::XPropertySet > xPropSet(xCell, uno::UNO_QUERY_THROW);
+ it = map.find(cells[i]);
+
+ uno::Any aLeftBorder = xPropSet->getPropertyValue("LeftBorder");
+ table::BorderLine aLeftBorderLine;
+ if (aLeftBorder >>= aLeftBorderLine)
+ {
+ sal_Int32 innerLineWidth = aLeftBorderLine.InnerLineWidth;
+ sal_Int32 outerLineWidth = aLeftBorderLine.OuterLineWidth;
+ sal_Int32 lineDistance = aLeftBorderLine.LineDistance;
+
+ sal_Int32 perfectInner = it->second[0].InnerLineWidth;
+ sal_Int32 perfectOuter = it->second[0].OuterLineWidth;
+ sal_Int32 perfectDistance = it->second[0].LineDistance;
+ CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+ }
+
+ uno::Any aRightBorder = xPropSet->getPropertyValue("RightBorder");
+ table::BorderLine aRightBorderLine;
+ if (aRightBorder >>= aRightBorderLine)
+ {
+ sal_Int32 innerLineWidth = aRightBorderLine.InnerLineWidth;
+ sal_Int32 outerLineWidth = aRightBorderLine.OuterLineWidth;
+ sal_Int32 lineDistance = aRightBorderLine.LineDistance;
+
+ sal_Int32 perfectInner = it->second[1].InnerLineWidth;
+ sal_Int32 perfectOuter = it->second[1].OuterLineWidth;
+ sal_Int32 perfectDistance = it->second[1].LineDistance;
+ CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+ }
+
+ uno::Any aTopBorder = xPropSet->getPropertyValue("TopBorder");
+ table::BorderLine aTopBorderLine;
+ if (aTopBorder >>= aTopBorderLine)
+ {
+ sal_Int32 innerLineWidth = aTopBorderLine.InnerLineWidth;
+ sal_Int32 outerLineWidth = aTopBorderLine.OuterLineWidth;
+ sal_Int32 lineDistance = aTopBorderLine.LineDistance;
+
+ sal_Int32 perfectInner = it->second[2].InnerLineWidth;
+ sal_Int32 perfectOuter = it->second[2].OuterLineWidth;
+ sal_Int32 perfectDistance = it->second[2].LineDistance;
+ CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+ }
+
+ uno::Any aBottomBorder = xPropSet->getPropertyValue("BottomBorder");
+ table::BorderLine aBottomBorderLine;
+ if (aBottomBorder >>= aBottomBorderLine)
+ {
+ sal_Int32 innerLineWidth = aBottomBorderLine.InnerLineWidth;
+ sal_Int32 outerLineWidth = aBottomBorderLine.OuterLineWidth;
+ sal_Int32 lineDistance = aBottomBorderLine.LineDistance;
+
+ sal_Int32 perfectInner = it->second[3].InnerLineWidth;
+ sal_Int32 perfectOuter = it->second[3].OuterLineWidth;
+ sal_Int32 perfectDistance = it->second[3].LineDistance;
+ CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+ }
+ }
+ } //end of the 'for' loop
+ }
+ }
+ } while(xParaEnum->hasMoreElements());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf41542_borderlessPadding)
+{
+ load(mpTestDocumentPath, "tdf41542_borderlessPadding.odt");
+ // the page style's borderless padding should force this to 3 pages, not 1
+ CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageStyleLayoutDefault)
+{
+ load(mpTestDocumentPath, "hello.odt");
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY);
+ // This was style::PageStyleLayout_MIRRORED.
+ CPPUNIT_ASSERT_EQUAL(style::PageStyleLayout_ALL, getProperty<style::PageStyleLayout>(xPropertySet, "PageStyleLayout"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTimeFormFormats)
+{
+ load(mpTestDocumentPath, "timeFormFormats.odt");
+ //FIXME: make it an ODFEXPORT_TEST. Validator fails with
+ //attribute "form:current-value" has a bad value: "PT12H12M" does not satisfy the "time" type
+ //See tdf#131127
+
+ uno::Reference<frame::XModel> const xModel(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xModel.is());
+ uno::Reference<drawing::XDrawPageSupplier> const xDPS(xModel, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> const xDP = xDPS->getDrawPage();
+ CPPUNIT_ASSERT(xDP.is());
+ uno::Reference<form::XFormsSupplier> const xFS(xDP, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFS.is());
+ uno::Reference<container::XIndexContainer> const xForms(xFS->getForms(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xForms.is());
+ uno::Reference<form::XForm> xForm(xForms->getByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xForm.is());
+ uno::Reference<container::XNameContainer> xFormNC(xForm, uno::UNO_QUERY);
+
+ uno::Any aAny;
+ uno::Reference<awt::XControlModel> xControlModel;
+ uno::Reference<view::XControlAccess> xController;
+ uno::Reference<awt::XControl> xControl;
+ uno::Reference<awt::XWindowPeer> xWindowPeer;
+ uno::Reference<awt::XTextComponent> xTextComponent;
+ OUString aName = "Time Field ";
+
+ static const char* const aExpectedResults[] = { "12:12", "12:12:00", "12:12PM", "06:00:00AM"};
+
+ for (size_t i = 1; i <= 4; ++i)
+ {
+ aAny = xFormNC->getByName(aName + OUString::number(i));
+ xControlModel.set(aAny, uno::UNO_QUERY);
+ xController.set(xModel->getCurrentController(), uno::UNO_QUERY_THROW);
+ xControl = xController->getControl(xControlModel);
+ xWindowPeer = xControl->getPeer();
+ xTextComponent.set(xWindowPeer, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(aExpectedResults[i - 1]), xTextComponent->getText());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDateFormFormats)
+{
+ load(mpTestDocumentPath, "dateFormFormats.odt");
+ //FIXME: make it an ODFEXPORT_TEST. Validator fails with
+ //unexpected attribute "form:input-required"
+ //See tdf#131148
+
+ uno::Reference<frame::XModel> const xModel(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xModel.is());
+ uno::Reference<drawing::XDrawPageSupplier> const xDPS(xModel, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> const xDP = xDPS->getDrawPage();
+ CPPUNIT_ASSERT(xDP.is());
+ uno::Reference<form::XFormsSupplier> const xFS(xDP, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFS.is());
+ uno::Reference<container::XIndexContainer> const xForms(xFS->getForms(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xForms.is());
+ uno::Reference<form::XForm> xForm(xForms->getByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xForm.is());
+ uno::Reference<container::XNameContainer> xFormNC(xForm, uno::UNO_QUERY);
+
+ uno::Any aAny;
+ uno::Reference<awt::XControlModel> xControlModel;
+ uno::Reference<view::XControlAccess> xController;
+ uno::Reference<awt::XControl> xControl;
+ uno::Reference<awt::XWindowPeer> xWindowPeer;
+ uno::Reference<awt::XTextComponent> xTextComponent;
+ OUString aName = "Date Field ";
+
+ static const char* const aExpectedResults[] = { "03/04/20", "03/04/20", "03/04/2020",
+ "Wednesday, March 4, 2020", "04/03/20", "03/04/20", "20/03/04", "04/03/2020", "03/04/2020",
+ "2020/03/04", "20-03-04", "2020-03-04"};
+
+ for (size_t i = 1; i <= 12; ++i)
+ {
+ aAny = xFormNC->getByName(aName + OUString::number(i));
+ xControlModel.set(aAny, uno::UNO_QUERY);
+ xController.set(xModel->getCurrentController(), uno::UNO_QUERY_THROW);
+ xControl = xController->getControl(xControlModel);
+ xWindowPeer = xControl->getPeer();
+ xTextComponent.set(xWindowPeer, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(aExpectedResults[i - 1]), xTextComponent->getText());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf149978)
+{
+ load(mpTestDocumentPath, "tdf149978.fodt");
+ // on Linux the bug only reproduces if a document has been loaded previously
+ load(mpTestDocumentPath, "tdf149978.fodt");
+ // this was nondeterministic so try 10 times
+ for (int i = 1; i <= 10; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(getRun(getParagraph(i), 2, "bar"), "CharBackColor"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf64038)
+{
+ load(mpTestDocumentPath, "space.odt");
+ // no space
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(4), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(4), 2)->getString());
+ // one space
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(6), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(6), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(7), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(7), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(7), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(8), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" b"), getRun(getParagraph(8), 2)->getString());
+ // two spaces
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(10), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(10), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(10), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(11), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(11), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(12), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(12), 2)->getString());
+ // three spaces
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(14), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(14), 2)->getString());
+ // no space
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(17), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(17), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(17), 3)->getString());
+ // one space
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(19), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(19), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(19), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(20), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(20), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(20), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(21), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(21), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(21), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(22), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(22), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" b"), getRun(getParagraph(22), 3)->getString());
+ // two spaces
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(24), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(24), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(24), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(25), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(25), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(25), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(26), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(26), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" b"), getRun(getParagraph(26), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(27), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(27), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(27), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(28), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(28), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" b"), getRun(getParagraph(28), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(29), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(29), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(29), 3)->getString());
+ // three spaces
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), getRun(getParagraph(31), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(31), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(31), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(32), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(32), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(32), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(33), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(33), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" b"), getRun(getParagraph(33), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(34), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(34), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(34), 3)->getString());
+ // four spaces
+ CPPUNIT_ASSERT_EQUAL(OUString("a "), getRun(getParagraph(36), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(36), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("b"), getRun(getParagraph(36), 3)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf74524)
+{
+ load(mpTestDocumentPath, "tdf74524.odt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Any aField1 = xFields->nextElement();
+ uno::Reference<lang::XServiceInfo> xServiceInfo1(aField1, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo1->supportsService("com.sun.star.text.textfield.PageNumber"));
+ uno::Reference<beans::XPropertySet> xPropertySet(aField1, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(style::NumberingType::PAGE_DESCRIPTOR)), xPropertySet->getPropertyValue("NumberingType"));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(0)), xPropertySet->getPropertyValue("Offset"));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(text::PageNumberType_CURRENT), xPropertySet->getPropertyValue("SubType"));
+ uno::Reference<text::XTextContent> xField1(aField1, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xField1->getAnchor()->getString());
+ uno::Any aField2 = xFields->nextElement();
+ uno::Reference<lang::XServiceInfo> xServiceInfo2(aField2, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo2->supportsService("com.sun.star.text.textfield.Annotation"));
+ uno::Reference<beans::XPropertySet> xPropertySet2(aField2, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Comment 1")), xPropertySet2->getPropertyValue("Content"));
+ uno::Reference<text::XTextContent> xField2(aField2, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello 1World"), xField2->getAnchor()->getString());
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageStyleLayoutRight)
+{
+ load(mpTestDocumentPath, "hello.odt");
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY);
+ // This caused a crash.
+ xPropertySet->setPropertyValue("PageStyleLayout", uno::Any(style::PageStyleLayout_RIGHT));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo61952)
+{
+ load(mpTestDocumentPath, "hello.odt");
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ xPara->setPropertyValue("PageDescName", uno::Any(OUString("Left Page")));
+ xPara->setPropertyValue("PageDescName", uno::Any(OUString("Right Page")));
+ xPara->setPropertyValue("PageDescName", uno::Any(OUString("Left Page")));
+ xPara->setPropertyValue("PageDescName", uno::Any(OUString("Right Page")));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo60842)
+{
+ load(mpTestDocumentPath, "fdo60842.odt");
+ uno::Reference<text::XTextContent> const xTable(getParagraphOrTable(1));
+ getCell(xTable, "A1", "");
+ getCell(xTable, "B1", "18/02/2012");
+ getCell(xTable, "C1", "USD"); // this is the cell with office:string-value
+ getCell(xTable, "D1", "");
+ getCell(xTable, "E1", "01/04/2012");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo79269)
+{
+ load(mpTestDocumentPath, "fdo79269.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ // The problem was that the first-footer was shared.
+ uno::Reference<beans::XPropertySet> xPropSet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xPropSet, "FirstIsShared"));
+
+ uno::Reference<text::XTextRange> xFooter1 = getProperty< uno::Reference<text::XTextRange> >(xPropSet, "FooterTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("first"), xFooter1->getString());
+ uno::Reference<text::XTextRange> xFooter = getProperty< uno::Reference<text::XTextRange> >(xPropSet, "FooterText");
+ CPPUNIT_ASSERT_EQUAL(OUString("second"), xFooter->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo79269_header)
+{
+ load(mpTestDocumentPath, "fdo79269_header.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ uno::Reference<beans::XPropertySet> xPropSet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xPropSet, "FirstIsShared"));
+
+ uno::Reference<text::XTextRange> xFooter1 = getProperty< uno::Reference<text::XTextRange> >(xPropSet, "HeaderTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("first"), xFooter1->getString());
+ uno::Reference<text::XTextRange> xFooter = getProperty< uno::Reference<text::XTextRange> >(xPropSet, "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("second"), xFooter->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageBackground)
+{
+ load(mpTestDocumentPath, "PageBackground.odt");
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY);
+ // The background image was lost
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xPropertySet, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty<OUString>(xPropertySet, "FillBitmapName"));
+ CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, getProperty<drawing::BitmapMode>(xPropertySet, "FillBitmapMode"));
+
+ uno::Reference<beans::XPropertySet> xPropertySetOld(getStyles("PageStyles")->getByName("OldStandard"), uno::UNO_QUERY);
+ // The background image was overridden by color
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xPropertySetOld, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty<OUString>(xPropertySetOld, "FillBitmapName"));
+ CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, getProperty<drawing::BitmapMode>(xPropertySetOld, "FillBitmapMode"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBibliographyEntryField)
+{
+ load(mpTestDocumentPath, "BibliographyEntryField.odt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ if( !xFields->hasMoreElements() ) {
+ CPPUNIT_ASSERT(false);
+ return;
+ }
+
+ uno::Reference<text::XTextField> xEnumerationAccess(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Bibliography entry"), xEnumerationAccess->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("[ABC]"), xEnumerationAccess->getPresentation(false).trim());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo56272)
+{
+ load(mpTestDocumentPath, "fdo56272.odt");
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // Vertical position was incorrect.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128737)
+{
+ load(mpTestDocumentPath, "tdf128737.odt");
+ // Without the fix in place, this test would have crashed
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCalcFootnoteContent)
+{
+ load(mpTestDocumentPath, "ooo32780-1.odt");
+ //this was a CalcFootnoteContent crash
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testMoveSubTree)
+{
+ load(mpTestDocumentPath, "ooo77837-1.odt");
+ //this was a MoveSubTree crash
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo75872_ooo33)
+{
+ load(mpTestDocumentPath, "fdo75872_ooo33.odt");
+ // graphics default style: line color and fill color changed
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK,
+ getProperty<Color>(xShape, "LineColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0x99ccff),
+ getProperty<Color>(xShape, "FillColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo75872_aoo40)
+{
+ load(mpTestDocumentPath, "fdo75872_aoo40.odt");
+ // graphics default style: line color and fill color changed
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT_EQUAL(Color(0x808080),
+ getProperty<Color>(xShape, "LineColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xcfe7f5),
+ getProperty<Color>(xShape, "FillColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo55814)
+{
+ load(mpTestDocumentPath, "fdo55814.odt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<beans::XPropertySet> xField(xFields->nextElement(), uno::UNO_QUERY);
+ xField->setPropertyValue("Content", uno::Any(OUString("Yes")));
+ uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh();
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ // This was "0".
+ CPPUNIT_ASSERT_EQUAL(OUString("Hide==\"Yes\""), getProperty<OUString>(xSections->getByIndex(0), "Condition"));
+}
+
+static void lcl_CheckShape(
+ uno::Reference<drawing::XShape> const& xShape, OUString const& rExpected)
+{
+ uno::Reference<container::XNamed> const xNamed(xShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xNamed.is());
+ CPPUNIT_ASSERT_EQUAL(rExpected, xNamed->getName());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo68839)
+{
+ load(mpTestDocumentPath, "fdo68839.odt");
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+ // check names
+ lcl_CheckShape(getShape(1), "FrameXXX");
+ lcl_CheckShape(getShape(2), "ObjectXXX");
+ lcl_CheckShape(getShape(3), "FrameY");
+ lcl_CheckShape(getShape(4), "graphicsXXX");
+ // check prev/next chain
+ uno::Reference<beans::XPropertySet> xFrame1(getShape(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame2(getShape(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(),
+ getProperty<OUString>(xFrame1, "ChainPrevName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("FrameY"),
+ getProperty<OUString>(xFrame1, "ChainNextName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("FrameXXX"),
+ getProperty<OUString>(xFrame2, "ChainPrevName"));
+ CPPUNIT_ASSERT_EQUAL(OUString(),
+ getProperty<OUString>(xFrame2, "ChainNextName"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo82165)
+{
+ load(mpTestDocumentPath, "fdo82165.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ // there was a duplicate shape in the left header
+ lcl_CheckShape(getShape(1), "Picture 9");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf89802)
+{
+ load(mpTestDocumentPath, "tdf89802.fodt");
+ // the text frame was dropped during import
+ uno::Reference<text::XTextFramesSupplier> const xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> const xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ uno::Reference<beans::XPropertySet> const xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0x3f004586), getProperty<Color>(xFrame, "BackColor"));
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo37606)
+{
+ load(mpTestDocumentPath, "fdo37606.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+
+ {
+ pWrtShell->SelAll(); // Selects A1.
+ SwTextNode& rCellEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode());
+ // fdo#72486 This was "Hello.", i.e. a single select-all selected the whole document, not just the cell only.
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rCellEnd.GetText());
+
+ pWrtShell->SelAll(); // Selects the whole table.
+ pWrtShell->SelAll(); // Selects the whole document.
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
+
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode());
+ // This was "A1", i.e. Ctrl-A only selected the A1 cell of the table, not the whole document.
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText());
+ }
+
+ {
+ pWrtShell->SttEndDoc(false); // Go to the end of the doc.
+ pWrtShell->SelAll(); // And now that we're outside of the table, try Ctrl-A again.
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
+ // This was "Hello", i.e. Ctrl-A did not select the starting table.
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
+
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText());
+ }
+
+ {
+ pWrtShell->Delete(); // Delete the selection
+ // And make sure the table got deleted as well.
+ SwNodes& rNodes = pWrtShell->GetDoc()->GetNodes();
+ SwNodeIndex nNode(rNodes.GetEndOfExtras());
+ SwContentNode* pContentNode = rNodes.GoNext(&nNode);
+ // First content node was in a table -> table wasn't deleted.
+ CPPUNIT_ASSERT(!pContentNode->FindTableNode());
+ }
+}
+
+#if HAVE_FEATURE_UI
+CPPUNIT_TEST_FIXTURE(Test, testFdo37606Copy)
+{
+ load(mpTestDocumentPath, "fdo37606.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ // Ctrl-A
+ pWrtShell->SelAll(); // Selects A1.
+ pWrtShell->SelAll(); // Selects the whole table.
+ pWrtShell->SelAll(); // Selects the whole document.
+
+ // Ctrl-C
+ rtl::Reference<SwTransferable> xTransferable(new SwTransferable(*pWrtShell));
+ xTransferable->Copy();
+
+ pWrtShell->SttEndDoc(false); // Go to the end of the doc.
+
+ // Ctrl-V
+ TransferableDataHelper aDataHelper(TransferableDataHelper::CreateFromSystemClipboard(&pWrtShell->GetView().GetEditWin()));
+ SwTransferable::Paste( *pWrtShell, aDataHelper );
+
+ // Previously copy&paste failed to copy the table in case it was the document-starting one.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo69862)
+{
+ load(mpTestDocumentPath, "fdo69862.odt");
+ // The test doc is special in that it starts with a table and it also has a footnote.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+
+ pWrtShell->SelAll(); // Selects A1.
+ pWrtShell->SelAll(); // Selects the whole table.
+ pWrtShell->SelAll(); // Selects the whole document.
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
+ // This was "Footnote.", as Ctrl-A also selected footnotes, but it should not.
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
+
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("H" "\x01" "ello."), rEnd.GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo69979)
+{
+ load(mpTestDocumentPath, "fdo69979.odt");
+ // The test doc is special in that it starts with a table and it also has a header.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+
+ pWrtShell->SelAll(); // Selects A1.
+ pWrtShell->SelAll(); // Selects the whole table.
+ pWrtShell->SelAll(); // Selects the whole document.
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
+ // This was "", as Ctrl-A also selected headers, but it should not.
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
+
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSpellmenuRedline)
+{
+ load(mpTestDocumentPath, "spellmenu-redline.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ uno::Reference<linguistic2::XSpellAlternatives> xAlt;
+ SwSpellPopup aPopup(pWrtShell, xAlt, OUString());
+ Menu& rMenu = aPopup.GetMenu();
+ // Make sure that if we show the spellcheck popup menu (for the current
+ // document, which contains redlines), then the last two entries will be
+ // always 'go to next/previous change'.
+ CPPUNIT_ASSERT_EQUAL(OString("next"), rMenu.GetItemIdent(rMenu.GetItemId(rMenu.GetItemCount() - 2)));
+ CPPUNIT_ASSERT_EQUAL(OString("prev"), rMenu.GetItemIdent(rMenu.GetItemId(rMenu.GetItemCount() - 1)));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107776)
+{
+ load(mpTestDocumentPath, "tdf107776.fodt");
+ // Shape with a Graphics parent style name was imported as textbox.
+ CPPUNIT_ASSERT(!getProperty<bool>(getShape(1), "TextBox"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAnnotationFormatting)
+{
+ load(mpTestDocumentPath, "annotation-formatting.odt");
+ uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 1), "TextField");
+ uno::Reference<text::XText> xText = getProperty< uno::Reference<text::XText> >(xTextField, "TextRange");
+ // Make sure we test the right annotation.
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText, "Looses: bold");
+ // Formatting was lost: the second text portion was NORMAL, not BOLD.
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(xParagraph, 2), "CharWeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, fdo81223)
+{
+ load(mpTestDocumentPath, "fdo81223.odt");
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(COL_TRANSPARENT, getProperty<Color>(xFrame, "BackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, fdo90130_1)
+{
+ load(mpTestDocumentPath, "fdo90130-1.odt");
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xff3333), getProperty<Color>(xFrame, "BackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, fdo90130_2)
+{
+ load(mpTestDocumentPath, "fdo90130-2.odt");
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ sal_Int32 nValue(0);
+ xFrame->getPropertyValue("BackColorTransparency") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(50), nValue);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBnc800714)
+{
+ load(mpTestDocumentPath, "bnc800714.fodt");
+ // Document's second paragraph wants to be together with the third one, but:
+ // - it's in a section with multiple columns
+ // - contains a single as-char anchored frame
+ // This was a layout loop.
+ CPPUNIT_ASSERT(getProperty< uno::Reference<text::XTextSection> >(getParagraph(2), "TextSection").is());
+ CPPUNIT_ASSERT(getProperty<bool>(getParagraph(2), "ParaKeepTogether"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf92586)
+{
+ load(mpTestDocumentPath, "tdf92586.odt");
+ uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
+ // This was BitmapMode_NO_REPEAT.
+ CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_STRETCH, getProperty<drawing::BitmapMode>(aPageStyle, "FillBitmapMode"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf103025)
+{
+ load(mpTestDocumentPath, "tdf103025.odt");
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-01"), parseDump("/root/page[1]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-01"), parseDump("/root/page[2]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-02"), parseDump("/root/page[3]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-03"), parseDump("/root/page[4]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-03"), parseDump("/root/page[5]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf76322_columnBreakInHeader)
+{
+ load(mpTestDocumentPath, "tdf76322_columnBreakInHeader.docx");
+// column breaks were ignored. First line should start in column 2
+ CPPUNIT_ASSERT_EQUAL( OUString("Test1"), parseDump("/root/page[1]/header/section/column[2]/body/txt/text()") );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf76349_1columnBreak)
+{
+ load(mpTestDocumentPath, "tdf76349_1columnBreak.odt");
+ //single-column breaks should only be treated as page breaks for MS formats - should be only one page here.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf96113)
+{
+ load(mpTestDocumentPath, "tdf96113.odt");
+ // Background of the formula frame was white (0xffffff), not green.
+ CPPUNIT_ASSERT_EQUAL(Color(0x00ff00), getProperty<Color>(getShape(1), "BackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo47267)
+{
+ load(mpTestDocumentPath, "fdo47267-3.odt");
+ // This was a Style Families getByName() crash
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf75221)
+{
+ load(mpTestDocumentPath, "tdf75221.odt");
+ // When "Don't add space between paragraphs of the same style" setting set,
+ // spacing between same-style paragraphs must be equal to their line spacing.
+ // It used to be 0.
+ OUString top = parseDump("/root/page/body/txt[2]/infos/prtBounds", "top");
+ CPPUNIT_ASSERT(top.toInt32() > 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf101729)
+{
+ load(mpTestDocumentPath, "tdf101729.odt");
+ sal_Int32 l = parseDump("/root/page/body/tab/row/cell[1]/infos/bounds", "left").toInt32();
+ sal_Int32 w = parseDump("/root/page/body/tab/row/cell[1]/infos/bounds", "width").toInt32();
+ sal_Int32 x = parseDump("/root/page/body/tab/row/cell[1]/txt/infos/bounds", "left").toInt32();
+ // Make sure the text does not go outside and verify it is centered roughly
+ CPPUNIT_ASSERT( l + w / 4 < x );
+ CPPUNIT_ASSERT( x < l + 3 * w / 4);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107392)
+{
+ load(mpTestDocumentPath, "tdf107392.odt");
+ // Shapes from bottom to top were Frame, SVG, Bitmap, i.e. in the order as
+ // they appeared in the document, not according to their requested z-index,
+ // as sorting failed.
+ // So instead of 0, 1, 2 these were 2, 0, 1.
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getShapeByName(u"Bitmap"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(getShapeByName(u"Frame"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(getShapeByName(u"SVG"), "ZOrder"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf100033_1)
+{
+ load(mpTestDocumentPath, "tdf100033_1.odt");
+ // Test document have three duplicated frames with the same name and position/size -> import one frame
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWordAsCharShape)
+{
+ load(mpTestDocumentPath, "Word2010AsCharShape.odt");
+ // As-char shape had VertOrient "from-top"/NONE default from GetVOrient()
+ uno::Reference<drawing::XShape> const xShape(getShape(1));
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, getProperty<text::TextContentAnchorType>(xShape, "AnchorType"));
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::TOP, getProperty<sal_Int16>(xShape, "VertOrient"));
+ // also, the paragraph default fo:bottom-margin was wrongly applied to
+ // the shape
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xShape, "BottomMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf100033_2)
+{
+ load(mpTestDocumentPath, "tdf100033_2.odt");
+ // Test document have three different frames anchored to different paragraphs -> import all frames
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testI61225)
+{
+ load(mpTestDocumentPath, "i61225.sxw");
+ // Part of ooo61225-1.sxw from crashtesting.
+
+ // This never returned.
+ calcLayout();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf109080_loext_ns)
+{
+ load(mpTestDocumentPath, "tdf109080_loext_ns.odt");
+ // Test we can import <loext:header-first> and <loext:footer-first>
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page header"),
+ parseDump("/root/page[1]/header/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page header"),
+ parseDump("/root/page[2]/header/txt/text()"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page footer"),
+ parseDump("/root/page[1]/footer/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page footer"),
+ parseDump("/root/page[2]/footer/txt/text()"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf109080_style_ns)
+{
+ load(mpTestDocumentPath, "tdf109080_style_ns.odt");
+ // Test we can import <style:header-first> and <style:footer-first>
+ // (produced by LibreOffice 4.0 - 5.x)
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page header"),
+ parseDump("/root/page[1]/header/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page header"),
+ parseDump("/root/page[2]/header/txt/text()"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page footer"),
+ parseDump("/root/page[1]/footer/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page footer"),
+ parseDump("/root/page[2]/footer/txt/text()"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf109228)
+{
+ load(mpTestDocumentPath, "tdf109228.odt");
+ // Embedded object with no frame name was imported incorrectly, it was anchored 'to character' instead of 'as character'
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf94882)
+{
+ load(mpTestDocumentPath, "tdf94882.odt");
+ // Get the header of the page containing our content
+ // (done this way to skip past any blank page inserted before it
+ // due to the page number being even)
+ OUString headertext = parseDump(
+ "/root/page[starts-with(body/txt/text(),'The paragraph style on this')]"
+ "/header/txt/text()"
+ );
+ // This header should be the first page header
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page header"), headertext);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBlankBeforeFirstPage)
+{
+ load(mpTestDocumentPath, "tdf94882.odt");
+ // This document starts on page 50, which is even, but it should not have a
+ // blank page inserted before it to make it a left page
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be 1 pages output",
+ OUString("1"), parseDump("count(/root/page)")
+ );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf115079)
+{
+ load(mpTestDocumentPath, "tdf115079.odt");
+ // This document caused segfault when layouting
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf108482)
+{
+ load(mpTestDocumentPath, "tdf108482.odt");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The table on second page must have two rows",
+ OUString("2"), parseDump("count(/root/page[2]/body/tab/row)")
+ );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The second page table's first row must be the repeated headline",
+ OUString("Header"), parseDump("/root/page[2]/body/tab/row[1]/cell/txt")
+ );
+ // The first (repeated headline) row with vertical text orientation must have non-zero height
+ // (in my tests, it was 1135)
+ CPPUNIT_ASSERT_GREATER(
+ sal_Int32(1000), parseDump("/root/page[2]/body/tab/row[1]/infos/bounds", "height").toInt32()
+ );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf116195)
+{
+ load(mpTestDocumentPath, "tdf116195.odt");
+ // The image was set to zero height due to a regression
+ CPPUNIT_ASSERT_EQUAL(
+ sal_Int32(12960), parseDump("/root/page/anchored/fly/notxt/infos/bounds", "height").toInt32()
+ );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf120677)
+{
+ load(mpTestDocumentPath, "tdf120677.fodt");
+ // The document used to hang the layout, consuming memory until OOM
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123829)
+{
+ load(mpTestDocumentPath, "tdf123829.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ "Compatibility: collapse cell paras should not be set", false,
+ pDoc->getIDocumentSettingAccess().get(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf113289)
+{
+ load(mpTestDocumentPath, "tdf113289.odt");
+ uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int8>(style::FootnoteLineStyle::SOLID),
+ getProperty<sal_Int8>(aPageStyle, "FootnoteLineStyle"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123968)
+{
+ load(mpTestDocumentPath, "tdf123968.odt");
+ // The test doc is special in that it starts with a table and it also has a header.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+
+ pWrtShell->SelAll();
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
+
+ // The field is now editable like any text, thus the field content "New value" shows up for the cursor.
+ CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART)
+ + "New value" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)),
+ rStart.GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133459)
+{
+ load(mpTestDocumentPath, "tdf133459.odt");
+ // Test that the number format was correctly imported, and used by both fields.
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xFields(xTextFieldsSupplier->getTextFields()->createEnumeration());
+
+ // First Field
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ const OUString sPresentation(xField->getPresentation(false));
+ const sal_Int32 nFormat(getProperty<sal_Int32>(xField, "NumberFormat"));
+ CPPUNIT_ASSERT_EQUAL(sal_True, getProperty<sal_Bool>(xField, "IsFixedLanguage"));
+
+ // Second field
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sPresentation, xField->getPresentation(false));
+ CPPUNIT_ASSERT_EQUAL(nFormat, getProperty<sal_Int32>(xField, "NumberFormat"));
+ CPPUNIT_ASSERT_EQUAL(sal_True, getProperty<sal_Bool>(xField, "IsFixedLanguage"));
+
+ // Test the number format itself
+ uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFormat(xNumberFormatsSupplier->getNumberFormats()->getByKey(nFormat));
+ lang::Locale aLocale(getProperty<lang::Locale>(xFormat, "Locale"));
+ CPPUNIT_ASSERT_EQUAL(OUString("ru"), aLocale.Language);
+ CPPUNIT_ASSERT_EQUAL(OUString("RU"), aLocale.Country);
+ CPPUNIT_ASSERT_EQUAL(OUString("QQ YYYY"), getProperty<OUString>(xFormat, "FormatString"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134971)
+{
+ load(mpTestDocumentPath, "tdf134971a.odt");
+ // now insert 2nd file somewhere - insertDocumentFromURL should
+ // _not_ touch pool defaults
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ {
+ {"Name", uno::Any(
+ m_directories.getURLFromSrc(mpTestDocumentPath) + "tdf134971b.odt")},
+ {"Filter", uno::Any(OUString("writer8"))},
+ });
+ dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+
+ // tdf134971b re-defines default font as "Liberation Sans" - make sure this stays
+ // Arial in final doc:
+ OUString sString;
+ uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles"));
+ uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName(
+ "Standard"), uno::UNO_QUERY);
+ xStyle1->getPropertyValue("CharFontName") >>= sString;
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial"), sString);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf138879)
+{
+ // Create a new document.
+ mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ {
+ {"Name", uno::Any(
+ m_directories.getURLFromSrc(mpTestDocumentPath) + "tdf138879.odt")},
+ {"Filter", uno::Any(OUString("writer8"))},
+ });
+ dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Heading 1
+ // - Actual : Standard
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPasteFirstParaDirectFormat)
+{
+ // Create a new document.
+ mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ {
+ // Set some direct formatting on the first paragraph, but leave paragraph adjust at its
+ // default (left).
+ uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ xParagraph->setPropertyValue("PageNumberOffset", uno::Any(static_cast<sal_Int16>(0)));
+ }
+
+ // Paste from ODT.
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<document::XDocumentInsertable> xCursor(xText->createTextCursorByRange(xText->getStart()), uno::UNO_QUERY);
+ xCursor->insertDocumentFromURL(m_directories.getURLFromSrc(mpTestDocumentPath) + "paste-first-para-direct-format.odt", {});
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3 (center)
+ // - Actual : 0 (left)
+ // i.e. the inserted document's first paragraph's paragraph formatting was lost.
+ uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(style::ParagraphAdjust_CENTER),
+ getProperty<sal_Int16>(xParagraph, "ParaAdjust"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVerticallyMergedCellBorder)
+{
+ // Given a document with two cells, vertically merged, when loading the document:
+ SwDoc* pDoc = createSwDoc(mpTestDocumentPath, "vmerge-cell-border.odt");
+
+ // Then make sure that the first cell has a right border while the second has no right border:
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(/*bBlock=*/false);
+ SwStartNode* pA1 = pShellCursor->Start()->nNode.GetNode().StartOfSectionNode();
+ const SwAttrSet& rA1Set = pA1->GetTableBox()->GetFrameFormat()->GetAttrSet();
+ CPPUNIT_ASSERT(rA1Set.GetBox().GetRight());
+ SwNodeIndex aA2(*pA1->EndOfSectionNode(), 1);
+ const SwAttrSet& rA2Set = aA2.GetNode().GetTableBox()->GetFrameFormat()->GetAttrSet();
+
+ // Without the accompanying fix in place, this test would have failed, as the A2 cell also had a
+ // right border, even if <table:covered-table-cell table:style-name="..."> explicitly disabled
+ // it.
+ CPPUNIT_ASSERT(!rA2Set.GetBox().GetRight());
+
+ // Given this document model, when exporting to ODT:
+ save("writer8", maTempFile);
+ mbExported = true;
+
+ // Then make sure the covered cell has a style.
+ xmlDocUniquePtr pXmlSettings = parseExport("content.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - In <...>, XPath '//table:covered-table-cell' no attribute 'style-name' exist
+ assertXPath(pXmlSettings, "//table:covered-table-cell", "style-name", "Table1.A2");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageAnchorZIndexFirstPage)
+{
+ load(mpTestDocumentPath, "PageAnchorZIndexFirstPage.fodt");
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image1 index not 0",
+ sal_Int32(0), getProperty<sal_Int32>(getShapeByName(u"Image1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image2 index not 1",
+ sal_Int32(1), getProperty<sal_Int32>(getShapeByName(u"Image2"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape1 index not 2",
+ sal_Int32(2), getProperty<sal_Int32>(getShapeByName(u"Shape1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape2 index not 3",
+ sal_Int32(3), getProperty<sal_Int32>(getShapeByName(u"Shape2"), "ZOrder"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageAnchorZIndexSecondPage)
+{
+ load(mpTestDocumentPath, "PageAnchorZIndexSecondPage.fodt");
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image1 index not 0",
+ sal_Int32(0), getProperty<sal_Int32>(getShapeByName(u"Image1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image2 index not 1",
+ sal_Int32(1), getProperty<sal_Int32>(getShapeByName(u"Image2"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape1 index not 2",
+ sal_Int32(2), getProperty<sal_Int32>(getShapeByName(u"Shape1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape2 index not 3",
+ sal_Int32(3), getProperty<sal_Int32>(getShapeByName(u"Shape2"), "ZOrder"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf146257)
+{
+ load(mpTestDocumentPath, "tdf146257.odt");
+
+ // First list should contain no labels
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ // For second list ensure second level empty and third level should not contain extra dots
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(7), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(8), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf146597)
+{
+ load(mpTestDocumentPath, "tdf146597.odt");
+ // This was crashed before.
+}
+
+// just care that it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(Test, testForcepoint101)
+{
+ load(mpTestDocumentPath, "forcepoint101.fodt");
+}
+
+// just care that it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(Test, testForcepoint108)
+{
+ //load would assert because it fails to load entirely, like testMathMalformedXml
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "forcepoint108.fodt";
+ mxComponent = mxDesktop->loadComponentFromURL(aURL, "_default", 0, {});
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */