From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- sw/qa/extras/odfexport/data/2_MathType3.docx | Bin 0 -> 15260 bytes .../odfexport/data/CrossRefHeadingBookmark.fodt | 120 + sw/qa/extras/odfexport/data/allow-overlap.odt | Bin 0 -> 9853 bytes .../odfexport/data/arabic-zero-numbering.odt | Bin 0 -> 8730 bytes .../odfexport/data/arabic-zero3-numbering.odt | Bin 0 -> 9166 bytes .../odfexport/data/arabic-zero4-numbering.odt | Bin 0 -> 8702 bytes .../odfexport/data/arabic-zero5-numbering.odt | Bin 0 -> 8779 bytes sw/qa/extras/odfexport/data/border_types.odt | Bin 0 -> 10656 bytes sw/qa/extras/odfexport/data/btlr-cell.odt | Bin 0 -> 9174 bytes sw/qa/extras/odfexport/data/btlr-frame.odt | Bin 0 -> 8564 bytes .../odfexport/data/chapter-number-new-line.odt | Bin 0 -> 8649 bytes sw/qa/extras/odfexport/data/charborder.odt | Bin 0 -> 8704 bytes .../extras/odfexport/data/embedded-font-props.odt | Bin 0 -> 8097 bytes sw/qa/extras/odfexport/data/embedded-pdf.odt | Bin 0 -> 23502 bytes sw/qa/extras/odfexport/data/fdo38244.odt | Bin 0 -> 10334 bytes sw/qa/extras/odfexport/data/fdo43807.odt | Bin 0 -> 7630 bytes sw/qa/extras/odfexport/data/fdo58949.docx | Bin 0 -> 26510 bytes sw/qa/extras/odfexport/data/fdo60769.odt | Bin 0 -> 9482 bytes sw/qa/extras/odfexport/data/fdo79358.odt | Bin 0 -> 9356 bytes sw/qa/extras/odfexport/data/fdo86963.odt | Bin 0 -> 39845 bytes .../extras/odfexport/data/first-header-footer.odt | Bin 0 -> 9644 bytes .../data/footnote-collect-at-end-of-section.fodt | 192 ++ sw/qa/extras/odfexport/data/framebackgrounds.odt | Bin 0 -> 14327 bytes sw/qa/extras/odfexport/data/gerrit13858.odt | Bin 0 -> 10200 bytes sw/qa/extras/odfexport/data/image-mimetype.odt | Bin 0 -> 88597 bytes .../extras/odfexport/data/nestedTableInFooter.odt | Bin 0 -> 8611 bytes .../odfexport/data/ooo321_stylepagenumber.odt | Bin 0 -> 8558 bytes sw/qa/extras/odfexport/data/oooxml_embedded.sxw | Bin 0 -> 21943 bytes .../extras/odfexport/data/page-content-bottom.odt | Bin 0 -> 8502 bytes sw/qa/extras/odfexport/data/protection-key.fodt | 48 + sw/qa/extras/odfexport/data/qrcode-properties.odt | 386 +++ sw/qa/extras/odfexport/data/redlineTextFrame.odt | Bin 0 -> 8560 bytes sw/qa/extras/odfexport/data/referencelanguage.odt | Bin 0 -> 16137 bytes sw/qa/extras/odfexport/data/relh-page-tdf80282.odt | Bin 0 -> 128045 bytes sw/qa/extras/odfexport/data/relh-page.odt | Bin 0 -> 10183 bytes sw/qa/extras/odfexport/data/relw-page.odt | Bin 0 -> 10221 bytes sw/qa/extras/odfexport/data/resolved-comment.odt | Bin 0 -> 8912 bytes sw/qa/extras/odfexport/data/ruby-position.odt | Bin 0 -> 8325 bytes sw/qa/extras/odfexport/data/sender-initials.fodt | 71 + sw/qa/extras/odfexport/data/sha1_correct.odt | Bin 0 -> 8587 bytes sw/qa/extras/odfexport/data/sha1_wrong.odt | Bin 0 -> 8435 bytes sw/qa/extras/odfexport/data/shape-relsize.odt | Bin 0 -> 10706 bytes .../odfexport/data/signatureline-properties.fodt | 596 +++++ .../odfexport/data/spellout-numberingtypes.odt | Bin 0 -> 10222 bytes sw/qa/extras/odfexport/data/sw_hatch.odt | Bin 0 -> 6560 bytes sw/qa/extras/odfexport/data/table_styles_1.odt | Bin 0 -> 9874 bytes sw/qa/extras/odfexport/data/table_styles_2.odt | Bin 0 -> 10727 bytes sw/qa/extras/odfexport/data/table_styles_3.odt | Bin 0 -> 9376 bytes sw/qa/extras/odfexport/data/table_styles_4.odt | Bin 0 -> 9094 bytes sw/qa/extras/odfexport/data/table_styles_5.odt | Bin 0 -> 9841 bytes sw/qa/extras/odfexport/data/tdf100492.odt | Bin 0 -> 19671 bytes sw/qa/extras/odfexport/data/tdf101710.odt | Bin 0 -> 9350 bytes sw/qa/extras/odfexport/data/tdf101856.odt | Bin 0 -> 9406 bytes .../extras/odfexport/data/tdf101856_overlapped.odt | Bin 0 -> 9233 bytes sw/qa/extras/odfexport/data/tdf103091.fodt | 307 +++ sw/qa/extras/odfexport/data/tdf103567.odt | Bin 0 -> 13562 bytes sw/qa/extras/odfexport/data/tdf107696.odt | Bin 0 -> 11122 bytes .../odfexport/data/tdf111891_frameVertStyle.odt | Bin 0 -> 8814 bytes sw/qa/extras/odfexport/data/tdf118393.odt | Bin 0 -> 14208 bytes sw/qa/extras/odfexport/data/tdf118502.odt | Bin 0 -> 76491 bytes sw/qa/extras/odfexport/data/tdf121658.odt | Bin 0 -> 20057 bytes .../data/tdf124470TableAndEmbeddedUsedFonts.odt | Bin 0 -> 10880 bytes sw/qa/extras/odfexport/data/tdf128504.docx | Bin 0 -> 3969 bytes sw/qa/extras/odfexport/data/tdf129568-ui.fodt | 368 +++ sw/qa/extras/odfexport/data/tdf129568.fodt | 368 +++ sw/qa/extras/odfexport/data/tdf131621.ott | Bin 0 -> 29145 bytes sw/qa/extras/odfexport/data/tdf131812.odt | Bin 0 -> 8683 bytes .../odfexport/data/tdf132642_keepWithNextTable.odt | Bin 0 -> 10030 bytes .../odfexport/data/tdf43569_conditionalfield.doc | Bin 0 -> 22016 bytes sw/qa/extras/odfexport/data/tdf66305.odt | Bin 0 -> 12685 bytes sw/qa/extras/odfexport/data/tdf77961.odt | Bin 0 -> 11510 bytes sw/qa/extras/odfexport/data/tdf92379.fodt | 89 + sw/qa/extras/odfexport/data/tdf99631.docx | Bin 0 -> 32417 bytes .../odfexport/data/textbox-rounded-corners.odt | Bin 0 -> 13249 bytes sw/qa/extras/odfexport/data/textframe-gradient.odt | Bin 0 -> 9800 bytes .../data/textframe-transparent-shadow.odt | Bin 0 -> 9634 bytes .../extras/odfexport/data/textframe-vertadjust.odt | Bin 0 -> 12850 bytes .../extras/odfexport/data/user-field-decl-fly.odt | Bin 0 -> 9167 bytes sw/qa/extras/odfexport/data/user-field-decl.odt | Bin 0 -> 8597 bytes .../odfexport/data/userdefattr-tablecell.odt | Bin 0 -> 9172 bytes sw/qa/extras/odfexport/data/whitespace.odt | Bin 0 -> 10981 bytes sw/qa/extras/odfexport/odfexport.cxx | 2555 ++++++++++++++++++++ 82 files changed, 5100 insertions(+) create mode 100644 sw/qa/extras/odfexport/data/2_MathType3.docx create mode 100644 sw/qa/extras/odfexport/data/CrossRefHeadingBookmark.fodt create mode 100644 sw/qa/extras/odfexport/data/allow-overlap.odt create mode 100644 sw/qa/extras/odfexport/data/arabic-zero-numbering.odt create mode 100644 sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt create mode 100644 sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt create mode 100644 sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt create mode 100644 sw/qa/extras/odfexport/data/border_types.odt create mode 100644 sw/qa/extras/odfexport/data/btlr-cell.odt create mode 100644 sw/qa/extras/odfexport/data/btlr-frame.odt create mode 100644 sw/qa/extras/odfexport/data/chapter-number-new-line.odt create mode 100644 sw/qa/extras/odfexport/data/charborder.odt create mode 100644 sw/qa/extras/odfexport/data/embedded-font-props.odt create mode 100644 sw/qa/extras/odfexport/data/embedded-pdf.odt create mode 100644 sw/qa/extras/odfexport/data/fdo38244.odt create mode 100644 sw/qa/extras/odfexport/data/fdo43807.odt create mode 100644 sw/qa/extras/odfexport/data/fdo58949.docx create mode 100644 sw/qa/extras/odfexport/data/fdo60769.odt create mode 100644 sw/qa/extras/odfexport/data/fdo79358.odt create mode 100644 sw/qa/extras/odfexport/data/fdo86963.odt create mode 100644 sw/qa/extras/odfexport/data/first-header-footer.odt create mode 100644 sw/qa/extras/odfexport/data/footnote-collect-at-end-of-section.fodt create mode 100644 sw/qa/extras/odfexport/data/framebackgrounds.odt create mode 100644 sw/qa/extras/odfexport/data/gerrit13858.odt create mode 100644 sw/qa/extras/odfexport/data/image-mimetype.odt create mode 100644 sw/qa/extras/odfexport/data/nestedTableInFooter.odt create mode 100644 sw/qa/extras/odfexport/data/ooo321_stylepagenumber.odt create mode 100644 sw/qa/extras/odfexport/data/oooxml_embedded.sxw create mode 100644 sw/qa/extras/odfexport/data/page-content-bottom.odt create mode 100644 sw/qa/extras/odfexport/data/protection-key.fodt create mode 100644 sw/qa/extras/odfexport/data/qrcode-properties.odt create mode 100644 sw/qa/extras/odfexport/data/redlineTextFrame.odt create mode 100644 sw/qa/extras/odfexport/data/referencelanguage.odt create mode 100644 sw/qa/extras/odfexport/data/relh-page-tdf80282.odt create mode 100644 sw/qa/extras/odfexport/data/relh-page.odt create mode 100644 sw/qa/extras/odfexport/data/relw-page.odt create mode 100644 sw/qa/extras/odfexport/data/resolved-comment.odt create mode 100644 sw/qa/extras/odfexport/data/ruby-position.odt create mode 100644 sw/qa/extras/odfexport/data/sender-initials.fodt create mode 100644 sw/qa/extras/odfexport/data/sha1_correct.odt create mode 100644 sw/qa/extras/odfexport/data/sha1_wrong.odt create mode 100644 sw/qa/extras/odfexport/data/shape-relsize.odt create mode 100644 sw/qa/extras/odfexport/data/signatureline-properties.fodt create mode 100644 sw/qa/extras/odfexport/data/spellout-numberingtypes.odt create mode 100644 sw/qa/extras/odfexport/data/sw_hatch.odt create mode 100644 sw/qa/extras/odfexport/data/table_styles_1.odt create mode 100644 sw/qa/extras/odfexport/data/table_styles_2.odt create mode 100644 sw/qa/extras/odfexport/data/table_styles_3.odt create mode 100644 sw/qa/extras/odfexport/data/table_styles_4.odt create mode 100644 sw/qa/extras/odfexport/data/table_styles_5.odt create mode 100644 sw/qa/extras/odfexport/data/tdf100492.odt create mode 100644 sw/qa/extras/odfexport/data/tdf101710.odt create mode 100644 sw/qa/extras/odfexport/data/tdf101856.odt create mode 100644 sw/qa/extras/odfexport/data/tdf101856_overlapped.odt create mode 100644 sw/qa/extras/odfexport/data/tdf103091.fodt create mode 100644 sw/qa/extras/odfexport/data/tdf103567.odt create mode 100644 sw/qa/extras/odfexport/data/tdf107696.odt create mode 100644 sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt create mode 100644 sw/qa/extras/odfexport/data/tdf118393.odt create mode 100644 sw/qa/extras/odfexport/data/tdf118502.odt create mode 100644 sw/qa/extras/odfexport/data/tdf121658.odt create mode 100644 sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt create mode 100644 sw/qa/extras/odfexport/data/tdf128504.docx create mode 100644 sw/qa/extras/odfexport/data/tdf129568-ui.fodt create mode 100644 sw/qa/extras/odfexport/data/tdf129568.fodt create mode 100644 sw/qa/extras/odfexport/data/tdf131621.ott create mode 100644 sw/qa/extras/odfexport/data/tdf131812.odt create mode 100644 sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt create mode 100644 sw/qa/extras/odfexport/data/tdf43569_conditionalfield.doc create mode 100644 sw/qa/extras/odfexport/data/tdf66305.odt create mode 100644 sw/qa/extras/odfexport/data/tdf77961.odt create mode 100644 sw/qa/extras/odfexport/data/tdf92379.fodt create mode 100644 sw/qa/extras/odfexport/data/tdf99631.docx create mode 100644 sw/qa/extras/odfexport/data/textbox-rounded-corners.odt create mode 100644 sw/qa/extras/odfexport/data/textframe-gradient.odt create mode 100644 sw/qa/extras/odfexport/data/textframe-transparent-shadow.odt create mode 100644 sw/qa/extras/odfexport/data/textframe-vertadjust.odt create mode 100644 sw/qa/extras/odfexport/data/user-field-decl-fly.odt create mode 100644 sw/qa/extras/odfexport/data/user-field-decl.odt create mode 100644 sw/qa/extras/odfexport/data/userdefattr-tablecell.odt create mode 100644 sw/qa/extras/odfexport/data/whitespace.odt create mode 100644 sw/qa/extras/odfexport/odfexport.cxx (limited to 'sw/qa/extras/odfexport') diff --git a/sw/qa/extras/odfexport/data/2_MathType3.docx b/sw/qa/extras/odfexport/data/2_MathType3.docx new file mode 100644 index 000000000..0694921b3 Binary files /dev/null and b/sw/qa/extras/odfexport/data/2_MathType3.docx differ diff --git a/sw/qa/extras/odfexport/data/CrossRefHeadingBookmark.fodt b/sw/qa/extras/odfexport/data/CrossRefHeadingBookmark.fodt new file mode 100644 index 000000000..64d620537 --- /dev/null +++ b/sw/qa/extras/odfexport/data/CrossRefHeadingBookmark.fodt @@ -0,0 +1,120 @@ + + + + ms 2015-08-24T21:49:45.305718699LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text + + + cross-reference to 1.1 (Numbered paragraph - Number) and 1.1(Numbered paragraph - no context) + + + + + + + diff --git a/sw/qa/extras/odfexport/data/allow-overlap.odt b/sw/qa/extras/odfexport/data/allow-overlap.odt new file mode 100644 index 000000000..b23f5b360 Binary files /dev/null and b/sw/qa/extras/odfexport/data/allow-overlap.odt differ diff --git a/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt b/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt new file mode 100644 index 000000000..2a445b227 Binary files /dev/null and b/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt differ diff --git a/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt new file mode 100644 index 000000000..0bdca270e Binary files /dev/null and b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt differ diff --git a/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt b/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt new file mode 100644 index 000000000..2eb9b49ce Binary files /dev/null and b/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt differ diff --git a/sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt b/sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt new file mode 100644 index 000000000..3526ee8d7 Binary files /dev/null and b/sw/qa/extras/odfexport/data/arabic-zero5-numbering.odt differ diff --git a/sw/qa/extras/odfexport/data/border_types.odt b/sw/qa/extras/odfexport/data/border_types.odt new file mode 100644 index 000000000..97b72436f Binary files /dev/null and b/sw/qa/extras/odfexport/data/border_types.odt differ diff --git a/sw/qa/extras/odfexport/data/btlr-cell.odt b/sw/qa/extras/odfexport/data/btlr-cell.odt new file mode 100644 index 000000000..c010fa9f5 Binary files /dev/null and b/sw/qa/extras/odfexport/data/btlr-cell.odt differ diff --git a/sw/qa/extras/odfexport/data/btlr-frame.odt b/sw/qa/extras/odfexport/data/btlr-frame.odt new file mode 100644 index 000000000..31cb03849 Binary files /dev/null and b/sw/qa/extras/odfexport/data/btlr-frame.odt differ diff --git a/sw/qa/extras/odfexport/data/chapter-number-new-line.odt b/sw/qa/extras/odfexport/data/chapter-number-new-line.odt new file mode 100644 index 000000000..68a427f72 Binary files /dev/null and b/sw/qa/extras/odfexport/data/chapter-number-new-line.odt differ diff --git a/sw/qa/extras/odfexport/data/charborder.odt b/sw/qa/extras/odfexport/data/charborder.odt new file mode 100644 index 000000000..0d4d50691 Binary files /dev/null and b/sw/qa/extras/odfexport/data/charborder.odt differ diff --git a/sw/qa/extras/odfexport/data/embedded-font-props.odt b/sw/qa/extras/odfexport/data/embedded-font-props.odt new file mode 100644 index 000000000..6eb073e29 Binary files /dev/null and b/sw/qa/extras/odfexport/data/embedded-font-props.odt differ diff --git a/sw/qa/extras/odfexport/data/embedded-pdf.odt b/sw/qa/extras/odfexport/data/embedded-pdf.odt new file mode 100644 index 000000000..3adb4cf11 Binary files /dev/null and b/sw/qa/extras/odfexport/data/embedded-pdf.odt differ diff --git a/sw/qa/extras/odfexport/data/fdo38244.odt b/sw/qa/extras/odfexport/data/fdo38244.odt new file mode 100644 index 000000000..0fcc168a8 Binary files /dev/null and b/sw/qa/extras/odfexport/data/fdo38244.odt differ diff --git a/sw/qa/extras/odfexport/data/fdo43807.odt b/sw/qa/extras/odfexport/data/fdo43807.odt new file mode 100644 index 000000000..ae03c5904 Binary files /dev/null and b/sw/qa/extras/odfexport/data/fdo43807.odt differ diff --git a/sw/qa/extras/odfexport/data/fdo58949.docx b/sw/qa/extras/odfexport/data/fdo58949.docx new file mode 100644 index 000000000..d8f568b16 Binary files /dev/null and b/sw/qa/extras/odfexport/data/fdo58949.docx differ diff --git a/sw/qa/extras/odfexport/data/fdo60769.odt b/sw/qa/extras/odfexport/data/fdo60769.odt new file mode 100644 index 000000000..b3c39376b Binary files /dev/null and b/sw/qa/extras/odfexport/data/fdo60769.odt differ diff --git a/sw/qa/extras/odfexport/data/fdo79358.odt b/sw/qa/extras/odfexport/data/fdo79358.odt new file mode 100644 index 000000000..a1d2572a6 Binary files /dev/null and b/sw/qa/extras/odfexport/data/fdo79358.odt differ diff --git a/sw/qa/extras/odfexport/data/fdo86963.odt b/sw/qa/extras/odfexport/data/fdo86963.odt new file mode 100644 index 000000000..72896e139 Binary files /dev/null and b/sw/qa/extras/odfexport/data/fdo86963.odt differ diff --git a/sw/qa/extras/odfexport/data/first-header-footer.odt b/sw/qa/extras/odfexport/data/first-header-footer.odt new file mode 100644 index 000000000..2ed6b740a Binary files /dev/null and b/sw/qa/extras/odfexport/data/first-header-footer.odt differ diff --git a/sw/qa/extras/odfexport/data/footnote-collect-at-end-of-section.fodt b/sw/qa/extras/odfexport/data/footnote-collect-at-end-of-section.fodt new file mode 100644 index 000000000..b99103348 --- /dev/null +++ b/sw/qa/extras/odfexport/data/footnote-collect-at-end-of-section.fodt @@ -0,0 +1,192 @@ + + + + 2019-10-21T13:59:35.8473398492019-10-21T14:28:45.221080424PT23M48S2LibreOffice_powered_by_CIBDev/6.1.7.5$Linux_X86_64 LibreOffice_project/3ab5486449d1f3ca0247a9c133da746401c57e28 + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unknown Author + 2019-10-21T14:28:28 + + 2 + two3 + three + + + + + 1 + one2 + two + + + 1 + one2 + four + + + + + diff --git a/sw/qa/extras/odfexport/data/framebackgrounds.odt b/sw/qa/extras/odfexport/data/framebackgrounds.odt new file mode 100644 index 000000000..9ad338c2d Binary files /dev/null and b/sw/qa/extras/odfexport/data/framebackgrounds.odt differ diff --git a/sw/qa/extras/odfexport/data/gerrit13858.odt b/sw/qa/extras/odfexport/data/gerrit13858.odt new file mode 100644 index 000000000..9b3dd37ff Binary files /dev/null and b/sw/qa/extras/odfexport/data/gerrit13858.odt differ diff --git a/sw/qa/extras/odfexport/data/image-mimetype.odt b/sw/qa/extras/odfexport/data/image-mimetype.odt new file mode 100644 index 000000000..4c4924a1b Binary files /dev/null and b/sw/qa/extras/odfexport/data/image-mimetype.odt differ diff --git a/sw/qa/extras/odfexport/data/nestedTableInFooter.odt b/sw/qa/extras/odfexport/data/nestedTableInFooter.odt new file mode 100644 index 000000000..0356f04ee Binary files /dev/null and b/sw/qa/extras/odfexport/data/nestedTableInFooter.odt differ diff --git a/sw/qa/extras/odfexport/data/ooo321_stylepagenumber.odt b/sw/qa/extras/odfexport/data/ooo321_stylepagenumber.odt new file mode 100644 index 000000000..aae70e106 Binary files /dev/null and b/sw/qa/extras/odfexport/data/ooo321_stylepagenumber.odt differ diff --git a/sw/qa/extras/odfexport/data/oooxml_embedded.sxw b/sw/qa/extras/odfexport/data/oooxml_embedded.sxw new file mode 100644 index 000000000..e4fe14aef Binary files /dev/null and b/sw/qa/extras/odfexport/data/oooxml_embedded.sxw differ diff --git a/sw/qa/extras/odfexport/data/page-content-bottom.odt b/sw/qa/extras/odfexport/data/page-content-bottom.odt new file mode 100644 index 000000000..263ca7df4 Binary files /dev/null and b/sw/qa/extras/odfexport/data/page-content-bottom.odt differ diff --git a/sw/qa/extras/odfexport/data/protection-key.fodt b/sw/qa/extras/odfexport/data/protection-key.fodt new file mode 100644 index 000000000..cd4cde962 --- /dev/null +++ b/sw/qa/extras/odfexport/data/protection-key.fodt @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/qa/extras/odfexport/data/qrcode-properties.odt b/sw/qa/extras/odfexport/data/qrcode-properties.odt new file mode 100644 index 000000000..6aa3ed252 --- /dev/null +++ b/sw/qa/extras/odfexport/data/qrcode-properties.odt @@ -0,0 +1,386 @@ + + + + 2019-08-08T13:36:57.760952360PT1M46S1LibreOfficeDev/6.4.0.0.alpha0$Linux_X86_64 LibreOffice_project/4dac05d709f960acb27cbbf1425f36cdbf68d04d + + + 0 + 0 + 13363 + 12146 + true + false + + + view2 + 6503 + 2501 + 0 + 0 + 13361 + 12144 + 0 + 1 + false + 100 + true + false + + + + + false + + false + false + false + false + false + true + true + true + 0 + true + false + true + false + + true + false + false + true + false + false + 1767301 + false + false + true + true + false + false + true + true + true + true + true + false + false + true + false + false + 1 + 0 + + 0 + false + true + false + + false + false + + false + false + false + + false + true + false + high-resolution + true + true + true + false + true + false + + true + false + false + false + false + false + false + false + true + false + true + 1767301 + true + false + false + false + false + false + false + true + false + false + false + true + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQ + VUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3Jh + cGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR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1aX01AlQ6MV5dXcV3WKlvB9SY4oQXCO+MhtY1lEaYOzEKwnTB + KDpEzvEiHQHu7pyPWO8m3AqQhnInRvcuQACKNLjRApa0spbfrUOBWtTLZK0ToyPBczVMeCrA + Kc5gCnZtdZlbq6iV3EnPsUCqPAHADIXOvb6WeqwH1KqodZo76TnJ0RFUClCnMkk6YcqUG1Dj + Giqd9LyI0uns1BaMUt+GZC3txiIgHZYk1cnp122V7P4b/9tvUn4koMniGm4YhzL7DX0ADFAY + Xmt+AAAAAElFTkSuQmCC + + + + + + + \ No newline at end of file diff --git a/sw/qa/extras/odfexport/data/redlineTextFrame.odt b/sw/qa/extras/odfexport/data/redlineTextFrame.odt new file mode 100644 index 000000000..0986c3792 Binary files /dev/null and b/sw/qa/extras/odfexport/data/redlineTextFrame.odt differ diff --git a/sw/qa/extras/odfexport/data/referencelanguage.odt b/sw/qa/extras/odfexport/data/referencelanguage.odt new file mode 100644 index 000000000..9614bb3e3 Binary files /dev/null and b/sw/qa/extras/odfexport/data/referencelanguage.odt differ diff --git a/sw/qa/extras/odfexport/data/relh-page-tdf80282.odt b/sw/qa/extras/odfexport/data/relh-page-tdf80282.odt new file mode 100644 index 000000000..6b3c583d3 Binary files /dev/null and b/sw/qa/extras/odfexport/data/relh-page-tdf80282.odt differ diff --git a/sw/qa/extras/odfexport/data/relh-page.odt b/sw/qa/extras/odfexport/data/relh-page.odt new file mode 100644 index 000000000..2dcf64124 Binary files /dev/null and b/sw/qa/extras/odfexport/data/relh-page.odt differ diff --git a/sw/qa/extras/odfexport/data/relw-page.odt b/sw/qa/extras/odfexport/data/relw-page.odt new file mode 100644 index 000000000..047d91e87 Binary files /dev/null and b/sw/qa/extras/odfexport/data/relw-page.odt differ diff --git a/sw/qa/extras/odfexport/data/resolved-comment.odt b/sw/qa/extras/odfexport/data/resolved-comment.odt new file mode 100644 index 000000000..e136cac3d Binary files /dev/null and b/sw/qa/extras/odfexport/data/resolved-comment.odt differ diff --git a/sw/qa/extras/odfexport/data/ruby-position.odt b/sw/qa/extras/odfexport/data/ruby-position.odt new file mode 100644 index 000000000..7086144bf Binary files /dev/null and b/sw/qa/extras/odfexport/data/ruby-position.odt differ diff --git a/sw/qa/extras/odfexport/data/sender-initials.fodt b/sw/qa/extras/odfexport/data/sender-initials.fodt new file mode 100644 index 000000000..b8a5c1e67 --- /dev/null +++ b/sw/qa/extras/odfexport/data/sender-initials.fodt @@ -0,0 +1,71 @@ + + + + ms 2015-08-24T21:49:45.305718699LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + I2018-05-08T11:09:30.015915376barFoo + + I2018-05-08T11:09:30.015915376barFoo + + I2018-05-08T11:09:30.015915376barFoo + + + I + + + + I + + + + + diff --git a/sw/qa/extras/odfexport/data/sha1_correct.odt b/sw/qa/extras/odfexport/data/sha1_correct.odt new file mode 100644 index 000000000..01cbb0a07 Binary files /dev/null and b/sw/qa/extras/odfexport/data/sha1_correct.odt differ diff --git a/sw/qa/extras/odfexport/data/sha1_wrong.odt b/sw/qa/extras/odfexport/data/sha1_wrong.odt new file mode 100644 index 000000000..94032025b Binary files /dev/null and b/sw/qa/extras/odfexport/data/sha1_wrong.odt differ diff --git a/sw/qa/extras/odfexport/data/shape-relsize.odt b/sw/qa/extras/odfexport/data/shape-relsize.odt new file mode 100644 index 000000000..05a3ffa59 Binary files /dev/null and b/sw/qa/extras/odfexport/data/shape-relsize.odt differ diff --git a/sw/qa/extras/odfexport/data/signatureline-properties.fodt b/sw/qa/extras/odfexport/data/signatureline-properties.fodt new file mode 100644 index 000000000..ddceff9f3 --- /dev/null +++ b/sw/qa/extras/odfexport/data/signatureline-properties.fodt @@ -0,0 +1,596 @@ + + + + 2017-12-11T16:12:21.9478635282017-12-11T16:12:44.952307632PT27S1LibreOfficeDev/6.1.0.0.alpha0$Linux_X86_64 LibreOffice_project/f694d0c29b4f38b6c40850c61ec6aeac3969fd88 + + + 0 + 0 + 47891 + 23206 + true + false + + + view2 + 21447 + 2501 + 0 + 0 + 47890 + 23204 + 0 + 1 + false + 100 + false + false + + + + + false + + false + false + false + false + false + true + true + false + true + true + false + + true + + false + false + true + false + false + 855097 + false + false + true + true + false + false + true + true + true + true + true + true + false + false + 1 + true + false + + false + false + + false + false + false + + false + 0 + 0 + false + + false + true + false + false + false + false + false + true + false + false + false + true + 1224071 + true + false + false + false + false + high-resolution + true + true + true + false + false + false + false + false + false + false + false + false + true + false + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+ + PHN2ZyB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5z + OmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOnJkZj0iaHR0cDov + L3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgeG1sbnM6c3ZnPSJodHRw + Oi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAv + c3ZnIiB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9E + VEQvc29kaXBvZGktMC5kdGQiIHhtbG5zOmlua3NjYXBlPSJodHRwOi8vd3d3Lmlua3NjYXBl + Lm9yZy9uYW1lc3BhY2VzL2lua3NjYXBlIiB2ZXJzaW9uPSIxLjIiIHdpZHRoPSI5MG1tIiBo + ZWlnaHQ9IjQ1bW0iIH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zt27PhbaGjoRxMnTpz8R5+bP3/+oGXLlnXP3paf2wUA8DyRMrC/ffv2 + /xw/fvzUyZMnTzS3TZkyZYKvr+9Rf3//LdmPP3XqVPWRI0fOyNoWEhIyq1evXktk1AMAhUHa + TCnRGxUPqdauXdtRvBe91W7dui0X91MrVqwYZz7u3r17RURvNjU11d7cJsaffvzxx2Nl1QIA + hUFaoIpxo4sXL+594cKFSmfPnq0q2u7evVtUhOeBAwcaODg4pIhxq3369PksLi6uovlz5cuX + /3n9+vXv6PX6dFm1AEBhkDqXX8xs2rhxYzvxU//27dvFRZv4eS+GRYn7pTNmzBgpwtN8vHgI + JXq0pUqVuimzDgAoDNIXR6lQoUK8CM+AgIBNmZmZWtEmhle5uLg8yD54f968eUPEsCvZNQBA + YbDKalOtW7feKgbmjxs3LtzcFh0dPTjrMYMHD44uyKwqAHheWW35PjF19OTJkzXEIP3sf6tf + v/7BWbNmhVjr2gBQGKwWqOIh1aRHVq9e3cm8iIpZx44d19rY2KRZ69oAUBisFqhiGmr37t2X + ZQ9TQdwK8PPzOyyGS1nr+gDwrFktUPv37//p0aNHfc3vxdx/80yq9PR0vZieeuzYsdpMMwXw + srBKoIrhUVmnlTo6OiZv27atleixxsfHVxBtV65cce/UqdPq7du3t2QhFAAvA+mBumvXruZZ + n+4LYo6++Hkv7qc2atRoX1pamo1o3717dzMxZXXatGkfyK4DAJ41qYGakJDg2blz51UZGRlP + zytW4hc9U/FvMeA/IiJizPDhw2eb/y7WVRULoohl/2TWAgDPmrRATUpKcmrXrt3GW7dulTC3 + iQdPWVf1F8RWKfv27WtknvMvHlr17t17cZUqVc5Xrlz5X7LqAYBnTUqgmufoiw38zG1iOqkI + zZyGRy1atChYHCtW6xfvxQLTYs6/2JvK2dk5UUZNAPCsSQlUMStqzZo175rfiyf64qGUm5vb + v3M6XoSmOF4sTG1edUosqiJGBoj9pWTUBADPmsWBKp7eiwH8WdvE4tItW7bc/r8+V61atdNi + ttTAgQMXmNvErCoxi0rcd7W0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2i+3uO1ZKaz9p + SWTswOqzHu8tldtGejldK35rk76l1LO5fxMA+N+sG6jGK/rY4MCZYdc614jZsLBbg9KahJsH + 5/oOHhA4e5D7+V/XBpWap6o2Jhu9MT3h80/a7es4a/O2id6tvIreij8nNueLntbl8MeLQ8/M + fsXtckynLk2G9533t70N6naL3DYlYZWu3/eTWw9rMWrc+83f2vJNn9JJ53LdSC/Ha6lxVv0/ + APCnYVmgGtM0KUlJjkna3y/Hp6p6k52jbYpWUyaj67Kz7/lrSmrcS9rfEH97tcKoK92jFwdN + 33msaXpQ62gbRatotZnGn50DHu74oP20CholSUnf76AqJiXZp0f8hLe9Vjo+6l1W7txxa92R + 2+5dqB9ydnTjV7bYPLq6X+eATd6fLBx18kLG6ybdhpu5bqSnaA3/dS0AkMSiQE0/MblqnSKT + f8nerine++amq4tq+tvorqk395SYOW5W6PoDF/567f7DYhkmkyrWKHX0SN1iero7lMZUtnbt + c24aJSXLWUzlKntfclWVx/tJqY5OBidVl+5V6bUf9P9ZMf9xm5KamWow2WWcO+KZ60Z6JZRL + OV8LACxn2VP+Sv1/WhLTfYhHtqf8qv6V9Cp65ZaSuMN1VEDfFWsrjDMsPbSrRbPXip21U66o + c5u+tuYDRbH57RMaxdHJMfn3e++pik6nzfjt7ZPN+37X9p88Fn8wis32cttI70mg5nAtALCc + ZU/5HT2SazVsdOiPnvKnf7+x9tdXy1fssWJ8T39v/cnHjRm37X69YyyqlM021EpVTDmcIs80 + LvnYSM/CawFATqz6UMpkSLUxqK5qUVfN08BNOby82toLmTVNPqb9/+uz+aXz8U3IdSO9dMVB + 5jUBICurBqqumt9PtWxWPFgdvSG4w4d+CZmnlnlPiLgX0qSF077FP55wP3a9pUed4spNGddS + i7e/letGego9UwDWY9VA1ZTr+cucfxwZ2evDnuE1l9ied/frfGxC9NyR/pcdHPd3mbmq3Vu2 + q7/5ttnbcq7mbMx1I71MeqgArKeAgfp0I7xc2Joq9Yxdc+jR63fNVaKUs/eiXjG/rZN9I76c + NvCz7fhgTWpHz6xNmgrD4/cahpd52pDbRno5bgwIAHKw2hQASEKgAoAkBCoASEKgAoAkBCoA + SEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoA + SEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoASEKgAoAkBCoA + SEKgAoAkBCoASEKgAoAkBCoASEKgAoAk/w/xJdzkzVWshgAAAABJRU5ErkJggg== + + + 140 + + + + + \ No newline at end of file diff --git a/sw/qa/extras/odfexport/data/spellout-numberingtypes.odt b/sw/qa/extras/odfexport/data/spellout-numberingtypes.odt new file mode 100644 index 000000000..0f07d93f2 Binary files /dev/null and b/sw/qa/extras/odfexport/data/spellout-numberingtypes.odt differ diff --git a/sw/qa/extras/odfexport/data/sw_hatch.odt b/sw/qa/extras/odfexport/data/sw_hatch.odt new file mode 100644 index 000000000..45e36c6ec Binary files /dev/null and b/sw/qa/extras/odfexport/data/sw_hatch.odt differ diff --git a/sw/qa/extras/odfexport/data/table_styles_1.odt b/sw/qa/extras/odfexport/data/table_styles_1.odt new file mode 100644 index 000000000..701fd92c2 Binary files /dev/null and b/sw/qa/extras/odfexport/data/table_styles_1.odt differ diff --git a/sw/qa/extras/odfexport/data/table_styles_2.odt b/sw/qa/extras/odfexport/data/table_styles_2.odt new file mode 100644 index 000000000..735ea4431 Binary files /dev/null and b/sw/qa/extras/odfexport/data/table_styles_2.odt differ diff --git a/sw/qa/extras/odfexport/data/table_styles_3.odt b/sw/qa/extras/odfexport/data/table_styles_3.odt new file mode 100644 index 000000000..736786489 Binary files /dev/null and b/sw/qa/extras/odfexport/data/table_styles_3.odt differ diff --git a/sw/qa/extras/odfexport/data/table_styles_4.odt b/sw/qa/extras/odfexport/data/table_styles_4.odt new file mode 100644 index 000000000..0d96127e3 Binary files /dev/null and b/sw/qa/extras/odfexport/data/table_styles_4.odt differ diff --git a/sw/qa/extras/odfexport/data/table_styles_5.odt b/sw/qa/extras/odfexport/data/table_styles_5.odt new file mode 100644 index 000000000..c90958322 Binary files /dev/null and b/sw/qa/extras/odfexport/data/table_styles_5.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf100492.odt b/sw/qa/extras/odfexport/data/tdf100492.odt new file mode 100644 index 000000000..e17bd67c5 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf100492.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf101710.odt b/sw/qa/extras/odfexport/data/tdf101710.odt new file mode 100644 index 000000000..50ab73607 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf101710.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf101856.odt b/sw/qa/extras/odfexport/data/tdf101856.odt new file mode 100644 index 000000000..bddd15022 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf101856.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf101856_overlapped.odt b/sw/qa/extras/odfexport/data/tdf101856_overlapped.odt new file mode 100644 index 000000000..c05df538d Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf101856_overlapped.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf103091.fodt b/sw/qa/extras/odfexport/data/tdf103091.fodt new file mode 100644 index 000000000..c2c84115d --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf103091.fodt @@ -0,0 +1,307 @@ + + + + ms 2017-06-15T21:56:462017-06-15T21:59:44ms P0D1LibreOffice/3.5$Linux_X86_64 LibreOffice_project/3215f89-f603614-ab984f2-7348103-1225a5b + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/qa/extras/odfexport/data/tdf103567.odt b/sw/qa/extras/odfexport/data/tdf103567.odt new file mode 100644 index 000000000..cbd29bd29 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf103567.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf107696.odt b/sw/qa/extras/odfexport/data/tdf107696.odt new file mode 100644 index 000000000..c24100bbd Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf107696.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt new file mode 100644 index 000000000..8fcf98a62 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf118393.odt b/sw/qa/extras/odfexport/data/tdf118393.odt new file mode 100644 index 000000000..ff8d54009 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf118393.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf118502.odt b/sw/qa/extras/odfexport/data/tdf118502.odt new file mode 100644 index 000000000..f006d607a Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf118502.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf121658.odt b/sw/qa/extras/odfexport/data/tdf121658.odt new file mode 100644 index 000000000..1ab6f75c8 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf121658.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt b/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt new file mode 100644 index 000000000..21969e9e5 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf128504.docx b/sw/qa/extras/odfexport/data/tdf128504.docx new file mode 100644 index 000000000..2e6e5225b Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf128504.docx differ diff --git a/sw/qa/extras/odfexport/data/tdf129568-ui.fodt b/sw/qa/extras/odfexport/data/tdf129568-ui.fodt new file mode 100644 index 000000000..8958bd685 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf129568-ui.fodt @@ -0,0 +1,368 @@ + + + + 2020-02-03T11:01:15.2025491202020-02-03T11:02:08.562696933PT55S2LibreOffice/6.3.4.2.0$Linux_X86_64 LibreOffice_project/30$Build-2 + + + 0 + 0 + 25137 + 13522 + true + false + + + view2 + 4165 + 2616 + 0 + 0 + 25135 + 13520 + 0 + 1 + false + 100 + false + false + + + + + false + true + true + true + 0 + true + true + + false + false + true + false + false + false + true + true + false + false + false + false + false + false + false + false + false + true + true + false + false + true + 1284982 + false + + false + true + false + false + false + true + false + false + false + true + 1284982 + + true + false + false + true + false + true + true + false + true + false + false + false + 0 + false + true + high-resolution + false + false + false + true + false + false + false + true + true + + true + false + false + true + false + false + false + + true + false + false + 1 + true + false + false + 0 + false + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/qa/extras/odfexport/data/tdf129568.fodt b/sw/qa/extras/odfexport/data/tdf129568.fodt new file mode 100644 index 000000000..30256a6cd --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf129568.fodt @@ -0,0 +1,368 @@ + + + + 2020-02-03T11:01:15.2025491202020-02-03T11:02:08.562696933PT55S2LibreOffice/6.3.4.2.0$Linux_X86_64 LibreOffice_project/30$Build-2 + + + 0 + 0 + 25137 + 13522 + true + false + + + view2 + 4165 + 2616 + 0 + 0 + 25135 + 13520 + 0 + 1 + false + 100 + false + false + + + + + false + true + true + true + 0 + true + true + + false + false + true + false + false + false + true + true + false + false + false + false + false + false + false + false + false + true + true + false + false + true + 1284982 + false + + false + true + false + false + false + true + false + false + false + true + 1284982 + + true + false + false + true + false + true + true + false + true + false + false + false + 0 + false + true + high-resolution + false + false + false + true + false + false + false + true + true + + true + false + false + true + false + false + false + + true + false + false + 1 + true + false + false + 0 + false + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/qa/extras/odfexport/data/tdf131621.ott b/sw/qa/extras/odfexport/data/tdf131621.ott new file mode 100644 index 000000000..8590c16ae Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf131621.ott differ diff --git a/sw/qa/extras/odfexport/data/tdf131812.odt b/sw/qa/extras/odfexport/data/tdf131812.odt new file mode 100644 index 000000000..c2833ff25 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf131812.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt b/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt new file mode 100644 index 000000000..739cd0078 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf43569_conditionalfield.doc b/sw/qa/extras/odfexport/data/tdf43569_conditionalfield.doc new file mode 100644 index 000000000..456a6ed83 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf43569_conditionalfield.doc differ diff --git a/sw/qa/extras/odfexport/data/tdf66305.odt b/sw/qa/extras/odfexport/data/tdf66305.odt new file mode 100644 index 000000000..4a310a83d Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf66305.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf77961.odt b/sw/qa/extras/odfexport/data/tdf77961.odt new file mode 100644 index 000000000..a6205e018 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf77961.odt differ diff --git a/sw/qa/extras/odfexport/data/tdf92379.fodt b/sw/qa/extras/odfexport/data/tdf92379.fodt new file mode 100644 index 000000000..762a04d57 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf92379.fodt @@ -0,0 +1,89 @@ + + + + ms 2015-08-24T21:49:45.305718699LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/qa/extras/odfexport/data/tdf99631.docx b/sw/qa/extras/odfexport/data/tdf99631.docx new file mode 100644 index 000000000..c72950b72 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf99631.docx differ diff --git a/sw/qa/extras/odfexport/data/textbox-rounded-corners.odt b/sw/qa/extras/odfexport/data/textbox-rounded-corners.odt new file mode 100644 index 000000000..add7512c6 Binary files /dev/null and b/sw/qa/extras/odfexport/data/textbox-rounded-corners.odt differ diff --git a/sw/qa/extras/odfexport/data/textframe-gradient.odt b/sw/qa/extras/odfexport/data/textframe-gradient.odt new file mode 100644 index 000000000..cdcae4fff Binary files /dev/null and b/sw/qa/extras/odfexport/data/textframe-gradient.odt differ diff --git a/sw/qa/extras/odfexport/data/textframe-transparent-shadow.odt b/sw/qa/extras/odfexport/data/textframe-transparent-shadow.odt new file mode 100644 index 000000000..508e853c9 Binary files /dev/null and b/sw/qa/extras/odfexport/data/textframe-transparent-shadow.odt differ diff --git a/sw/qa/extras/odfexport/data/textframe-vertadjust.odt b/sw/qa/extras/odfexport/data/textframe-vertadjust.odt new file mode 100644 index 000000000..bbf3416c0 Binary files /dev/null and b/sw/qa/extras/odfexport/data/textframe-vertadjust.odt differ diff --git a/sw/qa/extras/odfexport/data/user-field-decl-fly.odt b/sw/qa/extras/odfexport/data/user-field-decl-fly.odt new file mode 100644 index 000000000..2ffe3ae55 Binary files /dev/null and b/sw/qa/extras/odfexport/data/user-field-decl-fly.odt differ diff --git a/sw/qa/extras/odfexport/data/user-field-decl.odt b/sw/qa/extras/odfexport/data/user-field-decl.odt new file mode 100644 index 000000000..f037f403e Binary files /dev/null and b/sw/qa/extras/odfexport/data/user-field-decl.odt differ diff --git a/sw/qa/extras/odfexport/data/userdefattr-tablecell.odt b/sw/qa/extras/odfexport/data/userdefattr-tablecell.odt new file mode 100644 index 000000000..c8f6dcca5 Binary files /dev/null and b/sw/qa/extras/odfexport/data/userdefattr-tablecell.odt differ diff --git a/sw/qa/extras/odfexport/data/whitespace.odt b/sw/qa/extras/odfexport/data/whitespace.odt new file mode 100644 index 000000000..fe2b3dd57 Binary files /dev/null and b/sw/qa/extras/odfexport/data/whitespace.odt differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx new file mode 100644 index 000000000..6554b6abc --- /dev/null +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -0,0 +1,2555 @@ +/* -*- 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 +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for SwHiddenTextField::ParseIfFieldDefinition() method call +#include +#include +#include +#include +#include + +class Test : public SwModelTestBase +{ +public: + Test() : SwModelTestBase("/sw/qa/extras/odfexport/data/", "writer8") {} + + /** + * Blacklist handling + */ + bool mustTestImportOf(const char* filename) const override { + // Only test import of .odt document + return OString(filename).endsWith(".odt"); + } + + bool mustValidate(const char* /*filename*/) const override + { + return true; + } + + virtual std::unique_ptr preTest(const char* pFilename) override + { + if (OString(pFilename) == "fdo58949.docx") + { + std::unique_ptr pResetter(new Resetter( + [] () { + std::shared_ptr pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(true, pBatch); + return pBatch->commit(); + })); + + std::shared_ptr pBatch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(false, pBatch); + pBatch->commit(); + return pResetter; + } + if (OString(pFilename) == "2_MathType3.docx") + { + std::unique_ptr pResetter(new Resetter( + [this] () { + mpFilter = "writer8"; + std::shared_ptr pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Cache::Writer::OLE_Objects::set(20, pBatch); + return pBatch->commit(); + })); + mpFilter = "OpenDocument Text Flat XML"; // doesn't happen with ODF package + std::shared_ptr pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Cache::Writer::OLE_Objects::set(1, pBatch); + pBatch->commit(); + return pResetter; + } + return nullptr; + } +}; + +DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, "2_MathType3.docx") +{ + uno::Reference xModifiable(mxComponent, uno::UNO_QUERY); + CPPUNIT_ASSERT(!xModifiable->isModified()); + // see preTest(), set the OLE cache to 1 for this test + // and the problem was that the formulas that were in the cache + // (the second one) were lost + OUString formula1(getFormula(getRun(getParagraph(1), 1))); + CPPUNIT_ASSERT_EQUAL(OUString(" size 12{1+1=2} {}"), formula1); + OUString formula2(getFormula(getRun(getParagraph(2), 1))); + CPPUNIT_ASSERT_EQUAL(OUString(" size 12{2+2=4} {}"), formula2); +} + +static void testTdf43569_CheckIfFieldParse() +{ + { + const OUString fieldDefinition("IF A B C"); + + OUString paramCondition; + OUString paramTrue; + OUString paramFalse; + + SwHiddenTextField::ParseIfFieldDefinition(fieldDefinition, paramCondition, paramTrue, paramFalse); + + CPPUNIT_ASSERT_EQUAL(OUString("A"), paramCondition); + CPPUNIT_ASSERT_EQUAL(OUString("B"), paramTrue); + CPPUNIT_ASSERT_EQUAL(OUString("C"), paramFalse); + } + + { + const OUString fieldDefinition(" IF AAA BBB CCC "); + + OUString paramCondition; + OUString paramTrue; + OUString paramFalse; + + SwHiddenTextField::ParseIfFieldDefinition(fieldDefinition, paramCondition, paramTrue, paramFalse); + + CPPUNIT_ASSERT_EQUAL(OUString("AAA"), paramCondition); + CPPUNIT_ASSERT_EQUAL(OUString("BBB"), paramTrue); + CPPUNIT_ASSERT_EQUAL(OUString("CCC"), paramFalse); + } + + { + const OUString fieldDefinition(" IF AAA \"BBB\" \"CCC\" "); + + OUString paramCondition; + OUString paramTrue; + OUString paramFalse; + + SwHiddenTextField::ParseIfFieldDefinition(fieldDefinition, paramCondition, paramTrue, paramFalse); + + CPPUNIT_ASSERT_EQUAL(OUString("AAA"), paramCondition); + CPPUNIT_ASSERT_EQUAL(OUString("BBB"), paramTrue); + CPPUNIT_ASSERT_EQUAL(OUString("CCC"), paramFalse); + } + + // true-case and false-case have spaces inside + { + const OUString fieldDefinition(" IF A A A \"B B B\" \"C C C\" "); + + OUString paramCondition; + OUString paramTrue; + OUString paramFalse; + + SwHiddenTextField::ParseIfFieldDefinition(fieldDefinition, paramCondition, paramTrue, paramFalse); + + CPPUNIT_ASSERT_EQUAL(OUString("A A A"), paramCondition); + CPPUNIT_ASSERT_EQUAL(OUString("B B B"), paramTrue); + CPPUNIT_ASSERT_EQUAL(OUString("C C C"), paramFalse); + } + + // true-case and false-case have leading/trailing space + { + const OUString fieldDefinition("IF A1 A2 A3 \"B1 B2 \" \" C1 C2\" "); + + OUString paramCondition; + OUString paramTrue; + OUString paramFalse; + + SwHiddenTextField::ParseIfFieldDefinition(fieldDefinition, paramCondition, paramTrue, paramFalse); + + CPPUNIT_ASSERT_EQUAL(OUString("A1 A2 A3"), paramCondition); + CPPUNIT_ASSERT_EQUAL(OUString("B1 B2 "), paramTrue); + CPPUNIT_ASSERT_EQUAL(OUString(" C1 C2"), paramFalse); + } + + // true-case and false-case are empty + { + const OUString fieldDefinition("IF condition \"\" \"\" "); + + OUString paramCondition; + OUString paramTrue; + OUString paramFalse; + + SwHiddenTextField::ParseIfFieldDefinition(fieldDefinition, paramCondition, paramTrue, paramFalse); + + CPPUNIT_ASSERT_EQUAL(OUString("condition"), paramCondition); + CPPUNIT_ASSERT_EQUAL(OUString(""), paramTrue); + CPPUNIT_ASSERT_EQUAL(OUString(""), paramFalse); + } +} + +// Input document contains only one IF-field, +// and it should be imported as com.sun.star.text.TextField.ConditionalText in any case, +// instead of insertion of the pair of two field-marks: + . +DECLARE_ODFEXPORT_TEST(testTdf43569, "tdf43569_conditionalfield.doc") +{ + // check if our parser is valid + testTdf43569_CheckIfFieldParse(); + + // now check field creation during import + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + + // at least one field should be detected + CPPUNIT_ASSERT(xFields->hasMoreElements()); +} + +DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference const xShape(getShape(1)); + + // contour wrap polygon + css::drawing::PointSequenceSequence const pointss( + getProperty(xShape, "ContourPolyPolygon")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pointss.getLength()); + // for some reason this property exists with 199 points if it wasn't + // imported, that would be a fail + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pointss[0].getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32( 0), pointss[0][0].X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][0].Y); + CPPUNIT_ASSERT_EQUAL(sal_Int32( 0), pointss[0][1].X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1111), pointss[0][1].Y); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][2].X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1111), pointss[0][2].Y); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][3].X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][3].Y); + CPPUNIT_ASSERT_EQUAL(sal_Int32( 0), pointss[0][4].X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][4].Y); + + // image map, one rectangle + uno::Reference const xImageMap( + getProperty>(xShape, "ImageMap")); + + uno::Reference const xEntry(xImageMap->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("http://example.com/"), getProperty(xEntry, "URL")); + awt::Rectangle const rect(getProperty(xEntry, "Boundary")); + CPPUNIT_ASSERT_EQUAL(sal_Int32( 726), rect.X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1718), rect.Y); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1347), rect.Width); + CPPUNIT_ASSERT_EQUAL(sal_Int32( 408), rect.Height); +} + +DECLARE_ODFEXPORT_TEST(testUserFieldDecl, "user-field-decl.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + if (xmlDocUniquePtr pXmlDoc = parseExport("styles.xml")) + // Without the accompanying fix in place, this test would have failed with 'Expected: 2; + // Actual: 1', i.e. the in-table field had no declaration (in the header), while the + // outside-table one had the declaration. + assertXPath(pXmlDoc, "//style:header/text:user-field-decls/text:user-field-decl", 2); +} + +DECLARE_ODFEXPORT_TEST(testUserFieldDeclFly, "user-field-decl-fly.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + if (xmlDocUniquePtr pXmlDoc = parseExport("styles.xml")) + // Without the accompanying fix in place, this test would have failed with 'Expected: 2; + // Actual: 1', i.e. the in-textframe field had no declaration (in the header), while the + // outside-textframe one had the declaration. + assertXPath(pXmlDoc, "//style:header/text:user-field-decls/text:user-field-decl", 2); +} + +DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt") +{ + CPPUNIT_ASSERT_EQUAL(16, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + //Counting the Number of Frames and checking with the expected count + uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(16), xIndexAccess->getCount()); + uno::Reference xTextFrame; + awt::Gradient aGradientxTextFrame; + //Frame 1 + xTextFrame = getShape(1); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillTransparence")); + //Frame 2 + xTextFrame = getShape(2); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x006600), getProperty(xTextFrame, "FillColor")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillTransparence")); + //Frame 3 + xTextFrame = getShape(3); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x006600), getProperty(xTextFrame, "FillColor")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty(xTextFrame, "FillTransparence")); + //Frame 4 + xTextFrame = getShape(4); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x579D1C), getProperty(xTextFrame, "FillColor")); + aGradientxTextFrame = getProperty(xTextFrame, "FillTransparenceGradient"); + CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style); + //Frame 5 + xTextFrame = getShape(5); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillTransparence")); + CPPUNIT_ASSERT_EQUAL(OUString("Subtle Tango Green"), getProperty(xTextFrame, "FillGradientName")); + //Frame 6 + xTextFrame = getShape(6); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Subtle Tango Green"), getProperty(xTextFrame, "FillGradientName")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty(xTextFrame, "FillTransparence")); + //Frame 7 + xTextFrame = getShape(7); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Subtle Tango Green"), getProperty(xTextFrame, "FillGradientName")); + aGradientxTextFrame = getProperty(xTextFrame, "FillTransparenceGradient"); + CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style); + //Frame 8 + xTextFrame = getShape(8); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty(xTextFrame, "FillHatchName")); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xTextFrame, "FillBackground")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillTransparence")); + //Frame 9 + xTextFrame = getShape(9); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty(xTextFrame, "FillHatchName")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xTextFrame, "FillBackground")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillTransparence")); + //Frame 10 + xTextFrame = getShape(10); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty(xTextFrame, "FillHatchName")); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xTextFrame, "FillBackground")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty(xTextFrame, "FillTransparence")); + //Frame 11 + xTextFrame = getShape(11); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty(xTextFrame, "FillHatchName")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xTextFrame, "FillBackground")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty(xTextFrame, "FillTransparence")); + //Frame 12 + xTextFrame = getShape(12); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty(xTextFrame, "FillHatchName")); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xTextFrame, "FillBackground")); + aGradientxTextFrame = getProperty(xTextFrame, "FillTransparenceGradient"); + CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style); + //Frame 13 + xTextFrame = getShape(13); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Black 0 Degrees"), getProperty(xTextFrame, "FillHatchName")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xTextFrame, "FillBackground")); + aGradientxTextFrame = getProperty(xTextFrame, "FillTransparenceGradient"); + CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style); + //Frame 14 + xTextFrame = getShape(14); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty(xTextFrame, "FillBitmapName")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillTransparence")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapPositionOffsetX")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapPositionOffsetY")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapOffsetX")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapOffsetY")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xTextFrame, "FillBitmapTile")); + //Frame 15 + xTextFrame = getShape(15); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty(xTextFrame, "FillBitmapName")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty(xTextFrame, "FillTransparence")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapPositionOffsetX")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapPositionOffsetY")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapOffsetX")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapOffsetY")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xTextFrame, "FillBitmapTile")); + //Frame 16 + xTextFrame = getShape(16); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty(xTextFrame, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty(xTextFrame, "FillBitmapName")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapPositionOffsetX")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapPositionOffsetY")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapOffsetX")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xTextFrame, "FillBitmapOffsetY")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xTextFrame, "FillBitmapTile")); + aGradientxTextFrame = getProperty(xTextFrame, "FillTransparenceGradient"); + CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style); + + if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml")) + { + // check that there are 3 background-image elements + assertXPath(pXmlDoc, "//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap']/style:background-image[@style:repeat='stretch']", 3); + // tdf#90640: check that one of them is 55% opaque + assertXPath(pXmlDoc, "//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap' and @fo:background-color='transparent' and @draw:opacity='55%']/style:background-image[@style:repeat='stretch' and @draw:opacity='55%']", 1); + // tdf#90640: check that one of them is 43% opaque + // (emulated - hopefully not with rounding errors) + assertXPath(pXmlDoc, "//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap' and @fo:background-color='transparent' and @draw:opacity-name='Transparency_20_1']/style:background-image[@style:repeat='stretch' and @draw:opacity='43%']", 1); + } +} + +DECLARE_SW_ROUNDTRIP_TEST(testSHA1Correct, "sha1_correct.odt", "1012345678901234567890123456789012345678901234567890", Test) +{ // tdf#114939 this has both an affected password as well as content.xml + CPPUNIT_ASSERT_EQUAL(1, getPages()); + getParagraph(1, "012"); +} + +DECLARE_SW_ROUNDTRIP_TEST(testSHA1Wrong, "sha1_wrong.odt", "1012345678901234567890123456789012345678901234567890", Test) +{ // tdf#114939 this has both an affected password as well as content.xml + CPPUNIT_ASSERT_EQUAL(1, getPages()); + getParagraph(1, "012"); +} + +DECLARE_ODFEXPORT_TEST(testOOoxmlEmbedded, "oooxml_embedded.sxw") +{ + uno::Reference xTEOSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xAccess(xTEOSupplier->getEmbeddedObjects()); + uno::Sequence aSeq(xAccess->getElementNames()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aSeq.getLength()); + uno::Reference xEOSupplier1(xAccess->getByName("Object1"), uno::UNO_QUERY); + uno::Reference xObj1(xEOSupplier1->getEmbeddedObject()); + uno::Reference xEOSupplier2(xAccess->getByName("Object2"), uno::UNO_QUERY); + uno::Reference xObj2(xEOSupplier2->getEmbeddedObject()); + uno::Reference xEOSupplier3(xAccess->getByName("Object3"), uno::UNO_QUERY); + uno::Reference xObj3(xEOSupplier3->getEmbeddedObject()); + uno::Reference xEOSupplier4(xAccess->getByName("Object4"), uno::UNO_QUERY); + uno::Reference xObj4(xEOSupplier4->getEmbeddedObject()); + //checking first object + uno::Reference xSBDoc1(xObj1, uno::UNO_QUERY); + uno::Reference xStorage1(xSBDoc1->getDocumentStorage()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper::OStorageHelper::GetXStorageFormat(xStorage1)); + //checking second object + uno::Reference xSBDoc2(xObj2, uno::UNO_QUERY); + uno::Reference xStorage2(xSBDoc2->getDocumentStorage()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper::OStorageHelper::GetXStorageFormat(xStorage2)); + //checking third object + uno::Reference xSBDoc3(xObj3, uno::UNO_QUERY); + uno::Reference xStorage3(xSBDoc3->getDocumentStorage()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper::OStorageHelper::GetXStorageFormat(xStorage3)); + //checking fourth object + uno::Reference xSBDoc4(xObj4, uno::UNO_QUERY); + uno::Reference xStorage4(xSBDoc4->getDocumentStorage()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper::OStorageHelper::GetXStorageFormat(xStorage4)); +} + +DECLARE_ODFEXPORT_TEST(testredlineTextFrame, "redlineTextFrame.odt") +{ + CPPUNIT_ASSERT_EQUAL(2, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + //Note this is for a crash test + //Counting the Number of Frames and checking with the expected count + uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); +} + +DECLARE_ODFEXPORT_TEST(testTdf131621, "tdf131621.ott") +{ + CPPUNIT_ASSERT_EQUAL(12, getShapes()); + //Crash test, Check number of pages + CPPUNIT_ASSERT_EQUAL( 1, getPages() ); +} + +DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // See ooxmlexport's testFdo38244(). + + // Test comment range feature. + uno::Reference xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference xParaEnum = xParaEnumAccess->createEnumeration(); + uno::Reference xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY); + uno::Reference xRunEnum = xRunEnumAccess->createEnumeration(); + xRunEnum->nextElement(); + uno::Reference xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Annotation"), getProperty(xPropertySet, "TextPortionType")); + xRunEnum->nextElement(); + xPropertySet.set(xRunEnum->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("AnnotationEnd"), getProperty(xPropertySet, "TextPortionType")); + + // Test properties + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("__Fieldmark__4_1833023242"), getProperty(xPropertySet, "Name")); + CPPUNIT_ASSERT_EQUAL(OUString("M"), getProperty(xPropertySet, "Initials")); +} + +DECLARE_ODFEXPORT_TEST(testSenderInitials, "sender-initials.fodt") +{ + // Test sender-initial properties (both annotation metadata and text field) + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + // first 3 are annotations, last 2 are text fields + for (unsigned i = 0; i < 3; ++i) + { + uno::Reference xPropertySet(xFields->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("I"), getProperty(xPropertySet, "Initials")); + } + for (unsigned i = 0; i < 2; ++i) + { + uno::Reference xPropertySet(xFields->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xPropertySet, "IsFixed")); + CPPUNIT_ASSERT_EQUAL(OUString("I"), getProperty(xPropertySet, "Content")); + } +} + +DECLARE_ODFEXPORT_TEST(testResolvedComment, "resolved-comment.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + uno::Reference xPropertySet(xFields->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xPropertySet, "Resolved")); + xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xPropertySet, "Resolved")); +} + +DECLARE_ODFEXPORT_TEST(testTdf92379, "tdf92379.fodt") +{ + // frame style fo:background-color was not imported + uno::Reference xStyles(getStyles("FrameStyles")); + uno::Reference xStyle(xStyles->getByName("encarts"), + uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffcc99), getProperty(xStyle, "BackColorRGB")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xStyle, "BackColorTransparency")); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xStyle, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffcc99), getProperty(xStyle, "FillColor")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty(xStyle, "FillTransparence")); + + uno::Reference xFrameStyle2(xStyles->getByName("Untitled1"), + uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty(xFrameStyle2, "BackColorRGB")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xFrameStyle2, "BackTransparent")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty(xFrameStyle2, "BackColorTransparency")); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty(xFrameStyle2, "FillStyle")); +// unfortunately this is actually the pool default value, which would be hard to fix - but it isn't a problem because style is NONE +// CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty(xFrameStyle2, "FillColor")); +// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty(xFrameStyle2, "FillTransparence")); + + if (xmlDocUniquePtr pXmlDoc = parseExport("styles.xml")) + { + // check that fo:background-color attribute is exported properly + assertXPath(pXmlDoc, "//style:style[@style:family='graphic' and @style:name='encarts']/style:graphic-properties[@fo:background-color='#ffcc99']", 1); + assertXPath(pXmlDoc, "//style:style[@style:family='graphic' and @style:name='Untitled1']/style:graphic-properties[@fo:background-color='transparent']", 1); + } + + // paragraph style fo:background-color was wrongly inherited despite being + // overridden in derived style + uno::Reference xParaStyles(getStyles("ParagraphStyles")); + uno::Reference xStyle1(xParaStyles->getByName( + "Titre Avis expert"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x661900), getProperty(xStyle1, "ParaBackColor")); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xStyle1, "ParaBackTransparent")); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xStyle1, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x661900), getProperty(xStyle1, "FillColor")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty(xStyle1, "FillTransparence")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty(xStyle1, "CharColor")); + + uno::Reference xStyle2(xParaStyles->getByName( + "Avis expert questions"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(COL_TRANSPARENT), getProperty(xStyle2, "ParaBackColor")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xStyle2, "ParaBackTransparent")); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty(xStyle2, "FillStyle")); +// unfortunately this is actually the pool default value, which would be hard to fix - but it isn't a problem because style is NONE +// CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty(xStyle2, "FillColor")); +// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty(xStyle2, "FillTransparence")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x661900), getProperty(xStyle2, "CharColor")); + + uno::Reference xStyle31(xParaStyles->getByName( + "avis expert questions non cadres"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x801900), getProperty(xStyle31, "ParaBackColor")); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xStyle31, "ParaBackTransparent")); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xStyle31, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x801900), getProperty(xStyle31, "FillColor")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty(xStyle31, "FillTransparence")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x661900), getProperty(xStyle31, "CharColor")); + + uno::Reference xStyle32(xParaStyles->getByName( + "Avis expert rXponses"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(COL_TRANSPARENT), getProperty(xStyle32, "ParaBackColor")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xStyle32, "ParaBackTransparent")); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty(xStyle32, "FillStyle")); +// unfortunately this is actually the pool default value, which would be hard to fix - but it isn't a problem because style is NONE +// CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty(xStyle32, "FillColor")); +// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty(xStyle32, "FillTransparence")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x461900), getProperty(xStyle32, "CharColor")); + + if (xmlDocUniquePtr pXmlDoc = parseExport("styles.xml")) + { + // check that fo:background-color attribute is exported properly + assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Titre Avis expert']/style:paragraph-properties[@fo:background-color='#661900']", 1); + assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Avis expert questions']/style:paragraph-properties[@fo:background-color='transparent']", 1); + assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='avis expert questions non cadres']/style:paragraph-properties[@fo:background-color='#801900']", 1); + assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Avis expert rXponses']/style:paragraph-properties[@fo:background-color='transparent']", 1); + } +} + +DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // the boolean properties of the index were not exported properly + uno::Reference xIndexSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xIndexes = xIndexSupplier->getDocumentIndexes(); + uno::Reference xTOCIndex(xIndexes->getByIndex(0), uno::UNO_QUERY); + uno::Reference xTOCProps(xTOCIndex, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xTOCProps, "CreateFromOutline")); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xTOCProps, "CreateFromMarks")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xTOCProps, "CreateFromLevelParagraphStyles")); + // check that the source styles are preserved too while at it + uno::Reference xLevels( + getProperty< uno::Reference >(xTOCProps, + "LevelParagraphStyles")); + uno::Sequence seq { "Heading" }; + CPPUNIT_ASSERT_EQUAL(uno::makeAny(seq), xLevels->getByIndex(1)); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(uno::Sequence()), xLevels->getByIndex(2)); +} + +DECLARE_ODFEXPORT_TEST(testFirstHeaderFooter, "first-header-footer.odt") +{ + CPPUNIT_ASSERT_EQUAL(6, getPages()); + // Test import and export of the header-first token. + + // The document has 6 pages, two page styles for the first and second half of pages. + CPPUNIT_ASSERT_EQUAL(OUString("First header"), parseDump("/root/page[1]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("First footer"), parseDump("/root/page[1]/footer/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Left header"), parseDump("/root/page[2]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Left footer"), parseDump("/root/page[2]/footer/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Right header"), parseDump("/root/page[3]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Right footer"), parseDump("/root/page[3]/footer/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("First header2"), parseDump("/root/page[4]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("First footer2"), parseDump("/root/page[4]/footer/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Right header2"), parseDump("/root/page[5]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Right footer2"), parseDump("/root/page[5]/footer/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Left header2"), parseDump("/root/page[6]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Left footer2"), parseDump("/root/page[6]/footer/txt/text()")); +} + +DECLARE_ODFEXPORT_TEST(testTextframeGradient, "textframe-gradient.odt") +{ + CPPUNIT_ASSERT_EQUAL(2, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount()); + + uno::Reference xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty(xFrame, "FillStyle")); + awt::Gradient aGradient = getProperty(xFrame, "FillGradient"); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xC0504D), aGradient.StartColor); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xD99594), aGradient.EndColor); + CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style); + + xFrame.set(xIndexAccess->getByIndex(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty(xFrame, "FillStyle")); + aGradient = getProperty(xFrame, "FillGradient"); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x000000), aGradient.StartColor); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x666666), aGradient.EndColor); + CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style); +} + +DECLARE_ODFEXPORT_TEST(testDuplicateCrossRefHeadingBookmark, "CrossRefHeadingBookmark.fodt") +{ + // the file contains invalid duplicate heading cross reference bookmarks + // but we have to round trip them, tdf#94804 + + uno::Reference xBookmarksSupplier(mxComponent, + uno::UNO_QUERY); + uno::Reference xBookmarks = + xBookmarksSupplier->getBookmarks(); + uno::Reference xBookmark1( + xBookmarks->getByName("__RefHeading__8284_1826734303"), uno::UNO_QUERY); + CPPUNIT_ASSERT(xBookmark1.is()); + CPPUNIT_ASSERT_THROW(xBookmarks->getByName("__RefHeading__1673_25705824"), container::NoSuchElementException); + + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh(); + + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + uno::Any aField1 = xFields->nextElement(); + uno::Reference xField1(aField1, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("1.1"), xField1->getPresentation(false)); + uno::Any aField2 = xFields->nextElement(); + uno::Reference xField2(aField2, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("1.1"), xField2->getPresentation(false)); +} + +DECLARE_ODFEXPORT_TEST(testFdo60769, "fdo60769.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Test multi-paragraph comment range feature. + uno::Reference xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference xParaEnum = xParaEnumAccess->createEnumeration(); + uno::Reference xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY); + uno::Reference xRunEnum = xRunEnumAccess->createEnumeration(); + while (xRunEnum->hasMoreElements()) + { + uno::Reference xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY); + OUString aType = getProperty(xPropertySet, "TextPortionType"); + // First paragraph: no field end, no anchor + CPPUNIT_ASSERT(aType == "Text" || aType == "Annotation"); + } + + xRunEnumAccess.set(xParaEnum->nextElement(), uno::UNO_QUERY); + while (xRunEnum->hasMoreElements()) + { + uno::Reference xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY); + OUString aType = getProperty(xPropertySet, "TextPortionType"); + // Second paragraph: no field start + CPPUNIT_ASSERT(aType == "Text" || aType == "AnnotationEnd"); + } +} + +DECLARE_ODFEXPORT_TEST(testFdo58949, "fdo58949.docx") +{ + /* + * The problem was that the exporter didn't insert "Obj102" to the + * resulting zip file. No idea how to check for "broken" (missing OLE data + * and replacement image) OLE objects using UNO, so we'll check the zip file directly. + */ + + utl::TempFile aTempFile; + save("writer8", aTempFile); + + uno::Sequence aArgs(1); + aArgs[0] <<= aTempFile.GetURL(); + uno::Reference xNameAccess(m_xSFactory->createInstanceWithArguments("com.sun.star.packages.zip.ZipFileAccess", aArgs), uno::UNO_QUERY); + const css::uno::Sequence aNames(xNameAccess->getElementNames()); + // The exported document must have three objects named ObjNNN. The names are assigned in + // OLEHandler::copyOLEOStream using a static counter, and actual numbers depend on previous + // tests; so just count the matching names here. + int nMatches = 0; + for (const OUString& sName : aNames) + { + OUString sRest; + if (sName.startsWith("Obj", &sRest)) + { + // all following characters must be decimal digits; minimal value is 100 + bool bMatch = sRest.getLength() >= 3 + && std::all_of(sRest.getStr(), sRest.getStr() + sRest.getLength(), + [](sal_Unicode ch) { return ch >= '0' && ch <= '9'; }); + if (bMatch) + ++nMatches; + } + } + CPPUNIT_ASSERT_EQUAL(3, nMatches); +} + +DECLARE_ODFEXPORT_TEST(testStylePageNumber, "ooo321_stylepagenumber.odt") +{ + CPPUNIT_ASSERT_EQUAL(5, getPages()); + uno::Reference xTable1(getParagraphOrTable(1)); +// actually no break attribute is written in this case +// CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty(xTable1, "BreakType")); + CPPUNIT_ASSERT_EQUAL(OUString("Left Page"), getProperty(xTable1, "PageDescName")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty(xTable1, "PageNumberOffset")); + + uno::Reference xPara1(getParagraphOrTable(2)); + CPPUNIT_ASSERT_EQUAL(OUString("Right Page"), getProperty(xPara1, "PageDescName")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty(xPara1, "PageNumberOffset")); + + // i#114163 tdf#77111: OOo < 3.3 bug, it wrote "auto" as "0" for tables + uno::Reference xTable0(getParagraphOrTable(3), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Left Page"), getProperty(xTable0, "PageDescName")); + CPPUNIT_ASSERT_EQUAL(uno::Any(), xTable0->getPropertyValue("PageNumberOffset")); + + uno::Reference xPara0(getParagraphOrTable(4), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Right Page"), getProperty(xPara0, "PageDescName")); + CPPUNIT_ASSERT_EQUAL(uno::Any(), xPara0->getPropertyValue("PageNumberOffset")); + + uno::Reference xParaStyles = getStyles("ParagraphStyles"); + uno::Reference xStyle1(xParaStyles->getByName("stylewithbreak1"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Right Page"), getProperty(xStyle1, "PageDescName")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty(xStyle1, "PageNumberOffset")); + + uno::Reference xStyle0(xParaStyles->getByName("stylewithbreak0"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("First Page"), getProperty(xStyle0, "PageDescName")); + CPPUNIT_ASSERT_EQUAL(uno::Any(), xStyle0->getPropertyValue("PageNumberOffset")); +} + +DECLARE_ODFEXPORT_TEST(testCharacterBorder, "charborder.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Make sure paragraph and character attributes don't interfere + // First paragraph has a paragraph border and a character border included by the paragraph style + + // Paragraph border of first paragraph + { + const table::BorderLine2 aFirstParTopBorder(0x6666FF,2,26,26,7,55); + const sal_Int32 aFirstParTopPadding(150); + uno::Reference xSet(getParagraph(1), uno::UNO_QUERY); + + // Top border + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"TopBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"TopBorderDistance")); + + // Bottom border (same as top border) + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"BottomBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"BottomBorderDistance")); + + // Left border (same as top border) + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"LeftBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"LeftBorderDistance")); + + // Right border (same as top border) + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty(xSet,"RightBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty(xSet,"RightBorderDistance")); + + // Shadow + const table::ShadowFormat aShadow = getProperty(xSet,"ParaShadowFormat"); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aShadow.Color); + CPPUNIT_ASSERT_EQUAL(false, static_cast(aShadow.IsTransparent)); + CPPUNIT_ASSERT_EQUAL(table::ShadowLocation(0), aShadow.Location); + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aShadow.ShadowWidth); + } + + // Character border for first paragraph + { + const table::BorderLine2 aFirstParCharTopBorder(0xFF3333,0,37,0,2,37); + const sal_Int32 aFirstParCharTopPadding(450); + uno::Reference xSet(getParagraph(1), uno::UNO_QUERY); + + // Top border + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharTopBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharTopBorderDistance")); + + // Bottom border (same as top border) + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharBottomBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharBottomBorderDistance")); + + // Left border (same as top border) + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharLeftBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharLeftBorderDistance")); + + // Right border (same as top border) + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharRightBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharRightBorderDistance")); + + // Shadow + const table::ShadowFormat aShadow = getProperty(xSet,"CharShadowFormat"); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFF3333), aShadow.Color); + CPPUNIT_ASSERT_EQUAL(false, static_cast(aShadow.IsTransparent)); + CPPUNIT_ASSERT_EQUAL(table::ShadowLocation(2), aShadow.Location); + CPPUNIT_ASSERT_EQUAL(sal_Int16(280), aShadow.ShadowWidth); + + // Check autostyle + { + uno::Reference< style::XAutoStyleFamily > xAutoStyleFamily(getAutoStyles("ParagraphStyles")); + uno::Reference < container::XEnumeration > xAutoStylesEnum( xAutoStyleFamily->createEnumeration() ); + CPPUNIT_ASSERT_EQUAL(true, static_cast(xAutoStylesEnum->hasMoreElements())); + + // First paragraph autostyle + uno::Reference < beans::XPropertySet > xPSet( xAutoStylesEnum->nextElement(), uno::UNO_QUERY ); + + // Top border + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharTopBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharTopBorderDistance")); + + // Bottom border + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharBottomBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharBottomBorderDistance")); + + // Left border + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharLeftBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharLeftBorderDistance")); + + // Right border + CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, getProperty(xSet,"CharRightBorder")); + CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty(xSet,"CharRightBorderDistance")); + } + } + + // Second paragraph's second text portion has a character style named CharDiffBor + // This style includes border with different sides + { + + table::BorderLine2 aBorderArray[4] = + { + table::BorderLine2(0xFF3333,0,37,0,14,37), // Top (fine dashed line) + table::BorderLine2(0x99FF66,26,26,53,11,106), // Bottom + table::BorderLine2(0x6666FF,9,26,9,12,71), // Left + table::BorderLine2(0,0,0,0,0,0) // Right + }; + + sal_Int32 aDistances[4] = { 400 /*Top*/, 300 /*Bottom*/, 250 /*Left*/, 0 /*Right*/ }; + + // Get second text portion of second paragraph + uno::Reference < beans::XPropertySet > xSet( getRun(getParagraph(2),2), uno::UNO_QUERY ); + + // Top border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[0], getProperty(xSet,"CharTopBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[0], getProperty(xSet,"CharTopBorderDistance")); + + // Bottom border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[1], getProperty(xSet,"CharBottomBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[1], getProperty(xSet,"CharBottomBorderDistance")); + + // Left border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[2], getProperty(xSet,"CharLeftBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[2], getProperty(xSet,"CharLeftBorderDistance")); + + // Right border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[3], getProperty(xSet,"CharRightBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[3], getProperty(xSet,"CharRightBorderDistance")); + + // Shadow + const table::ShadowFormat aShadow = getProperty(xSet,"CharShadowFormat"); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aShadow.Color); + CPPUNIT_ASSERT_EQUAL(false, static_cast(aShadow.IsTransparent)); + CPPUNIT_ASSERT_EQUAL(table::ShadowLocation(3), aShadow.Location); + CPPUNIT_ASSERT_EQUAL(sal_Int16(79), aShadow.ShadowWidth); + + // Check character style + { + uno::Reference< container::XNameAccess > xStyleFamily = getStyles("CharacterStyles"); + uno::Reference < beans::XPropertySet > xStyleSet(xStyleFamily->getByName("CharDiffBor"), uno::UNO_QUERY); + + // Top border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[0], getProperty(xStyleSet,"CharTopBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[0], getProperty(xStyleSet,"CharTopBorderDistance")); + + // Bottom border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[1], getProperty(xStyleSet,"CharBottomBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[1], getProperty(xStyleSet,"CharBottomBorderDistance")); + + // Left border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[2], getProperty(xStyleSet,"CharLeftBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[2], getProperty(xStyleSet,"CharLeftBorderDistance")); + + // Right border + CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[3], getProperty(xStyleSet,"CharRightBorder")); + CPPUNIT_ASSERT_EQUAL(aDistances[3], getProperty(xStyleSet,"CharRightBorderDistance")); + } + } +} + +DECLARE_ODFEXPORT_TEST(testProtectionKey, "protection-key.fodt") +{ + OUString const password("1012345678901234567890123456789012345678901234567890"); + + // check 1 invalid OOo legacy password and 3 valid ODF 1.2 passwords + uno::Reference xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); + uno::Reference xSect0(xSections->getByIndex(0), uno::UNO_QUERY); + uno::Sequence const key0(getProperty>(xSect0, "ProtectionKey")); + CPPUNIT_ASSERT(SvPasswordHelper::CompareHashPassword(key0, password)); + uno::Reference xSect1(xSections->getByIndex(1), uno::UNO_QUERY); + uno::Sequence const key1(getProperty>(xSect1, "ProtectionKey")); + CPPUNIT_ASSERT(SvPasswordHelper::CompareHashPassword(key1, password)); + uno::Reference xSect2(xSections->getByIndex(2), uno::UNO_QUERY); + uno::Sequence const key2(getProperty>(xSect1, "ProtectionKey")); + CPPUNIT_ASSERT(SvPasswordHelper::CompareHashPassword(key2, password)); + uno::Reference xSect3(xSections->getByIndex(3), uno::UNO_QUERY); + uno::Sequence const key3(getProperty>(xSect1, "ProtectionKey")); + CPPUNIT_ASSERT(SvPasswordHelper::CompareHashPassword(key3, password)); + + // we can't assume that the user entered the password; check that we + // round-trip the password as-is + if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml")) + { + assertXPath(pXmlDoc, "//text:section[@text:name='Section0' and @text:protected='true' and @text:protection-key='vbnhxyBKtPHCA1wB21zG1Oha8ZA=']"); + assertXPath(pXmlDoc, "//text:section[@text:name='Section1' and @text:protected='true' and @text:protection-key='nLHas0RIwepGDaH4c2hpyIUvIS8=']"); + assertXPath(pXmlDoc, "//text:section[@text:name='Section2' and @text:protected='true' and @text:protection-key-digest-algorithm='http://www.w3.org/2000/09/xmldsig#sha256' and @text:protection-key='1tnJohagR2T0yF/v69hLPuumSTsj32CumW97nkKGuSQ=']"); + assertXPath(pXmlDoc, "//text:section[@text:name='Section3' and @text:protected='true' and @text:protection-key-digest-algorithm='http://www.w3.org/2000/09/xmldsig#sha256' and @text:protection-key='1tnJohagR2T0yF/v69hLPuumSTsj32CumW97nkKGuSQ=']"); + } +} + +DECLARE_ODFEXPORT_TEST(testTdf128188, "footnote-collect-at-end-of-section.fodt") +{ + SwDoc *const pDoc = dynamic_cast(mxComponent.get())->GetDocShell()->GetDoc(); + CPPUNIT_ASSERT(pDoc); + SwFootnoteIdxs const& rFootnotes(pDoc->GetFootnoteIdxs()); + // Section1 + CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnotes[0]->GetFootnote().GetNumber()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnotes[0]->GetFootnote().GetNumberRLHidden()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnotes[1]->GetFootnote().GetNumber()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnotes[1]->GetFootnote().GetNumberRLHidden()); + // Section2 + CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnotes[2]->GetFootnote().GetNumber()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnotes[2]->GetFootnote().GetNumberRLHidden()); + // deleted + CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnotes[3]->GetFootnote().GetNumber()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnotes[3]->GetFootnote().GetNumberRLHidden()); + // deleted + CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rFootnotes[4]->GetFootnote().GetNumber()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnotes[4]->GetFootnote().GetNumberRLHidden()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), rFootnotes[5]->GetFootnote().GetNumber()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnotes[5]->GetFootnote().GetNumberRLHidden()); +} + +DECLARE_ODFEXPORT_TEST(testFdo43807, "fdo43807.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xSet(getParagraph(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Drop Caps"),getProperty(xSet,"DropCapCharStyleName")); + + xSet.set(getParagraph(2), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("User Defined Drop Caps"),getProperty(xSet,"DropCapCharStyleName")); +} + +DECLARE_ODFEXPORT_TEST(testTdf103091, "tdf103091.fodt") +{ + // check that all conditional paragraph style conditions are imported + uno::Reference xParaStyles(getStyles("ParagraphStyles")); + uno::Reference xStyle1(xParaStyles->getByName( + "Conditional"), uno::UNO_QUERY); + auto conditions(getProperty>(xStyle1, "ParaStyleConditions")); + + CPPUNIT_ASSERT_EQUAL(sal_Int32(28), conditions.getLength()); + CPPUNIT_ASSERT_EQUAL(OUString("TableHeader"), conditions[0].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Addressee")), conditions[0].Value); + CPPUNIT_ASSERT_EQUAL(OUString("Table"), conditions[1].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Bibliography 1")), conditions[1].Value); + CPPUNIT_ASSERT_EQUAL(OUString("Frame"), conditions[2].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Bibliography Heading")), conditions[2].Value); + CPPUNIT_ASSERT_EQUAL(OUString("Section"), conditions[3].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Caption")), conditions[3].Value); + CPPUNIT_ASSERT_EQUAL(OUString("Footnote"), conditions[4].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Salutation")), conditions[4].Value); + CPPUNIT_ASSERT_EQUAL(OUString("Endnote"), conditions[5].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 1")), conditions[5].Value); + CPPUNIT_ASSERT_EQUAL(OUString("Header"), conditions[6].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 2")), conditions[6].Value); + CPPUNIT_ASSERT_EQUAL(OUString("Footer"), conditions[7].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 3")), conditions[7].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel1"), conditions[8].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 4")), conditions[8].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel2"), conditions[9].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 5")), conditions[9].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel3"), conditions[10].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 6")), conditions[10].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel4"), conditions[11].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 7")), conditions[11].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel5"), conditions[12].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 8")), conditions[12].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel6"), conditions[13].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 9")), conditions[13].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel7"), conditions[14].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 10")), conditions[14].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel8"), conditions[15].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents Heading")), conditions[15].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel9"), conditions[16].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Standard")), conditions[16].Value); + CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel10"), conditions[17].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Drawing")), conditions[17].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel1"), conditions[18].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Endnote")), conditions[18].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel2"), conditions[19].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("First line indent")), conditions[19].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel3"), conditions[20].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footer")), conditions[20].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel4"), conditions[21].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footer left")), conditions[21].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel5"), conditions[22].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footer right")), conditions[22].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel6"), conditions[23].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footnote")), conditions[23].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel7"), conditions[24].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Frame contents")), conditions[24].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel8"), conditions[25].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Hanging indent")), conditions[25].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel9"), conditions[26].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Header")), conditions[26].Value); + CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel10"), conditions[27].Name); + CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Header left")), conditions[27].Value); +} + +DECLARE_ODFEXPORT_TEST(testTextframeTransparentShadow, "textframe-transparent-shadow.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xPicture = getShape(1); + // ODF stores opacity of 75%, that means 25% transparency. + CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty(xPicture, "ShadowTransparence")); +} + +DECLARE_ODFEXPORT_TEST(testRelhPage, "relh-page.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xTextFrame = getShape(1); + // This was text::RelOrientation::FRAME (the default), RelativeHeightRelation was not handled in xmloff. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty(xTextFrame, "RelativeHeightRelation")); + // Make sure rel-height-rel doesn't affect width. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty(xTextFrame, "RelativeWidthRelation")); + + // This was 2601, 20% height was relative from margin, not page. + CPPUNIT_ASSERT_EQUAL(sal_Int32(3168), parseDump("/root/page/body/txt/anchored/fly/infos/bounds", "height").toInt32()); +} + +DECLARE_ODFEXPORT_TEST(testRelhPageTdf80282, "relh-page-tdf80282.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xTextFrame = getShape(1); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Height", sal_Int32(8391), parseDump("//anchored/fly/infos/bounds", "height").toInt32()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Width", sal_Int32(5953), parseDump("//anchored/fly/infos/bounds", "width").toInt32()); +} + +DECLARE_ODFEXPORT_TEST(testRelwPage, "relw-page.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xTextFrame = getShape(1); + // This was text::RelOrientation::FRAME (the default), RelativeWidthRelation was not handled in xmloff. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty(xTextFrame, "RelativeWidthRelation")); + // Make sure rel-width-rel doesn't affect height. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty(xTextFrame, "RelativeHeightRelation")); + + // This was 3762, 40% width was relative from margin, not page. + CPPUNIT_ASSERT_EQUAL(sal_Int32(4896), parseDump("/root/page/body/txt/anchored/fly/infos/bounds", "width").toInt32()); +} + +DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt") +{ + CPPUNIT_ASSERT_EQUAL(3, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Test import/export of new frame attribute called TextVerticalAdjust + + // 1st frame's context is adjusted to the top + uno::Reference xFrame(getTextFrameByName("Rectangle 1"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_TOP, getProperty(xFrame, "TextVerticalAdjust")); + // 2nd frame's context is adjusted to the center + xFrame.set(getTextFrameByName("Rectangle 2"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_CENTER, getProperty(xFrame, "TextVerticalAdjust")); + // 3rd frame's context is adjusted to the bottom + xFrame.set(getTextFrameByName("Rectangle 3"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty(xFrame, "TextVerticalAdjust")); +} + +DECLARE_ODFEXPORT_TEST(testTdf111891_frameVertStyle, "tdf111891_frameVertStyle.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xFrame(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty(xFrame, "TextVerticalAdjust")); +} + +DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape = getShape(1); + // These were all 0, as style:rel-width/height was ignored on import for shapes. + CPPUNIT_ASSERT_EQUAL(sal_Int16(40), getProperty(xShape, "RelativeWidth")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(20), getProperty(xShape, "RelativeHeight")); + + // Relation was "page" for both width and height, should be "paragraph" for width. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty(xShape, "RelativeWidthRelation")); + // And make sure that height stays "page". + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty(xShape, "RelativeHeightRelation")); +} + +DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape = getShape(1); + comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence >(xShape, "CustomShapeGeometry")); + + // Test that the shape is a rounded rectangle. + CPPUNIT_ASSERT_EQUAL(OUString("round-rectangle"), aCustomShapeGeometry["Type"].get()); + + // The shape text should start with a table, with "a" in its A1 cell. + uno::Reference xText = uno::Reference(xShape, uno::UNO_QUERY_THROW)->getText(); + uno::Reference xTable(getParagraphOrTable(1, xText), uno::UNO_QUERY); + uno::Reference xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("a"), xCell->getString()); + + // Table inside a textbox should be in the extension namespace. + if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml")) + // This failed, as draw:custom-shape had a table:table child. + assertXPath(pXmlDoc, "//draw:custom-shape/loext:table", "name", "Table1"); +} + +// test that import whitespace collapsing is compatible with old docs +DECLARE_ODFEXPORT_TEST(testWhitespace, "whitespace.odt") +{ + CPPUNIT_ASSERT_EQUAL(4, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xPara; + uno::Reference xPortions; + uno::Reference xPortion; + xPara.set(getParagraphOrTable(1), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(2), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("http://example.com/"), getProperty(xPortion, "HyperLinkURL")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(3), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Ruby"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(), xPortion->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("foo"), getProperty(xPortion, "RubyText")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Ruby"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(4), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("InContentMetadata"), getProperty(xPortion, "TextPortionType")); + { + // what a stupid idea to require recursively enumerating this + uno::Reference xMeta( + getProperty>(xPortion, "InContentMetadata"), uno::UNO_QUERY); + uno::Reference xMetaPortions = + xMeta->createEnumeration(); + uno::Reference xMP(xMetaPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xMP, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xMP->getString()); + CPPUNIT_ASSERT(!xMetaPortions->hasMoreElements()); + } + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(5), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty(xPortion, "TextPortionType")); + { + // what a stupid idea to require recursively enumerating this + uno::Reference xMeta( + getProperty>(xPortion, "TextField"), uno::UNO_QUERY); + uno::Reference xMetaPortions = + xMeta->createEnumeration(); + uno::Reference xMP(xMetaPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xMP, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xMP->getString()); + CPPUNIT_ASSERT(!xMetaPortions->hasMoreElements()); + } + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(7), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Frame"), getProperty(xPortion, "TextPortionType")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(8), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Frame"), getProperty(xPortion, "TextPortionType")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(9), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Frame"), getProperty(xPortion, "TextPortionType")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(10), uno::UNO_QUERY); + uno::Reference xCEA(xPara, uno::UNO_QUERY); + uno::Reference xFrames( + xCEA->createContentEnumeration("com.sun.star.text.TextContent")); + xFrames->nextElement(); // one at-paragraph frame + CPPUNIT_ASSERT(!xFrames->hasMoreElements()); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(11), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Footnote"), getProperty(xPortion, "TextPortionType")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(12), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty(xPortion, "TextPortionType")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(13), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Annotation"), getProperty(xPortion, "TextPortionType")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("AnnotationEnd"), getProperty(xPortion, "TextPortionType")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(15), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Bookmark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(16), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Bookmark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Bookmark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(17), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Redline"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Redline"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(18), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Redline"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Redline"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(19), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("ReferenceMark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(20), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("ReferenceMark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("ReferenceMark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(21), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("DocumentIndexMark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); + + xPara.set(getParagraphOrTable(22), uno::UNO_QUERY); + xPortions.set(xPara->createEnumeration()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString("X "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("DocumentIndexMark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" "), xPortion->getString()); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("DocumentIndexMark"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT(!getProperty(xPortion, "IsCollapsed")); + xPortion.set(xPortions->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty(xPortion, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(OUString(" X"), xPortion->getString()); + CPPUNIT_ASSERT(!xPortions->hasMoreElements()); +} + +DECLARE_ODFEXPORT_TEST(testBtlrCell, "btlr-cell.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Without the accompanying fix in place, this test would have failed, as + // the btlr text direction in the A1 cell was lost on ODF import and + // export. + uno::Reference xSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xTables = xSupplier->getTextTables(); + uno::Reference xTable(xTables->getByName("Table1"), uno::UNO_QUERY); + uno::Reference xA1(xTable->getCellByName("A1"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, getProperty(xA1, "WritingMode")); + + uno::Reference xB1(xTable->getCellByName("B1"), uno::UNO_QUERY); + auto nActual = getProperty(xB1, "WritingMode"); + CPPUNIT_ASSERT(nActual == text::WritingMode2::LR_TB || nActual == text::WritingMode2::CONTEXT); + + uno::Reference xC1(xTable->getCellByName("C1"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, getProperty(xC1, "WritingMode")); +} + +DECLARE_ODFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Without the accompanying fix in place, this test would have failed, as + // the btlr text direction in the text frame was lost on ODF import and + // export. + uno::Reference xTextFrame(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xTextFrame.is()); + + auto nActual = getProperty(xTextFrame, "WritingMode"); + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, nActual); + + // Without the accompanying fix in place, this test would have failed, as the fly frame had + // mbVertical==true, but mbVertLRBT==false, even if the writing direction in the doc model was + // btlr. + SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); + CPPUNIT_ASSERT(pDoc); + + SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + CPPUNIT_ASSERT(pLayout); + + SwFrame* pPageFrame = pLayout->GetLower(); + CPPUNIT_ASSERT(pPageFrame); + CPPUNIT_ASSERT(pPageFrame->IsPageFrame()); + + SwFrame* pBodyFrame = pPageFrame->GetLower(); + CPPUNIT_ASSERT(pBodyFrame); + CPPUNIT_ASSERT(pBodyFrame->IsBodyFrame()); + + SwFrame* pBodyTextFrame = pBodyFrame->GetLower(); + CPPUNIT_ASSERT(pBodyTextFrame); + CPPUNIT_ASSERT(pBodyTextFrame->IsTextFrame()); + + CPPUNIT_ASSERT(pBodyTextFrame->GetDrawObjs()); + const SwSortedObjs& rAnchored = *pBodyTextFrame->GetDrawObjs(); + CPPUNIT_ASSERT_EQUAL(static_cast(1), rAnchored.size()); + + auto* pFlyFrame = dynamic_cast(rAnchored[0]); + CPPUNIT_ASSERT(pFlyFrame); + CPPUNIT_ASSERT(pFlyFrame->IsVertLRBT()); + + if (!mbExported) + // Not yet exported, don't modify the doc model for test purposes. + return; + + // Make sure that btlr -> tbrl transition clears the "BT" flag. + xTextFrame->setPropertyValue("WritingMode", uno::makeAny(text::WritingMode2::TB_LR)); + pFlyFrame = dynamic_cast(rAnchored[0]); + CPPUNIT_ASSERT(pFlyFrame); + CPPUNIT_ASSERT(!pFlyFrame->IsVertLRBT()); +} + +DECLARE_ODFEXPORT_TEST(testFdo86963, "fdo86963.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Export of this document failed with beans::UnknownPropertyException. + CPPUNIT_ASSERT_EQUAL(1, getShapes()); +} + +// Check for correct header/footer with special first page with TOC inside: +// - DECLARE_ODFEXPORT_TEST(testTdf118393, "tdf118393.odt") +// - DECLARE_OOXMLEXPORT_TEST(testTdf118393, "tdf118393.odt") +DECLARE_ODFEXPORT_TEST(testTdf118393, "tdf118393.odt") +{ + CPPUNIT_ASSERT_EQUAL( 7, getPages() ); + + // First page has no header/footer + { + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + + // check first page + xmlXPathObjectPtr pXmlPage1Header = getXPathNode(pXmlDoc, "/root/page[1]/header"); + CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlPage1Header->nodesetval)); + + xmlXPathObjectPtr pXmlPage1Footer = getXPathNode(pXmlDoc, "/root/page[1]/footer"); + CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlPage1Footer->nodesetval)); + + // check second page in the same way + xmlXPathObjectPtr pXmlPage2Header = getXPathNode(pXmlDoc, "/root/page[2]/header"); + CPPUNIT_ASSERT_EQUAL(1, xmlXPathNodeSetGetLength(pXmlPage2Header->nodesetval)); + + xmlXPathObjectPtr pXmlPage2Footer = getXPathNode(pXmlDoc, "/root/page[2]/footer"); + CPPUNIT_ASSERT_EQUAL(1, xmlXPathNodeSetGetLength(pXmlPage2Footer->nodesetval)); + } + + // All other pages should have header/footer + + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[2]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[2]/footer/txt/text()")); + + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[3]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[3]/footer/txt/text()")); + + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[4]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[4]/footer/txt/text()")); + + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[5]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[5]/footer/txt/text()")); + + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[6]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[6]/footer/txt/text()")); + + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[7]/header/txt/text()")); + CPPUNIT_ASSERT_EQUAL(OUString("Seite * von *"), parseDump("/root/page[7]/footer/txt/text()")); +} + +DECLARE_ODFEXPORT_TEST(testGerrit13858, "gerrit13858.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Just make sure the output is valid. +} +DECLARE_ODFEXPORT_TEST(testOdtBorderTypes, "border_types.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + static const sal_Int32 lineStyles[] = { 0, 1, 2, 14, 16, 17, 3, 15 }; + uno::Reference textDocument(mxComponent, uno::UNO_QUERY); + uno::Reference xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY); + // list of paragraphs + uno::Reference xParaEnum = xParaEnumAccess->createEnumeration(); + do + { + uno::Reference xServiceInfo; + if (xParaEnum->nextElement() >>= xServiceInfo) + { + if (xServiceInfo->supportsService("com.sun.star.text.TextTable")) + { + uno::Reference const xCellRange(xServiceInfo, uno::UNO_QUERY_THROW); + + for (sal_Int32 row = 0; row < 15; row += 2) + { + uno::Reference xCell = xCellRange->getCellByPosition(1, row); + uno::Reference< beans::XPropertySet > xPropSet(xCell, uno::UNO_QUERY_THROW); + + uno::Any aTopBorder = xPropSet->getPropertyValue("TopBorder"); + table::BorderLine2 aTopBorderLine; + if (aTopBorder >>= aTopBorderLine) + { + sal_Int32 lineStyle = aTopBorderLine.LineStyle; + CPPUNIT_ASSERT_EQUAL(lineStyles[row / 2], lineStyle); + } + } //end of the 'for' loop + } + } + } while (xParaEnum->hasMoreElements()); +} + +DECLARE_ODFEXPORT_TEST(testMasterPageWithDrawingPage, "sw_hatch.odt") +{ + uno::Reference xStyles(getStyles("PageStyles")); + uno::Reference xStyle(xStyles->getByName("Standard"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty(xStyle, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(OUString("Blue -45 Degrees"), getProperty(xStyle, "FillHatchName")); + CPPUNIT_ASSERT(!getProperty(xStyle, "FillBackground")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty(xStyle, "FillTransparence")); +} + +DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xTable(getParagraphOrTable(1), uno::UNO_QUERY); + uno::Reference const xCellA1(xTable->getCellByName("A1"), uno::UNO_SET_THROW); + uno::Reference const xCellB1(xTable->getCellByName("B1"), uno::UNO_SET_THROW); + uno::Reference const xCellC1(xTable->getCellByName("C1"), uno::UNO_SET_THROW); + getUserDefineAttribute(uno::makeAny(xCellA1), "proName", "v1"); + getUserDefineAttribute(uno::makeAny(xCellB1), "proName", "v2"); + getUserDefineAttribute(uno::makeAny(xCellC1), "proName", "v3"); +} + +#if HAVE_FEATURE_PDFIUM +DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape = getShape(1); + // This failed, pdf+png replacement graphics pair didn't survive an ODT roundtrip. + auto xReplacementGraphic = getProperty>(xShape, "ReplacementGraphic"); + CPPUNIT_ASSERT(xReplacementGraphic.is()); + + auto xGraphic = getProperty>(xShape, "Graphic"); + CPPUNIT_ASSERT(xGraphic.is()); + // This was image/x-vclgraphic, not exposing the info that the image is a PDF one. + CPPUNIT_ASSERT_EQUAL(OUString("application/pdf"), getProperty(xGraphic, "MimeType")); + + if (mbExported) + { + uno::Sequence aArgs(1); + aArgs[0] <<= maTempFile.GetURL(); + uno::Reference xNameAccess(m_xSFactory->createInstanceWithArguments("com.sun.star.packages.zip.ZipFileAccess", aArgs), uno::UNO_QUERY); + bool bHasBitmap = false; + const uno::Sequence aNames = xNameAccess->getElementNames(); + for (const auto& rElementName : aNames) + { + if (rElementName.startsWith("Pictures") && rElementName.endsWith("png")) + { + bHasBitmap = true; + break; + } + } + // This failed, replacement was an svm file. + CPPUNIT_ASSERT(bHasBitmap); + } +} +#endif + +DECLARE_ODFEXPORT_TEST(testTableStyles1, "table_styles_1.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Table styles basic graphic test. + // Doesn't cover all attributes. + uno::Reference XFamiliesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFamilies(XFamiliesSupplier->getStyleFamilies()); + uno::Reference xCellFamily(xFamilies->getByName("CellStyles"), uno::UNO_QUERY); + uno::Reference xCell1Style; + xCellFamily->getByName("Test style.1") >>= xCell1Style; + + sal_Int64 nInt64 = 0xF0F0F0; + sal_Int32 nInt32 = 0xF0F0F0; + table::BorderLine2 oBorder; + + xCell1Style->getPropertyValue("BackColor") >>= nInt64; + CPPUNIT_ASSERT_EQUAL(sal_Int64(0xCC0000), nInt64); + xCell1Style->getPropertyValue("WritingMode") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), nInt32); + xCell1Style->getPropertyValue("VertOrient") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nInt32); + xCell1Style->getPropertyValue("BorderDistance") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(97), nInt32); + xCell1Style->getPropertyValue("LeftBorderDistance") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(97), nInt32); + xCell1Style->getPropertyValue("RightBorderDistance") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(97), nInt32); + xCell1Style->getPropertyValue("TopBorderDistance") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(97), nInt32); + xCell1Style->getPropertyValue("BottomBorderDistance") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(97), nInt32); + xCell1Style->getPropertyValue("RightBorder") >>= oBorder; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), oBorder.Color); + xCell1Style->getPropertyValue("LeftBorder") >>= oBorder; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), oBorder.Color); + xCell1Style->getPropertyValue("TopBorder") >>= oBorder; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), oBorder.Color); + xCell1Style->getPropertyValue("BottomBorder") >>= oBorder; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), oBorder.Color); +} + +DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Table styles paragraph and char tests + // Doesn't cover all attributes. + // Problem: underline for table autoformat doesn't work. + uno::Reference XFamiliesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFamilies(XFamiliesSupplier->getStyleFamilies()); + uno::Reference xTableFamily(xFamilies->getByName("TableStyles"), uno::UNO_QUERY); + uno::Reference xTableStyle(xTableFamily->getByName("Test style2"), uno::UNO_QUERY); + uno::Reference xCell1Style; + + float fFloat = 0.; + bool bBool = true; + sal_Int16 nInt16 = 0xF0; + sal_Int32 nInt32 = 0xF0F0F0; + sal_Int64 nInt64 = 0xF0F0F0; + OUString sString; + awt::FontSlant eCharPosture; + + // cell 1 + xTableStyle->getByName("first-row-start-column") >>= xCell1Style; + xCell1Style->getPropertyValue("ParaAdjust") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nInt32); + xCell1Style->getPropertyValue("CharColor") >>= nInt64; + CPPUNIT_ASSERT_EQUAL(sal_Int64(0xFF6600), nInt64); + xCell1Style->getPropertyValue("CharContoured") >>= bBool; + CPPUNIT_ASSERT_EQUAL(false, bBool); + xCell1Style->getPropertyValue("CharShadowed") >>= bBool; + CPPUNIT_ASSERT_EQUAL(true, bBool); + xCell1Style->getPropertyValue("CharStrikeout") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nInt32); + xCell1Style->getPropertyValue("CharUnderline") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nInt32); + // underline color is not working for table autoformats + // xCell1Style->getPropertyValue("CharUnderlineHasColor") >>= bBool; + // CPPUNIT_ASSERT_EQUAL(bool(false), bBool); + // xCell1Style->getPropertyValue("CharUnderlineColor") >>= nInt64; + // CPPUNIT_ASSERT_EQUAL(sal_Int64(-1), nInt64); + // standard font + xCell1Style->getPropertyValue("CharHeight") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(18.), fFloat); + xCell1Style->getPropertyValue("CharWeight") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(100.), fFloat); + xCell1Style->getPropertyValue("CharPosture") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture); + xCell1Style->getPropertyValue("CharFontName") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Courier"), sString); + xCell1Style->getPropertyValue("CharFontStyleName") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString(), sString); + xCell1Style->getPropertyValue("CharFontFamily") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + xCell1Style->getPropertyValue("CharFontPitch") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nInt16); + // cjk font + xCell1Style->getPropertyValue("CharHeightAsian") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(18.), fFloat); + xCell1Style->getPropertyValue("CharWeightAsian") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(100.), fFloat); + xCell1Style->getPropertyValue("CharPostureAsian") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture); + xCell1Style->getPropertyValue("CharFontNameAsian") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Courier"), sString); + xCell1Style->getPropertyValue("CharFontStyleNameAsian") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Regularna"), sString); + xCell1Style->getPropertyValue("CharFontFamilyAsian") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + xCell1Style->getPropertyValue("CharFontPitchAsian") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nInt16); + // ctl font + xCell1Style->getPropertyValue("CharHeightComplex") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(18.), fFloat); + xCell1Style->getPropertyValue("CharWeightComplex") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(100.), fFloat); + xCell1Style->getPropertyValue("CharPostureComplex") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture); + xCell1Style->getPropertyValue("CharFontNameComplex") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Courier"), sString); + xCell1Style->getPropertyValue("CharFontStyleNameComplex") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Regularna"), sString); + xCell1Style->getPropertyValue("CharFontFamilyComplex") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + xCell1Style->getPropertyValue("CharFontPitchComplex") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nInt16); + + // cell 2 + xTableStyle->getByName("first-row") >>= xCell1Style; + xCell1Style->getPropertyValue("ParaAdjust") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), nInt32); + xCell1Style->getPropertyValue("CharColor") >>= nInt64; + CPPUNIT_ASSERT_EQUAL(sal_Int64(0x9900FF), nInt64); + xCell1Style->getPropertyValue("CharContoured") >>= bBool; + CPPUNIT_ASSERT_EQUAL(true, bBool); + xCell1Style->getPropertyValue("CharShadowed") >>= bBool; + CPPUNIT_ASSERT_EQUAL(false, bBool); + xCell1Style->getPropertyValue("CharStrikeout") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nInt32); + xCell1Style->getPropertyValue("CharUnderline") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), nInt32); + // underline color test place + // standard font + xCell1Style->getPropertyValue("CharHeight") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(12.), fFloat); + xCell1Style->getPropertyValue("CharWeight") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(150.), fFloat); + xCell1Style->getPropertyValue("CharPosture") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture); + xCell1Style->getPropertyValue("CharFontName") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sString); + xCell1Style->getPropertyValue("CharFontStyleName") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString(), sString); + xCell1Style->getPropertyValue("CharFontFamily") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(3), nInt16); + xCell1Style->getPropertyValue("CharFontPitch") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + // cjk font + xCell1Style->getPropertyValue("CharHeightAsian") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(12.), fFloat); + xCell1Style->getPropertyValue("CharWeightAsian") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(150.), fFloat); + xCell1Style->getPropertyValue("CharPostureAsian") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture); + xCell1Style->getPropertyValue("CharFontNameAsian") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sString); + xCell1Style->getPropertyValue("CharFontStyleNameAsian") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Pogrubiona"), sString); + xCell1Style->getPropertyValue("CharFontFamilyAsian") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(3), nInt16); + xCell1Style->getPropertyValue("CharFontPitchAsian") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + // ctl font + xCell1Style->getPropertyValue("CharHeightComplex") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(12.), fFloat); + xCell1Style->getPropertyValue("CharWeightComplex") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(150.), fFloat); + xCell1Style->getPropertyValue("CharPostureComplex") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture); + xCell1Style->getPropertyValue("CharFontNameComplex") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sString); + xCell1Style->getPropertyValue("CharFontStyleNameComplex") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Pogrubiona"), sString); + xCell1Style->getPropertyValue("CharFontFamilyComplex") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(3), nInt16); + xCell1Style->getPropertyValue("CharFontPitchComplex") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + + // cell 3 + xTableStyle->getByName("first-row-even-column") >>= xCell1Style; + xCell1Style->getPropertyValue("ParaAdjust") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nInt32); + xCell1Style->getPropertyValue("CharColor") >>= nInt64; + CPPUNIT_ASSERT_EQUAL(sal_Int64(0), nInt64); + xCell1Style->getPropertyValue("CharContoured") >>= bBool; + CPPUNIT_ASSERT_EQUAL(true, bBool); + xCell1Style->getPropertyValue("CharShadowed") >>= bBool; + CPPUNIT_ASSERT_EQUAL(true, bBool); + xCell1Style->getPropertyValue("CharStrikeout") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nInt32); + xCell1Style->getPropertyValue("CharUnderline") >>= nInt32; + CPPUNIT_ASSERT_EQUAL(sal_Int32(6), nInt32); + // underline color test place + // standard font + xCell1Style->getPropertyValue("CharHeight") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(12.), fFloat); + xCell1Style->getPropertyValue("CharWeight") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(100.), fFloat); + xCell1Style->getPropertyValue("CharPosture") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, eCharPosture); + xCell1Style->getPropertyValue("CharFontName") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Open Sans"), sString); + xCell1Style->getPropertyValue("CharFontStyleName") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString(), sString); + xCell1Style->getPropertyValue("CharFontFamily") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nInt16); + xCell1Style->getPropertyValue("CharFontPitch") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + // cjk font + xCell1Style->getPropertyValue("CharHeightAsian") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(12.), fFloat); + xCell1Style->getPropertyValue("CharWeightAsian") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(100.), fFloat); + xCell1Style->getPropertyValue("CharPostureAsian") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, eCharPosture); + xCell1Style->getPropertyValue("CharFontNameAsian") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Open Sans"), sString); + xCell1Style->getPropertyValue("CharFontStyleNameAsian") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Kursywa"), sString); + xCell1Style->getPropertyValue("CharFontFamilyAsian") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nInt16); + xCell1Style->getPropertyValue("CharFontPitchAsian") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); + // ctl font + xCell1Style->getPropertyValue("CharHeightComplex") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(12.), fFloat); + xCell1Style->getPropertyValue("CharWeightComplex") >>= fFloat; + CPPUNIT_ASSERT_EQUAL(float(100.), fFloat); + xCell1Style->getPropertyValue("CharPostureComplex") >>= eCharPosture; + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, eCharPosture); + xCell1Style->getPropertyValue("CharFontNameComplex") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Open Sans"), sString); + xCell1Style->getPropertyValue("CharFontStyleNameComplex") >>= sString; + CPPUNIT_ASSERT_EQUAL(OUString("Kursywa"), sString); + xCell1Style->getPropertyValue("CharFontFamilyComplex") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nInt16); + xCell1Style->getPropertyValue("CharFontPitchComplex") >>= nInt16; + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); +} + +DECLARE_ODFEXPORT_TEST(testTableStyles3, "table_styles_3.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // This test checks if default valued attributes aren't exported. + xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"); + if (!pXmlDoc) + return; + + // + // For this element the only exported attributes are: "border-left", "border-bottom" + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "background-color"); + // border-left place + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "border-right"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "border-top"); + // border-bottom place + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "padding"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "padding-left"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "padding-right"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "padding-top"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "padding-bottom"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:table-cell-properties", "writing-mode"); + + // should be absent, because it has only "text-align" attribute, which shouldn't be exported. + // Assume that style:paragraph-properties and style:text-properties exists. + assertXPathChildren(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']", 2); + + // + // For this element the only exported attributes are: "use-window-font-color place", "font-size-asian", "font-name-asian", "font-family-asian", "font-name-complex", "font-family-complex" + // use-window-font-color place + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "text-shadow"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "text-outline"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "text-line-through-style"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "text-line-through-type"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "text-underline-style"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "text-underline-color"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-size"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-weight"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-style"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-family"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-family-generic"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-pitch"); + // font-size-asian place + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-weight-asian"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-style-asian"); + // font-name-asian place + // font-family-asian place + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-style-name-asian"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-family-generic-asian"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-pitch-asian"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-size-complex"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-weight-complex"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-style-complex"); + // font-name-complex place + // font-family-complex place + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-style-name-complex"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-family-generic-complex"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style3.2']/style:text-properties", "font-pitch-complex"); + +} + +DECLARE_ODFIMPORT_TEST(testTableStyles4, "table_styles_4.odt") +{ + // Test if loaded styles overwrite existing styles + uno::Reference XFamiliesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xFamilies(XFamiliesSupplier->getStyleFamilies()); + uno::Reference xTableFamily(xFamilies->getByName("TableStyles"), uno::UNO_QUERY); + uno::Reference xTableStyle(xTableFamily->getByName("Green"), uno::UNO_QUERY); + uno::Reference xCell1Style; + + xTableStyle->getByName("first-row-start-column") >>= xCell1Style; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty(xCell1Style, "BackColor")); +} + +DECLARE_ODFEXPORT_TEST(testTableStyles5, "table_styles_5.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Test if cell styles doesn't have a style:parent-style-name attribute. + xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"); + if (!pXmlDoc) + return; + + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.1']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.2']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.3']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.4']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.5']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.6']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.7']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.8']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.9']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.10']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.11']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.12']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.13']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.14']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.15']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.16']", "parent-style-name"); + +} + +DECLARE_ODFEXPORT_TEST(testTdf101710, "tdf101710.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Test that number format of cell styles can be imported and exported. + uno::Reference xStyle(getStyles("CellStyles")->getByName("Test Style.11"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(10104), getProperty(xStyle, "NumberFormat")); +} + +DECLARE_ODFEXPORT_TEST(testTdf129568, "tdf129568.fodt") +{ + // Test that export doesn't fail, and that style is imported and in use. + uno::Reference xStyle(getStyles("CellStyles")->getByName("Default Style.1"), uno::UNO_QUERY); + CPPUNIT_ASSERT(xStyle->isInUse()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffff00), getProperty(xStyle, "BackColor")); +} + +DECLARE_ODFEXPORT_TEST(testTdf129568ui, "tdf129568-ui.fodt") +{ + // Same as above, but styles referenced by UI name. + uno::Reference xStyle(getStyles("CellStyles")->getByName("Default Style.1"), uno::UNO_QUERY); + CPPUNIT_ASSERT(xStyle->isInUse()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffff00), getProperty(xStyle, "BackColor")); +} + +DECLARE_ODFEXPORT_TEST(testTdf132642_keepWithNextTable, "tdf132642_keepWithNextTable.odt") +{ + // Since the row is very big, it should split over two pages. + // Since up to this point we haven't tried to make it match MS formats, it should start on page 1. + CPPUNIT_ASSERT_EQUAL_MESSAGE("Row splits over 2 pages", 2, getPages()); +} + +DECLARE_ODFEXPORT_TEST(testImageMimetype, "image-mimetype.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // Test that the loext:mimetype attribute is written for exported images, tdf#109202 + if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml")) + { + // Original image (svg) + assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p/draw:frame/draw:image[@draw:mime-type='image/svg+xml']"); + } +} + +DECLARE_ODFEXPORT_TEST(testEmbeddedFontProps, "embedded-font-props.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); +#if !defined(MACOSX) + // Test that font style/weight of embedded fonts is exposed. + // Test file is a normal ODT, except EmbedFonts is set to true in settings.xml. + if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml")) + { + // These failed, the attributes were missing. + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[1]", "font-style", "normal"); + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[1]", "font-weight", "normal"); + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[2]", "font-style", "normal"); + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[2]", "font-weight", "bold"); + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[3]", "font-style", "italic"); + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[3]", "font-weight", "normal"); + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[4]", "font-style", "italic"); + assertXPath(pXmlDoc, "//style:font-face[@style:name='Liberation Serif']/svg:font-face-src/svg:font-face-uri[4]", "font-weight", "bold"); + } +#endif +} + +DECLARE_ODFEXPORT_TEST(testTdf100492, "tdf100492.odt") +{ + CPPUNIT_ASSERT_EQUAL(2, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape = getShape(1); + CPPUNIT_ASSERT(xShape.is()); + + // Save the first shape to a SVG + uno::Reference xGraphicExporter = drawing::GraphicExportFilter::create(comphelper::getProcessComponentContext()); + uno::Reference xSourceDoc(xShape, uno::UNO_QUERY); + xGraphicExporter->setSourceDocument(xSourceDoc); + + SvMemoryStream aStream; + uno::Reference xOutputStream(new utl::OStreamWrapper(aStream)); + uno::Sequence aDescriptor( comphelper::InitPropertySequence({ + { "OutputStream", uno::Any(xOutputStream) }, + { "FilterName", uno::Any(OUString("SVG")) } + })); + xGraphicExporter->filter(aDescriptor); + aStream.Seek(STREAM_SEEK_TO_BEGIN); + + // TODO: Disabled. Parsing of SVG gives just root node without any children. + // Reason of such behavior unclear. So XPATH assert fails. + + // Parse resulting SVG as XML file. + // xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream); + + // Check amount of paths required to draw an arrow. + // Since there are still some empty paths in output test can fail later. There are just two + // really used and visible paths. + //assertXPath(pXmlDoc, "/svg/path", 4); +} + +DECLARE_ODFEXPORT_TEST(testTdf77961, "tdf77961.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xStyles(getStyles("PageStyles")); + uno::Reference xStyle(xStyles->getByName("Standard"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL( false , getProperty(xStyle, "GridDisplay")); + CPPUNIT_ASSERT_EQUAL( false , getProperty(xStyle, "GridPrint")); +} + +DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt") +{ + CPPUNIT_ASSERT_EQUAL(2, getPages()); + // Test loext:reference-language attribute of reference fields + // (used from LibreOffice 6.1, and proposed for next ODF) + const char* aFieldTexts[] = { "A 2", "Az Isten", "Az 50-esek", + "A 2018-asok", "Az egyebek", "A fejezetek", + reinterpret_cast(u8"Az „Őseinket...”"), "a 2", + "Az v", "az 1", "Az e", "az 1", + "Az (5)", "az 1", "A 2", "az 1" }; + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + // update "A (4)" to "Az (5)" + uno::Reference(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh(); + + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + + uno::Any aHu = uno::makeAny(OUString("Hu")); + uno::Any ahu = uno::makeAny(OUString("hu")); + for (size_t i = 0; i < SAL_N_ELEMENTS(aFieldTexts); i++) + { + uno::Any aField = xFields->nextElement(); + uno::Reference xServiceInfo(aField, uno::UNO_QUERY); + if (xServiceInfo->supportsService("com.sun.star.text.textfield.GetReference")) + { + uno::Reference xPropertySet(aField, uno::UNO_QUERY); + uno::Any aLang = xPropertySet->getPropertyValue("ReferenceFieldLanguage"); + CPPUNIT_ASSERT_EQUAL(true, aLang == aHu || aLang == ahu); + uno::Reference xField(aField, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(aFieldTexts[i]), xField->getAnchor()->getString()); + } + } +} + +DECLARE_ODFEXPORT_TEST(testRubyPosition, "ruby-position.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml")) + { + assertXPath(pXmlDoc, "//style:style[@style:family='ruby']/style:ruby-properties[@loext:ruby-position='inter-character']", 1); + assertXPath(pXmlDoc, "//style:style[@style:family='ruby']/style:ruby-properties[@style:ruby-position='below']", 1); + } +} + +DECLARE_ODFEXPORT_TEST(testAllowOverlap, "allow-overlap.odt") +{ + CPPUNIT_ASSERT_EQUAL(2, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape = getShape(1); + // Without the accompanying fix in place, this test would have failed with: + // - Expression: !getProperty(xShape, "AllowOverlap") + // i.e. the custom AllowOverlap=false shape property was lost on import/export. + CPPUNIT_ASSERT(!getProperty(xShape, "AllowOverlap")); + xShape = getShape(2); + CPPUNIT_ASSERT(!getProperty(xShape, "AllowOverlap")); +} + +DECLARE_ODFEXPORT_TEST(testSignatureLineProperties, "signatureline-properties.fodt") +{ + uno::Reference xShape = getShape(1); + CPPUNIT_ASSERT(xShape.is()); + + CPPUNIT_ASSERT_EQUAL(true, getProperty(xShape, "IsSignatureLine")); + CPPUNIT_ASSERT_EQUAL(OUString("{3C24159B-3B98-4F60-AB52-00E7721758E9}"), + getProperty(xShape, "SignatureLineId")); + CPPUNIT_ASSERT_EQUAL(OUString("John Doe"), + getProperty(xShape, "SignatureLineSuggestedSignerName")); + CPPUNIT_ASSERT_EQUAL(OUString("Farmer"), + getProperty(xShape, "SignatureLineSuggestedSignerTitle")); + CPPUNIT_ASSERT_EQUAL(OUString("john@farmers.org"), + getProperty(xShape, "SignatureLineSuggestedSignerEmail")); + CPPUNIT_ASSERT_EQUAL(OUString("Please farm here."), + getProperty(xShape, "SignatureLineSigningInstructions")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xShape, "SignatureLineCanAddComment")); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xShape, "SignatureLineShowSignDate")); + + // tdf#130917 This needs to be always set when importing a doc, ooxml export expects it. + uno::Reference xUnsignedGraphic; + uno::Reference xProps(xShape, uno::UNO_QUERY); + xProps->getPropertyValue("SignatureLineUnsignedImage") >>= xUnsignedGraphic; + CPPUNIT_ASSERT_EQUAL(true, xUnsignedGraphic.is()); +} + +DECLARE_ODFEXPORT_TEST(testQrCodeGenProperties, "qrcode-properties.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape = getShape(1); + CPPUNIT_ASSERT(xShape.is()); + + css::drawing::QRCode aQRCode = getProperty(xShape, "QRCodeProperties"); + + CPPUNIT_ASSERT_EQUAL(OUString("www.libreoffice.org"), + aQRCode.Payload); + CPPUNIT_ASSERT_EQUAL(css::drawing::QRCodeErrorCorrection::LOW, + aQRCode.ErrorCorrection); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), + aQRCode.Border); +} + +DECLARE_ODFEXPORT_TEST(testChapterNumberingNewLine, "chapter-number-new-line.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xNumberingSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xNumberingRules = xNumberingSupplier->getChapterNumberingRules(); + comphelper::SequenceAsHashMap hashMap(xNumberingRules->getByIndex(0)); + + //This failed Actual Value was LISTTAB instead of NEWLINE + CPPUNIT_ASSERT_EQUAL( + sal_Int16(SvxNumberFormat::NEWLINE), hashMap["LabelFollowedBy"].get()); +} + +DECLARE_ODFEXPORT_TEST(testSpellOutNumberingTypes, "spellout-numberingtypes.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // ordinal indicator, ordinal and cardinal number numbering styles (from LibreOffice 6.1) + static const char* const aFieldTexts[] = { "1st", "Erste", "Eins", "1.", "Premier", "Un", "1ᵉʳ", "First", "One" }; + // fallback for old platforms without std::codecvt and std::regex supports + static const char* const aFieldTextFallbacks[] = { "Ordinal-number 1", "Ordinal 1", "1" }; + uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); + // update text field content + uno::Reference(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh(); + + uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); + uno::Reference xFields(xFieldsAccess->createEnumeration()); + + for (size_t i = 0; i < SAL_N_ELEMENTS(aFieldTexts); i++) + { + uno::Any aField = xFields->nextElement(); + uno::Reference xServiceInfo(aField, uno::UNO_QUERY); + if (xServiceInfo->supportsService("com.sun.star.text.textfield.PageNumber")) + { + uno::Reference xField(aField, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(true, OUString::fromUtf8(aFieldTexts[i]).equals(xField->getAnchor()->getString()) || + OUString::fromUtf8(aFieldTextFallbacks[i%3]).equals(xField->getAnchor()->getString())); + } + } +} + +// MAILMERGE Add conditional to expand / collapse bookmarks +DECLARE_ODFEXPORT_TEST(tdf101856_overlapped, "tdf101856_overlapped.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // get bookmark interface + uno::Reference xBookmarksSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY); + uno::Reference xBookmarksByName = xBookmarksSupplier->getBookmarks(); + + // check: we have 2 bookmarks + CPPUNIT_ASSERT_EQUAL(static_cast(2), xBookmarksByIdx->getCount()); + CPPUNIT_ASSERT(xBookmarksByName->hasByName("BookmarkNonHidden")); + CPPUNIT_ASSERT(xBookmarksByName->hasByName("BookmarkHidden")); + + // + uno::Reference xBookmark1(xBookmarksByName->getByName("BookmarkNonHidden"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty(xBookmark1, UNO_NAME_BOOKMARK_CONDITION)); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xBookmark1, UNO_NAME_BOOKMARK_HIDDEN)); + + // + uno::Reference xBookmark2(xBookmarksByName->getByName("BookmarkHidden"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty(xBookmark2, UNO_NAME_BOOKMARK_CONDITION)); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xBookmark2, UNO_NAME_BOOKMARK_HIDDEN)); +} + +// MAILMERGE Add conditional to expand / collapse bookmarks +DECLARE_ODFEXPORT_TEST(tdf101856, "tdf101856.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + // get bookmark interface + uno::Reference xBookmarksSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY); + uno::Reference xBookmarksByName = xBookmarksSupplier->getBookmarks(); + + // check: we have 2 bookmarks + CPPUNIT_ASSERT_EQUAL(static_cast(5), xBookmarksByIdx->getCount()); + CPPUNIT_ASSERT(xBookmarksByName->hasByName("BookmarkVisible")); + CPPUNIT_ASSERT(xBookmarksByName->hasByName("BookmarkHidden")); + CPPUNIT_ASSERT(xBookmarksByName->hasByName("BookmarkVisibleWithCondition")); + CPPUNIT_ASSERT(xBookmarksByName->hasByName("BookmarkNotHiddenWithCondition")); + CPPUNIT_ASSERT(xBookmarksByName->hasByName("BookmarkHiddenWithCondition")); + + // + uno::Reference xBookmark1(xBookmarksByName->getByName("BookmarkVisible"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty(xBookmark1, UNO_NAME_BOOKMARK_CONDITION)); + CPPUNIT_ASSERT_EQUAL(false, getProperty(xBookmark1, UNO_NAME_BOOKMARK_HIDDEN)); + + // + uno::Reference xBookmark2(xBookmarksByName->getByName("BookmarkHidden"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty(xBookmark2, UNO_NAME_BOOKMARK_CONDITION)); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xBookmark2, UNO_NAME_BOOKMARK_HIDDEN)); + + // + uno::Reference xBookmark3(xBookmarksByName->getByName("BookmarkVisibleWithCondition"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("0==1"), getProperty(xBookmark3, UNO_NAME_BOOKMARK_CONDITION)); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xBookmark3, UNO_NAME_BOOKMARK_HIDDEN)); + + // + // + // The following test doesn't work, while during output in the case of loext:hidden="false". + // no additional parameters are written. Implementation should be reviewed. + // +// uno::Reference xBookmark4(xBookmarksByName->getByName("BookmarkNotHiddenWithCondition"), uno::UNO_QUERY); +// CPPUNIT_ASSERT_EQUAL(OUString("1==1"), getProperty(xBookmark4, UNO_NAME_BOOKMARK_CONDITION)); +// CPPUNIT_ASSERT_EQUAL(false, getProperty(xBookmark4, UNO_NAME_BOOKMARK_HIDDEN)); + + // + uno::Reference xBookmark5(xBookmarksByName->getByName("BookmarkHiddenWithCondition"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("1==1"), getProperty(xBookmark5, UNO_NAME_BOOKMARK_CONDITION)); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xBookmark5, UNO_NAME_BOOKMARK_HIDDEN)); +} + +DECLARE_ODFEXPORT_TEST(tdf118502, "tdf118502.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape = getShape(1); + // Make sure the replacement graphic is still there + // (was gone because the original graphic was not recognized during load) + auto xReplacementGraphic + = getProperty>(xShape, "ReplacementGraphic"); + CPPUNIT_ASSERT(xReplacementGraphic.is()); +} + +DECLARE_ODFEXPORT_TEST(tdf99631, "tdf99631.docx") +{ + // check import of VisualArea settings of the embedded XLSX OLE objects + xmlDocUniquePtr pXmlDoc = parseExport("Object 1/settings.xml"); + if (!pXmlDoc) + return; + assertXPathContent(pXmlDoc, "//config:config-item[@config:name='VisibleAreaWidth']", "4515"); + assertXPathContent(pXmlDoc, "//config:config-item[@config:name='VisibleAreaHeight']", "903"); + + xmlDocUniquePtr pXmlDoc2 = parseExport("Object 2/settings.xml"); + if (!pXmlDoc2) + return; + assertXPathContent(pXmlDoc2, "//config:config-item[@config:name='VisibleAreaWidth']", "4515"); + assertXPathContent(pXmlDoc2, "//config:config-item[@config:name='VisibleAreaHeight']", "1354"); +} + +DECLARE_ODFEXPORT_TEST(tdf128504, "tdf128504.docx") +{ + uno::Reference xPara = getParagraph(6); + uno::Reference xRun(getRun(xPara,1), uno::UNO_QUERY); + OUString unVisitedStyleName = getProperty(xRun, "UnvisitedCharStyleName"); + CPPUNIT_ASSERT(!unVisitedStyleName.equalsIgnoreAsciiCase("Internet Link")); + OUString visitedStyleName = getProperty(xRun, "VisitedCharStyleName"); + CPPUNIT_ASSERT(!visitedStyleName.equalsIgnoreAsciiCase("Visited Internet Link")); +} + +DECLARE_ODFEXPORT_TEST(tdf121658, "tdf121658.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xParaStyles(getStyles("ParagraphStyles")); + uno::Reference xStyle1(xParaStyles->getByName( + "Standard"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(true, getProperty(xStyle1, "ParaHyphenationNoCaps")); +} + +DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + auto xNumberingRules + = getProperty>(getParagraph(1), "NumberingRules"); + comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 64 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO. + CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO), + aMap["NumberingType"].get()); +} + +DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + auto xNumberingRules + = getProperty>(getParagraph(1), "NumberingRules"); + comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 65 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO3. + CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO3), + aMap["NumberingType"].get()); +} + +DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + auto xNumberingRules + = getProperty>(getParagraph(1), "NumberingRules"); + comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 66 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO4. + CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO4), + aMap["NumberingType"].get()); +} + +DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + auto xNumberingRules + = getProperty>(getParagraph(1), "NumberingRules"); + comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 67 + // - Actual : 4 + // i.e. numbering type was ARABIC, not ARABIC_ZERO5. + CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO5), + aMap["NumberingType"].get()); +} + +DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference xShape(getShape(1), uno::UNO_QUERY); + sal_Int16 nExpected = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM; + CPPUNIT_ASSERT_EQUAL(nExpected, getProperty(xShape, "VertOrientRelation")); +} + +DECLARE_ODFEXPORT_TEST(tdf124470, "tdf124470TableAndEmbeddedUsedFonts.odt") +{ + // Table styles were exported out of place, inside font-face-decls. + // Without the fix in place, this will fail already in ODF validation: + // "content.xml[2,2150]: Error: tag name "style:style" is not allowed. Possible tag names are: " + + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "/office:document-content/office:font-face-decls/style:style", 0); + assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:family='table']", 1); + assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:family='table-column']", 2); + assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:family='paragraph']", 1); +} + +DECLARE_ODFEXPORT_TEST(tdf135942, "nestedTableInFooter.odt") +{ + // All table autostyles should be collected, including nested, and must not crash. + + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"); + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "/office:document-styles/office:automatic-styles/style:style[@style:family='table']", 2); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3