summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/ooxmlexport
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r--sw/qa/extras/ooxmlexport/data/090716_Studentische_Arbeit_VWS.docxbin0 -> 42368 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/1-table-1-page.docxbin0 -> 11658 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/128197_compat14.docxbin0 -> 13797 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/128197_compat15.docxbin0 -> 13778 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/151384Hyperlink.odtbin0 -> 9372 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/1_page.docxbin0 -> 20552 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/2-id.docxbin0 -> 12782 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/2120112713.docxbin0 -> 41022 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docxbin0 -> 23146 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/2129393649.docxbin0 -> 50312 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/2_table_doc.docxbin0 -> 10090 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/2col-header.docxbin0 -> 17060 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/99_Fields.docxbin0 -> 15788 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/AnchorId.docxbin0 -> 17942 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docxbin0 -> 25288 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docxbin0 -> 25114 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ColorOverwritten.docxbin0 -> 17647 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/CommentDone.docxbin0 -> 20946 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/CommentReply.docxbin0 -> 10353 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/EmbeddedExcelChart.docxbin0 -> 21785 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Encrypted_LO_Standard_abc.docxbin0 -> 7680 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Encrypted_MSO2007_abc.docxbin0 -> 18432 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Encrypted_MSO2010_abc.docxbin0 -> 19456 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Encrypted_MSO2013_abc.docxbin0 -> 17920 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/EquationAsScientificNumbering.docxbin0 -> 16850 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/EquationWithAboveAndBelowCaption.docxbin0 -> 15211 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO73034.docxbin0 -> 11655 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO73546.docxbin0 -> 27528 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO74105.docxbin0 -> 13804 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO74106.docxbin0 -> 17030 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO74215.docxbin0 -> 24322 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO74774.docxbin0 -> 118904 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO74775.docxbin0 -> 16685 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO75133.docxbin0 -> 16659 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO76248.docxbin0 -> 22330 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO76312.docxbin0 -> 37560 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO77715.docxbin0 -> 120055 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO78292.docxbin0 -> 586141 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO78590.docxbin0 -> 59732 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FigureAsLabelPicture.docxbin0 -> 109122 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/FileWithInvalidImageLink.docxbin0 -> 15118 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Hau_min_list2.fodt334
-rw-r--r--sw/qa/extras/ooxmlexport/data/ImageCrop.docxbin0 -> 71650 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/IndexFieldFlagF.docxbin0 -> 15781 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docxbin0 -> 22867 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/LineStyle_DashType_VML.docxbin0 -> 15661 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/LinkedTextBoxes.docxbin0 -> 62194 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/NoFillAttrInImagedata.docxbin0 -> 272326 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/NumberedList.docxbin0 -> 55519 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/PreserveWfieldTOC.docxbin0 -> 18485 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docxbin0 -> 18620 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/SdtContent.docxbin0 -> 24609 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Shape.docxbin0 -> 15602 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ShapeOverlappingWithSdt.docxbin0 -> 29760 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Simple-TOC.odtbin0 -> 10289 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/SvgImageTest.odtbin0 -> 13608 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docxbin0 -> 12977 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docxbin0 -> 13407 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docxbin0 -> 13389 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docxbin0 -> 13378 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docxbin0 -> 16327 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TOC_field_b.docxbin0 -> 15114 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TOC_field_f.docxbin0 -> 15697 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Table-of-Figures.odtbin0 -> 9748 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TableWithAboveCaptions.docxbin0 -> 14761 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Table_cell_auto_width_fdo69656.docxbin0 -> 18939 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Tdf147485.docxbin0 -> 62544 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TestPuzzleExport.odtbin0 -> 15349 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TestVMLData.docxbin0 -> 50255 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Test_CharUnderlineThemeColor.docxbin0 -> 13339 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Test_ThemeBorderColor.docxbin0 -> 14743 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.docxbin0 -> 14672 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.fodt420
-rw-r--r--sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docxbin0 -> 15662 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextEffects_Glow_Shadow_Reflection.docxbin0 -> 11925 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextEffects_Groupshapes.docxbin0 -> 44427 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextEffects_InStyle.docxbin0 -> 13028 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextEffects_Props3d_Ligatures_NumForm_NumSpacing.docxbin0 -> 12144 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextEffects_StylisticSets_CntxtAlts.docxbin0 -> 11988 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextEffects_TextFill.docxbin0 -> 11937 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextEffects_TextOutline.docxbin0 -> 11918 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/TextFrameRotation.docxbin0 -> 25798 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/UnknownStyleInRedline.docxbin0 -> 14030 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/Unsupportedtextfields.docxbin0 -> 15608 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/WPGbodyPr.docxbin0 -> 24700 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/a4andborders.docxbin0 -> 10014 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/abi11739.docxbin0 -> 11635 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/absolute-link.docxbin0 -> 10533 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/activex_checkbox.docxbin0 -> 13851 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/activex_control_align.odtbin0 -> 9737 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/activex_control_at_run_end.odtbin0 -> 9601 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/activex_option_button_group.docxbin0 -> 15877 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/activex_textbox.docxbin0 -> 16937 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/afterlines.docxbin0 -> 12622 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/all_gaps_word.docxbin0 -> 10226 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/alphabeticalIndex_AutoColumn.docxbin0 -> 15891 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/alphabeticalIndex_MultipleColumns.docxbin0 -> 15937 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/anchor-position.docxbin0 -> 14599 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/annotation-formatting.docxbin0 -> 14298 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/arabic-zero-numbering.docxbin0 -> 5730 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docxbin0 -> 5934 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/arabic-zero4-numbering.docxbin0 -> 5238 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/arabic-zero5-numbering.docxbin0 -> 14411 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/artistic_effects.docxbin0 -> 31934 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/author-property.docxbin0 -> 18198 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/autofit.docxbin0 -> 13763 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bad.docmbin0 -> 9672 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/behinddoc.docxbin0 -> 17341 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bezier.odtbin0 -> 12174 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc581614.docbin0 -> 31744 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc637947.odtbin0 -> 9408 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc780044_spacing.docxbin0 -> 7437 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc834035.odtbin0 -> 18557 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc837302.docxbin0 -> 13904 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc865381.docxbin0 -> 19510 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc884615.docxbin0 -> 14343 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/bnc891663.docxbin0 -> 7911 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/btlr-frame.odtbin0 -> 8564 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/btlr-textbox.docxbin0 -> 15965 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/calendar1.docxbin0 -> 14148 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/calendar2.docxbin0 -> 12180 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/calendar3.docxbin0 -> 9235 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/calendar4.docxbin0 -> 9218 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/calendar5.docxbin0 -> 12584 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/caption.docxbin0 -> 13773 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cell-btlr.docxbin0 -> 4392 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cell-grid-span.docxbin0 -> 14652 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cell-sdt-redline.docxbin0 -> 11268 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/charborder.odtbin0 -> 8052 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/chart-dupe.docxbin0 -> 25367 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/chart-in-footer.docxbin0 -> 29207 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/chart-prop.docxbin0 -> 17749 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/chart-size.docxbin0 -> 18128 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/chart.docxbin0 -> 24453 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/checkbox-control.docxbin0 -> 13493 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/chtoutline.docxbin0 -> 15406 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cjklist30.docxbin0 -> 13395 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cjklist31.docxbin0 -> 13406 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cjklist34.docxbin0 -> 13414 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cjklist35.docxbin0 -> 13394 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/cjklist44.docxbin0 -> 13384 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/clearing-break.docxbin0 -> 15739 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/columnbreak.docxbin0 -> 12703 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/combobox-control.docxbin0 -> 21561 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/comment_initials.odtbin0 -> 9335 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/comments-nested.odtbin0 -> 11343 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/conditional-text.fodt8
-rw-r--r--sw/qa/extras/ooxmlexport/data/conditionalstyles-tbllook.docxbin0 -> 11531 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/content-control-grab-bag.docxbin0 -> 30547 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/content-control-shape.docxbin0 -> 59050 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/controlshape.fodt182
-rw-r--r--sw/qa/extras/ooxmlexport/data/cp1000015.odtbin0 -> 8044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/crop-pixel.docxbin0 -> 28063 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/crop-roundtrip.docxbin0 -> 143445 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/croppedAndRotated.odtbin0 -> 11188 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/custom-properties.docxbin0 -> 10968 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/custom-styles-TOC-comma.docxbin0 -> 14735 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/custom-styles-TOC-semicolon.docxbin0 -> 14902 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/customxml.docxbin0 -> 23402 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dashed_line_custdash_1000th_of_percent.docxbin0 -> 16895 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dashed_line_custdash_percentage.docxbin0 -> 16895 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/date-control.docxbin0 -> 20936 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/date_field_at_end_of_paragraph.docxbin0 -> 22693 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/date_field_in_shape.docxbin0 -> 21746 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docxbin0 -> 13517 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/default-sect-break-cols.docxbin0 -> 9993 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/defaultStyle.docxbin0 -> 5126 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dkvert.docxbin0 -> 20751 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-charheight-default.docxbin0 -> 15770 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-customgeometry-cubicbezier.docxbin0 -> 8702 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-gradientfill-theme.docxbin0 -> 15771 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-groupshape-capitalization.docxbin0 -> 17676 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-groupshape-childposition.docxbin0 -> 17609 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-groupshape-paraspacing.docxbin0 -> 17128 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docxbin0 -> 17223 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-groupshape-runfonts.docxbin0 -> 16971 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-groupshape-sdt.docxbin0 -> 19727 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-picture-in-textframe.docxbin0 -> 17252 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-rectangle-relsize.docxbin0 -> 17858 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-shape-fillbitmapcrop.docxbin0 -> 33037 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-shape-fillpattern.docxbin0 -> 27380 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-shape-relsize.docxbin0 -> 15499 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-shape-title.docxbin0 -> 13772 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-solidfill-alpha.docxbin0 -> 17049 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-textframe-vertadjust.docxbin0 -> 18296 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-textshape.docxbin0 -> 16554 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-textshapeB.docxbin0 -> 15148 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dml-zorder.odtbin0 -> 9704 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/docxopenhyperlinkbox.docxbin0 -> 18197 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dont-add-new-styles.docxbin0 -> 13305 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/drawinglayer-pic-pos.docxbin0 -> 17617 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/drawingml-flipv.docxbin0 -> 15580 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/dropdown-in-cell.docxbin0 -> 13262 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/duplicate-east-asia.odtbin0 -> 9514 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/effect-extent-inline.docxbin0 -> 25805 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docxbin0 -> 23257 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/effect-extent.docxbin0 -> 14715 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/effectextent-margin.docxbin0 -> 13144 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/em.docxbin0 -> 10016 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/embedded-xlsx.docxbin0 -> 33370 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/embedded_chart.odtbin0 -> 23955 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/embedded_images.odtbin0 -> 19334 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/empty-annotation-mark.docxbin0 -> 13339 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/empty-date-control.odtbin0 -> 8668 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/empty.odtbin0 -> 8466 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/endingSectionProps.docxbin0 -> 6506 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fail_bracePair.odtbin0 -> 9394 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo106029.docxbin0 -> 4336 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo38244.docxbin0 -> 12424 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo38414.docxbin0 -> 21800 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo43093.docxbin0 -> 9547 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo43093b.docxbin0 -> 12959 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo44689_start_page_0.docxbin0 -> 16875 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo44689_start_page_7.docxbin0 -> 16849 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo46361.docxbin0 -> 13791 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo47669.docxbin0 -> 3908 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo48557.odtbin0 -> 16782 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo51034.odtbin0 -> 9922 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo51550.odtbin0 -> 13611 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo52208.docxbin0 -> 13356 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo53985.docxbin0 -> 20115 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo55187.docxbin0 -> 12759 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo55381.docxbin0 -> 4710 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo56679.docxbin0 -> 15993 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo58577.odtbin0 -> 9427 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo59273.docxbin0 -> 4358 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo59638.docxbin0 -> 12166 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo60922.docxbin0 -> 4503 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo60957-2.docxbin0 -> 24075 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo60990.odtbin0 -> 10945 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo61343.docxbin0 -> 114220 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo63053.docxbin0 -> 5044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo63685.docxbin0 -> 10964 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo64350.docxbin0 -> 16139 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo64826.docxbin0 -> 12018 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65090.docxbin0 -> 10409 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65265.docxbin0 -> 14520 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65295.docxbin0 -> 26411 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65400.docxbin0 -> 16108 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65632.docxbin0 -> 12862 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65718.docxbin0 -> 62876 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65833.docxbin0 -> 34539 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo66474.docxbin0 -> 96326 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo66543.docxbin0 -> 16196 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo66688.docxbin0 -> 24042 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo66773.docxbin0 -> 16239 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo66781.docxbin0 -> 21428 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo66929.docxbin0 -> 21624 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo67013.docxbin0 -> 27038 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo67737.docxbin0 -> 21349 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo68418.docxbin0 -> 13897 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo68607.docxbin0 -> 36117 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo68787.docxbin0 -> 14436 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo69548.docxbin0 -> 3802 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo69616.docxbin0 -> 22253 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo69636.docxbin0 -> 23779 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo69644.docxbin0 -> 18215 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo69649.docxbin0 -> 35048 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo70457.docxbin0 -> 20296 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo70812.docxbin0 -> 5530 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo70838.docxbin0 -> 4103 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo70942.docxbin0 -> 15520 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo71302.docxbin0 -> 13418 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo71646.docxbin0 -> 22792 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo71785.docxbin0 -> 54366 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo71834.docxbin0 -> 20967 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo72560.docxbin0 -> 15144 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo72560b.docxbin0 -> 9969 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo72560c.docxbin0 -> 9969 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo72560d.docxbin0 -> 8116 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo72560e.docxbin0 -> 9934 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73215.docxbin0 -> 17846 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73227.docxbin0 -> 206920 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73247.docxbin0 -> 17526 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73389.docxbin0 -> 11067 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73541.docxbin0 -> 16446 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73550.docxbin0 -> 7671 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73556.docxbin0 -> 12124 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docxbin0 -> 16099 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docxbin0 -> 15886 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74110.docxbin0 -> 22916 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74153.docxbin0 -> 11506 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74357.docxbin0 -> 11930 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74401.docxbin0 -> 18425 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74566.docxbin0 -> 12675 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74605.docxbin0 -> 180916 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74745.docxbin0 -> 32560 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo74792.docxbin0 -> 127945 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo75431.docxbin0 -> 13275 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76016.docxbin0 -> 15182 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76098.docxbin0 -> 79411 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76101.docxbin0 -> 88435 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76163.docxbin0 -> 41001 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76249.docxbin0 -> 121643 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76316.docxbin0 -> 653222 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76586.docxbin0 -> 12277 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76587.docxbin0 -> 13605 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76589.docxbin0 -> 13790 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76591.docxbin0 -> 109793 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76597.docxbin0 -> 83390 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76741.docxbin0 -> 18895 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76803.docxbin0 -> 36516 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76934.docxbin0 -> 31867 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo76979.docxbin0 -> 41973 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77117.docxbin0 -> 23755 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77129.docxbin0 -> 106404 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77476.docxbin0 -> 935746 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77716.docxbin0 -> 12915 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77718.docxbin0 -> 554994 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77719.docxbin0 -> 16680 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77725.docxbin0 -> 53579 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77727.docxbin0 -> 48777 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77759.docxbin0 -> 23880 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77812.docxbin0 -> 13485 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77887.docxbin0 -> 39281 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo77890.docxbin0 -> 31759 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78284.docxbin0 -> 26129 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78300.docxbin0 -> 14358 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78384.docxbin0 -> 13134 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78420.docxbin0 -> 687154 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78432.docxbin0 -> 29365 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78469.docxbin0 -> 31664 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78474.docxbin0 -> 116064 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78599.docxbin0 -> 38560 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78651.docxbin0 -> 20283 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78654.docxbin0 -> 40927 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78658.docxbin0 -> 54504 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78659.docxbin0 -> 86548 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78663.docxbin0 -> 30861 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78882.docxbin0 -> 22429 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78883.docxbin0 -> 18303 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78886.docxbin0 -> 40499 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78887.docxbin0 -> 14813 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78904.docxbin0 -> 14388 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78907.docxbin0 -> 38642 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78910.docxbin0 -> 22596 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78939.docxbin0 -> 73680 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78957.docxbin0 -> 54098 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79008.docxbin0 -> 53143 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79062.docxbin0 -> 17422 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79256.docxbin0 -> 15170 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79535.docxbin0 -> 22547 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79540.docxbin0 -> 26279 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79591.docxbin0 -> 25140 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79668.docxbin0 -> 27444 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79738.docxbin0 -> 10159 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79817.docxbin0 -> 22303 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79822.docxbin0 -> 40902 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79915.docxbin0 -> 20751 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79968.docxbin0 -> 51338 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79969_xlsb.docxbin0 -> 25622 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo79969_xlsm.docxbin0 -> 26157 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80097.docxbin0 -> 36655 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80410.docxbin0 -> 24733 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80522.docxbin0 -> 31344 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80523_pptm.docxbin0 -> 50693 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80523_sldm.docxbin0 -> 50663 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80555.docxbin0 -> 15018 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80800.docxbin0 -> 13128 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80800b_tableStyle.docxbin0 -> 11946 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80895.docxbin0 -> 23133 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80897.docxbin0 -> 16332 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80898.docxbin0 -> 21989 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80902.docxbin0 -> 10795 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo80997.docxbin0 -> 20222 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo81031.docxbin0 -> 25264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo81341.docxbin0 -> 12678 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo81381.docxbin0 -> 51656 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo81486.docxbin0 -> 13354 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo81492.docxbin0 -> 45995 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo81945.docxbin0 -> 14037 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo81946.docxbin0 -> 34561 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo82123.docxbin0 -> 36087 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo82492.docxbin0 -> 25948 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo83044.docxbin0 -> 25970 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo83048.docxbin0 -> 29731 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo83057.docxbin0 -> 25032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo83428.docxbin0 -> 4386 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo85542.docxbin0 -> 10299 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/field-rotated.fodt44
-rw-r--r--sw/qa/extras/ooxmlexport/data/file_crash.docxbin0 -> 17243 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fixed-date-field.docxbin0 -> 5066 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/flip_and_rotate.odtbin0 -> 9403 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/floating-table-position.docxbin0 -> 13236 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/floating-tables-anchor.docxbin0 -> 16348 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/floatingtbl_with_formula.docxbin0 -> 17046 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odtbin0 -> 12811 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/floattable-nested.odtbin0 -> 11635 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt60
-rw-r--r--sw/qa/extras/ooxmlexport/data/font-name-is-empty.docxbin0 -> 6991 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/footer-body-distance.docxbin0 -> 17891 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docxbin0 -> 12196 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/footer-margin-lost.docxbin0 -> 21058 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/footnote.docxbin0 -> 15779 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/footnotesep.fodt86
-rw-r--r--sw/qa/extras/ooxmlexport/data/frame-wrap-auto.docxbin0 -> 10348 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/frame.fodt75
-rw-r--r--sw/qa/extras/ooxmlexport/data/frame_size_export.docxbin0 -> 13929 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/glossaryWithEmail.docxbin0 -> 19290 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/grabbag.docxbin0 -> 9989 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/gradient-fill-preservation.docxbin0 -> 9390 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/graphic-object-fliph.docxbin0 -> 14408 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/gridbefore.docxbin0 -> 4987 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/grouped_link.docxbin0 -> 21001 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/groupshape-picture.docxbin0 -> 24669 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/groupshape-rotation.docxbin0 -> 10462 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/groupshape-smarttag.docxbin0 -> 10694 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/groupshape-textbox.docxbin0 -> 17394 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/groupshape-theme-font.docxbin0 -> 13871 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/groupshape-trackedchanges.docxbin0 -> 17667 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/gutter-left.docxbin0 -> 11860 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/gutter-top.docxbin0 -> 13032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/header-border.docxbin0 -> 15503 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hello.docmbin0 -> 12709 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hello.docxbin0 -> 12578 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hidemark.docxbin0 -> 12816 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hyperlink-field.odtbin0 -> 15543 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hyperlink.docxbin0 -> 12564 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hyperlinkshape.docxbin0 -> 17780 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hyphenation.odtbin0 -> 16416 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/i120928.docxbin0 -> 16550 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/i124106.docxbin0 -> 4810 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/image-comment-at-char.docxbin0 -> 6385 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/image-noborder.docxbin0 -> 14305 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/image_data.docxbin0 -> 50255 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/image_through_shape.docxbin0 -> 18888 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/imgshadow.docxbin0 -> 29629 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/indentation.docxbin0 -> 16945 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/indents.docxbin0 -> 11553 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/inheritFirstHeader.docxbin0 -> 15002 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/inline-groupshape.docxbin0 -> 16992 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/inline-sdt-header.docxbin0 -> 14930 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/internal_hyperlink_frame.odtbin0 -> 9021 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/internal_hyperlink_ole.odtbin0 -> 13400 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/internal_hyperlink_region.odtbin0 -> 8744 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/internal_hyperlink_table.odtbin0 -> 8866 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/invalid_date_form_field.docxbin0 -> 4386 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/kde216114-1.odtbin0 -> 22717 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/kde302504-1.odtbin0 -> 10014 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/kern.docxbin0 -> 12832 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/large-twips.docxbin0 -> 5365 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/lastEmptyLineWithDirectFormatting.docxbin0 -> 1816 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/layout-flow-alt-alone.docxbin0 -> 7669 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/libreoffice.pngbin0 -> 767 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/listWithLgl.docxbin0 -> 3009 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/list_notcounted_indent.fodt141
-rw-r--r--sw/qa/extras/ooxmlexport/data/longBookmarkName.fodt13
-rw-r--r--sw/qa/extras/ooxmlexport/data/lorem_hyperlink.fodt40
-rw-r--r--sw/qa/extras/ooxmlexport/data/lvlPicBulletId.docxbin0 -> 32450 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/mailmerge.docxbin0 -> 17580 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/margins_from_style.docxbin0 -> 13878 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-accents.docxbin0 -> 3555 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-d.docxbin0 -> 3633 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-escape.docxbin0 -> 13422 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-escaping.docxbin0 -> 3481 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-lim.docxbin0 -> 3512 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-literal.docxbin0 -> 3850 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-matrix.docxbin0 -> 3507 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-mso2k7.docxbin0 -> 12207 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-nary.docxbin0 -> 3562 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-overbrace_underbrace.docxbin0 -> 3567 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-overstrike.docxbin0 -> 3507 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-placeholders.docxbin0 -> 3467 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-rad.docxbin0 -> 3507 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-subscripts.docxbin0 -> 3669 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-vertical_stacks.docxbin0 -> 3522 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/mathtype.docxbin0 -> 12533 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/mce-nested.docxbin0 -> 32734 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/mce-wpg.docxbin0 -> 17404 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/mce.docxbin0 -> 15667 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/missing-path.docxbin0 -> 15860 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/missing_newline.odtbin0 -> 10524 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/mso-spt180.docxbin0 -> 10496 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/msobrightnesscontrast.docxbin0 -> 18972 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/multi-column-line-separator-SAVED.docxbin0 -> 5640 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/multi-column-separator-with-line.docxbin0 -> 11618 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/multi-page-toc.docxbin0 -> 18321 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/multi_space_url.fodt9
-rw-r--r--sw/qa/extras/ooxmlexport/data/n592908-frame.docxbin0 -> 13589 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n592908-picture.docxbin0 -> 62593 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n652364.docxbin0 -> 8975 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n693238.docxbin0 -> 9933 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n705956-1.docxbin0 -> 7861 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n705956-2.docxbin0 -> 9363 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n747461.docxbin0 -> 6489 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n750255.docxbin0 -> 10102 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n751054.docxbin0 -> 13100 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n751117.docxbin0 -> 10312 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n764005.docxbin0 -> 13088 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n766481.docxbin0 -> 10021 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n766487.docxbin0 -> 9273 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n775906.docxbin0 -> 11750 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n777337.docxbin0 -> 13409 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n778828.docxbin0 -> 10012 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n778836.docxbin0 -> 9649 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n779630.docxbin0 -> 12500 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n779642.docxbin0 -> 85485 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n779834.docxbin0 -> 22624 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n779941.docxbin0 -> 10316 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n780563.docxbin0 -> 24144 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n780843.docxbin0 -> 12614 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n780843b.docxbin0 -> 13623 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n780853.docxbin0 -> 9261 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n782345.docxbin0 -> 12607 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n783638.docxbin0 -> 19119 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n785767.docxbin0 -> 12848 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n789482.docxbin0 -> 12916 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n792778.docxbin0 -> 15329 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n793262.docxbin0 -> 15449 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n793998.docxbin0 -> 13167 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n816593.docxbin0 -> 17030 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n820509.docxbin0 -> 12047 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n822175.odtbin0 -> 7633 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/n830205.docxbin0 -> 33186 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/negative-cell-margin-twips.docxbin0 -> 5902 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/nested-text-frames.odtbin0 -> 13013 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/nestedAlternateContent.docxbin0 -> 19109 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odtbin0 -> 19535 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/noDefault.docxbin0 -> 9238 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/non_ascii_link.docxbin0 -> 12061 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/nonbmpchar.docxbin0 -> 4194 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/num-override-lvltext.docxbin0 -> 13708 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/num-override-start.docxbin0 -> 14327 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/num-parent-style.docxbin0 -> 14002 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/number-portion-format.odtbin0 -> 8984 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/numbering-font.docxbin0 -> 11014 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/numbering1.docxbin0 -> 14346 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/numlist-zhcn.odtbin0 -> 10410 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/numlist-zhtw.odtbin0 -> 10419 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/object_cross_reference.odtbin0 -> 38788 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo106020-1.odtbin0 -> 11044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo30436-1-minimized.sxwbin0 -> 8793 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo34469-1.odtbin0 -> 16812 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo39250-1-min.rtf42
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo39845-7.odtbin0 -> 14361 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo47778-3.odtbin0 -> 9872 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo47778-4.odtbin0 -> 9815 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo67471-2.odtbin0 -> 9511 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo72950-1.odtbin0 -> 12591 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooo96040-2.odtbin0 -> 289214 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/ooxml-triangle.docxbin0 -> 13289 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/open-as-read-only.docxbin0 -> 4594 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/outline-number-types.odtbin0 -> 13600 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/page-background.docxbin0 -> 10041 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/page-border-shadow.docxbin0 -> 10012 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/page-borders-export-case-2.docxbin0 -> 16156 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/page-break-before.docxbin0 -> 12943 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/page-content-bottom.docxbin0 -> 5007 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/page-graphic-background.odtbin0 -> 32296 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/pageBreak_after.odtbin0 -> 10162 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/pagerelsize.docxbin0 -> 17318 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/para-adjust-distribute.docxbin0 -> 11326 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/para-auto-spacing.docxbin0 -> 30380 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/para-shading.docxbin0 -> 12609 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/para-shadow.docxbin0 -> 4056 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/para-style-char-position.docxbin0 -> 9628 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/para-style-num-level.docxbin0 -> 13101 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/paragraph-mark-nonempty.odtbin0 -> 8769 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/paragraph-mark.docxbin0 -> 13113 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/paragraph-mark2.docxbin0 -> 31782 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/paragraph-sdt.docxbin0 -> 34035 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/paragraphWithComments.docxbin0 -> 14255 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/parasplit-on-section-border.odtbin0 -> 17642 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture-artistic-effects-preservation.docxbin0 -> 17272 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture-effects-preservation.docxbin0 -> 33275 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture-with-schemecolor.docxbin0 -> 35489 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture-wrap-polygon.docxbin0 -> 15997 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/pictureWatermark.docxbin0 -> 798086 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odtbin0 -> 32725 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docxbin0 -> 36515 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odtbin0 -> 32345 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/plausable-border.docxbin0 -> 15719 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/position-and-rotation.docxbin0 -> 18502 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/preserve_Z_field_TOC.docxbin0 -> 18381 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/preset-shape.docxbin0 -> 16054 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/protectedform.docxbin0 -> 18511 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/quicktables.docxbin0 -> 12205 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rel-size-round.docxbin0 -> 15098 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/relative-link.docxbin0 -> 13415 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/relorientation.docxbin0 -> 22931 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rhbz1180114.docxbin0 -> 3435 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rhbz988516.docxbin0 -> 15513 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rot180-flipv.docxbin0 -> 15903 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rot270-flipv.docxbin0 -> 15887 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rot90-fliph.docxbin0 -> 15683 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rotated_shape.fodt81
-rw-r--r--sw/qa/extras/ooxmlexport/data/rprchange_closed.docxbin0 -> 24695 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rtl-gutter.docxbin0 -> 8843 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rubyhyperlink.fodt45
-rw-r--r--sw/qa/extras/ooxmlexport/data/sample.dotxbin0 -> 11338 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-2-para.docxbin0 -> 15487 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-2-run.docxbin0 -> 12849 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-alias.docxbin0 -> 12872 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-before-field.docxbin0 -> 12995 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-citation-run.docxbin0 -> 12817 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-company-multipara.docxbin0 -> 19521 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docxbin0 -> 34071 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docxbin0 -> 11940 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-header.docxbin0 -> 18551 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-ignored-footer.docxbin0 -> 18299 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-run-picture.docxbin0 -> 15444 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt_after_section_break.docxbin0 -> 1185 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/section_break_after_table.docxbin0 -> 12583 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/section_break_numbering.docxbin0 -> 5614 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sectionprot.odtbin0 -> 8612 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/sectionprot2.odtbin0 -> 8568 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docxbin0 -> 19676 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt185
-rw-r--r--sw/qa/extras/ooxmlexport/data/shape-effect-preservation.docxbin0 -> 23996 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/shape-in-floattable.docxbin0 -> 26161 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/shape-theme-preservation.docxbin0 -> 18757 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/signature-line-all-props-set.docxbin0 -> 13169 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/simple-sdts.docxbin0 -> 25424 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/smartart.docxbin0 -> 20453 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/strict-smartart.docxbin0 -> 18661 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/strict.docxbin0 -> 25636 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/style-inheritance.docxbin0 -> 26321 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docxbin0 -> 8909 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-alignment.docxbin0 -> 13187 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size.docxbin0 -> 17672 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size2.docxbin0 -> 12907 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-auto-nested.docxbin0 -> 10297 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-black_fill.docxbin0 -> 17978 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-borders.docxbin0 -> 13489 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-btlr-center.docxbin0 -> 10686 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-cell-margin.docxbin0 -> 13708 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-floating-margins.docxbin0 -> 14346 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-floating.docxbin0 -> 14996 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-ltr.docxbin0 -> 5242 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-pagebreak.docxbin0 -> 10148 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-position-14.docxbin0 -> 13708 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-position-15.docxbin0 -> 12264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-row-data-displayed-twice.docxbin0 -> 27239 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-rtl.docxbin0 -> 13449 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docxbin0 -> 34077 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-style-border-export.docxbin0 -> 13984 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-style-border.docxbin0 -> 14552 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-style-cell-back-color.docxbin0 -> 13646 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-style-conf-nested.docxbin0 -> 13167 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-style-parprop.docxbin0 -> 10098 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-style-rPr-sz.docxbin0 -> 10771 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table-theme-preservation.docxbin0 -> 37575 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table.fodt70
-rw-r--r--sw/qa/extras/ooxmlexport/data/table.odtbin0 -> 8889 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tableCurrupt.docxbin0 -> 28750 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tablePreferredWidth.docxbin0 -> 13130 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table_atleast.docxbin0 -> 13029 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table_cross_reference.odtbin0 -> 10243 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table_cross_reference_custom_format.odtbin0 -> 12089 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/table_lineRule.docxbin0 -> 13998 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tableborder-finedash.docxbin0 -> 10266 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tblppr-shape.docxbin0 -> 13497 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tblr-height.docxbin0 -> 10466 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tbrl-frame-vml.docxbin0 -> 22756 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tbrl-textbox.docxbin0 -> 17300 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf100075.docxbin0 -> 11834 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf100581.odtbin0 -> 24334 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf100751_arrowBothFlip.docxbin0 -> 15546 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odtbin0 -> 15232 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf101589_dontSplitTable.odtbin0 -> 11314 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf102466.docxbin0 -> 101162 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103001.docxbin0 -> 33883 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103090.odtbin0 -> 8845 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103389.docxbin0 -> 13983 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103544.docxbin0 -> 15012 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103573.docxbin0 -> 16155 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103651.docxbin0 -> 14459 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakB.docxbin0 -> 13971 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakC.docxbin0 -> 13955 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakD.docxbin0 -> 21482 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakE.docxbin0 -> 14047 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103976.docxbin0 -> 51017 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103982.docxbin0 -> 12085 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docxbin0 -> 103497 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104115.docxbin0 -> 13044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104150.docxbin0 -> 12621 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104162.docxbin0 -> 14541 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docxbin0 -> 19145 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104354-2.docxbin0 -> 15263 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104354.docxbin0 -> 10182 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docxbin0 -> 6828 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docxbin0 -> 18979 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104418.odtbin0 -> 12437 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docxbin0 -> 103469 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104539.odtbin0 -> 12783 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104565_ArrowPosition.docxbin0 -> 4980 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104707_urlComment.odtbin0 -> 9942 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104713_undefinedStyles.docxbin0 -> 2331 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104797.docxbin0 -> 11710 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104823.docxbin0 -> 21260 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105035_framePrB.docxbin0 -> 23142 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105035_framePrC.docxbin0 -> 24095 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105095.docxbin0 -> 15756 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105215.docxbin0 -> 5654 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105444.docxbin0 -> 4928 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105485.docxbin0 -> 7804 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105490_negativeMargins.docxbin0 -> 12389 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105688.docxbin0 -> 31745 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf105875_VmlShapeRotationWithFlip.docxbin0 -> 23175 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106001-2.odtbin0 -> 8159 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106001.docxbin0 -> 5021 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106062_nonHangingFootnote.odtbin0 -> 14255 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106132.docxbin0 -> 5851 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106174_rtlParaAlign.docxbin0 -> 5266 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106492.docxbin0 -> 7896 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106541_noinheritChapterNumbering.odtbin0 -> 13859 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106690-cell.docxbin0 -> 14385 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106690.docxbin0 -> 20653 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106724.docxbin0 -> 21692 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106843.fodt43
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106953.docxbin0 -> 13833 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106970.docxbin0 -> 23255 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf106974_int32Crop.docxbin0 -> 374376 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107020.docxbin0 -> 404889 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107033.docxbin0 -> 12577 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107035.docxbin0 -> 4240 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107104.docxbin0 -> 15648 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107111.docxbin0 -> 451082 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107119.docxbin0 -> 12207 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docxbin0 -> 12806 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107618.docbin0 -> 28160 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107626.odtbin0 -> 12912 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107684.odtbin0 -> 12357 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107837.odtbin0 -> 9059 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107889.docxbin0 -> 11207 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf107969.docxbin0 -> 28622 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108269.docmbin0 -> 20187 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docxbin0 -> 7502 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108493.docxbin0 -> 27322 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108496.docxbin0 -> 19421 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108505.docxbin0 -> 16732 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108682.docxbin0 -> 12653 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odtbin0 -> 10646 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docxbin0 -> 10429 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docxbin0 -> 10478 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf109063.docxbin0 -> 13191 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf109184.docxbin0 -> 20720 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf109306.docxbin0 -> 1427 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf109310_endnoteStyleForMSO.docxbin0 -> 5109 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf111964.docxbin0 -> 1481 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112103_tablebgnofill.docxbin0 -> 19239 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112118.docxbin0 -> 11702 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112169.odtbin0 -> 23366 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112287.docxbin0 -> 12695 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112287B.docxbin0 -> 12700 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112312_AutoFitForLegacyShapes.odtbin0 -> 11123 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docxbin0 -> 14346 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docxbin0 -> 18766 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113183.docxbin0 -> 17163 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113258.docxbin0 -> 17327 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113258_noBeforeAutospacing.docxbin0 -> 16284 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113399.docbin0 -> 73728 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113547.docxbin0 -> 14424 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docxbin0 -> 17300 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf114308.docxbin0 -> 21487 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf114537_conditional-text2.docbin0 -> 19968 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf114703.docxbin0 -> 26969 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf114734_commentFormating.docxbin0 -> 10056 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf114882.docxbin0 -> 14888 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf115030.docxbin0 -> 14926 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf115094v3.docxbin0 -> 11652 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf115212.docxbin0 -> 11275 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf115557.docxbin0 -> 12284 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf115719.docxbin0 -> 18668 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf115719b.docxbin0 -> 19145 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf115861.docxbin0 -> 15035 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116084.docxbin0 -> 18209 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116194.docxbin0 -> 17227 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116371.odtbin0 -> 13384 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116394.docxbin0 -> 11537 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116410.docxbin0 -> 49192 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116436_rowFill.odtbin0 -> 10835 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116801.docxbin0 -> 28554 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116883.docxbin0 -> 10422 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116976.docxbin0 -> 14983 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf116985.docxbin0 -> 13508 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf117137.docxbin0 -> 17888 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf117297_tableStyle.docxbin0 -> 12279 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docxbin0 -> 15821 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf117805.odtbin0 -> 14897 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf117988.docxbin0 -> 10553 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118169.docxbin0 -> 5650 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118242.odtbin0 -> 30562 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118361_RTLfootnoteSeparator.docxbin0 -> 13551 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docxbin0 -> 11538 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118535.odtbin0 -> 12032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118682.fodt36
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118691.docxbin0 -> 27096 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118701.docxbin0 -> 21644 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118702.odtbin0 -> 8620 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118812_tableStyles-comprehensive.docxbin0 -> 12382 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle.docxbin0 -> 9461 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle2.docxbin0 -> 9578 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119037.odtbin0 -> 12291 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119054.docxbin0 -> 18842 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119143.docxbin0 -> 17052 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119188_list_margin_in_cell.docxbin0 -> 13663 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119201.docxbin0 -> 24206 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119760_positionCellBorder.docxbin0 -> 13144 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119760_tableInTablePosition.docxbin0 -> 4698 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119800.docxbin0 -> 14336 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119809.docxbin0 -> 22211 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf119952_negativeMargins.docxbin0 -> 23533 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120224_textControlCrossRef.docxbin0 -> 16356 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120315.docxbin0 -> 12276 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120338.docxbin0 -> 14898 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docxbin0 -> 13217 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120394.docxbin0 -> 11032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docxbin0 -> 10691 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docxbin0 -> 29319 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docxbin0 -> 40418 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyProtection.docxbin0 -> 7727 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyUnProtected.docxbin0 -> 11446 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121045.docxbin0 -> 28392 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121176.docxbin0 -> 30973 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF.odtbin0 -> 9719 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF2.docbin0 -> 127488 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121441.docxbin0 -> 23346 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121456.docxbin0 -> 5277 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121456_tabsOffset.odtbin0 -> 14208 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121597.odtbin0 -> 10592 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121658.docxbin0 -> 20859 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121659_loseColumnBrNextToShape.docxbin0 -> 23557 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121661.docxbin0 -> 20885 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121663.docxbin0 -> 21773 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121665_back2backColumnBreaks.docxbin0 -> 5127 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docxbin0 -> 20235 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docxbin0 -> 20227 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121670_columnsInSectionsOnly.docxbin0 -> 11270 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121784.docxbin0 -> 5937 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121867.odtbin0 -> 7856 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odtbin0 -> 8068 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122201_editUnprotectedText.odtbin0 -> 7104 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122342.docxbin0 -> 12443 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122563.docxbin0 -> 24895 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122594.docxbin0 -> 23235 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122648.docxbin0 -> 4767 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123054.docxbin0 -> 29457 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123104.docxbin0 -> 24314 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123116_oversizedRowSplit.odtbin0 -> 11843 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123243.docxbin0 -> 11905 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docxbin0 -> 29044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginHasHeader.docxbin0 -> 20882 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginNoHeader.docxbin0 -> 14683 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123346_ArrowMarker.docxbin0 -> 12804 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123351_UnderlineGroupSapeText.docxbin0 -> 33000 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123354.fodt40
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123355.docxbin0 -> 74156 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123356.fodt40
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123381.docxbin0 -> 11895 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123382.docxbin0 -> 17952 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123386.docxbin0 -> 14928 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123388.docxbin0 -> 19614 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123389.docxbin0 -> 13649 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123390.fodt40
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123401.fodt36
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123435.docxbin0 -> 27738 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123460.docxbin0 -> 13060 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123569_rotWriterImage_46deg.odtbin0 -> 18450 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docxbin0 -> 14711 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123621.docxbin0 -> 14753 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123622.docxbin0 -> 13441 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123627.docxbin0 -> 12153 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123628.odtbin0 -> 8410 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak.docxbin0 -> 10107 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak2.docxbin0 -> 15014 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak3.docxbin0 -> 10411 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak4.docxbin0 -> 10347 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123642.docxbin0 -> 17814 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123705.docxbin0 -> 49292 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123757.docxbin0 -> 16781 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123873.docxbin0 -> 6951 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123912_protectedForm.odtbin0 -> 9604 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124367.docxbin0 -> 12180 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124384.docxbin0 -> 37437 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124399_SingleCellTableBorders.docxbin0 -> 12183 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124472.docxbin0 -> 13354 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124491.docxbin0 -> 12794 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124594.docxbin0 -> 18592 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124600b.docxbin0 -> 15959 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124604.docxbin0 -> 35311 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124637_sectionMargin.docxbin0 -> 21535 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odtbin0 -> 9122 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.odtbin0 -> 9164 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124795-5.docxbin0 -> 36739 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124986.docxbin0 -> 12108 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125038_conditionalText3.docxbin0 -> 19938 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125268.odtbin0 -> 8432 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125298_crossreflink_nonascii_charlimit.docxbin0 -> 5194 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125324.docxbin0 -> 14007 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125338.docmbin0 -> 20187 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125518.odtbin0 -> 34438 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125546.docxbin0 -> 20716 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125657.docxbin0 -> 19731 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125778_lostPageBreakTOX.docxbin0 -> 18696 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125894.docxbin0 -> 23870 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docxbin0 -> 25589 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126206.docxbin0 -> 12509 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126245.docxbin0 -> 19219 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126287.docxbin0 -> 8701 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docxbin0 -> 9956 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126590.docxbin0 -> 12046 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126723.docxbin0 -> 18689 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126768.docxbin0 -> 12242 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126792.odtbin0 -> 8403 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odtbin0 -> 16401 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odtbin0 -> 16424 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126994_lostPageBreak.docxbin0 -> 17107 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127085.docxbin0 -> 34263 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127116.odtbin0 -> 8573 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127316_autoEscapement.odtbin0 -> 11475 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127339.docxbin0 -> 13057 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127362.odtbin0 -> 9702 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127579.odtbin0 -> 8551 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127605.odtbin0 -> 9958 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127622_framePr.docxbin0 -> 32759 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127741.docxbin0 -> 19275 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127814.docxbin0 -> 29713 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127864.docxbin0 -> 4726 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127925.odtbin0 -> 8677 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128156.docxbin0 -> 42256 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128207.docxbin0 -> 50324 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128245.docxbin0 -> 8276 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128290.odtbin0 -> 9782 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128304.odtbin0 -> 15138 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128646.docxbin0 -> 24912 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128752.docxbin0 -> 13621 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128820.fodt16
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128889.fodt15
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf128913.docxbin0 -> 10392 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129242_InsideBorders.docxbin0 -> 12222 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129353.docxbin0 -> 4420 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129442_RightBorder.docxbin0 -> 12167 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docxbin0 -> 12195 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docxbin0 -> 11237 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129452_excessBorder.docxbin0 -> 11115 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129522_removeShadowStyle.odtbin0 -> 14253 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129525.rtf262
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129575-directAfter.docxbin0 -> 18625 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129575-directBefore.docxbin0 -> 19246 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129575-docDefault.docxbin0 -> 38088 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129575-styleAfter.docxbin0 -> 18620 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129888dml.docxbin0 -> 17003 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf129888vml.docxbin0 -> 17979 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf130088.docxbin0 -> 16961 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf130120.docxbin0 -> 23067 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf130494.docxbin0 -> 17455 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ottbin0 -> 10062 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf130690.docxbin0 -> 13323 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf130814.docxbin0 -> 18008 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf130907.docxbin0 -> 12201 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131203.docxbin0 -> 3890 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131258.docxbin0 -> 18939 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131260.docxbin0 -> 14773 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131420.docxbin0 -> 11981 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131537.odtbin0 -> 15318 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131539.odtbin0 -> 35907 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131540.odtbin0 -> 36613 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131561_necessaryBorder.docxbin0 -> 9385 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131594.docxbin0 -> 17358 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131722.docxbin0 -> 18825 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131775_SpacingGroupShapeText.docxbin0 -> 16290 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docxbin0 -> 42520 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131801.docxbin0 -> 12067 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf131922_LanguageInGroupShape.docxbin0 -> 18178 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak.odtbin0 -> 14309 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak2.odtbin0 -> 17550 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132149_pgBreakB.odtbin0 -> 14621 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132185.docxbin0 -> 2183 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132271.docxbin0 -> 12861 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132305.docxbin0 -> 13398 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132475_printField.docxbin0 -> 11229 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132483.docxbin0 -> 21183 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132491_UnderlineColorGroupedShapes.docxbin0 -> 16784 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132514.docxbin0 -> 16787 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132752.docxbin0 -> 26741 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132754.docxbin0 -> 13249 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132766.docxbin0 -> 5241 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132802.docxbin0 -> 12960 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132807.docxbin0 -> 13154 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132898_extraBorder.docxbin0 -> 11252 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132898_missingBorder.docxbin0 -> 25304 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132976_testRelativeAnchorWidthFromLeftMargin.docxbin0 -> 14864 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133000_numStyleFormatting.docxbin0 -> 13761 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133030.docxbin0 -> 12451 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133035.docxbin0 -> 16259 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docxbin0 -> 19805 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133052.docxbin0 -> 13891 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133065.odtbin0 -> 64161 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginHasFooter.docxbin0 -> 19378 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docxbin0 -> 14632 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133163.fodt36
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odtbin0 -> 19219 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133363.docxbin0 -> 13891 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odtbin0 -> 18388 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133455.docxbin0 -> 15724 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133457.docxbin0 -> 4525 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133473.docxbin0 -> 83030 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133605.docxbin0 -> 21862 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133605_2.docxbin0 -> 21978 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133643.docbin0 -> 27136 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133647.docxbin0 -> 14536 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133670_testRelativeAnchorWidthFromRightMargin.docxbin0 -> 14953 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133701.docxbin0 -> 12392 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133702.docxbin0 -> 12138 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133771.odtbin0 -> 12738 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133861_RelativeAnchorWidthFromInsideOutsideMargin.docxbin0 -> 10536 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133924.docxbin0 -> 12612 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134063.docxbin0 -> 19378 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134114_allowOverlap.docxbin0 -> 19264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134260.docxbin0 -> 14233 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docxbin0 -> 17060 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134606.docxbin0 -> 21603 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134609_gridAfter.docxbin0 -> 11574 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134618.docbin0 -> 23552 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.docbin0 -> 75264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134648.docxbin0 -> 15198 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134649_pageBreak.fodt86
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134784.docxbin0 -> 28416 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134951_duplicates.odtbin0 -> 59232 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135047_ImageSpaceSettings.fodt42
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docxbin0 -> 19962 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135187.docxbin0 -> 19696 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135329_lostImage.odtbin0 -> 29541 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c12v3.docxbin0 -> 11087 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14.docxbin0 -> 11891 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14v2.docxbin0 -> 11298 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c15.docxbin0 -> 11890 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap.odtbin0 -> 97647 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap_c12.docxbin0 -> 74051 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135653.docxbin0 -> 15117 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135655.odtbin0 -> 18707 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135660.docxbin0 -> 20134 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135665.docxbin0 -> 25099 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135667.odtbin0 -> 16180 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135774_numberingCRProps.docxbin0 -> 9989 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135774_numberingShading.docxbin0 -> 5435 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135786.docxbin0 -> 5569 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135906.docxbin0 -> 35926 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135923-min.docxbin0 -> 16777 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135943_shapeWithText_LayoutInCell0_compat15.docxbin0 -> 16850 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135949_anchoredBeforeBreak.docxbin0 -> 49510 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135973.odtbin0 -> 14301 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136059.odtbin0 -> 17964 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonCurve.odtbin0 -> 15739 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonLineShape.odtbin0 -> 15715 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136404.fodt65
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136441_commentInFootnote.odtbin0 -> 11777 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docxbin0 -> 39738 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136617.docxbin0 -> 20185 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136667.docxbin0 -> 12729 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136814.odtbin0 -> 8249 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136841.docxbin0 -> 15697 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136850.docxbin0 -> 31943 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136929_framesOfParagraph.odtbin0 -> 179339 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136952_pgBreak3B.odtbin0 -> 14321 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137295.docbin0 -> 26624 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137466.docxbin0 -> 20243 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137593.docxbin0 -> 15697 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137641_RelativeFromTopMargin.docxbin0 -> 19650 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docxbin0 -> 13163 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137655.docxbin0 -> 33098 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137678_testVmlLineShapeMirroredY.docxbin0 -> 13192 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137683_charHighlightTests.docxbin0 -> 9877 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137742.docxbin0 -> 6925 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137765_testVmlLineShapeRotated.docxbin0 -> 13280 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137850_compat14ZOrder.docxbin0 -> 24821 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137850_compat15ZOrder.docxbin0 -> 24816 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138093.docxbin0 -> 39532 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138345_charStyleHighlight.docxbin0 -> 4434 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138345_numberingHighlight.docxbin0 -> 5752 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138374.odtbin0 -> 10053 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138612.docxbin0 -> 36179 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138739.docxbin0 -> 16780 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138771.docxbin0 -> 26757 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138780.odtbin0 -> 9383 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docxbin0 -> 18468 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138899.docxbin0 -> 22715 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf139128.odtbin0 -> 8645 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf139549.docxbin0 -> 18155 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf139580.odtbin0 -> 17378 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf139759_commentHighlightBackground.docxbin0 -> 10319 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf139948.docxbin0 -> 12765 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140137.docxbin0 -> 28792 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docxbin0 -> 34729 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odtbin0 -> 10529 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140572_docDefault_superscript.docxbin0 -> 16387 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140597.docxbin0 -> 13966 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140668.docxbin0 -> 14629 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141172.docxbin0 -> 16286 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf61
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docxbin0 -> 20367 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141548.docxbin0 -> 4675 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141550.docxbin0 -> 18735 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141660.docxbin0 -> 35150 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumberTortureTest.docxbin0 -> 6323 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumbering.docxbin0 -> 6846 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odtbin0 -> 9135 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142387.docxbin0 -> 13268 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docxbin0 -> 9218 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142404_tabOverSpacingC15.odtbin0 -> 16596 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docxbin0 -> 9287 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142407.docxbin0 -> 13527 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142433_WrapPolygonCustomShape.odtbin0 -> 13306 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142464_ampm.docxbin0 -> 15171 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142486_FrameShadow.odtbin0 -> 14129 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142486_LeftMarginShadowLeft.docxbin0 -> 21616 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142542_cancelledAutospacing.docxbin0 -> 23239 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docxbin0 -> 4371 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142700.docxbin0 -> 18373 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143175.docxbin0 -> 4651 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_glow_rotate.docxbin0 -> 27622 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_stroke_shadow.docxbin0 -> 20398 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143384_tableInFoot_negativeMargins.docxbin0 -> 58566 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143399.docxbin0 -> 10556 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143432_Frame_WrapTextMode.odtbin0 -> 14147 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143583_emptyParaAtEndOfFootnote.docxbin0 -> 8777 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143692_outlineLevelTortureTest.docxbin0 -> 20964 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odtbin0 -> 9408 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf144362.odtbin0 -> 10328 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf144563.docxbin0 -> 17488 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf144668.odtbin0 -> 8913 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf145998_unnecessaryPageStyles.odtbin0 -> 11742 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146171.docxbin0 -> 11710 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146346.docxbin0 -> 20285 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146491.odtbin0 -> 31278 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146515.odtbin0 -> 12991 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146802.docxbin0 -> 72360 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146851_1.docxbin0 -> 12378 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146851_2.docxbin0 -> 14171 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146955.odtbin0 -> 77189 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf146984_anchorInShape.docxbin0 -> 279883 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf147115_defaultStyle.docxbin0 -> 12060 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf147646_mergedCellNumbering.docxbin0 -> 16540 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf147724.docxbin0 -> 9928 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf147810.odtbin0 -> 10890 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf147861_customField.docxbin0 -> 6473 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf147892.fodt25
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf147978_enhancedPath_commandABVW.odtbin0 -> 11581 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148026.fodt14
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148052.docxbin0 -> 17854 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148111.docxbin0 -> 18731 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148132.docxbin0 -> 3702 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148273_sectionBulletFormatLeak.docxbin0 -> 15161 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148360.docxbin0 -> 3574 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148361.docxbin0 -> 10663 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148380_createField.docxbin0 -> 12312 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148380_fldLocked.docxbin0 -> 12547 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148380_modifiedField.docxbin0 -> 7267 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148380_printField.docxbin0 -> 9399 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docxbin0 -> 16239 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148455_1.docxbin0 -> 3038 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148455_2.docxbin0 -> 3022 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148494.docxbin0 -> 11605 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148671.docxbin0 -> 33869 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148720.odtbin0 -> 11848 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148834_lineNumbering.odtbin0 -> 17756 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148952.odtbin0 -> 11038 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148956_directEndFormatting.docxbin0 -> 6147 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149089.docxbin0 -> 100716 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149198.docxbin0 -> 3018 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149200.docxbin0 -> 2880 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149313.docxbin0 -> 2106 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149388.docxbin0 -> 20546 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149388_fly.docxbin0 -> 20251 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149546.docxbin0 -> 23264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149551_mongolianVert.docxbin0 -> 19164 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149649.docxbin0 -> 26280 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149708.docxbin0 -> 5633 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf149711.docxbin0 -> 13619 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf150166.docxbin0 -> 15751 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf150542.docxbin0 -> 2978 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf150824.fodt48
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf150966_regularInset.docxbin0 -> 17569 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docmbin0 -> 47797 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf151704_thinColumnHeight.docxbin0 -> 14184 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf151912.docxbin0 -> 3666 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf152200-field+textbox.docxbin0 -> 15009 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf152203.docxbin0 -> 7778 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf152425.docxbin0 -> 16904 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf152506.docxbin0 -> 7803 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak.odtbin0 -> 8632 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docxbin0 -> 16206 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153042_largeTab.docxbin0 -> 14504 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153042_noTab.docxbin0 -> 14550 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153104.docxbin0 -> 16519 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153128.docxbin0 -> 13425 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153255.docxbin0 -> 14233 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153526_commentInNumbering.docxbin0 -> 8910 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docxbin0 -> 6866 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak.docxbin0 -> 21473 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak2.docxbin0 -> 18324 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak3.docxbin0 -> 18336 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak6.docxbin0 -> 18330 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak.docxbin0 -> 21240 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak2.docxbin0 -> 15272 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docxbin0 -> 46930 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docxbin0 -> 22616 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153804.docxbin0 -> 8159 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153891.docxbin0 -> 24988 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153964_firstIndentAfterBreak14.docxbin0 -> 18361 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153964_numberingAfterBreak14.docxbin0 -> 13436 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak14.docxbin0 -> 14353 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak15.docxbin0 -> 14358 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docxbin0 -> 21425 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154478.docxbin0 -> 46878 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154481.docxbin0 -> 46878 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docxbin0 -> 14038 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154703_framePr2.rtf187
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154703_framePrTextDirection.docxbin0 -> 13534 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154703_framePrWrapSpacing.docxbin0 -> 13991 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf154751_dualStrikethrough.docxbin0 -> 11980 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf155690.docxbin0 -> 17677 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf155736_PageNumbers_footer.docxbin0 -> 29799 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf155903.odtbin0 -> 11839 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf155945.docxbin0 -> 1892 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf156372.docbin0 -> 31232 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docxbin0 -> 9954 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docxbin0 -> 22502 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf157572_defaultVAnchor.docxbin0 -> 12702 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf157572_insidiousCombination.docxbin0 -> 12689 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf157572_noVAlignAsText.docxbin0 -> 12704 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf157598.docxbin0 -> 15043 bytes
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf158044.odtbin0 -> 14032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf158436.docxbin0 -> 12243 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docxbin0 -> 13309 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docxbin0 -> 8960 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf38778_properties_in_run_for_field.docbin0 -> 25600 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf41466_testVmlShapeWithTextbox.docxbin0 -> 21651 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odtbin0 -> 15669 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf41542_imagePadding.odtbin0 -> 17926 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf44278.docxbin0 -> 14451 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odtbin0 -> 19830 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf44986.docxbin0 -> 14593 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf46938_clearTabStop.docxbin0 -> 10264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf46940_dontEquallyDistributeColumns.docxbin0 -> 8068 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf48569.odtbin0 -> 13858 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf49073.docxbin0 -> 17584 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf53856_conflictingStyle.docxbin0 -> 16157 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf55427_footnote2endnote.odtbin0 -> 13291 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf57589_hashColor.docxbin0 -> 11515 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docxbin0 -> 16640 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf59274.docxbin0 -> 5167 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf59699.docxbin0 -> 13232 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docxbin0 -> 4499 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docxbin0 -> 11915 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf64264.docxbin0 -> 13501 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf64372_continuousBreaks.docxbin0 -> 11735 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf64531.docxbin0 -> 13683 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf65955.odtbin0 -> 8827 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf65955_2.odtbin0 -> 8898 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf66039.docxbin0 -> 23717 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf66398_permissions.docxbin0 -> 10420 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf66401.docxbin0 -> 16369 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf66496.docxbin0 -> 21752 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf67207.docxbin0 -> 5186 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf70234.docxbin0 -> 12301 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf73499.docxbin0 -> 16470 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf73547-dash.docxbin0 -> 7308 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf76022_textboxWrap.odtbin0 -> 13878 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf76683_negativeTwipsMeasure.docxbin0 -> 12051 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docxbin0 -> 10550 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docxbin0 -> 10554 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docxbin0 -> 21999 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf77417.docxbin0 -> 57079 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf77796.docxbin0 -> 60288 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf78352.docxbin0 -> 15491 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docxbin0 -> 21039 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf78749.docxbin0 -> 18316 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf78902.docxbin0 -> 30230 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf79272_strictDxa.docxbin0 -> 12279 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf79329.docxbin0 -> 21212 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf79435_legacyInputFields.docbin0 -> 13312 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docxbin0 -> 15114 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf81100.docxbin0 -> 29760 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf81345.docxbin0 -> 221506 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf81507.docxbin0 -> 20183 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf81567.odtbin0 -> 10892 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docxbin0 -> 12533 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docxbin0 -> 14321 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf82173_footnoteStyle.docxbin0 -> 14012 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docxbin0 -> 5432 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docxbin0 -> 7885 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf82177_outsideCellBorders.docxbin0 -> 8990 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf82177_tblBorders.docxbin0 -> 9673 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf8255.docxbin0 -> 27607 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf83227.docxbin0 -> 14647 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf83300.docxbin0 -> 9948 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf83309.docxbin0 -> 111543 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf84678.docxbin0 -> 17834 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf85161.docxbin0 -> 15730 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf86374.docxbin0 -> 13194 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf86926_A3.docxbin0 -> 5465 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf87348_linkedTextboxes.docxbin0 -> 18697 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf87460.docxbin0 -> 17343 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf87569_drawingml.docxbin0 -> 14935 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf87569_vml.docxbin0 -> 50503 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf87924.docxbin0 -> 15925 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf88496.docxbin0 -> 25175 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf88583.odtbin0 -> 8471 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf89165.docxbin0 -> 89495 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf89377_tableWithBreakBeforeParaStyle.docxbin0 -> 11507 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf89702.docxbin0 -> 13147 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf89774.fodt11
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf89791.docxbin0 -> 3989 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf89890.docxbin0 -> 41925 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf89991.docxbin0 -> 5543 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90153.docxbin0 -> 4856 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90611.docxbin0 -> 14706 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90681-1.odtbin0 -> 13089 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90681-2.odtbin0 -> 16590 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90697_complexBreaksHeaders.docxbin0 -> 42783 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90789-2.docxbin0 -> 12372 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90789.docxbin0 -> 12023 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90810short.docxbin0 -> 22286 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90906_colAuto.docxbin0 -> 37477 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf90906_colAutoB.docxbin0 -> 9479 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf91122.docxbin0 -> 16946 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf91260.docxbin0 -> 16422 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf91261.docxbin0 -> 22081 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf91417.docxbin0 -> 13007 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf91429.docxbin0 -> 7989 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf91594.docxbin0 -> 13037 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92045.docxbin0 -> 12629 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92124.docxbin0 -> 7042 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92157.docxbin0 -> 25188 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92335.docxbin0 -> 5287 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92454.docxbin0 -> 32409 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docxbin0 -> 5154 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92472.docxbin0 -> 27734 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92521.odtbin0 -> 8891 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92524_autoColor.docbin0 -> 62464 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92526_ShapeLineWidth.odtbin0 -> 9163 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex.docxbin0 -> 26913 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex2.docxbin0 -> 16057 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf93676-1.odtbin0 -> 18743 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf93919.docxbin0 -> 15336 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf94043.docxbin0 -> 12326 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf94374.docxbin0 -> 12578 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf94628.docxbin0 -> 10434 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf94801.docxbin0 -> 16128 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95031.docxbin0 -> 14024 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95033.docxbin0 -> 22773 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95189.docxbin0 -> 27705 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95213.docxbin0 -> 17747 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95367_inheritFollowStyle.docxbin0 -> 13861 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95374.docxbin0 -> 42873 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95376.docxbin0 -> 25375 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95377.docxbin0 -> 11982 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95495.docxbin0 -> 102240 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95775.docxbin0 -> 22523 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95777.docxbin0 -> 19126 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95848.docxbin0 -> 34087 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf95848_2.docxbin0 -> 14087 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf96750_landscapeFollow.docxbin0 -> 24129 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf97090.docxbin0 -> 29899 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf97371.docxbin0 -> 18800 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf97517_testVmlLineShapeMirroredX.docxbin0 -> 11539 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docxbin0 -> 16115 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf97648_relativeWidth.docxbin0 -> 17613 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odtbin0 -> 9418 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odtbin0 -> 9321 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf98700_keepWithNext.odtbin0 -> 12680 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99074.docxbin0 -> 12608 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99090_pgbrkAfterTable.docxbin0 -> 14726 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99140.docxbin0 -> 13349 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99227.docxbin0 -> 15636 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript.docxbin0 -> 10669 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript2.odtbin0 -> 12475 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99602_subscript_charStyleSize.docxbin0 -> 10623 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docxbin0 -> 11742 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99631.docxbin0 -> 32417 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odtbin0 -> 9720 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test76108.docxbin0 -> 14419 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test76317.docxbin0 -> 17705 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test76317_2K10.docxbin0 -> 20751 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test76734_2K7.docxbin0 -> 10446 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test77219.docxbin0 -> 82015 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testCrashWhileSave.docxbin0 -> 40873 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testCustomShapePresetExport.odtbin0 -> 86157 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testFootnote.docxbin0 -> 24191 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testGlossary.docxbin0 -> 25741 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testOuterShdw.docxbin0 -> 272537 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testPageref.docxbin0 -> 26321 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testParaListRightIndent.docxbin0 -> 12774 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testPgMargin.docxbin0 -> 10448 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTOCFlag_u.docxbin0 -> 17390 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTcBorders.docxbin0 -> 55225 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTdf130167_spilloverHeader.docxbin0 -> 47532 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTextBoxZOrder.docxbin0 -> 17635 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTitlePage.docxbin0 -> 16479 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedEmptyParagraph.docxbin0 -> 12394 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedParagraphMark.docxbin0 -> 16364 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docxbin0 -> 13744 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableRow.docxbin0 -> 16518 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesEmptyParagraphsInADeletion.docxbin0 -> 13952 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedParagraphMark.docxbin0 -> 16376 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docxbin0 -> 13842 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableRow.docxbin0 -> 16290 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testTrackChangesParagraphProperties.docxbin0 -> 16307 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testWPGZOrder.docxbin0 -> 30061 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testWPGtextboxes.docxbin0 -> 19842 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/testWordArtWithinDraingtool.docxbin0 -> 45324 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_GIF_ImageCrop.docxbin0 -> 19624 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_PNG_ImageCrop.docxbin0 -> 57502 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_extra_image.docxbin0 -> 120620 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_indentation.docxbin0 -> 12896 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_line_spacing.docxbin0 -> 9997 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_msword_hang.docxbin0 -> 11209 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_ole_object.docxbin0 -> 286633 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docxbin0 -> 20357 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docxbin0 -> 55619 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_tdf120412.docxbin0 -> 11820 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textWatermark.docxbin0 -> 17870 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/text_cardinal_list.docxbin0 -> 8844 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/text_number_list.docxbin0 -> 8966 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/text_ordinal_list.docxbin0 -> 8907 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textbox-right-edge.docxbin0 -> 13896 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textbox-rounded-corners.docxbin0 -> 16225 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textbox-table.docxbin0 -> 16404 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textbox-wpg-only.docxbin0 -> 16526 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textbox_picturefill.docxbin0 -> 383971 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textframe-borders.docxbin0 -> 10440 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textframe-gradient.docxbin0 -> 13655 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textframes.odtbin0 -> 8853 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textinput.odtbin0 -> 9544 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/theme-preservation.docxbin0 -> 15173 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/toc_doc.docxbin0 -> 15698 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tools-line-numbering.docxbin0 -> 15052 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/toxmarkhyperlink.fodt52
-rw-r--r--sw/qa/extras/ooxmlexport/data/transparent-shadow.docxbin0 -> 14091 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tscp.docxbin0 -> 4878 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/unbalanced-columns.docxbin0 -> 12820 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/unwanted-section-break.docxbin0 -> 15710 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/vml-text-vertical-adjust.docxbin0 -> 10578 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/watermark-font.docxbin0 -> 18824 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/watermark-shapetype.docxbin0 -> 17830 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/watermark.docxbin0 -> 19473 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/wpg-nested.docxbin0 -> 34068 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/wpg-only.docxbin0 -> 13503 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/wps-char-color.docxbin0 -> 15589 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/wps-only.docxbin0 -> 13180 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/wrap-tight-through.docxbin0 -> 18524 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/zoom.docxbin0 -> 10625 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx145
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlencryption.cxx52
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx982
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx739
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx874
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx2348
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx1341
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx1610
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx1065
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport16.cxx1098
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport17.cxx1157
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport18.cxx879
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport19.cxx1224
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport2.cxx1153
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport20.cxx1125
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx1234
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx1313
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx699
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx1055
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx1150
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx1240
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx1604
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport_template.cxx36
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx972
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmllinks.cxx226
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlw14export.cxx636
1470 files changed, 28947 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/090716_Studentische_Arbeit_VWS.docx b/sw/qa/extras/ooxmlexport/data/090716_Studentische_Arbeit_VWS.docx
new file mode 100644
index 0000000000..bfed379195
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/090716_Studentische_Arbeit_VWS.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx b/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx
new file mode 100644
index 0000000000..d821c6698f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/1-table-1-page.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/128197_compat14.docx b/sw/qa/extras/ooxmlexport/data/128197_compat14.docx
new file mode 100644
index 0000000000..507e283960
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/128197_compat14.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/128197_compat15.docx b/sw/qa/extras/ooxmlexport/data/128197_compat15.docx
new file mode 100644
index 0000000000..d618b117cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/128197_compat15.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt b/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt
new file mode 100644
index 0000000000..223fda16df
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/1_page.docx b/sw/qa/extras/ooxmlexport/data/1_page.docx
new file mode 100644
index 0000000000..9b8638dd3f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/1_page.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/2-id.docx b/sw/qa/extras/ooxmlexport/data/2-id.docx
new file mode 100644
index 0000000000..6d05e68a6c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2-id.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/2120112713.docx b/sw/qa/extras/ooxmlexport/data/2120112713.docx
new file mode 100644
index 0000000000..5de6378b77
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2120112713.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docx b/sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docx
new file mode 100644
index 0000000000..10dfd31ab2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/2129393649.docx b/sw/qa/extras/ooxmlexport/data/2129393649.docx
new file mode 100644
index 0000000000..e1fd7581f0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2129393649.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/2_table_doc.docx b/sw/qa/extras/ooxmlexport/data/2_table_doc.docx
new file mode 100644
index 0000000000..21513ec2cc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2_table_doc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/2col-header.docx b/sw/qa/extras/ooxmlexport/data/2col-header.docx
new file mode 100644
index 0000000000..3e8f2c459d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2col-header.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/99_Fields.docx b/sw/qa/extras/ooxmlexport/data/99_Fields.docx
new file mode 100644
index 0000000000..e0ee431e33
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/99_Fields.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/AnchorId.docx b/sw/qa/extras/ooxmlexport/data/AnchorId.docx
new file mode 100644
index 0000000000..b1b66684d3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/AnchorId.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docx b/sw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docx
new file mode 100644
index 0000000000..0d3b74b77c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docx b/sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docx
new file mode 100644
index 0000000000..d1f0f97f10
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ColorOverwritten.docx b/sw/qa/extras/ooxmlexport/data/ColorOverwritten.docx
new file mode 100644
index 0000000000..f1c8e527df
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ColorOverwritten.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/CommentDone.docx b/sw/qa/extras/ooxmlexport/data/CommentDone.docx
new file mode 100644
index 0000000000..1ce5993d44
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/CommentDone.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/CommentReply.docx b/sw/qa/extras/ooxmlexport/data/CommentReply.docx
new file mode 100644
index 0000000000..e3a648aa43
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/CommentReply.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/EmbeddedExcelChart.docx b/sw/qa/extras/ooxmlexport/data/EmbeddedExcelChart.docx
new file mode 100644
index 0000000000..567660b8e1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/EmbeddedExcelChart.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Encrypted_LO_Standard_abc.docx b/sw/qa/extras/ooxmlexport/data/Encrypted_LO_Standard_abc.docx
new file mode 100644
index 0000000000..c35aaf12ad
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Encrypted_LO_Standard_abc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2007_abc.docx b/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2007_abc.docx
new file mode 100644
index 0000000000..27566d4a73
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2007_abc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2010_abc.docx b/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2010_abc.docx
new file mode 100644
index 0000000000..4881e351db
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2010_abc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2013_abc.docx b/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2013_abc.docx
new file mode 100644
index 0000000000..28fa85c261
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Encrypted_MSO2013_abc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/EquationAsScientificNumbering.docx b/sw/qa/extras/ooxmlexport/data/EquationAsScientificNumbering.docx
new file mode 100644
index 0000000000..e6d6bdf448
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/EquationAsScientificNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/EquationWithAboveAndBelowCaption.docx b/sw/qa/extras/ooxmlexport/data/EquationWithAboveAndBelowCaption.docx
new file mode 100644
index 0000000000..7657d05078
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/EquationWithAboveAndBelowCaption.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO73034.docx b/sw/qa/extras/ooxmlexport/data/FDO73034.docx
new file mode 100644
index 0000000000..c3f8c926ea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO73034.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO73546.docx b/sw/qa/extras/ooxmlexport/data/FDO73546.docx
new file mode 100644
index 0000000000..4682971968
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO73546.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO74105.docx b/sw/qa/extras/ooxmlexport/data/FDO74105.docx
new file mode 100644
index 0000000000..4299cf9c21
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO74105.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO74106.docx b/sw/qa/extras/ooxmlexport/data/FDO74106.docx
new file mode 100644
index 0000000000..3b62573253
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO74106.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO74215.docx b/sw/qa/extras/ooxmlexport/data/FDO74215.docx
new file mode 100644
index 0000000000..fd2cc552ef
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO74215.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO74774.docx b/sw/qa/extras/ooxmlexport/data/FDO74774.docx
new file mode 100644
index 0000000000..11242475fa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO74774.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO74775.docx b/sw/qa/extras/ooxmlexport/data/FDO74775.docx
new file mode 100644
index 0000000000..a8ee58895c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO74775.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO75133.docx b/sw/qa/extras/ooxmlexport/data/FDO75133.docx
new file mode 100644
index 0000000000..93170ddc6d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO75133.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO76248.docx b/sw/qa/extras/ooxmlexport/data/FDO76248.docx
new file mode 100644
index 0000000000..c7b868e3f6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO76248.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO76312.docx b/sw/qa/extras/ooxmlexport/data/FDO76312.docx
new file mode 100644
index 0000000000..b41ae7a720
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO76312.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO77715.docx b/sw/qa/extras/ooxmlexport/data/FDO77715.docx
new file mode 100644
index 0000000000..f93a46e0f3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO77715.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO78292.docx b/sw/qa/extras/ooxmlexport/data/FDO78292.docx
new file mode 100644
index 0000000000..0388c0a5df
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO78292.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FDO78590.docx b/sw/qa/extras/ooxmlexport/data/FDO78590.docx
new file mode 100644
index 0000000000..c32b0276b9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO78590.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FigureAsLabelPicture.docx b/sw/qa/extras/ooxmlexport/data/FigureAsLabelPicture.docx
new file mode 100644
index 0000000000..50415bc1c9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FigureAsLabelPicture.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/FileWithInvalidImageLink.docx b/sw/qa/extras/ooxmlexport/data/FileWithInvalidImageLink.docx
new file mode 100644
index 0000000000..6ad5cac388
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FileWithInvalidImageLink.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Hau_min_list2.fodt b/sw/qa/extras/ooxmlexport/data/Hau_min_list2.fodt
new file mode 100644
index 0000000000..715fbcde8b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Hau_min_list2.fodt
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Lucida Sans Unicode" svg:font-family="&apos;Lucida Sans Unicode&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:font-size="11pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" style:line-height-at-least="0.46cm"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Lucida Sans Unicode" style:font-family-asian="&apos;Lucida Sans Unicode&apos;" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
+ <style:text-properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:list-style style:name="Numbering_20_123" style:display-name="Numbering 123">
+ <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="">
+ <style:list-level-properties text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="">
+ <style:list-level-properties text:space-before="1cm" text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-format="">
+ <style:list-level-properties text:space-before="1cm" text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="1cm" text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="1cm" text:min-label-width="1cm" text:min-label-distance="0.381cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:min-label-distance="0.381cm" fo:text-align="end"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:min-label-distance="0.381cm" fo:text-align="end"/>
+ </text:list-level-style-number>
+ </text:list-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="-0.704cm" style:auto-text-indent="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="-0.704cm" style:auto-text-indent="false" style:writing-mode="rl-tb">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P8" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0.741cm" style:auto-text-indent="false"/>
+ </style:style>
+ <style:style style:name="P11" style:family="paragraph" style:parent-style-name="List" style:list-style-name="Numbering_20_123">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="end" style:justify-single-word="false" fo:text-indent="0.741cm" style:auto-text-indent="false" style:writing-mode="rl-tb"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" fo:background-color="transparent" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" draw:fill="none" draw:fill-color="#99ccff" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:list xml:id="list2248535956" text:style-name="Numbering_20_123">
+ <text:list-item>
+ <text:p text:style-name="P2">III.<text:tab/>Level 1</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P2">level 2 has width</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P2">level 3 has indent</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P2">level 4 has width + indent</text:p>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P8">level 1 with positive on para</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P8">level 2</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P8">level 3</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P8">level 4</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P2">III.<text:tab/>Level 5</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P2">level 6 has width</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P2">level 7 has indent</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P2">level 8 has width + indent</text:p>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P8">level 5 with positive on para</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P8">level 6</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P8">level 7</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P8">level 8</text:p>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ <text:p text:style-name="P1"/>
+ <text:list xml:id="list131919252068408" text:continue-numbering="true" text:style-name="Numbering_20_123">
+ <text:list-item>
+ <text:p text:style-name="P6">III.<text:tab/>Level 1</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P6">level 2 has width</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P6">level 3 has indent</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P6">level 4 has width + indent</text:p>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P11">level 1 with positive on para</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P11">level 2</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P11">level 3</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P11">level 4</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P6">III.<text:tab/>Level 5</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P6">level 6 has width</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P6">level 7 has indent</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P6">level 8 has width + indent</text:p>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P11">level 5 with positive on para</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P11">level 6</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P11">level 7</text:p>
+ <text:list>
+ <text:list-item>
+ <text:p text:style-name="P11">level 8</text:p>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ </text:list-item>
+ </text:list>
+ <text:p text:style-name="P1"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/ImageCrop.docx b/sw/qa/extras/ooxmlexport/data/ImageCrop.docx
new file mode 100644
index 0000000000..120ce78eb7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ImageCrop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/IndexFieldFlagF.docx b/sw/qa/extras/ooxmlexport/data/IndexFieldFlagF.docx
new file mode 100644
index 0000000000..2c7d365271
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/IndexFieldFlagF.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx
new file mode 100644
index 0000000000..b8eceb92de
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/LineStyle_DashType_VML.docx b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType_VML.docx
new file mode 100644
index 0000000000..8b95672318
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType_VML.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/LinkedTextBoxes.docx b/sw/qa/extras/ooxmlexport/data/LinkedTextBoxes.docx
new file mode 100644
index 0000000000..48a5f64e38
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/LinkedTextBoxes.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/NoFillAttrInImagedata.docx b/sw/qa/extras/ooxmlexport/data/NoFillAttrInImagedata.docx
new file mode 100644
index 0000000000..3819e7931a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/NoFillAttrInImagedata.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/NumberedList.docx b/sw/qa/extras/ooxmlexport/data/NumberedList.docx
new file mode 100644
index 0000000000..53f4490d40
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/NumberedList.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/PreserveWfieldTOC.docx b/sw/qa/extras/ooxmlexport/data/PreserveWfieldTOC.docx
new file mode 100644
index 0000000000..ac294fd0fe
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/PreserveWfieldTOC.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx b/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx
new file mode 100644
index 0000000000..adf7fd9249
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/SdtContent.docx b/sw/qa/extras/ooxmlexport/data/SdtContent.docx
new file mode 100644
index 0000000000..91e0ef0e44
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/SdtContent.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Shape.docx b/sw/qa/extras/ooxmlexport/data/Shape.docx
new file mode 100644
index 0000000000..474e6ffc2b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Shape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ShapeOverlappingWithSdt.docx b/sw/qa/extras/ooxmlexport/data/ShapeOverlappingWithSdt.docx
new file mode 100644
index 0000000000..e1ec07489e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ShapeOverlappingWithSdt.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt b/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt
new file mode 100644
index 0000000000..475f59e051
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/SvgImageTest.odt b/sw/qa/extras/ooxmlexport/data/SvgImageTest.odt
new file mode 100644
index 0000000000..3b37fe7998
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/SvgImageTest.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docx b/sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docx
new file mode 100644
index 0000000000..f231d6f842
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docx b/sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docx
new file mode 100644
index 0000000000..227f2862c6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docx b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docx
new file mode 100644
index 0000000000..17d3feeb34
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docx b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docx
new file mode 100644
index 0000000000..9608736cf2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx b/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx
new file mode 100644
index 0000000000..6d890acdb5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TOC_field_b.docx b/sw/qa/extras/ooxmlexport/data/TOC_field_b.docx
new file mode 100644
index 0000000000..b8ff32b3bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TOC_field_b.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TOC_field_f.docx b/sw/qa/extras/ooxmlexport/data/TOC_field_f.docx
new file mode 100644
index 0000000000..ea0958a218
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TOC_field_f.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Table-of-Figures.odt b/sw/qa/extras/ooxmlexport/data/Table-of-Figures.odt
new file mode 100644
index 0000000000..cd1502cf86
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Table-of-Figures.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TableWithAboveCaptions.docx b/sw/qa/extras/ooxmlexport/data/TableWithAboveCaptions.docx
new file mode 100644
index 0000000000..f445ab6b15
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TableWithAboveCaptions.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Table_cell_auto_width_fdo69656.docx b/sw/qa/extras/ooxmlexport/data/Table_cell_auto_width_fdo69656.docx
new file mode 100644
index 0000000000..10b8f9de21
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Table_cell_auto_width_fdo69656.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Tdf147485.docx b/sw/qa/extras/ooxmlexport/data/Tdf147485.docx
new file mode 100644
index 0000000000..cb630efb87
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Tdf147485.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TestPuzzleExport.odt b/sw/qa/extras/ooxmlexport/data/TestPuzzleExport.odt
new file mode 100644
index 0000000000..6f7a62deec
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TestPuzzleExport.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TestVMLData.docx b/sw/qa/extras/ooxmlexport/data/TestVMLData.docx
new file mode 100644
index 0000000000..a2f89b146c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TestVMLData.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Test_CharUnderlineThemeColor.docx b/sw/qa/extras/ooxmlexport/data/Test_CharUnderlineThemeColor.docx
new file mode 100644
index 0000000000..3ee3cdf457
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Test_CharUnderlineThemeColor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Test_ThemeBorderColor.docx b/sw/qa/extras/ooxmlexport/data/Test_ThemeBorderColor.docx
new file mode 100644
index 0000000000..fe1b188580
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Test_ThemeBorderColor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.docx b/sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.docx
new file mode 100644
index 0000000000..c644ed2d7f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.fodt b/sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.fodt
new file mode 100644
index 0000000000..afa565250e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Test_ThemePortionLevel_CharColor.fodt
@@ -0,0 +1,420 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>quikee</meta:initial-creator><dc:creator>quikee</dc:creator><meta:editing-cycles>2</meta:editing-cycles><meta:creation-date>2023-06-06T13:26:00</meta:creation-date><dc:date>2023-06-06T13:32:00</dc:date><meta:editing-duration>PT6M</meta:editing-duration><meta:generator>LibreOfficeDev/7.6.0.0.alpha1$Linux_X86_64 LibreOffice_project/5a25d9252791409f5e73616ff752a9ae8227aaf7</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="2" meta:character-count="11" meta:non-whitespace-character-count="10"/><meta:user-defined meta:name="AppVersion">16.0000</meta:user-defined><meta:template xlink:type="simple" xlink:actuate="onRequest" xlink:title="Normal.dotm" xlink:href=""/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">39848</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">8945</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">11963</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3041</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">39846</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">8943</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="WordLikeWrapForAsCharFlys" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">1874693</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">1874693</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Calibri1" svg:font-family="Calibri" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="F" svg:font-family="" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Sans CJK SC" svg:font-family="&apos;Noto Sans CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="11pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="Calibri1" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="F" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.27cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="11pt" fo:language="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="Calibri1" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="F" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.282cm" style:contextual-spacing="false" fo:line-height="108%" fo:text-align="start" style:justify-single-word="false" fo:orphans="2" fo:widows="2" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="&apos;Noto Sans CJK SC&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lohit Devanagari1" style:font-family-complex="&apos;Lohit Devanagari&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;"/>
+ </style:style>
+ <style:style style:name="Default_20_Paragraph_20_Font_20__28_WW_29_" style:display-name="Default Paragraph Font (WW)" style:family="text"/>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:list-style style:name="No_20_List_20__28_WW_29_" style:display-name="No List (WW)">
+ <text:list-level-style-number text:level="1" loext:num-list-format="%1%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" loext:num-list-format="%2%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" loext:num-list-format="%3%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" loext:num-list-format="%4%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm" fo:margin-left="3.175cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" loext:num-list-format="%5%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" loext:num-list-format="%6%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" loext:num-list-format="%7%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" loext:num-list-format="%8%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" loext:num-list-format="%9%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" loext:num-list-format="%10%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ </text:list-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <style:default-page-layout>
+ <style:page-layout-properties style:layout-grid-standard-mode="true"/>
+ </style:default-page-layout>
+ <loext:theme loext:name="Office Theme">
+ <loext:theme-colors loext:name="Red">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#323232"/>
+ <loext:color loext:name="light2" loext:color="#e5c243"/>
+ <loext:color loext:name="accent1" loext:color="#a5300f"/>
+ <loext:color loext:name="accent2" loext:color="#d55816"/>
+ <loext:color loext:name="accent3" loext:color="#e19825"/>
+ <loext:color loext:name="accent4" loext:color="#b19c7d"/>
+ <loext:color loext:name="accent5" loext:color="#7f5f52"/>
+ <loext:color loext:name="accent6" loext:color="#b27d49"/>
+ <loext:color loext:name="hyperlink" loext:color="#6b9f25"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#b26b02"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:color="#ef9769" loext:opacity="100%">
+ <loext:char-complex-color loext:theme-type="accent2" loext:color-type="theme">
+ <loext:transformation loext:type="tint" loext:value="4000"/>
+ </loext:char-complex-color>
+ </style:text-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="2.54cm" fo:margin-right="2.54cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="38" style:layout-grid-base-height="0.635cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:layout-grid-base-width="0.423cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm3" style:page-usage="left">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm4" style:page-usage="right">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm5">
+ <style:page-layout-properties fo:page-width="22.901cm" fo:page-height="11.4cm" style:num-format="1" style:print-orientation="landscape" fo:margin-top="0cm" fo:margin-bottom="0cm" fo:margin-left="0cm" fo:margin-right="0cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm6">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1cm" fo:margin-bottom="1cm" fo:margin-left="2cm" fo:margin-right="1cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm7">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm8">
+ <style:page-layout-properties fo:page-width="29.7cm" fo:page-height="21.001cm" style:num-format="1" style:print-orientation="landscape" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ <style:master-page style:name="First_20_Page" style:display-name="First Page" style:page-layout-name="pm2" style:next-style-name="Standard"/>
+ <style:master-page style:name="Left_20_Page" style:display-name="Left Page" style:page-layout-name="pm3" style:next-style-name="Right_20_Page"/>
+ <style:master-page style:name="Right_20_Page" style:display-name="Right Page" style:page-layout-name="pm4" style:next-style-name="Left_20_Page"/>
+ <style:master-page style:name="Envelope" style:page-layout-name="pm5"/>
+ <style:master-page style:name="Index" style:page-layout-name="pm2"/>
+ <style:master-page style:name="HTML" style:page-layout-name="pm6"/>
+ <style:master-page style:name="Footnote" style:page-layout-name="pm7"/>
+ <style:master-page style:name="Endnote" style:page-layout-name="pm7"/>
+ <style:master-page style:name="Landscape" style:page-layout-name="pm8"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="Standard" loext:marker-style-name="T1"><text:span text:style-name="T1">Sample Text</text:span></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docx b/sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docx
new file mode 100644
index 0000000000..5b012f0133
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextEffects_Glow_Shadow_Reflection.docx b/sw/qa/extras/ooxmlexport/data/TextEffects_Glow_Shadow_Reflection.docx
new file mode 100644
index 0000000000..e7412077cc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextEffects_Glow_Shadow_Reflection.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextEffects_Groupshapes.docx b/sw/qa/extras/ooxmlexport/data/TextEffects_Groupshapes.docx
new file mode 100644
index 0000000000..85f7a55ae9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextEffects_Groupshapes.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextEffects_InStyle.docx b/sw/qa/extras/ooxmlexport/data/TextEffects_InStyle.docx
new file mode 100644
index 0000000000..5be6d9c5f9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextEffects_InStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextEffects_Props3d_Ligatures_NumForm_NumSpacing.docx b/sw/qa/extras/ooxmlexport/data/TextEffects_Props3d_Ligatures_NumForm_NumSpacing.docx
new file mode 100644
index 0000000000..e8636ec1e9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextEffects_Props3d_Ligatures_NumForm_NumSpacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextEffects_StylisticSets_CntxtAlts.docx b/sw/qa/extras/ooxmlexport/data/TextEffects_StylisticSets_CntxtAlts.docx
new file mode 100644
index 0000000000..7233104764
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextEffects_StylisticSets_CntxtAlts.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextEffects_TextFill.docx b/sw/qa/extras/ooxmlexport/data/TextEffects_TextFill.docx
new file mode 100644
index 0000000000..383d0a0215
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextEffects_TextFill.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextEffects_TextOutline.docx b/sw/qa/extras/ooxmlexport/data/TextEffects_TextOutline.docx
new file mode 100644
index 0000000000..4ceb40c0e3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextEffects_TextOutline.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/TextFrameRotation.docx b/sw/qa/extras/ooxmlexport/data/TextFrameRotation.docx
new file mode 100644
index 0000000000..ac7c2236bf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/TextFrameRotation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/UnknownStyleInRedline.docx b/sw/qa/extras/ooxmlexport/data/UnknownStyleInRedline.docx
new file mode 100644
index 0000000000..37457fe1e8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/UnknownStyleInRedline.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/Unsupportedtextfields.docx b/sw/qa/extras/ooxmlexport/data/Unsupportedtextfields.docx
new file mode 100644
index 0000000000..698142effe
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Unsupportedtextfields.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/WPGbodyPr.docx b/sw/qa/extras/ooxmlexport/data/WPGbodyPr.docx
new file mode 100644
index 0000000000..a0a9ae764b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/WPGbodyPr.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/a4andborders.docx b/sw/qa/extras/ooxmlexport/data/a4andborders.docx
new file mode 100644
index 0000000000..afeb91cda7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/a4andborders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/abi11739.docx b/sw/qa/extras/ooxmlexport/data/abi11739.docx
new file mode 100644
index 0000000000..8eb6999da2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/abi11739.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/absolute-link.docx b/sw/qa/extras/ooxmlexport/data/absolute-link.docx
new file mode 100644
index 0000000000..db36a6f32a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/absolute-link.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/activex_checkbox.docx b/sw/qa/extras/ooxmlexport/data/activex_checkbox.docx
new file mode 100644
index 0000000000..d7415ef5a5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/activex_checkbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/activex_control_align.odt b/sw/qa/extras/ooxmlexport/data/activex_control_align.odt
new file mode 100644
index 0000000000..b9944c7e5a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/activex_control_align.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/activex_control_at_run_end.odt b/sw/qa/extras/ooxmlexport/data/activex_control_at_run_end.odt
new file mode 100644
index 0000000000..9008cb90a5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/activex_control_at_run_end.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx b/sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx
new file mode 100644
index 0000000000..9da266a927
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/activex_textbox.docx b/sw/qa/extras/ooxmlexport/data/activex_textbox.docx
new file mode 100644
index 0000000000..6f137008ce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/activex_textbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/afterlines.docx b/sw/qa/extras/ooxmlexport/data/afterlines.docx
new file mode 100644
index 0000000000..296f91e2e6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/afterlines.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/all_gaps_word.docx b/sw/qa/extras/ooxmlexport/data/all_gaps_word.docx
new file mode 100644
index 0000000000..fc52281a25
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/all_gaps_word.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/alphabeticalIndex_AutoColumn.docx b/sw/qa/extras/ooxmlexport/data/alphabeticalIndex_AutoColumn.docx
new file mode 100644
index 0000000000..e08e943ac2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/alphabeticalIndex_AutoColumn.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/alphabeticalIndex_MultipleColumns.docx b/sw/qa/extras/ooxmlexport/data/alphabeticalIndex_MultipleColumns.docx
new file mode 100644
index 0000000000..970166ad48
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/alphabeticalIndex_MultipleColumns.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/anchor-position.docx b/sw/qa/extras/ooxmlexport/data/anchor-position.docx
new file mode 100644
index 0000000000..b210ee930e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/anchor-position.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/annotation-formatting.docx b/sw/qa/extras/ooxmlexport/data/annotation-formatting.docx
new file mode 100644
index 0000000000..87af02b780
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/annotation-formatting.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/arabic-zero-numbering.docx b/sw/qa/extras/ooxmlexport/data/arabic-zero-numbering.docx
new file mode 100644
index 0000000000..f87dce364c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/arabic-zero-numbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docx b/sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docx
new file mode 100644
index 0000000000..bd95186a60
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/arabic-zero3-numbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/arabic-zero4-numbering.docx b/sw/qa/extras/ooxmlexport/data/arabic-zero4-numbering.docx
new file mode 100644
index 0000000000..6779d85989
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/arabic-zero4-numbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/arabic-zero5-numbering.docx b/sw/qa/extras/ooxmlexport/data/arabic-zero5-numbering.docx
new file mode 100644
index 0000000000..f7df2c5267
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/arabic-zero5-numbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/artistic_effects.docx b/sw/qa/extras/ooxmlexport/data/artistic_effects.docx
new file mode 100644
index 0000000000..7bfb4b9d14
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/artistic_effects.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/author-property.docx b/sw/qa/extras/ooxmlexport/data/author-property.docx
new file mode 100644
index 0000000000..474bb7933d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/author-property.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/autofit.docx b/sw/qa/extras/ooxmlexport/data/autofit.docx
new file mode 100644
index 0000000000..8932edfc7b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/autofit.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bad.docm b/sw/qa/extras/ooxmlexport/data/bad.docm
new file mode 100644
index 0000000000..b1e83220aa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bad.docm
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/behinddoc.docx b/sw/qa/extras/ooxmlexport/data/behinddoc.docx
new file mode 100644
index 0000000000..f859d2e90a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/behinddoc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bezier.odt b/sw/qa/extras/ooxmlexport/data/bezier.odt
new file mode 100644
index 0000000000..c73ed3e98f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bezier.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc581614.doc b/sw/qa/extras/ooxmlexport/data/bnc581614.doc
new file mode 100644
index 0000000000..f56525e87d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc581614.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc637947.odt b/sw/qa/extras/ooxmlexport/data/bnc637947.odt
new file mode 100644
index 0000000000..db5c878c9f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc637947.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc780044_spacing.docx b/sw/qa/extras/ooxmlexport/data/bnc780044_spacing.docx
new file mode 100644
index 0000000000..927d4d3767
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc780044_spacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc834035.odt b/sw/qa/extras/ooxmlexport/data/bnc834035.odt
new file mode 100644
index 0000000000..393c960dea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc834035.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc837302.docx b/sw/qa/extras/ooxmlexport/data/bnc837302.docx
new file mode 100644
index 0000000000..9d0c0af68b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc837302.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc865381.docx b/sw/qa/extras/ooxmlexport/data/bnc865381.docx
new file mode 100644
index 0000000000..bb125cc730
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc865381.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc884615.docx b/sw/qa/extras/ooxmlexport/data/bnc884615.docx
new file mode 100644
index 0000000000..51ee5ca0c5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc884615.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/bnc891663.docx b/sw/qa/extras/ooxmlexport/data/bnc891663.docx
new file mode 100644
index 0000000000..d5f057e66f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/bnc891663.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/btlr-frame.odt b/sw/qa/extras/ooxmlexport/data/btlr-frame.odt
new file mode 100644
index 0000000000..31cb03849c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/btlr-frame.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/btlr-textbox.docx b/sw/qa/extras/ooxmlexport/data/btlr-textbox.docx
new file mode 100644
index 0000000000..181d305eac
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/btlr-textbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/calendar1.docx b/sw/qa/extras/ooxmlexport/data/calendar1.docx
new file mode 100644
index 0000000000..81a5046171
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/calendar1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/calendar2.docx b/sw/qa/extras/ooxmlexport/data/calendar2.docx
new file mode 100644
index 0000000000..4e7d4ed3c0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/calendar2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/calendar3.docx b/sw/qa/extras/ooxmlexport/data/calendar3.docx
new file mode 100644
index 0000000000..6c720aff9c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/calendar3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/calendar4.docx b/sw/qa/extras/ooxmlexport/data/calendar4.docx
new file mode 100644
index 0000000000..ecf71d8a34
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/calendar4.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/calendar5.docx b/sw/qa/extras/ooxmlexport/data/calendar5.docx
new file mode 100644
index 0000000000..a27634673e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/calendar5.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/caption.docx b/sw/qa/extras/ooxmlexport/data/caption.docx
new file mode 100644
index 0000000000..301472cbc7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/caption.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cell-btlr.docx b/sw/qa/extras/ooxmlexport/data/cell-btlr.docx
new file mode 100644
index 0000000000..f05f114da0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cell-btlr.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cell-grid-span.docx b/sw/qa/extras/ooxmlexport/data/cell-grid-span.docx
new file mode 100644
index 0000000000..de71d48188
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cell-grid-span.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cell-sdt-redline.docx b/sw/qa/extras/ooxmlexport/data/cell-sdt-redline.docx
new file mode 100644
index 0000000000..41d7222990
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cell-sdt-redline.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/charborder.odt b/sw/qa/extras/ooxmlexport/data/charborder.odt
new file mode 100644
index 0000000000..67dd89b099
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/charborder.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/chart-dupe.docx b/sw/qa/extras/ooxmlexport/data/chart-dupe.docx
new file mode 100644
index 0000000000..545f9665f7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/chart-dupe.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/chart-in-footer.docx b/sw/qa/extras/ooxmlexport/data/chart-in-footer.docx
new file mode 100644
index 0000000000..293ee076bc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/chart-in-footer.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/chart-prop.docx b/sw/qa/extras/ooxmlexport/data/chart-prop.docx
new file mode 100644
index 0000000000..f9cddd4949
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/chart-prop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/chart-size.docx b/sw/qa/extras/ooxmlexport/data/chart-size.docx
new file mode 100644
index 0000000000..da5d144438
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/chart-size.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/chart.docx b/sw/qa/extras/ooxmlexport/data/chart.docx
new file mode 100644
index 0000000000..f984f0b17e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/chart.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/checkbox-control.docx b/sw/qa/extras/ooxmlexport/data/checkbox-control.docx
new file mode 100644
index 0000000000..905d29a966
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/checkbox-control.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/chtoutline.docx b/sw/qa/extras/ooxmlexport/data/chtoutline.docx
new file mode 100644
index 0000000000..92fdaf71e7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/chtoutline.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cjklist30.docx b/sw/qa/extras/ooxmlexport/data/cjklist30.docx
new file mode 100644
index 0000000000..b2efbb995d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cjklist30.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cjklist31.docx b/sw/qa/extras/ooxmlexport/data/cjklist31.docx
new file mode 100644
index 0000000000..95d4c9aeba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cjklist31.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cjklist34.docx b/sw/qa/extras/ooxmlexport/data/cjklist34.docx
new file mode 100644
index 0000000000..c09615aa2b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cjklist34.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cjklist35.docx b/sw/qa/extras/ooxmlexport/data/cjklist35.docx
new file mode 100644
index 0000000000..85aa24fc20
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cjklist35.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/cjklist44.docx b/sw/qa/extras/ooxmlexport/data/cjklist44.docx
new file mode 100644
index 0000000000..98538e931b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cjklist44.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/clearing-break.docx b/sw/qa/extras/ooxmlexport/data/clearing-break.docx
new file mode 100644
index 0000000000..453a4c2b83
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/clearing-break.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/columnbreak.docx b/sw/qa/extras/ooxmlexport/data/columnbreak.docx
new file mode 100644
index 0000000000..f55780e896
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/columnbreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/combobox-control.docx b/sw/qa/extras/ooxmlexport/data/combobox-control.docx
new file mode 100644
index 0000000000..180aacab9e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/combobox-control.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/comment_initials.odt b/sw/qa/extras/ooxmlexport/data/comment_initials.odt
new file mode 100644
index 0000000000..9b84ed8592
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/comment_initials.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/comments-nested.odt b/sw/qa/extras/ooxmlexport/data/comments-nested.odt
new file mode 100644
index 0000000000..e7686058dd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/comments-nested.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/conditional-text.fodt b/sw/qa/extras/ooxmlexport/data/conditional-text.fodt
new file mode 100644
index 0000000000..2486d0f6aa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/conditional-text.fodt
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:p><text:conditional-text text:condition="ooow:1 &lt; 2" text:string-value-if-true="&quot;True&quot;" text:string-value-if-false="- &quot;False&quot; -">True</text:conditional-text></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/conditionalstyles-tbllook.docx b/sw/qa/extras/ooxmlexport/data/conditionalstyles-tbllook.docx
new file mode 100644
index 0000000000..4222d63767
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/conditionalstyles-tbllook.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/content-control-grab-bag.docx b/sw/qa/extras/ooxmlexport/data/content-control-grab-bag.docx
new file mode 100644
index 0000000000..33c01f08fd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/content-control-grab-bag.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/content-control-shape.docx b/sw/qa/extras/ooxmlexport/data/content-control-shape.docx
new file mode 100644
index 0000000000..ab5be6cb69
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/content-control-shape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/controlshape.fodt b/sw/qa/extras/ooxmlexport/data/controlshape.fodt
new file mode 100644
index 0000000000..81a7109240
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/controlshape.fodt
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Lucida Sans Unicode" svg:font-family="&apos;Lucida Sans Unicode&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:font-size="11pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" style:line-height-at-least="0.46cm"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Lucida Sans Unicode" style:font-family-asian="&apos;Lucida Sans Unicode&apos;" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
+ <style:text-properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ </text:outline-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabelle1" style:family="table" style:master-page-name="First_20_Page">
+ <style:table-properties style:width="19.396cm" fo:margin-left="-1.642cm" style:page-number="auto" table:align="left" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="19.396cm"/>
+ </style:style>
+ <style:style style:name="Tabelle1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A1" style:family="table-cell">
+ <style:table-cell-properties style:vertical-align="top" fo:padding="0cm" fo:border="none" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties fo:margin-left="0.002cm" fo:margin-right="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:flow-with-text="true"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" fo:background-color="transparent" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" draw:fill="none" draw:fill-color="#99ccff" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false">
+ <form:form form:name="WW-Standard" form:apply-filter="true" form:control-implementation="ooo:com.sun.star.form.component.Form" office:target-frame="">
+ <form:properties>
+ <form:property form:property-name="PropertyChangeNotificationEnabled" office:value-type="boolean" office:boolean-value="true"/>
+ <form:property form:property-name="TargetURL" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ <form:checkbox form:name="Kontrollkästchen1" form:control-implementation="ooo:com.sun.star.form.component.CheckBox" xml:id="control1" form:id="control1" form:input-required="false" form:state="checked" form:current-state="checked" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="ControlTypeinMSO" office:value-type="float" office:value="0"/>
+ <form:property form:property-name="DefaultControl" office:value-type="string" office:string-value="com.sun.star.form.control.CheckBox"/>
+ <form:property form:property-name="ObjIDinMSO" office:value-type="float" office:value="65535"/>
+ <form:property form:property-name="SecondaryRefValue" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ </form:checkbox>
+ </form:form>
+ </office:forms>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <table:table table:name="Tabelle1" table:style-name="Tabelle1">
+ <table:table-column table:style-name="Tabelle1.A"/>
+ <table:table-row table:style-name="Tabelle1.1">
+ <table:table-cell table:style-name="Tabelle1.A1" office:value-type="string">
+ <text:p>
+ <draw:frame draw:style-name="fr1" draw:name="Rahmen2" text:anchor-type="as-char" svg:width="7.959cm" draw:z-index="0">
+ <draw:text-box fo:min-height="0.041cm">
+ <text:p>
+ <draw:control text:anchor-type="as-char" draw:z-index="1" draw:name="Shape1" draw:style-name="gr1" svg:width="0.318cm" svg:height="0.318cm" draw:control="control1"/>
+ </text:p>
+ </draw:text-box>
+ </draw:frame>
+ </text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/cp1000015.odt b/sw/qa/extras/ooxmlexport/data/cp1000015.odt
new file mode 100644
index 0000000000..7d8dc9f107
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cp1000015.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/crop-pixel.docx b/sw/qa/extras/ooxmlexport/data/crop-pixel.docx
new file mode 100644
index 0000000000..1ddb2efb93
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/crop-pixel.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/crop-roundtrip.docx b/sw/qa/extras/ooxmlexport/data/crop-roundtrip.docx
new file mode 100644
index 0000000000..6db60d0e8c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/crop-roundtrip.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/croppedAndRotated.odt b/sw/qa/extras/ooxmlexport/data/croppedAndRotated.odt
new file mode 100644
index 0000000000..825db09da8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/croppedAndRotated.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/custom-properties.docx b/sw/qa/extras/ooxmlexport/data/custom-properties.docx
new file mode 100644
index 0000000000..01db34977b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/custom-properties.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/custom-styles-TOC-comma.docx b/sw/qa/extras/ooxmlexport/data/custom-styles-TOC-comma.docx
new file mode 100644
index 0000000000..1b013086dc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/custom-styles-TOC-comma.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/custom-styles-TOC-semicolon.docx b/sw/qa/extras/ooxmlexport/data/custom-styles-TOC-semicolon.docx
new file mode 100644
index 0000000000..bef835c9bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/custom-styles-TOC-semicolon.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/customxml.docx b/sw/qa/extras/ooxmlexport/data/customxml.docx
new file mode 100644
index 0000000000..bfdf8ece68
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/customxml.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dashed_line_custdash_1000th_of_percent.docx b/sw/qa/extras/ooxmlexport/data/dashed_line_custdash_1000th_of_percent.docx
new file mode 100644
index 0000000000..643ec08ea4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dashed_line_custdash_1000th_of_percent.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dashed_line_custdash_percentage.docx b/sw/qa/extras/ooxmlexport/data/dashed_line_custdash_percentage.docx
new file mode 100644
index 0000000000..643ec08ea4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dashed_line_custdash_percentage.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/date-control.docx b/sw/qa/extras/ooxmlexport/data/date-control.docx
new file mode 100644
index 0000000000..fdf2299137
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/date-control.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/date_field_at_end_of_paragraph.docx b/sw/qa/extras/ooxmlexport/data/date_field_at_end_of_paragraph.docx
new file mode 100644
index 0000000000..6514b2a530
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/date_field_at_end_of_paragraph.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/date_field_in_shape.docx b/sw/qa/extras/ooxmlexport/data/date_field_in_shape.docx
new file mode 100644
index 0000000000..ff3c637c34
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/date_field_in_shape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx b/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx
new file mode 100644
index 0000000000..d7ec479976
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/decimal-numbering-no-leveltext.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/default-sect-break-cols.docx b/sw/qa/extras/ooxmlexport/data/default-sect-break-cols.docx
new file mode 100644
index 0000000000..b66b844f16
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/default-sect-break-cols.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/defaultStyle.docx b/sw/qa/extras/ooxmlexport/data/defaultStyle.docx
new file mode 100644
index 0000000000..8e3faa70da
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/defaultStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dkvert.docx b/sw/qa/extras/ooxmlexport/data/dkvert.docx
new file mode 100644
index 0000000000..bc1ee78813
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dkvert.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-charheight-default.docx b/sw/qa/extras/ooxmlexport/data/dml-charheight-default.docx
new file mode 100644
index 0000000000..0f22a87f0e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-charheight-default.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-customgeometry-cubicbezier.docx b/sw/qa/extras/ooxmlexport/data/dml-customgeometry-cubicbezier.docx
new file mode 100644
index 0000000000..9cc84a9271
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-customgeometry-cubicbezier.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-gradientfill-theme.docx b/sw/qa/extras/ooxmlexport/data/dml-gradientfill-theme.docx
new file mode 100644
index 0000000000..3311ce8a04
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-gradientfill-theme.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-groupshape-capitalization.docx b/sw/qa/extras/ooxmlexport/data/dml-groupshape-capitalization.docx
new file mode 100644
index 0000000000..67fd21f64d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-groupshape-capitalization.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-groupshape-childposition.docx b/sw/qa/extras/ooxmlexport/data/dml-groupshape-childposition.docx
new file mode 100644
index 0000000000..a5c6bf99a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-groupshape-childposition.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-groupshape-paraspacing.docx b/sw/qa/extras/ooxmlexport/data/dml-groupshape-paraspacing.docx
new file mode 100644
index 0000000000..a8fc82bd56
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-groupshape-paraspacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docx b/sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docx
new file mode 100644
index 0000000000..6be137b287
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-groupshape-relsize.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-groupshape-runfonts.docx b/sw/qa/extras/ooxmlexport/data/dml-groupshape-runfonts.docx
new file mode 100644
index 0000000000..e4c8c6cb57
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-groupshape-runfonts.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-groupshape-sdt.docx b/sw/qa/extras/ooxmlexport/data/dml-groupshape-sdt.docx
new file mode 100644
index 0000000000..7314d876a4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-groupshape-sdt.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-picture-in-textframe.docx b/sw/qa/extras/ooxmlexport/data/dml-picture-in-textframe.docx
new file mode 100644
index 0000000000..7d5876108d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-picture-in-textframe.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-rectangle-relsize.docx b/sw/qa/extras/ooxmlexport/data/dml-rectangle-relsize.docx
new file mode 100644
index 0000000000..265dcbb4ee
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-rectangle-relsize.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-shape-fillbitmapcrop.docx b/sw/qa/extras/ooxmlexport/data/dml-shape-fillbitmapcrop.docx
new file mode 100644
index 0000000000..6c401bae93
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-shape-fillbitmapcrop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-shape-fillpattern.docx b/sw/qa/extras/ooxmlexport/data/dml-shape-fillpattern.docx
new file mode 100644
index 0000000000..9878c99641
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-shape-fillpattern.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-shape-relsize.docx b/sw/qa/extras/ooxmlexport/data/dml-shape-relsize.docx
new file mode 100644
index 0000000000..80ae02e026
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-shape-relsize.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-shape-title.docx b/sw/qa/extras/ooxmlexport/data/dml-shape-title.docx
new file mode 100644
index 0000000000..d354806f90
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-shape-title.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-solidfill-alpha.docx b/sw/qa/extras/ooxmlexport/data/dml-solidfill-alpha.docx
new file mode 100644
index 0000000000..9f2c46d2e8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-solidfill-alpha.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-textframe-vertadjust.docx b/sw/qa/extras/ooxmlexport/data/dml-textframe-vertadjust.docx
new file mode 100644
index 0000000000..bf5dcdde43
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-textframe-vertadjust.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-textshape.docx b/sw/qa/extras/ooxmlexport/data/dml-textshape.docx
new file mode 100644
index 0000000000..28e39c29a9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-textshape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-textshapeB.docx b/sw/qa/extras/ooxmlexport/data/dml-textshapeB.docx
new file mode 100644
index 0000000000..ab790a896f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-textshapeB.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dml-zorder.odt b/sw/qa/extras/ooxmlexport/data/dml-zorder.odt
new file mode 100644
index 0000000000..ba799a547e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dml-zorder.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/docxopenhyperlinkbox.docx b/sw/qa/extras/ooxmlexport/data/docxopenhyperlinkbox.docx
new file mode 100644
index 0000000000..2653e62020
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/docxopenhyperlinkbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dont-add-new-styles.docx b/sw/qa/extras/ooxmlexport/data/dont-add-new-styles.docx
new file mode 100644
index 0000000000..1ee154a818
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dont-add-new-styles.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/drawinglayer-pic-pos.docx b/sw/qa/extras/ooxmlexport/data/drawinglayer-pic-pos.docx
new file mode 100644
index 0000000000..bb18ab38b3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/drawinglayer-pic-pos.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/drawingml-flipv.docx b/sw/qa/extras/ooxmlexport/data/drawingml-flipv.docx
new file mode 100644
index 0000000000..f10a83fac2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/drawingml-flipv.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/dropdown-in-cell.docx b/sw/qa/extras/ooxmlexport/data/dropdown-in-cell.docx
new file mode 100644
index 0000000000..8abe25f82e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/dropdown-in-cell.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/duplicate-east-asia.odt b/sw/qa/extras/ooxmlexport/data/duplicate-east-asia.odt
new file mode 100644
index 0000000000..22b8a554f8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/duplicate-east-asia.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/effect-extent-inline.docx b/sw/qa/extras/ooxmlexport/data/effect-extent-inline.docx
new file mode 100644
index 0000000000..bb7db129aa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/effect-extent-inline.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx
new file mode 100644
index 0000000000..5cc4d4e374
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/effect-extent.docx b/sw/qa/extras/ooxmlexport/data/effect-extent.docx
new file mode 100644
index 0000000000..f35fc3a4ab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/effect-extent.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx
new file mode 100644
index 0000000000..5dccf967fe
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/em.docx b/sw/qa/extras/ooxmlexport/data/em.docx
new file mode 100644
index 0000000000..ee3137e70c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/em.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/embedded-xlsx.docx b/sw/qa/extras/ooxmlexport/data/embedded-xlsx.docx
new file mode 100644
index 0000000000..3b9dd2a684
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/embedded-xlsx.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/embedded_chart.odt b/sw/qa/extras/ooxmlexport/data/embedded_chart.odt
new file mode 100644
index 0000000000..820e9a3b2e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/embedded_chart.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/embedded_images.odt b/sw/qa/extras/ooxmlexport/data/embedded_images.odt
new file mode 100644
index 0000000000..26166fac34
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/embedded_images.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/empty-annotation-mark.docx b/sw/qa/extras/ooxmlexport/data/empty-annotation-mark.docx
new file mode 100644
index 0000000000..854b6d7261
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/empty-annotation-mark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/empty-date-control.odt b/sw/qa/extras/ooxmlexport/data/empty-date-control.odt
new file mode 100644
index 0000000000..acd5b8b94e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/empty-date-control.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/empty.odt b/sw/qa/extras/ooxmlexport/data/empty.odt
new file mode 100644
index 0000000000..ba6886080e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/empty.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/endingSectionProps.docx b/sw/qa/extras/ooxmlexport/data/endingSectionProps.docx
new file mode 100644
index 0000000000..e5dee2f60d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/endingSectionProps.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fail_bracePair.odt b/sw/qa/extras/ooxmlexport/data/fail_bracePair.odt
new file mode 100644
index 0000000000..adab115eb0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fail_bracePair.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo106029.docx b/sw/qa/extras/ooxmlexport/data/fdo106029.docx
new file mode 100644
index 0000000000..b19d63d4c2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo106029.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo38244.docx b/sw/qa/extras/ooxmlexport/data/fdo38244.docx
new file mode 100644
index 0000000000..2551f0c64d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo38244.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo38414.docx b/sw/qa/extras/ooxmlexport/data/fdo38414.docx
new file mode 100644
index 0000000000..135cd32c98
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo38414.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo43093.docx b/sw/qa/extras/ooxmlexport/data/fdo43093.docx
new file mode 100644
index 0000000000..9d5de58b5f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo43093.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo43093b.docx b/sw/qa/extras/ooxmlexport/data/fdo43093b.docx
new file mode 100644
index 0000000000..3e5a910e20
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo43093b.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo44689_start_page_0.docx b/sw/qa/extras/ooxmlexport/data/fdo44689_start_page_0.docx
new file mode 100644
index 0000000000..f7e9331bef
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo44689_start_page_0.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo44689_start_page_7.docx b/sw/qa/extras/ooxmlexport/data/fdo44689_start_page_7.docx
new file mode 100644
index 0000000000..25e58d3952
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo44689_start_page_7.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo46361.docx b/sw/qa/extras/ooxmlexport/data/fdo46361.docx
new file mode 100644
index 0000000000..2f894e4b3c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo46361.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo47669.docx b/sw/qa/extras/ooxmlexport/data/fdo47669.docx
new file mode 100644
index 0000000000..9c5ef68790
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo47669.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo48557.odt b/sw/qa/extras/ooxmlexport/data/fdo48557.odt
new file mode 100644
index 0000000000..35353baace
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo48557.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo51034.odt b/sw/qa/extras/ooxmlexport/data/fdo51034.odt
new file mode 100644
index 0000000000..9720cfb65b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo51034.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo51550.odt b/sw/qa/extras/ooxmlexport/data/fdo51550.odt
new file mode 100644
index 0000000000..4cade5b21b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo51550.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo52208.docx b/sw/qa/extras/ooxmlexport/data/fdo52208.docx
new file mode 100644
index 0000000000..be842ad2ac
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo52208.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo53985.docx b/sw/qa/extras/ooxmlexport/data/fdo53985.docx
new file mode 100644
index 0000000000..0c8b32fb67
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo53985.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo55187.docx b/sw/qa/extras/ooxmlexport/data/fdo55187.docx
new file mode 100644
index 0000000000..59cd0a8062
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo55187.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo55381.docx b/sw/qa/extras/ooxmlexport/data/fdo55381.docx
new file mode 100644
index 0000000000..ffeae1f874
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo55381.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo56679.docx b/sw/qa/extras/ooxmlexport/data/fdo56679.docx
new file mode 100644
index 0000000000..8ea689c3c5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo56679.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo58577.odt b/sw/qa/extras/ooxmlexport/data/fdo58577.odt
new file mode 100644
index 0000000000..4c8656d7eb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo58577.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo59273.docx b/sw/qa/extras/ooxmlexport/data/fdo59273.docx
new file mode 100644
index 0000000000..fcdfd77344
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo59273.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo59638.docx b/sw/qa/extras/ooxmlexport/data/fdo59638.docx
new file mode 100644
index 0000000000..d33e7cc0a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo59638.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo60922.docx b/sw/qa/extras/ooxmlexport/data/fdo60922.docx
new file mode 100644
index 0000000000..0d1ff2613e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo60922.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo60957-2.docx b/sw/qa/extras/ooxmlexport/data/fdo60957-2.docx
new file mode 100644
index 0000000000..3819aafd8f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo60957-2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo60990.odt b/sw/qa/extras/ooxmlexport/data/fdo60990.odt
new file mode 100644
index 0000000000..c855f327a9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo60990.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo61343.docx b/sw/qa/extras/ooxmlexport/data/fdo61343.docx
new file mode 100644
index 0000000000..9ab99739b7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo61343.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo63053.docx b/sw/qa/extras/ooxmlexport/data/fdo63053.docx
new file mode 100644
index 0000000000..43282b0df7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo63053.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo63685.docx b/sw/qa/extras/ooxmlexport/data/fdo63685.docx
new file mode 100644
index 0000000000..a1348fcff3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo63685.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo64350.docx b/sw/qa/extras/ooxmlexport/data/fdo64350.docx
new file mode 100644
index 0000000000..6f41b66647
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo64350.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo64826.docx b/sw/qa/extras/ooxmlexport/data/fdo64826.docx
new file mode 100644
index 0000000000..ce4287cea5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo64826.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65090.docx b/sw/qa/extras/ooxmlexport/data/fdo65090.docx
new file mode 100644
index 0000000000..4d45737ddc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65090.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65265.docx b/sw/qa/extras/ooxmlexport/data/fdo65265.docx
new file mode 100644
index 0000000000..6267085fa2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65265.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65295.docx b/sw/qa/extras/ooxmlexport/data/fdo65295.docx
new file mode 100644
index 0000000000..52a231afa0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65295.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65400.docx b/sw/qa/extras/ooxmlexport/data/fdo65400.docx
new file mode 100644
index 0000000000..c247e9fff8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65400.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65632.docx b/sw/qa/extras/ooxmlexport/data/fdo65632.docx
new file mode 100644
index 0000000000..8c336c20fd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65632.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65718.docx b/sw/qa/extras/ooxmlexport/data/fdo65718.docx
new file mode 100644
index 0000000000..0af4f90025
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65718.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65833.docx b/sw/qa/extras/ooxmlexport/data/fdo65833.docx
new file mode 100644
index 0000000000..097015eed1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65833.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66474.docx b/sw/qa/extras/ooxmlexport/data/fdo66474.docx
new file mode 100644
index 0000000000..0252746f5b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo66474.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66543.docx b/sw/qa/extras/ooxmlexport/data/fdo66543.docx
new file mode 100644
index 0000000000..585eb41e42
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo66543.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66688.docx b/sw/qa/extras/ooxmlexport/data/fdo66688.docx
new file mode 100644
index 0000000000..300b915044
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo66688.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66773.docx b/sw/qa/extras/ooxmlexport/data/fdo66773.docx
new file mode 100644
index 0000000000..41f0abee7b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo66773.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66781.docx b/sw/qa/extras/ooxmlexport/data/fdo66781.docx
new file mode 100644
index 0000000000..13e5423f4d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo66781.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo66929.docx b/sw/qa/extras/ooxmlexport/data/fdo66929.docx
new file mode 100644
index 0000000000..7f0afac3cb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo66929.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo67013.docx b/sw/qa/extras/ooxmlexport/data/fdo67013.docx
new file mode 100644
index 0000000000..5512550ead
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo67013.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo67737.docx b/sw/qa/extras/ooxmlexport/data/fdo67737.docx
new file mode 100644
index 0000000000..8be34ec711
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo67737.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo68418.docx b/sw/qa/extras/ooxmlexport/data/fdo68418.docx
new file mode 100644
index 0000000000..10b7c009c2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo68418.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo68607.docx b/sw/qa/extras/ooxmlexport/data/fdo68607.docx
new file mode 100644
index 0000000000..11f57064ce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo68607.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo68787.docx b/sw/qa/extras/ooxmlexport/data/fdo68787.docx
new file mode 100644
index 0000000000..c47b809958
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo68787.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo69548.docx b/sw/qa/extras/ooxmlexport/data/fdo69548.docx
new file mode 100644
index 0000000000..6799f5ef26
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo69548.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo69616.docx b/sw/qa/extras/ooxmlexport/data/fdo69616.docx
new file mode 100644
index 0000000000..7c7f52e168
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo69616.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo69636.docx b/sw/qa/extras/ooxmlexport/data/fdo69636.docx
new file mode 100644
index 0000000000..b2f3069b50
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo69636.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo69644.docx b/sw/qa/extras/ooxmlexport/data/fdo69644.docx
new file mode 100644
index 0000000000..1a254db3b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo69644.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo69649.docx b/sw/qa/extras/ooxmlexport/data/fdo69649.docx
new file mode 100644
index 0000000000..cb0f789998
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo69649.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo70457.docx b/sw/qa/extras/ooxmlexport/data/fdo70457.docx
new file mode 100644
index 0000000000..b9cabb1190
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo70457.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo70812.docx b/sw/qa/extras/ooxmlexport/data/fdo70812.docx
new file mode 100644
index 0000000000..b9b5d52c20
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo70812.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo70838.docx b/sw/qa/extras/ooxmlexport/data/fdo70838.docx
new file mode 100644
index 0000000000..ede97f7eac
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo70838.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo70942.docx b/sw/qa/extras/ooxmlexport/data/fdo70942.docx
new file mode 100644
index 0000000000..a04a78437c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo70942.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo71302.docx b/sw/qa/extras/ooxmlexport/data/fdo71302.docx
new file mode 100644
index 0000000000..1f62e87c5d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo71302.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo71646.docx b/sw/qa/extras/ooxmlexport/data/fdo71646.docx
new file mode 100644
index 0000000000..d49d88b67c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo71646.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo71785.docx b/sw/qa/extras/ooxmlexport/data/fdo71785.docx
new file mode 100644
index 0000000000..e155e831fa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo71785.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo71834.docx b/sw/qa/extras/ooxmlexport/data/fdo71834.docx
new file mode 100644
index 0000000000..1545334507
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo71834.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo72560.docx b/sw/qa/extras/ooxmlexport/data/fdo72560.docx
new file mode 100644
index 0000000000..b21535bfd4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo72560.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo72560b.docx b/sw/qa/extras/ooxmlexport/data/fdo72560b.docx
new file mode 100644
index 0000000000..dfe5176f3a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo72560b.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo72560c.docx b/sw/qa/extras/ooxmlexport/data/fdo72560c.docx
new file mode 100644
index 0000000000..ed0b888220
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo72560c.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo72560d.docx b/sw/qa/extras/ooxmlexport/data/fdo72560d.docx
new file mode 100644
index 0000000000..000ae73d8a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo72560d.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo72560e.docx b/sw/qa/extras/ooxmlexport/data/fdo72560e.docx
new file mode 100644
index 0000000000..7c3e89fb33
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo72560e.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73215.docx b/sw/qa/extras/ooxmlexport/data/fdo73215.docx
new file mode 100644
index 0000000000..9b2c05b720
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73215.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73227.docx b/sw/qa/extras/ooxmlexport/data/fdo73227.docx
new file mode 100644
index 0000000000..015beb9d69
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73227.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73247.docx b/sw/qa/extras/ooxmlexport/data/fdo73247.docx
new file mode 100644
index 0000000000..63ad782f60
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73247.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73389.docx b/sw/qa/extras/ooxmlexport/data/fdo73389.docx
new file mode 100644
index 0000000000..02b55f74e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73389.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73541.docx b/sw/qa/extras/ooxmlexport/data/fdo73541.docx
new file mode 100644
index 0000000000..469d025209
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73541.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73550.docx b/sw/qa/extras/ooxmlexport/data/fdo73550.docx
new file mode 100644
index 0000000000..c6b7f15d9f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73550.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73556.docx b/sw/qa/extras/ooxmlexport/data/fdo73556.docx
new file mode 100644
index 0000000000..50354076d3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73556.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docx b/sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docx
new file mode 100644
index 0000000000..892bc553b3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docx b/sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docx
new file mode 100644
index 0000000000..8f1863b467
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74110.docx b/sw/qa/extras/ooxmlexport/data/fdo74110.docx
new file mode 100644
index 0000000000..6b7ab0e415
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74110.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74153.docx b/sw/qa/extras/ooxmlexport/data/fdo74153.docx
new file mode 100644
index 0000000000..4cbdd7bba9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74153.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74357.docx b/sw/qa/extras/ooxmlexport/data/fdo74357.docx
new file mode 100644
index 0000000000..970372906e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74357.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74401.docx b/sw/qa/extras/ooxmlexport/data/fdo74401.docx
new file mode 100644
index 0000000000..fd3cbabdd9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74401.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74566.docx b/sw/qa/extras/ooxmlexport/data/fdo74566.docx
new file mode 100644
index 0000000000..b197b946a4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74566.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74605.docx b/sw/qa/extras/ooxmlexport/data/fdo74605.docx
new file mode 100644
index 0000000000..85231f151f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74605.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74745.docx b/sw/qa/extras/ooxmlexport/data/fdo74745.docx
new file mode 100644
index 0000000000..773567756a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74745.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo74792.docx b/sw/qa/extras/ooxmlexport/data/fdo74792.docx
new file mode 100644
index 0000000000..3d00009a03
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo74792.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo75431.docx b/sw/qa/extras/ooxmlexport/data/fdo75431.docx
new file mode 100644
index 0000000000..4922784036
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo75431.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76016.docx b/sw/qa/extras/ooxmlexport/data/fdo76016.docx
new file mode 100644
index 0000000000..79fa6b9a42
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76016.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76098.docx b/sw/qa/extras/ooxmlexport/data/fdo76098.docx
new file mode 100644
index 0000000000..8a616e9b73
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76098.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76101.docx b/sw/qa/extras/ooxmlexport/data/fdo76101.docx
new file mode 100644
index 0000000000..d2264f3f88
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76101.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76163.docx b/sw/qa/extras/ooxmlexport/data/fdo76163.docx
new file mode 100644
index 0000000000..0c7cc7027c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76163.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76249.docx b/sw/qa/extras/ooxmlexport/data/fdo76249.docx
new file mode 100644
index 0000000000..9b50f5de65
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76249.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76316.docx b/sw/qa/extras/ooxmlexport/data/fdo76316.docx
new file mode 100644
index 0000000000..5cfd9d937b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76316.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76586.docx b/sw/qa/extras/ooxmlexport/data/fdo76586.docx
new file mode 100644
index 0000000000..28ae05ee72
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76586.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76587.docx b/sw/qa/extras/ooxmlexport/data/fdo76587.docx
new file mode 100644
index 0000000000..84c23adc77
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76587.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76589.docx b/sw/qa/extras/ooxmlexport/data/fdo76589.docx
new file mode 100644
index 0000000000..d501b1b594
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76589.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76591.docx b/sw/qa/extras/ooxmlexport/data/fdo76591.docx
new file mode 100644
index 0000000000..8ca43879ca
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76591.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76597.docx b/sw/qa/extras/ooxmlexport/data/fdo76597.docx
new file mode 100644
index 0000000000..a970136b8f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76597.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76741.docx b/sw/qa/extras/ooxmlexport/data/fdo76741.docx
new file mode 100644
index 0000000000..abe9985a14
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76741.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76803.docx b/sw/qa/extras/ooxmlexport/data/fdo76803.docx
new file mode 100644
index 0000000000..65fad065a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76803.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76934.docx b/sw/qa/extras/ooxmlexport/data/fdo76934.docx
new file mode 100644
index 0000000000..0515cf2bf2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76934.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo76979.docx b/sw/qa/extras/ooxmlexport/data/fdo76979.docx
new file mode 100644
index 0000000000..f8ee995200
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo76979.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77117.docx b/sw/qa/extras/ooxmlexport/data/fdo77117.docx
new file mode 100644
index 0000000000..f2a1d447e7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77117.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77129.docx b/sw/qa/extras/ooxmlexport/data/fdo77129.docx
new file mode 100644
index 0000000000..b0661e9362
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77129.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77476.docx b/sw/qa/extras/ooxmlexport/data/fdo77476.docx
new file mode 100644
index 0000000000..08c38b066b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77476.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77716.docx b/sw/qa/extras/ooxmlexport/data/fdo77716.docx
new file mode 100644
index 0000000000..f706791004
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77716.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77718.docx b/sw/qa/extras/ooxmlexport/data/fdo77718.docx
new file mode 100644
index 0000000000..7a22485f76
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77718.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77719.docx b/sw/qa/extras/ooxmlexport/data/fdo77719.docx
new file mode 100644
index 0000000000..e671b33f4e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77719.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77725.docx b/sw/qa/extras/ooxmlexport/data/fdo77725.docx
new file mode 100644
index 0000000000..b06a4b4eea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77725.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77727.docx b/sw/qa/extras/ooxmlexport/data/fdo77727.docx
new file mode 100644
index 0000000000..9f553e210d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77727.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77759.docx b/sw/qa/extras/ooxmlexport/data/fdo77759.docx
new file mode 100644
index 0000000000..6558690690
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77759.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77812.docx b/sw/qa/extras/ooxmlexport/data/fdo77812.docx
new file mode 100644
index 0000000000..48fb498887
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77812.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77887.docx b/sw/qa/extras/ooxmlexport/data/fdo77887.docx
new file mode 100644
index 0000000000..cb3f4537dd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77887.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo77890.docx b/sw/qa/extras/ooxmlexport/data/fdo77890.docx
new file mode 100644
index 0000000000..ac90174fff
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo77890.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78284.docx b/sw/qa/extras/ooxmlexport/data/fdo78284.docx
new file mode 100644
index 0000000000..92145eb127
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78284.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78300.docx b/sw/qa/extras/ooxmlexport/data/fdo78300.docx
new file mode 100644
index 0000000000..40da0913d4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78300.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78384.docx b/sw/qa/extras/ooxmlexport/data/fdo78384.docx
new file mode 100644
index 0000000000..ee102648f1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78384.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78420.docx b/sw/qa/extras/ooxmlexport/data/fdo78420.docx
new file mode 100644
index 0000000000..6b253b189f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78420.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78432.docx b/sw/qa/extras/ooxmlexport/data/fdo78432.docx
new file mode 100644
index 0000000000..343e76ae25
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78432.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78469.docx b/sw/qa/extras/ooxmlexport/data/fdo78469.docx
new file mode 100644
index 0000000000..7ae4d71beb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78469.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78474.docx b/sw/qa/extras/ooxmlexport/data/fdo78474.docx
new file mode 100644
index 0000000000..6468a84218
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78474.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78599.docx b/sw/qa/extras/ooxmlexport/data/fdo78599.docx
new file mode 100644
index 0000000000..3c81780da1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78599.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78651.docx b/sw/qa/extras/ooxmlexport/data/fdo78651.docx
new file mode 100644
index 0000000000..a510782b4a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78651.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78654.docx b/sw/qa/extras/ooxmlexport/data/fdo78654.docx
new file mode 100644
index 0000000000..81d7bd0c42
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78654.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78658.docx b/sw/qa/extras/ooxmlexport/data/fdo78658.docx
new file mode 100644
index 0000000000..1c0782e981
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78658.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78659.docx b/sw/qa/extras/ooxmlexport/data/fdo78659.docx
new file mode 100644
index 0000000000..cf0800373e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78659.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78663.docx b/sw/qa/extras/ooxmlexport/data/fdo78663.docx
new file mode 100644
index 0000000000..be35b6c004
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78663.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78882.docx b/sw/qa/extras/ooxmlexport/data/fdo78882.docx
new file mode 100644
index 0000000000..da591f9e75
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78882.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78883.docx b/sw/qa/extras/ooxmlexport/data/fdo78883.docx
new file mode 100644
index 0000000000..a72ff9436e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78883.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78886.docx b/sw/qa/extras/ooxmlexport/data/fdo78886.docx
new file mode 100644
index 0000000000..e364948f1f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78886.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78887.docx b/sw/qa/extras/ooxmlexport/data/fdo78887.docx
new file mode 100644
index 0000000000..db92fe4ede
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78887.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78904.docx b/sw/qa/extras/ooxmlexport/data/fdo78904.docx
new file mode 100644
index 0000000000..c171ae2ca8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78904.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78907.docx b/sw/qa/extras/ooxmlexport/data/fdo78907.docx
new file mode 100644
index 0000000000..abae6b4be0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78907.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78910.docx b/sw/qa/extras/ooxmlexport/data/fdo78910.docx
new file mode 100644
index 0000000000..e8a090bee7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78910.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78939.docx b/sw/qa/extras/ooxmlexport/data/fdo78939.docx
new file mode 100644
index 0000000000..2fc3198630
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78939.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78957.docx b/sw/qa/extras/ooxmlexport/data/fdo78957.docx
new file mode 100644
index 0000000000..38a18a3a6a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78957.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79008.docx b/sw/qa/extras/ooxmlexport/data/fdo79008.docx
new file mode 100644
index 0000000000..2b1758776b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79008.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79062.docx b/sw/qa/extras/ooxmlexport/data/fdo79062.docx
new file mode 100644
index 0000000000..181ea72836
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79062.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79256.docx b/sw/qa/extras/ooxmlexport/data/fdo79256.docx
new file mode 100644
index 0000000000..2358abb850
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79256.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79535.docx b/sw/qa/extras/ooxmlexport/data/fdo79535.docx
new file mode 100644
index 0000000000..64aab18e0a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79535.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79540.docx b/sw/qa/extras/ooxmlexport/data/fdo79540.docx
new file mode 100644
index 0000000000..ce843d6616
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79540.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79591.docx b/sw/qa/extras/ooxmlexport/data/fdo79591.docx
new file mode 100644
index 0000000000..32a61debd4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79591.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79668.docx b/sw/qa/extras/ooxmlexport/data/fdo79668.docx
new file mode 100644
index 0000000000..793fd2adff
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79668.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79738.docx b/sw/qa/extras/ooxmlexport/data/fdo79738.docx
new file mode 100644
index 0000000000..e6873e7a23
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79738.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79817.docx b/sw/qa/extras/ooxmlexport/data/fdo79817.docx
new file mode 100644
index 0000000000..7e948c5c8f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79817.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79822.docx b/sw/qa/extras/ooxmlexport/data/fdo79822.docx
new file mode 100644
index 0000000000..2844671d60
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79822.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79915.docx b/sw/qa/extras/ooxmlexport/data/fdo79915.docx
new file mode 100644
index 0000000000..351674df07
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79915.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79968.docx b/sw/qa/extras/ooxmlexport/data/fdo79968.docx
new file mode 100644
index 0000000000..2da7ddcc4f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79968.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79969_xlsb.docx b/sw/qa/extras/ooxmlexport/data/fdo79969_xlsb.docx
new file mode 100644
index 0000000000..0e413992be
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79969_xlsb.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79969_xlsm.docx b/sw/qa/extras/ooxmlexport/data/fdo79969_xlsm.docx
new file mode 100644
index 0000000000..6fd11f3974
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo79969_xlsm.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80097.docx b/sw/qa/extras/ooxmlexport/data/fdo80097.docx
new file mode 100644
index 0000000000..3f8ba9f90a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80097.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80410.docx b/sw/qa/extras/ooxmlexport/data/fdo80410.docx
new file mode 100644
index 0000000000..7660d84447
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80410.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80522.docx b/sw/qa/extras/ooxmlexport/data/fdo80522.docx
new file mode 100644
index 0000000000..9445b733f5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80522.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80523_pptm.docx b/sw/qa/extras/ooxmlexport/data/fdo80523_pptm.docx
new file mode 100644
index 0000000000..3140f3b6d6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80523_pptm.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80523_sldm.docx b/sw/qa/extras/ooxmlexport/data/fdo80523_sldm.docx
new file mode 100644
index 0000000000..e50cda1a51
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80523_sldm.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80555.docx b/sw/qa/extras/ooxmlexport/data/fdo80555.docx
new file mode 100644
index 0000000000..a15bdc1ecd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80555.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80800.docx b/sw/qa/extras/ooxmlexport/data/fdo80800.docx
new file mode 100644
index 0000000000..64ed7697f7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80800.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80800b_tableStyle.docx b/sw/qa/extras/ooxmlexport/data/fdo80800b_tableStyle.docx
new file mode 100644
index 0000000000..bde907cf22
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80800b_tableStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80895.docx b/sw/qa/extras/ooxmlexport/data/fdo80895.docx
new file mode 100644
index 0000000000..711882fd4e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80895.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80897.docx b/sw/qa/extras/ooxmlexport/data/fdo80897.docx
new file mode 100644
index 0000000000..2f0957e692
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80897.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80898.docx b/sw/qa/extras/ooxmlexport/data/fdo80898.docx
new file mode 100644
index 0000000000..d4b9e1f23a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80898.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80902.docx b/sw/qa/extras/ooxmlexport/data/fdo80902.docx
new file mode 100644
index 0000000000..73a927f9a3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80902.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo80997.docx b/sw/qa/extras/ooxmlexport/data/fdo80997.docx
new file mode 100644
index 0000000000..713e890afd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo80997.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo81031.docx b/sw/qa/extras/ooxmlexport/data/fdo81031.docx
new file mode 100644
index 0000000000..d80111dec5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo81031.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo81341.docx b/sw/qa/extras/ooxmlexport/data/fdo81341.docx
new file mode 100644
index 0000000000..3c243c0dd1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo81341.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo81381.docx b/sw/qa/extras/ooxmlexport/data/fdo81381.docx
new file mode 100644
index 0000000000..bf4a860c78
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo81381.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo81486.docx b/sw/qa/extras/ooxmlexport/data/fdo81486.docx
new file mode 100644
index 0000000000..6e680c350a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo81486.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo81492.docx b/sw/qa/extras/ooxmlexport/data/fdo81492.docx
new file mode 100644
index 0000000000..be3353b3c4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo81492.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo81945.docx b/sw/qa/extras/ooxmlexport/data/fdo81945.docx
new file mode 100644
index 0000000000..51dee9cfe3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo81945.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo81946.docx b/sw/qa/extras/ooxmlexport/data/fdo81946.docx
new file mode 100644
index 0000000000..b179f58bf8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo81946.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo82123.docx b/sw/qa/extras/ooxmlexport/data/fdo82123.docx
new file mode 100644
index 0000000000..fc2632cb6a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo82123.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo82492.docx b/sw/qa/extras/ooxmlexport/data/fdo82492.docx
new file mode 100644
index 0000000000..6533056f47
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo82492.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo83044.docx b/sw/qa/extras/ooxmlexport/data/fdo83044.docx
new file mode 100644
index 0000000000..01d32bfdb8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo83044.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo83048.docx b/sw/qa/extras/ooxmlexport/data/fdo83048.docx
new file mode 100644
index 0000000000..3ef6d995fa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo83048.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo83057.docx b/sw/qa/extras/ooxmlexport/data/fdo83057.docx
new file mode 100644
index 0000000000..d4d42321de
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo83057.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo83428.docx b/sw/qa/extras/ooxmlexport/data/fdo83428.docx
new file mode 100644
index 0000000000..9e9743a3e0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo83428.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fdo85542.docx b/sw/qa/extras/ooxmlexport/data/fdo85542.docx
new file mode 100644
index 0000000000..db49408451
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo85542.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/field-rotated.fodt b/sw/qa/extras/ooxmlexport/data/field-rotated.fodt
new file mode 100644
index 0000000000..079f35dfb9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/field-rotated.fodt
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2020-02-07T13:06:45.869388502</meta:creation-date><meta:editing-cycles>1</meta:editing-cycles><meta:editing-duration>PT1M18S</meta:editing-duration><dc:title>Rotationeering</dc:title><dc:date>2020-02-07T13:08:03.244415357</dc:date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="1" meta:character-count="14" meta:non-whitespace-character-count="14"/><meta:generator>LibreOfficeDev/7.0.0.0.alpha0$Linux_X86_64 LibreOffice_project/d2eff4b08869dd15b025c5801896e0332b14ba59</meta:generator></office:meta>
+
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties style:text-rotation-angle="90" style:text-rotation-scale="line-height"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"><text:title>Rotationeering</text:title></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/file_crash.docx b/sw/qa/extras/ooxmlexport/data/file_crash.docx
new file mode 100644
index 0000000000..7a233aba5c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/file_crash.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fixed-date-field.docx b/sw/qa/extras/ooxmlexport/data/fixed-date-field.docx
new file mode 100644
index 0000000000..960e2db808
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fixed-date-field.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/flip_and_rotate.odt b/sw/qa/extras/ooxmlexport/data/flip_and_rotate.odt
new file mode 100644
index 0000000000..4805bfa800
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/flip_and_rotate.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/floating-table-position.docx b/sw/qa/extras/ooxmlexport/data/floating-table-position.docx
new file mode 100644
index 0000000000..de7a467aac
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/floating-table-position.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/floating-tables-anchor.docx b/sw/qa/extras/ooxmlexport/data/floating-tables-anchor.docx
new file mode 100644
index 0000000000..70dc7cf8bf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/floating-tables-anchor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/floatingtbl_with_formula.docx b/sw/qa/extras/ooxmlexport/data/floatingtbl_with_formula.docx
new file mode 100644
index 0000000000..ecabbd6b2a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/floatingtbl_with_formula.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odt b/sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odt
new file mode 100644
index 0000000000..3e2ed72eca
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/floattable-nested-cell-start.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/floattable-nested.odt b/sw/qa/extras/ooxmlexport/data/floattable-nested.odt
new file mode 100644
index 0000000000..8644412f60
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/floattable-nested.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt b/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt
new file mode 100644
index 0000000000..af1ae9a862
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph">
+ <style:paragraph-properties fo:text-align="center"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.609cm" fo:min-width="1.609cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="2.064cm" fo:min-width="3.44cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="1" draw:z-index="1" draw:name="Shape2" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.276cm" svg:height="2.276cm" svg:x="4.752cm" svg:y="2.902cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:glue-points="10800 0 3163 3163 0 10800 3163 18437 10800 21600 18437 18437 21600 10800 18437 3163" draw:text-areas="3163 3163 18437 18437" draw:type="ellipse" draw:enhanced-path="U 10800 10800 10800 10800 0 360 Z N"/>
+ </draw:custom-shape>
+ <text:p text:style-name="Standard"><draw:custom-shape text:anchor-type="char" draw:z-index="0" draw:name="Shape1" draw:style-name="gr2" svg:width="3.44cm" svg:height="2.065cm" svg:x="-1.337cm" svg:y="0.912cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape><field:fieldmark-start text:name="__Fieldmark__0_1348794289" field:type="vnd.oasis.opendocument.field.FORMTEXT"/>foobar<field:fieldmark-end/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/font-name-is-empty.docx b/sw/qa/extras/ooxmlexport/data/font-name-is-empty.docx
new file mode 100644
index 0000000000..5ee8cad1ac
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/font-name-is-empty.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/footer-body-distance.docx b/sw/qa/extras/ooxmlexport/data/footer-body-distance.docx
new file mode 100644
index 0000000000..0244d76c75
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/footer-body-distance.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docx b/sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docx
new file mode 100644
index 0000000000..42c68d5e1f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/footer-margin-lost.docx b/sw/qa/extras/ooxmlexport/data/footer-margin-lost.docx
new file mode 100644
index 0000000000..d6a9d7bd8d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/footer-margin-lost.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/footnote.docx b/sw/qa/extras/ooxmlexport/data/footnote.docx
new file mode 100644
index 0000000000..f5c94bd270
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/footnote.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/footnotesep.fodt b/sw/qa/extras/ooxmlexport/data/footnotesep.fodt
new file mode 100644
index 0000000000..f786580bb2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/footnotesep.fodt
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2020-02-06T14:04:13.152283572</meta:creation-date><dc:date>2020-02-06T14:08:19.939509466</dc:date><meta:editing-duration>PT4M8S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="2" meta:paragraph-count="4" meta:word-count="4" meta:character-count="8" meta:non-whitespace-character-count="8"/><meta:generator>LibreOfficeDev/7.0.0.0.alpha0$Linux_X86_64 LibreOffice_project/d2eff4b08869dd15b025c5801896e0332b14ba59</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Footnote" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-left="0.598cm" fo:margin-right="0cm" fo:text-indent="-0.598cm" style:auto-text-indent="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="Footnote_20_Symbol" style:display-name="Footnote Symbol" style:family="text"/>
+ <style:style style:name="Footnote_20_anchor" style:display-name="Footnote anchor" style:family="text">
+ <style:text-properties style:text-position="super 58%"/>
+ </style:style>
+
+ <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" text:citation-body-style-name="Footnote_20_anchor" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Footnote">
+ <style:text-properties officeooo:rsid="00069b1f" officeooo:paragraph-rsid="00069b1f"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Sep">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm2"/>
+ <style:master-page style:name="Sep" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="Standard"><text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body>
+ <text:p text:style-name="P1">foo</text:p></text:note-body></text:note></text:p>
+ <text:p text:style-name="P2"><text:note text:id="ftn1" text:note-class="footnote"><text:note-citation>2</text:note-citation><text:note-body>
+ <text:p text:style-name="P1">bar</text:p></text:note-body></text:note></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/frame-wrap-auto.docx b/sw/qa/extras/ooxmlexport/data/frame-wrap-auto.docx
new file mode 100644
index 0000000000..6ad7fe0594
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/frame-wrap-auto.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/frame.fodt b/sw/qa/extras/ooxmlexport/data/frame.fodt
new file mode 100644
index 0000000000..c474b8de5e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/frame.fodt
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Frame_20_contents" style:display-name="Frame contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"/>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+ </style:style>
+
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:opacity="0%" draw:wrap-influence-on-position="once-concurrent"/>
+ </style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:background-color="#e8f2a1" draw:fill="solid" draw:fill-color="#e8f2a1" draw:wrap-influence-on-position="once-concurrent"/>
+ </style:style>
+ <style:style style:name="fr3" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"><draw:frame draw:style-name="fr3" draw:name="Frame1" text:anchor-type="paragraph" svg:x="0.87cm" svg:y="0cm" svg:width="2cm" draw:z-index="0">
+ <draw:text-box fo:min-height="0.499cm">
+ <text:p text:style-name="Frame_20_contents">opaque</text:p>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr2" draw:name="Frame2" text:anchor-type="paragraph" svg:x="3.069cm" svg:y="0cm" svg:width="2cm" draw:z-index="1">
+ <draw:text-box fo:min-height="0.499cm">
+ <text:p text:style-name="Frame_20_contents">solid</text:p>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr1" draw:name="Frame3" text:anchor-type="paragraph" svg:x="5.33cm" svg:y="0cm" svg:width="2.281cm" draw:z-index="2">
+ <draw:text-box fo:min-height="0.499cm">
+ <text:p text:style-name="Frame_20_contents">transparent</text:p>
+ </draw:text-box>
+ </draw:frame></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/frame_size_export.docx b/sw/qa/extras/ooxmlexport/data/frame_size_export.docx
new file mode 100644
index 0000000000..86147f3110
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/frame_size_export.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/glossaryWithEmail.docx b/sw/qa/extras/ooxmlexport/data/glossaryWithEmail.docx
new file mode 100644
index 0000000000..5ec375adf3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/glossaryWithEmail.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/grabbag.docx b/sw/qa/extras/ooxmlexport/data/grabbag.docx
new file mode 100644
index 0000000000..0aca64d6ee
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/grabbag.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/gradient-fill-preservation.docx b/sw/qa/extras/ooxmlexport/data/gradient-fill-preservation.docx
new file mode 100644
index 0000000000..c9abc10d29
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/gradient-fill-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/graphic-object-fliph.docx b/sw/qa/extras/ooxmlexport/data/graphic-object-fliph.docx
new file mode 100644
index 0000000000..2f95a2b858
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/graphic-object-fliph.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/gridbefore.docx b/sw/qa/extras/ooxmlexport/data/gridbefore.docx
new file mode 100644
index 0000000000..571fb48eaa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/gridbefore.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/grouped_link.docx b/sw/qa/extras/ooxmlexport/data/grouped_link.docx
new file mode 100644
index 0000000000..8c5657b708
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/grouped_link.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/groupshape-picture.docx b/sw/qa/extras/ooxmlexport/data/groupshape-picture.docx
new file mode 100644
index 0000000000..4ecce56cfa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/groupshape-picture.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/groupshape-rotation.docx b/sw/qa/extras/ooxmlexport/data/groupshape-rotation.docx
new file mode 100644
index 0000000000..d63b5d0734
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/groupshape-rotation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/groupshape-smarttag.docx b/sw/qa/extras/ooxmlexport/data/groupshape-smarttag.docx
new file mode 100644
index 0000000000..6fc1cb2e69
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/groupshape-smarttag.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/groupshape-textbox.docx b/sw/qa/extras/ooxmlexport/data/groupshape-textbox.docx
new file mode 100644
index 0000000000..fca71bfcf9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/groupshape-textbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/groupshape-theme-font.docx b/sw/qa/extras/ooxmlexport/data/groupshape-theme-font.docx
new file mode 100644
index 0000000000..75011d7e5c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/groupshape-theme-font.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/groupshape-trackedchanges.docx b/sw/qa/extras/ooxmlexport/data/groupshape-trackedchanges.docx
new file mode 100644
index 0000000000..116721f39e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/groupshape-trackedchanges.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/gutter-left.docx b/sw/qa/extras/ooxmlexport/data/gutter-left.docx
new file mode 100644
index 0000000000..4dc1cbf615
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/gutter-left.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/gutter-top.docx b/sw/qa/extras/ooxmlexport/data/gutter-top.docx
new file mode 100644
index 0000000000..d48cb28462
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/gutter-top.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/header-border.docx b/sw/qa/extras/ooxmlexport/data/header-border.docx
new file mode 100644
index 0000000000..18ee9f52ad
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/header-border.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hello.docm b/sw/qa/extras/ooxmlexport/data/hello.docm
new file mode 100644
index 0000000000..a00aa58e7b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hello.docm
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hello.docx b/sw/qa/extras/ooxmlexport/data/hello.docx
new file mode 100644
index 0000000000..d5d8d43ebd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hello.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hidemark.docx b/sw/qa/extras/ooxmlexport/data/hidemark.docx
new file mode 100644
index 0000000000..4a273d6039
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hidemark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hyperlink-field.odt b/sw/qa/extras/ooxmlexport/data/hyperlink-field.odt
new file mode 100644
index 0000000000..0c265cf718
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hyperlink-field.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hyperlink.docx b/sw/qa/extras/ooxmlexport/data/hyperlink.docx
new file mode 100644
index 0000000000..5f5289790c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hyperlink.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hyperlinkshape.docx b/sw/qa/extras/ooxmlexport/data/hyperlinkshape.docx
new file mode 100644
index 0000000000..3bf4f8c5c4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hyperlinkshape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hyphenation.odt b/sw/qa/extras/ooxmlexport/data/hyphenation.odt
new file mode 100644
index 0000000000..13c1afaaa5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hyphenation.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/i120928.docx b/sw/qa/extras/ooxmlexport/data/i120928.docx
new file mode 100644
index 0000000000..ce78653e98
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/i120928.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/i124106.docx b/sw/qa/extras/ooxmlexport/data/i124106.docx
new file mode 100644
index 0000000000..de1d542936
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/i124106.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/image-comment-at-char.docx b/sw/qa/extras/ooxmlexport/data/image-comment-at-char.docx
new file mode 100644
index 0000000000..677464de49
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/image-comment-at-char.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/image-noborder.docx b/sw/qa/extras/ooxmlexport/data/image-noborder.docx
new file mode 100644
index 0000000000..7e0fc90d23
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/image-noborder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/image_data.docx b/sw/qa/extras/ooxmlexport/data/image_data.docx
new file mode 100644
index 0000000000..a2f89b146c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/image_data.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/image_through_shape.docx b/sw/qa/extras/ooxmlexport/data/image_through_shape.docx
new file mode 100644
index 0000000000..dd90f9d9bf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/image_through_shape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/imgshadow.docx b/sw/qa/extras/ooxmlexport/data/imgshadow.docx
new file mode 100644
index 0000000000..efe0e95960
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/imgshadow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/indentation.docx b/sw/qa/extras/ooxmlexport/data/indentation.docx
new file mode 100644
index 0000000000..cf57aaf541
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/indentation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/indents.docx b/sw/qa/extras/ooxmlexport/data/indents.docx
new file mode 100644
index 0000000000..b16736791c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/indents.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/inheritFirstHeader.docx b/sw/qa/extras/ooxmlexport/data/inheritFirstHeader.docx
new file mode 100644
index 0000000000..e3d7d20a2d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/inheritFirstHeader.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/inline-groupshape.docx b/sw/qa/extras/ooxmlexport/data/inline-groupshape.docx
new file mode 100644
index 0000000000..def5a05b40
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/inline-groupshape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/inline-sdt-header.docx b/sw/qa/extras/ooxmlexport/data/inline-sdt-header.docx
new file mode 100644
index 0000000000..0a6009c2cd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/inline-sdt-header.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/internal_hyperlink_frame.odt b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_frame.odt
new file mode 100644
index 0000000000..2497d5926a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_frame.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/internal_hyperlink_ole.odt b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_ole.odt
new file mode 100644
index 0000000000..844cf1be65
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_ole.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/internal_hyperlink_region.odt b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_region.odt
new file mode 100644
index 0000000000..abec2c5a8f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_region.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/internal_hyperlink_table.odt b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_table.odt
new file mode 100644
index 0000000000..f3144a30e5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/internal_hyperlink_table.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/invalid_date_form_field.docx b/sw/qa/extras/ooxmlexport/data/invalid_date_form_field.docx
new file mode 100644
index 0000000000..9dc24e768b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/invalid_date_form_field.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/kde216114-1.odt b/sw/qa/extras/ooxmlexport/data/kde216114-1.odt
new file mode 100644
index 0000000000..536da7253f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/kde216114-1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/kde302504-1.odt b/sw/qa/extras/ooxmlexport/data/kde302504-1.odt
new file mode 100644
index 0000000000..d0b7c6017d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/kde302504-1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/kern.docx b/sw/qa/extras/ooxmlexport/data/kern.docx
new file mode 100644
index 0000000000..b66130d38d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/kern.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/large-twips.docx b/sw/qa/extras/ooxmlexport/data/large-twips.docx
new file mode 100644
index 0000000000..6e9d82dfab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/large-twips.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/lastEmptyLineWithDirectFormatting.docx b/sw/qa/extras/ooxmlexport/data/lastEmptyLineWithDirectFormatting.docx
new file mode 100644
index 0000000000..5cfb4fcce1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/lastEmptyLineWithDirectFormatting.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/layout-flow-alt-alone.docx b/sw/qa/extras/ooxmlexport/data/layout-flow-alt-alone.docx
new file mode 100644
index 0000000000..59c2db23d5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/layout-flow-alt-alone.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/libreoffice.png b/sw/qa/extras/ooxmlexport/data/libreoffice.png
new file mode 100644
index 0000000000..437f613c17
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/libreoffice.png
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/listWithLgl.docx b/sw/qa/extras/ooxmlexport/data/listWithLgl.docx
new file mode 100644
index 0000000000..3bc5c32d2d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/listWithLgl.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/list_notcounted_indent.fodt b/sw/qa/extras/ooxmlexport/data/list_notcounted_indent.fodt
new file mode 100644
index 0000000000..41a1f7d17a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/list_notcounted_indent.fodt
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+
+ <office:font-face-decls>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Lucida Sans Unicode" svg:font-family="'Lucida Sans Unicode'" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:font-size="11pt"/>
+ </style:style>
+
+ <style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
+ <style:text-properties style:font-name="StarSymbol" fo:font-family="StarSymbol" style:font-charset="x-symbol" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-charset-asian="x-symbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-charset-complex="x-symbol" style:font-size-complex="9pt"/>
+ </style:style>
+ <style:style style:name="Style_20_2" style:display-name="Style 2" style:family="paragraph" style:parent-style-name="Standard" style:default-outline-level="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:line-height="0.476cm" fo:orphans="0" fo:widows="0" fo:text-indent="-0.953cm" style:auto-text-indent="false" fo:background-color="#ffffff">
+ <style:background-image/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Style_20_8" style:display-name="Style 8" style:family="paragraph" style:parent-style-name="Standard" style:default-outline-level="4" style:list-style-name="">
+ <style:paragraph-properties fo:line-height="0.464cm" fo:orphans="0" fo:widows="0" fo:background-color="#ffffff">
+ <style:background-image/>
+ </style:paragraph-properties>
+ </style:style>
+
+ </office:styles>
+ <office:automatic-styles>
+
+ <text:list-style style:name="L2">
+ <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm" fo:margin-left="3.175cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" text:bullet-char="➔">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="StarSymbol"/>
+ </text:list-level-style-bullet>
+ </text:list-style>
+
+ <style:style style:name="P41" style:family="paragraph" style:parent-style-name="Style_20_8" style:list-style-name="L2">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:line-height="0.413cm" fo:text-align="start" style:justify-single-word="false" fo:orphans="0" fo:widows="0" fo:hyphenation-ladder-count="no-limit" fo:text-indent="0cm" style:auto-text-indent="false" fo:background-color="#ffffff">
+ <style:background-image/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P42" style:family="paragraph" style:parent-style-name="Style_20_8" style:list-style-name="L2">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:line-height="0.413cm" fo:text-align="start" style:justify-single-word="false" fo:keep-together="always" fo:orphans="0" fo:widows="0" fo:hyphenation-ladder-count="no-limit" fo:text-indent="0cm" style:auto-text-indent="false" fo:background-color="#ffffff" fo:keep-with-next="always">
+ <style:background-image/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P60" style:family="paragraph" style:parent-style-name="Style_20_2" style:list-style-name="L2">
+ <style:paragraph-properties fo:line-height="0.437cm" fo:text-align="start" style:justify-single-word="false" fo:orphans="0" fo:widows="0" fo:hyphenation-ladder-count="no-limit" fo:background-color="#ffffff">
+ <style:background-image/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P62" style:family="paragraph" style:parent-style-name="Style_20_2" style:list-style-name="L2">
+ <style:paragraph-properties fo:line-height="0.437cm" fo:text-align="start" style:justify-single-word="false" fo:keep-together="auto" fo:orphans="0" fo:widows="0" fo:hyphenation-ladder-count="no-limit" fo:background-color="#ffffff" fo:keep-with-next="auto">
+ <style:background-image/>
+ </style:paragraph-properties>
+ </style:style>
+
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+
+ <text:list xml:id="list4504291082075752071" text:style-name="L2">
+ <text:list-header>
+ <text:h text:style-name="P41" text:outline-level="4"/>
+ </text:list-header>
+ <text:list-item>
+ <text:p text:style-name="P62">Foo</text:p>
+ <text:p text:style-name="P60">Blah blah blah</text:p>
+ <text:h text:style-name="P42" text:outline-level="4"/>
+ <text:h text:style-name="P41" text:outline-level="4">Etc</text:h>
+ </text:list-item>
+ </text:list>
+
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/longBookmarkName.fodt b/sw/qa/extras/ooxmlexport/data/longBookmarkName.fodt
new file mode 100644
index 0000000000..8b09760fcb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/longBookmarkName.fodt
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:p><text:a xlink:type="simple" xlink:href="#A_bookmark_name_longer_than_forty_characters">This is a hyperlink to the first target paragraph below</text:a></text:p>
+ <text:p><text:a xlink:type="simple" xlink:href="#A_bookmark_name_longer_than_forty_characters2">This is a hyperlink to the second target paragraph below</text:a></text:p>
+ <text:p/>
+ <text:p><text:bookmark-start text:name="A_bookmark_name_longer_than_forty_characters"/>The first target paragraph with a bookmark with a very long name<text:bookmark-end text:name="A_bookmark_name_longer_than_forty_characters"/></text:p>
+ <text:p><text:bookmark-start text:name="A_bookmark_name_longer_than_forty_characters2"/>The second target paragraph with a bookmark with a very long name<text:bookmark-end text:name="A_bookmark_name_longer_than_forty_characters2"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/lorem_hyperlink.fodt b/sw/qa/extras/ooxmlexport/data/lorem_hyperlink.fodt
new file mode 100644
index 0000000000..485f87f130
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/lorem_hyperlink.fodt
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:style style:name="Internet_20_link" style:display-name="Internet link" style:family="text">
+ <style:text-properties fo:color="#000080" loext:opacity="100%" fo:language="zxx" fo:country="none" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="00102359" officeooo:paragraph-rsid="00102359"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph">
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="0.781cm" fo:min-width="0.808cm" style:writing-mode="lr-tb" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#foo" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">Lorem <draw:custom-shape text:anchor-type="char" draw:z-index="0" draw:name="Shape 1" draw:style-name="gr1" draw:text-style-name="P2" svg:width="1.615cm" svg:height="1.562cm" svg:x="1cm" svg:y="1cm">
+ <text:p>1</text:p>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:glue-points="10800 0 0 10800 10800 21600 21600 10800" draw:text-areas="5400 5400 16200 16200" draw:type="diamond" draw:enhanced-path="M 10800 0 L 21600 10800 10800 21600 0 10800 10800 0 Z N"/>
+ </draw:custom-shape>ipsum</text:a></text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/ooxmlexport/data/lvlPicBulletId.docx b/sw/qa/extras/ooxmlexport/data/lvlPicBulletId.docx
new file mode 100644
index 0000000000..28e656bdd4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/lvlPicBulletId.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/mailmerge.docx b/sw/qa/extras/ooxmlexport/data/mailmerge.docx
new file mode 100644
index 0000000000..7e209a1b4d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/mailmerge.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/margins_from_style.docx b/sw/qa/extras/ooxmlexport/data/margins_from_style.docx
new file mode 100644
index 0000000000..721982458e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/margins_from_style.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-accents.docx b/sw/qa/extras/ooxmlexport/data/math-accents.docx
new file mode 100644
index 0000000000..b623cb556d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-accents.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-d.docx b/sw/qa/extras/ooxmlexport/data/math-d.docx
new file mode 100644
index 0000000000..a18afdd810
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-d.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-escape.docx b/sw/qa/extras/ooxmlexport/data/math-escape.docx
new file mode 100644
index 0000000000..e935a83f57
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-escape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-escaping.docx b/sw/qa/extras/ooxmlexport/data/math-escaping.docx
new file mode 100644
index 0000000000..d51c47552e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-escaping.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-lim.docx b/sw/qa/extras/ooxmlexport/data/math-lim.docx
new file mode 100644
index 0000000000..6adb548ab6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-lim.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-literal.docx b/sw/qa/extras/ooxmlexport/data/math-literal.docx
new file mode 100644
index 0000000000..b62bd23513
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-literal.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-matrix.docx b/sw/qa/extras/ooxmlexport/data/math-matrix.docx
new file mode 100644
index 0000000000..d6b5b1871a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-matrix.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-mso2k7.docx b/sw/qa/extras/ooxmlexport/data/math-mso2k7.docx
new file mode 100644
index 0000000000..b6b16ef7cb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-mso2k7.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-nary.docx b/sw/qa/extras/ooxmlexport/data/math-nary.docx
new file mode 100644
index 0000000000..f3bb781d6e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-nary.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-overbrace_underbrace.docx b/sw/qa/extras/ooxmlexport/data/math-overbrace_underbrace.docx
new file mode 100644
index 0000000000..e4119f66f7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-overbrace_underbrace.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-overstrike.docx b/sw/qa/extras/ooxmlexport/data/math-overstrike.docx
new file mode 100644
index 0000000000..9809edc8ef
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-overstrike.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-placeholders.docx b/sw/qa/extras/ooxmlexport/data/math-placeholders.docx
new file mode 100644
index 0000000000..1c32c048f0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-placeholders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-rad.docx b/sw/qa/extras/ooxmlexport/data/math-rad.docx
new file mode 100644
index 0000000000..39194dcca2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-rad.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-subscripts.docx b/sw/qa/extras/ooxmlexport/data/math-subscripts.docx
new file mode 100644
index 0000000000..038925f639
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-subscripts.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/math-vertical_stacks.docx b/sw/qa/extras/ooxmlexport/data/math-vertical_stacks.docx
new file mode 100644
index 0000000000..50dfab0ecb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-vertical_stacks.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/mathtype.docx b/sw/qa/extras/ooxmlexport/data/mathtype.docx
new file mode 100644
index 0000000000..bf60f43b25
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/mathtype.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/mce-nested.docx b/sw/qa/extras/ooxmlexport/data/mce-nested.docx
new file mode 100644
index 0000000000..907ac080c1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/mce-nested.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/mce-wpg.docx b/sw/qa/extras/ooxmlexport/data/mce-wpg.docx
new file mode 100644
index 0000000000..bd0d846813
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/mce-wpg.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/mce.docx b/sw/qa/extras/ooxmlexport/data/mce.docx
new file mode 100644
index 0000000000..d4790de411
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/mce.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/missing-path.docx b/sw/qa/extras/ooxmlexport/data/missing-path.docx
new file mode 100644
index 0000000000..8d75e9f630
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/missing-path.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/missing_newline.odt b/sw/qa/extras/ooxmlexport/data/missing_newline.odt
new file mode 100644
index 0000000000..b0f10ade81
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/missing_newline.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/mso-spt180.docx b/sw/qa/extras/ooxmlexport/data/mso-spt180.docx
new file mode 100644
index 0000000000..bf3a801a96
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/mso-spt180.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/msobrightnesscontrast.docx b/sw/qa/extras/ooxmlexport/data/msobrightnesscontrast.docx
new file mode 100644
index 0000000000..132f23575b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/msobrightnesscontrast.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/multi-column-line-separator-SAVED.docx b/sw/qa/extras/ooxmlexport/data/multi-column-line-separator-SAVED.docx
new file mode 100644
index 0000000000..96458833b2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/multi-column-line-separator-SAVED.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/multi-column-separator-with-line.docx b/sw/qa/extras/ooxmlexport/data/multi-column-separator-with-line.docx
new file mode 100644
index 0000000000..c19ed697b5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/multi-column-separator-with-line.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/multi-page-toc.docx b/sw/qa/extras/ooxmlexport/data/multi-page-toc.docx
new file mode 100644
index 0000000000..5b5b5949d6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/multi-page-toc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/multi_space_url.fodt b/sw/qa/extras/ooxmlexport/data/multi_space_url.fodt
new file mode 100644
index 0000000000..3a96582aa7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/multi_space_url.fodt
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:p><text:a xlink:type="simple" xlink:href="http://www.example.org/path%20%20with%20%20spaces" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">A sample hyperlink</text:a></text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/ooxmlexport/data/n592908-frame.docx b/sw/qa/extras/ooxmlexport/data/n592908-frame.docx
new file mode 100644
index 0000000000..ff59cacbad
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n592908-frame.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n592908-picture.docx b/sw/qa/extras/ooxmlexport/data/n592908-picture.docx
new file mode 100644
index 0000000000..2766d3691c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n592908-picture.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n652364.docx b/sw/qa/extras/ooxmlexport/data/n652364.docx
new file mode 100644
index 0000000000..0845509e84
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n652364.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n693238.docx b/sw/qa/extras/ooxmlexport/data/n693238.docx
new file mode 100644
index 0000000000..5bcda0fff6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n693238.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n705956-1.docx b/sw/qa/extras/ooxmlexport/data/n705956-1.docx
new file mode 100644
index 0000000000..edff3bac41
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n705956-1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n705956-2.docx b/sw/qa/extras/ooxmlexport/data/n705956-2.docx
new file mode 100644
index 0000000000..138818523a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n705956-2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n747461.docx b/sw/qa/extras/ooxmlexport/data/n747461.docx
new file mode 100644
index 0000000000..1064e5db06
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n747461.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n750255.docx b/sw/qa/extras/ooxmlexport/data/n750255.docx
new file mode 100644
index 0000000000..a0c7370022
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n750255.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n751054.docx b/sw/qa/extras/ooxmlexport/data/n751054.docx
new file mode 100644
index 0000000000..49d7d6af9c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n751054.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n751117.docx b/sw/qa/extras/ooxmlexport/data/n751117.docx
new file mode 100644
index 0000000000..17cc9c53d1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n751117.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n764005.docx b/sw/qa/extras/ooxmlexport/data/n764005.docx
new file mode 100644
index 0000000000..1c0dd9d077
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n764005.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n766481.docx b/sw/qa/extras/ooxmlexport/data/n766481.docx
new file mode 100644
index 0000000000..e1521ec82f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n766481.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n766487.docx b/sw/qa/extras/ooxmlexport/data/n766487.docx
new file mode 100644
index 0000000000..85eda0e7e3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n766487.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n775906.docx b/sw/qa/extras/ooxmlexport/data/n775906.docx
new file mode 100644
index 0000000000..6b6dd1a6b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n775906.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n777337.docx b/sw/qa/extras/ooxmlexport/data/n777337.docx
new file mode 100644
index 0000000000..8bb377dcf6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n777337.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n778828.docx b/sw/qa/extras/ooxmlexport/data/n778828.docx
new file mode 100644
index 0000000000..ad2e22d17f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n778828.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n778836.docx b/sw/qa/extras/ooxmlexport/data/n778836.docx
new file mode 100644
index 0000000000..ccd89e85b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n778836.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n779630.docx b/sw/qa/extras/ooxmlexport/data/n779630.docx
new file mode 100644
index 0000000000..97812d66cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n779630.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n779642.docx b/sw/qa/extras/ooxmlexport/data/n779642.docx
new file mode 100644
index 0000000000..2fe9a17668
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n779642.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n779834.docx b/sw/qa/extras/ooxmlexport/data/n779834.docx
new file mode 100644
index 0000000000..24b6db1a44
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n779834.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n779941.docx b/sw/qa/extras/ooxmlexport/data/n779941.docx
new file mode 100644
index 0000000000..9889d81e23
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n779941.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n780563.docx b/sw/qa/extras/ooxmlexport/data/n780563.docx
new file mode 100644
index 0000000000..508dc7474b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n780563.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n780843.docx b/sw/qa/extras/ooxmlexport/data/n780843.docx
new file mode 100644
index 0000000000..9b92f79aaa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n780843.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n780843b.docx b/sw/qa/extras/ooxmlexport/data/n780843b.docx
new file mode 100644
index 0000000000..2ba9ab2c6f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n780843b.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n780853.docx b/sw/qa/extras/ooxmlexport/data/n780853.docx
new file mode 100644
index 0000000000..fed8276fbb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n780853.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n782345.docx b/sw/qa/extras/ooxmlexport/data/n782345.docx
new file mode 100644
index 0000000000..f25709fedf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n782345.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n783638.docx b/sw/qa/extras/ooxmlexport/data/n783638.docx
new file mode 100644
index 0000000000..93b587b92e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n783638.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n785767.docx b/sw/qa/extras/ooxmlexport/data/n785767.docx
new file mode 100644
index 0000000000..db356769bc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n785767.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n789482.docx b/sw/qa/extras/ooxmlexport/data/n789482.docx
new file mode 100644
index 0000000000..493e8ee04b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n789482.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n792778.docx b/sw/qa/extras/ooxmlexport/data/n792778.docx
new file mode 100644
index 0000000000..d9541d4ccf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n792778.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n793262.docx b/sw/qa/extras/ooxmlexport/data/n793262.docx
new file mode 100644
index 0000000000..7f2d2e0a80
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n793262.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n793998.docx b/sw/qa/extras/ooxmlexport/data/n793998.docx
new file mode 100644
index 0000000000..fc96e2e97f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n793998.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n816593.docx b/sw/qa/extras/ooxmlexport/data/n816593.docx
new file mode 100644
index 0000000000..7d784e69d4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n816593.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n820509.docx b/sw/qa/extras/ooxmlexport/data/n820509.docx
new file mode 100644
index 0000000000..bfaea90756
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n820509.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n822175.odt b/sw/qa/extras/ooxmlexport/data/n822175.odt
new file mode 100644
index 0000000000..d49a59194f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n822175.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/n830205.docx b/sw/qa/extras/ooxmlexport/data/n830205.docx
new file mode 100644
index 0000000000..89cf1d8434
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/n830205.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/negative-cell-margin-twips.docx b/sw/qa/extras/ooxmlexport/data/negative-cell-margin-twips.docx
new file mode 100644
index 0000000000..3ae73db5c8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/negative-cell-margin-twips.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/nested-text-frames.odt b/sw/qa/extras/ooxmlexport/data/nested-text-frames.odt
new file mode 100644
index 0000000000..d2106f9800
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/nested-text-frames.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/nestedAlternateContent.docx b/sw/qa/extras/ooxmlexport/data/nestedAlternateContent.docx
new file mode 100644
index 0000000000..5b6b03c1ac
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/nestedAlternateContent.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odt b/sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odt
new file mode 100644
index 0000000000..e435acdad3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/noDefault.docx b/sw/qa/extras/ooxmlexport/data/noDefault.docx
new file mode 100644
index 0000000000..56bc266911
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/noDefault.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/non_ascii_link.docx b/sw/qa/extras/ooxmlexport/data/non_ascii_link.docx
new file mode 100644
index 0000000000..345a55b5cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/non_ascii_link.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/nonbmpchar.docx b/sw/qa/extras/ooxmlexport/data/nonbmpchar.docx
new file mode 100644
index 0000000000..a6b5d416c1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/nonbmpchar.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx b/sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx
new file mode 100644
index 0000000000..fe3142d54a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/num-override-lvltext.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/num-override-start.docx b/sw/qa/extras/ooxmlexport/data/num-override-start.docx
new file mode 100644
index 0000000000..b57a02cde3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/num-override-start.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/num-parent-style.docx b/sw/qa/extras/ooxmlexport/data/num-parent-style.docx
new file mode 100644
index 0000000000..4b8c657afa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/num-parent-style.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/number-portion-format.odt b/sw/qa/extras/ooxmlexport/data/number-portion-format.odt
new file mode 100644
index 0000000000..66f3b175b5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/number-portion-format.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/numbering-font.docx b/sw/qa/extras/ooxmlexport/data/numbering-font.docx
new file mode 100644
index 0000000000..ccbbd9ed8d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/numbering-font.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/numbering1.docx b/sw/qa/extras/ooxmlexport/data/numbering1.docx
new file mode 100644
index 0000000000..55b4af3e85
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/numbering1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/numlist-zhcn.odt b/sw/qa/extras/ooxmlexport/data/numlist-zhcn.odt
new file mode 100644
index 0000000000..0ced2b63a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/numlist-zhcn.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/numlist-zhtw.odt b/sw/qa/extras/ooxmlexport/data/numlist-zhtw.odt
new file mode 100644
index 0000000000..62a729d51a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/numlist-zhtw.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/object_cross_reference.odt b/sw/qa/extras/ooxmlexport/data/object_cross_reference.odt
new file mode 100644
index 0000000000..31fdb2b01d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/object_cross_reference.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo106020-1.odt b/sw/qa/extras/ooxmlexport/data/ooo106020-1.odt
new file mode 100644
index 0000000000..9cc774b174
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo106020-1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo30436-1-minimized.sxw b/sw/qa/extras/ooxmlexport/data/ooo30436-1-minimized.sxw
new file mode 100644
index 0000000000..140d6b23ea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo30436-1-minimized.sxw
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo34469-1.odt b/sw/qa/extras/ooxmlexport/data/ooo34469-1.odt
new file mode 100644
index 0000000000..7cf031fb2f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo34469-1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo39250-1-min.rtf b/sw/qa/extras/ooxmlexport/data/ooo39250-1-min.rtf
new file mode 100644
index 0000000000..df1467e4fe
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo39250-1-min.rtf
@@ -0,0 +1,42 @@
+{\rtf1\ansi\ansicpg1250\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1060\deflangfe1060{\fonttbl{\f0\froman\fcharset238\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\f1\fswiss\fcharset238\fprq2{\*\panose 020b0604020202020204}Arial;}{\f40\froman\fcharset0\fprq2 Times New Roman;}{\f39\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f41\froman\fcharset161\fprq2 Times New Roman Greek;}
+{\f42\froman\fcharset162\fprq2 Times New Roman Tur;}{\f43\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f44\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f45\froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\f46\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f50\fswiss\fcharset0\fprq2 Arial;}{\f49\fswiss\fcharset204\fprq2 Arial Cyr;}{\f51\fswiss\fcharset161\fprq2 Arial Greek;}{\f52\fswiss\fcharset162\fprq2 Arial Tur;}
+{\f53\fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f54\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f55\fswiss\fcharset186\fprq2 Arial Baltic;}{\f56\fswiss\fcharset163\fprq2 Arial (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;
+\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;
+\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 \snext0 Normal;}{\*\cs10 \additive
+\ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid3551688\rsid4459474}
+{\*\generator Microsoft Word 11.0.6359;}{\info{\author robi01}{\doccomm Produced by: PsQRFilters V2.11 for QuickReport (www.pragnaan.com)}{\operator robi01}{\creatim\yr2004\mo12\dy16\hr12\min51}{\revtim\yr2004\mo12\dy16\hr12\min51}{\version2}{\edmins1}
+{\nofpages1}{\nofwords256}{\nofchars1465}{\nofcharsws1718}{\vern24703}}\paperw11906\paperh16838\margl567\margr567\margt283\margb283 \widowctrl\ftnbj\aenddoc\hyphhotz425\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120
+\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot3551688 \fet0\sectd \linex0\headery0\footery0\colsx708\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}
+{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
+{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9
+\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {\lang1024\langfe1024\noproof\insrsid3551688
+}
+{\f1\insrsid3551688 \par }
+
+\pard \ql \li0\ri0\nowidctlpar\pvpg\phpg\posx702\posy11927\absw1095\faauto\rin0\lin0\itap0 {\f1\fs16\cf1\insrsid3551688
+\par }
+\pard \ql \li0\ri0\nowidctlpar\pvpg\phpg\posx1782\posy11927\absw1695\faauto\rin0\lin0\itap0 {\lang1024\langfe1024\noproof\insrsid3551688
+}
+
+\pard \qr \li0\ri0\nowidctlpar\pvpg\phpg\posx7347\posy11492\absw1785\faauto\rin0\lin0\itap0 {\b\f1\fs16\cf1\insrsid3551688 Za pla\'e8ilo: }
+
+{\lang1024\langfe1024\noproof\insrsid3551688
+{\shp{\*\shpinst\shpleft687\shptop12452\shpright11248\shpbottom13593\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz7\shplid1033{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 65536}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\shptxt \pard\plain \qc \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0
+\fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {\b\f1\fs16\expnd-1\expndtw-6\insrsid3551688
+\par
+\par Pla\'e8ilo izvr\'9aite na transakcijski ra\'e8un NLB in se sklicujte na \'9atevilko predra\'e8una
+\par Do popolnega pla\'e8ila ostaja predmet pogodbe last podjetja TI, d.o.o. }{\f1\fs16\expnd-1\expndtw-6\insrsid3551688
+\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\fs16\expnd-1\expndtw-6\insrsid3551688
+\par }{\f1\insrsid3551688 _}}}{\shprslt{\*\do\dobxpage\dobypage\dodhgt7\dptxbx\dptxlrtb{\dptxbxtext\pard\plain \qc \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {\b\f1\fs16\expnd-1\expndtw-6\insrsid3551688
+\par
+\par Pla\'e8ilo izvr\'9aite na transakcijski ra\'e8un NLB in se sklicujte na \'9atevilko predra\'e8una
+\par Do popolnega pla\'e8ila ostaja predmet pogodbe last podjetja TI, d.o.o. }{\f1\fs16\expnd-1\expndtw-6\insrsid3551688
+\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\f1\fs16\expnd-1\expndtw-6\insrsid3551688
+\par }{\f1\insrsid3551688 _}}\dpx687\dpy12452\dpxsize10561\dpysize1141\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}}
+
+}
diff --git a/sw/qa/extras/ooxmlexport/data/ooo39845-7.odt b/sw/qa/extras/ooxmlexport/data/ooo39845-7.odt
new file mode 100644
index 0000000000..ee8d139359
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo39845-7.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo47778-3.odt b/sw/qa/extras/ooxmlexport/data/ooo47778-3.odt
new file mode 100644
index 0000000000..69005b11e1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo47778-3.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo47778-4.odt b/sw/qa/extras/ooxmlexport/data/ooo47778-4.odt
new file mode 100644
index 0000000000..ae6b56b8cd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo47778-4.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo67471-2.odt b/sw/qa/extras/ooxmlexport/data/ooo67471-2.odt
new file mode 100644
index 0000000000..82daa57763
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo67471-2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo72950-1.odt b/sw/qa/extras/ooxmlexport/data/ooo72950-1.odt
new file mode 100644
index 0000000000..df0ac91828
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo72950-1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooo96040-2.odt b/sw/qa/extras/ooxmlexport/data/ooo96040-2.odt
new file mode 100644
index 0000000000..35a1858e53
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooo96040-2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/ooxml-triangle.docx b/sw/qa/extras/ooxmlexport/data/ooxml-triangle.docx
new file mode 100644
index 0000000000..4279fbfb05
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/ooxml-triangle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/open-as-read-only.docx b/sw/qa/extras/ooxmlexport/data/open-as-read-only.docx
new file mode 100644
index 0000000000..057c67ff6d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/open-as-read-only.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/outline-number-types.odt b/sw/qa/extras/ooxmlexport/data/outline-number-types.odt
new file mode 100644
index 0000000000..2232ad64ce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/outline-number-types.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/page-background.docx b/sw/qa/extras/ooxmlexport/data/page-background.docx
new file mode 100644
index 0000000000..8c1f2ebdb2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/page-background.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/page-border-shadow.docx b/sw/qa/extras/ooxmlexport/data/page-border-shadow.docx
new file mode 100644
index 0000000000..65a2273f6b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/page-border-shadow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/page-borders-export-case-2.docx b/sw/qa/extras/ooxmlexport/data/page-borders-export-case-2.docx
new file mode 100644
index 0000000000..f06471ecb8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/page-borders-export-case-2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/page-break-before.docx b/sw/qa/extras/ooxmlexport/data/page-break-before.docx
new file mode 100644
index 0000000000..99d8c3a5d4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/page-break-before.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/page-content-bottom.docx b/sw/qa/extras/ooxmlexport/data/page-content-bottom.docx
new file mode 100644
index 0000000000..f955586f39
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/page-content-bottom.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/page-graphic-background.odt b/sw/qa/extras/ooxmlexport/data/page-graphic-background.odt
new file mode 100644
index 0000000000..15050e6307
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/page-graphic-background.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/pageBreak_after.odt b/sw/qa/extras/ooxmlexport/data/pageBreak_after.odt
new file mode 100644
index 0000000000..c3096b58a5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/pageBreak_after.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/pagerelsize.docx b/sw/qa/extras/ooxmlexport/data/pagerelsize.docx
new file mode 100644
index 0000000000..3b6c1ff448
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/pagerelsize.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/para-adjust-distribute.docx b/sw/qa/extras/ooxmlexport/data/para-adjust-distribute.docx
new file mode 100644
index 0000000000..5389a75370
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/para-adjust-distribute.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx b/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx
new file mode 100644
index 0000000000..3cc8bd6fbd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/para-shading.docx b/sw/qa/extras/ooxmlexport/data/para-shading.docx
new file mode 100644
index 0000000000..9c2af1ad5e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/para-shading.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/para-shadow.docx b/sw/qa/extras/ooxmlexport/data/para-shadow.docx
new file mode 100644
index 0000000000..d35d5f958d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/para-shadow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/para-style-char-position.docx b/sw/qa/extras/ooxmlexport/data/para-style-char-position.docx
new file mode 100644
index 0000000000..946ca0bf9c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/para-style-char-position.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/para-style-num-level.docx b/sw/qa/extras/ooxmlexport/data/para-style-num-level.docx
new file mode 100644
index 0000000000..2de0c50db6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/para-style-num-level.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/paragraph-mark-nonempty.odt b/sw/qa/extras/ooxmlexport/data/paragraph-mark-nonempty.odt
new file mode 100644
index 0000000000..b12cbf607d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/paragraph-mark-nonempty.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/paragraph-mark.docx b/sw/qa/extras/ooxmlexport/data/paragraph-mark.docx
new file mode 100644
index 0000000000..4636e4d368
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/paragraph-mark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/paragraph-mark2.docx b/sw/qa/extras/ooxmlexport/data/paragraph-mark2.docx
new file mode 100644
index 0000000000..a465813dc6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/paragraph-mark2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/paragraph-sdt.docx b/sw/qa/extras/ooxmlexport/data/paragraph-sdt.docx
new file mode 100644
index 0000000000..c86f599ed7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/paragraph-sdt.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/paragraphWithComments.docx b/sw/qa/extras/ooxmlexport/data/paragraphWithComments.docx
new file mode 100644
index 0000000000..84a6f20a13
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/paragraphWithComments.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/parasplit-on-section-border.odt b/sw/qa/extras/ooxmlexport/data/parasplit-on-section-border.odt
new file mode 100644
index 0000000000..8a6e4aeb47
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/parasplit-on-section-border.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture-artistic-effects-preservation.docx b/sw/qa/extras/ooxmlexport/data/picture-artistic-effects-preservation.docx
new file mode 100644
index 0000000000..85f31d8c32
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture-artistic-effects-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture-effects-preservation.docx b/sw/qa/extras/ooxmlexport/data/picture-effects-preservation.docx
new file mode 100644
index 0000000000..d26def49f9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture-effects-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture-with-schemecolor.docx b/sw/qa/extras/ooxmlexport/data/picture-with-schemecolor.docx
new file mode 100644
index 0000000000..bfee0e1415
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture-with-schemecolor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture-wrap-polygon.docx b/sw/qa/extras/ooxmlexport/data/picture-wrap-polygon.docx
new file mode 100644
index 0000000000..f858a05ad8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture-wrap-polygon.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/pictureWatermark.docx b/sw/qa/extras/ooxmlexport/data/pictureWatermark.docx
new file mode 100644
index 0000000000..b526ecf370
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/pictureWatermark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odt b/sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odt
new file mode 100644
index 0000000000..b2166bdd36
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docx b/sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docx
new file mode 100644
index 0000000000..2bc6458eda
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odt b/sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odt
new file mode 100644
index 0000000000..70dd5e9089
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/plausable-border.docx b/sw/qa/extras/ooxmlexport/data/plausable-border.docx
new file mode 100644
index 0000000000..c6f049fe2d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/plausable-border.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/position-and-rotation.docx b/sw/qa/extras/ooxmlexport/data/position-and-rotation.docx
new file mode 100644
index 0000000000..d883ad32e7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/position-and-rotation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/preserve_Z_field_TOC.docx b/sw/qa/extras/ooxmlexport/data/preserve_Z_field_TOC.docx
new file mode 100644
index 0000000000..63ae40287a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/preserve_Z_field_TOC.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/preset-shape.docx b/sw/qa/extras/ooxmlexport/data/preset-shape.docx
new file mode 100644
index 0000000000..922b906e25
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/preset-shape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/protectedform.docx b/sw/qa/extras/ooxmlexport/data/protectedform.docx
new file mode 100644
index 0000000000..a67d88006c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/protectedform.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/quicktables.docx b/sw/qa/extras/ooxmlexport/data/quicktables.docx
new file mode 100644
index 0000000000..5060d3dbae
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/quicktables.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rel-size-round.docx b/sw/qa/extras/ooxmlexport/data/rel-size-round.docx
new file mode 100644
index 0000000000..ccd076a15e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rel-size-round.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/relative-link.docx b/sw/qa/extras/ooxmlexport/data/relative-link.docx
new file mode 100644
index 0000000000..c3688f3e87
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/relative-link.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/relorientation.docx b/sw/qa/extras/ooxmlexport/data/relorientation.docx
new file mode 100644
index 0000000000..22a04538bd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/relorientation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rhbz1180114.docx b/sw/qa/extras/ooxmlexport/data/rhbz1180114.docx
new file mode 100644
index 0000000000..23009ebbdc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rhbz1180114.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rhbz988516.docx b/sw/qa/extras/ooxmlexport/data/rhbz988516.docx
new file mode 100644
index 0000000000..38e2dcff32
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rhbz988516.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rot180-flipv.docx b/sw/qa/extras/ooxmlexport/data/rot180-flipv.docx
new file mode 100644
index 0000000000..2a8bb19675
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rot180-flipv.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rot270-flipv.docx b/sw/qa/extras/ooxmlexport/data/rot270-flipv.docx
new file mode 100644
index 0000000000..0aa19e08a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rot270-flipv.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rot90-fliph.docx b/sw/qa/extras/ooxmlexport/data/rot90-fliph.docx
new file mode 100644
index 0000000000..c2a916d809
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rot90-fliph.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rotated_shape.fodt b/sw/qa/extras/ooxmlexport/data/rotated_shape.fodt
new file mode 100644
index 0000000000..fce84f93e9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rotated_shape.fodt
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="Times New Roman" svg:font-family="&apos;Times New Roman&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="NSimSun" svg:font-family="NSimSun" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph">
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph">
+ <loext:graphic-properties draw:fill="none" draw:fill-color="#ffffff"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="11pt"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="7pt" fo:language="de" fo:country="DE" style:font-name-asian="Times New Roman" style:font-size-asian="7pt" style:font-name-complex="Arial" style:font-size-complex="12pt" style:language-complex="ar" style:country-complex="SA"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:stroke="none" draw:fill="none" draw:fill-color="#ffffff" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" draw:auto-grow-width="false" fo:padding-top="0.254cm" fo:padding-bottom="0.254cm" fo:padding-left="0.127cm" fo:padding-right="0.127cm" fo:wrap-option="wrap" draw:shadow="hidden" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:horizontal-pos="from-left" style:horizontal-rel="paragraph" style:vertical-pos="from-top" style:vertical-rel="page" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <draw:frame text:anchor-type="page" text:anchor-page-number="1" draw:z-index="0" draw:name="Shape1" draw:style-name="gr1" draw:text-style-name="P2" svg:width="5.896cm" svg:height="0.957cm" draw:transform="rotate (1.5707963267949) translate (1.13418055555556cm 26.0579305555556cm)">
+ <draw:text-box>
+ <text:p text:style-name="P1"><text:span text:style-name="T1"><text:s/></text:span><text:span text:style-name="T1">Foo</text:span></text:p>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="page" text:anchor-page-number="1" svg:width="0.67cm" svg:height="0.67cm" draw:z-index="0"><draw:image draw:mime-type="image/png" svg:x="2cm" svg:y="3cm">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAAXNSR0IArs4c6QAAAAZiS0dE
+ AP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJBhI0A6HXrrIAAABl
+ SURBVDjLY/z//z8DtQATMYokl7D8p4phMIOIMZCJFBcRMpCJVK/hM5CJnDDCJc9EbmBjU8dE
+ jkG41DPhM+h5zB9GfHx0fTgjAJtGfOIMDAwMLMQoItZAJgYqglHDhpNhjNQsaQHF4y3hS/bS
+ HgAAAABJRU5ErkJggg==
+ </office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/rprchange_closed.docx b/sw/qa/extras/ooxmlexport/data/rprchange_closed.docx
new file mode 100644
index 0000000000..ff53871e91
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rprchange_closed.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx
new file mode 100644
index 0000000000..d6b28e5cbc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rubyhyperlink.fodt b/sw/qa/extras/ooxmlexport/data/rubyhyperlink.fodt
new file mode 100644
index 0000000000..a201d7c342
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rubyhyperlink.fodt
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Normal" svg:font-family="&apos;Source Han Sans CN Normal&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Normal" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Internet_20_link" style:display-name="Internet link" style:family="text">
+ <style:text-properties fo:color="#000080" fo:language="zxx" fo:country="none" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
+ </style:style>
+
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="001000a5" officeooo:paragraph-rsid="001000a5"/>
+ </style:style>
+ <style:style style:name="Ru1" style:family="ruby">
+ <style:ruby-properties style:ruby-align="left" style:ruby-position="above"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"><text:ruby text:style-name="Ru1"><text:ruby-base>bar</text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby></text:p>
+ <text:p text:style-name="P1">foo<text:ruby text:style-name="Ru1"><text:ruby-base>bar</text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby>baz</text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:ruby text:style-name="Ru1"><text:ruby-base>bar</text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby>baz</text:p>
+ <text:p text:style-name="P1">foo<text:ruby text:style-name="Ru1"><text:ruby-base><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">bar</text:a></text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby>baz</text:p>
+ <text:p text:style-name="P1">foo<text:ruby text:style-name="Ru1"><text:ruby-base>bar</text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">baz</text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:ruby text:style-name="Ru1"><text:ruby-base><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">bar</text:a></text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby>baz</text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:ruby text:style-name="Ru1"><text:ruby-base>bar</text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">baz</text:a></text:p>
+ <text:p text:style-name="P1">foo<text:ruby text:style-name="Ru1"><text:ruby-base><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">bar</text:a></text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">baz</text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:ruby text:style-name="Ru1"><text:ruby-base><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">bar</text:a></text:ruby-base><text:ruby-text>quux</text:ruby-text></text:ruby><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">baz</text:a></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/sample.dotx b/sw/qa/extras/ooxmlexport/data/sample.dotx
new file mode 100644
index 0000000000..c0f4062c1e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sample.dotx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-2-para.docx b/sw/qa/extras/ooxmlexport/data/sdt-2-para.docx
new file mode 100644
index 0000000000..b6d6565d65
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-2-para.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-2-run.docx b/sw/qa/extras/ooxmlexport/data/sdt-2-run.docx
new file mode 100644
index 0000000000..6063ebc41c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-2-run.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-alias.docx b/sw/qa/extras/ooxmlexport/data/sdt-alias.docx
new file mode 100644
index 0000000000..f46ef693a3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-alias.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-before-field.docx b/sw/qa/extras/ooxmlexport/data/sdt-before-field.docx
new file mode 100644
index 0000000000..a83a76885c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-before-field.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-citation-run.docx b/sw/qa/extras/ooxmlexport/data/sdt-citation-run.docx
new file mode 100644
index 0000000000..cd97f934a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-citation-run.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-company-multipara.docx b/sw/qa/extras/ooxmlexport/data/sdt-company-multipara.docx
new file mode 100644
index 0000000000..96d25ff750
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-company-multipara.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx b/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx
new file mode 100644
index 0000000000..038ab111da
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docx b/sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docx
new file mode 100644
index 0000000000..d21894df30
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-header.docx b/sw/qa/extras/ooxmlexport/data/sdt-header.docx
new file mode 100644
index 0000000000..6a4bdfb2d0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-header.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-ignored-footer.docx b/sw/qa/extras/ooxmlexport/data/sdt-ignored-footer.docx
new file mode 100644
index 0000000000..8330291af8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-ignored-footer.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-run-picture.docx b/sw/qa/extras/ooxmlexport/data/sdt-run-picture.docx
new file mode 100644
index 0000000000..fa2d57c2b3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-run-picture.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sdt_after_section_break.docx b/sw/qa/extras/ooxmlexport/data/sdt_after_section_break.docx
new file mode 100644
index 0000000000..d753f5da30
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt_after_section_break.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/section_break_after_table.docx b/sw/qa/extras/ooxmlexport/data/section_break_after_table.docx
new file mode 100644
index 0000000000..9f8e4c687b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/section_break_after_table.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/section_break_numbering.docx b/sw/qa/extras/ooxmlexport/data/section_break_numbering.docx
new file mode 100644
index 0000000000..8b5378a771
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/section_break_numbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sectionprot.odt b/sw/qa/extras/ooxmlexport/data/sectionprot.odt
new file mode 100644
index 0000000000..1effc19516
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sectionprot.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/sectionprot2.odt b/sw/qa/extras/ooxmlexport/data/sectionprot2.odt
new file mode 100644
index 0000000000..8f4a283f84
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sectionprot2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docx b/sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docx
new file mode 100644
index 0000000000..1e361bd4e4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/shape-3d-effect-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt b/sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt
new file mode 100644
index 0000000000..42c9c77905
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Lucida Sans Unicode" svg:font-family="&apos;Lucida Sans Unicode&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:font-size="11pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" style:line-height-at-least="0.46cm"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Lucida Sans Unicode" style:font-family-asian="&apos;Lucida Sans Unicode&apos;" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
+ <style:text-properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ </text:outline-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabelle1" style:family="table" style:master-page-name="First_20_Page">
+ <style:table-properties style:width="19.396cm" fo:margin-left="-1.642cm" style:page-number="auto" table:align="left" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="19.396cm"/>
+ </style:style>
+ <style:style style:name="Tabelle1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A1" style:family="table-cell">
+ <style:table-cell-properties style:vertical-align="top" fo:padding="0cm" fo:border="none" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:stroke="none" draw:fill="none" draw:fill-color="#ffffff" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" draw:auto-grow-width="false" fo:padding-top="0.1in" fo:padding-bottom="0.1in" fo:padding-left="0.05in" fo:padding-right="0.05in" fo:wrap-option="wrap" draw:shadow="hidden" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ </style:style>
+ <style:style style:name="P54" style:family="paragraph">
+ <loext:graphic-properties draw:fill="none" draw:fill-color="#ffffff"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial1" fo:font-size="7pt" fo:language="de" fo:country="DE" style:font-name-asian="Arial1" style:font-size-asian="7pt" style:font-name-complex="Arial1" style:font-size-complex="7pt" style:language-complex="ar" style:country-complex="SA"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" fo:background-color="transparent" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" draw:fill="none" draw:fill-color="#99ccff" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false">
+ <form:form form:name="WW-Standard" form:apply-filter="true" form:control-implementation="ooo:com.sun.star.form.component.Form" office:target-frame="">
+ <form:properties>
+ <form:property form:property-name="PropertyChangeNotificationEnabled" office:value-type="boolean" office:boolean-value="true"/>
+ <form:property form:property-name="TargetURL" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ <form:checkbox form:name="Kontrollkästchen1" form:control-implementation="ooo:com.sun.star.form.component.CheckBox" xml:id="control1" form:id="control1" form:input-required="false" form:state="checked" form:current-state="checked" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="ControlTypeinMSO" office:value-type="float" office:value="0"/>
+ <form:property form:property-name="DefaultControl" office:value-type="string" office:string-value="com.sun.star.form.control.CheckBox"/>
+ <form:property form:property-name="ObjIDinMSO" office:value-type="float" office:value="65535"/>
+ <form:property form:property-name="SecondaryRefValue" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ </form:checkbox>
+ </form:form>
+ </office:forms>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <draw:frame text:anchor-type="page" text:anchor-page-number="1" draw:z-index="0" draw:name="Shape1" draw:style-name="gr2" draw:text-style-name="P54" svg:width="2.3213in" svg:height="0.3776in" draw:transform="rotate (1.5707963267949) translate (0.364583333333333in 10.65in)">
+ <draw:text-box>
+ <text:p text:style-name="P53">
+ ABC DEF GHI
+ </text:p>
+ </draw:text-box>
+ </draw:frame>
+ <table:table table:name="Tabelle1" table:style-name="Tabelle1">
+ <table:table-column table:style-name="Tabelle1.A"/>
+ <table:table-row table:style-name="Tabelle1.1">
+ <table:table-cell table:style-name="Tabelle1.A1" office:value-type="string">
+ <text:p>
+ </text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/shape-effect-preservation.docx b/sw/qa/extras/ooxmlexport/data/shape-effect-preservation.docx
new file mode 100644
index 0000000000..f2b91ea45f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/shape-effect-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/shape-in-floattable.docx b/sw/qa/extras/ooxmlexport/data/shape-in-floattable.docx
new file mode 100644
index 0000000000..46af861822
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/shape-in-floattable.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/shape-theme-preservation.docx b/sw/qa/extras/ooxmlexport/data/shape-theme-preservation.docx
new file mode 100644
index 0000000000..134f629fb6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/shape-theme-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/signature-line-all-props-set.docx b/sw/qa/extras/ooxmlexport/data/signature-line-all-props-set.docx
new file mode 100644
index 0000000000..2f8401bf5c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/signature-line-all-props-set.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/simple-sdts.docx b/sw/qa/extras/ooxmlexport/data/simple-sdts.docx
new file mode 100644
index 0000000000..95c5d00a6a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/simple-sdts.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/smartart.docx b/sw/qa/extras/ooxmlexport/data/smartart.docx
new file mode 100644
index 0000000000..7a553f4251
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/smartart.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/strict-smartart.docx b/sw/qa/extras/ooxmlexport/data/strict-smartart.docx
new file mode 100644
index 0000000000..bab7c16bce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/strict-smartart.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/strict.docx b/sw/qa/extras/ooxmlexport/data/strict.docx
new file mode 100644
index 0000000000..b46ce94b34
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/strict.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/style-inheritance.docx b/sw/qa/extras/ooxmlexport/data/style-inheritance.docx
new file mode 100644
index 0000000000..65ca38aedd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/style-inheritance.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docx b/sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docx
new file mode 100644
index 0000000000..5d27260ca8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-alignment.docx b/sw/qa/extras/ooxmlexport/data/table-alignment.docx
new file mode 100644
index 0000000000..e1efaaefd5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-alignment.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size.docx b/sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size.docx
new file mode 100644
index 0000000000..557edcb3cb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size2.docx b/sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size2.docx
new file mode 100644
index 0000000000..2125f09da7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-auto-column-fixed-size2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-auto-nested.docx b/sw/qa/extras/ooxmlexport/data/table-auto-nested.docx
new file mode 100644
index 0000000000..85f47dbba0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-auto-nested.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-black_fill.docx b/sw/qa/extras/ooxmlexport/data/table-black_fill.docx
new file mode 100644
index 0000000000..c9d4e22896
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-black_fill.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-borders.docx b/sw/qa/extras/ooxmlexport/data/table-borders.docx
new file mode 100644
index 0000000000..a18a93e790
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-borders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-btlr-center.docx b/sw/qa/extras/ooxmlexport/data/table-btlr-center.docx
new file mode 100644
index 0000000000..79cb53eed0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-btlr-center.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-cell-margin.docx b/sw/qa/extras/ooxmlexport/data/table-cell-margin.docx
new file mode 100644
index 0000000000..f59a5da11a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-cell-margin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-floating-margins.docx b/sw/qa/extras/ooxmlexport/data/table-floating-margins.docx
new file mode 100644
index 0000000000..81f6f6cf1f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-floating-margins.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-floating.docx b/sw/qa/extras/ooxmlexport/data/table-floating.docx
new file mode 100644
index 0000000000..1e0cb30ece
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-floating.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-ltr.docx b/sw/qa/extras/ooxmlexport/data/table-ltr.docx
new file mode 100644
index 0000000000..d627b81a31
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-ltr.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-pagebreak.docx b/sw/qa/extras/ooxmlexport/data/table-pagebreak.docx
new file mode 100644
index 0000000000..06ecf9535a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-pagebreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-position-14.docx b/sw/qa/extras/ooxmlexport/data/table-position-14.docx
new file mode 100644
index 0000000000..f59a5da11a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-position-14.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-position-15.docx b/sw/qa/extras/ooxmlexport/data/table-position-15.docx
new file mode 100644
index 0000000000..91fbdbef00
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-position-15.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-row-data-displayed-twice.docx b/sw/qa/extras/ooxmlexport/data/table-row-data-displayed-twice.docx
new file mode 100644
index 0000000000..00c63d8fce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-row-data-displayed-twice.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-rtl.docx b/sw/qa/extras/ooxmlexport/data/table-rtl.docx
new file mode 100644
index 0000000000..90fba0b927
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-rtl.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docx b/sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docx
new file mode 100644
index 0000000000..d3bf3bc5d6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-style-border-export.docx b/sw/qa/extras/ooxmlexport/data/table-style-border-export.docx
new file mode 100644
index 0000000000..eeb23ee84b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-style-border-export.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-style-border.docx b/sw/qa/extras/ooxmlexport/data/table-style-border.docx
new file mode 100644
index 0000000000..ceb0bd8a0e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-style-border.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-style-cell-back-color.docx b/sw/qa/extras/ooxmlexport/data/table-style-cell-back-color.docx
new file mode 100644
index 0000000000..f622b9d842
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-style-cell-back-color.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-style-conf-nested.docx b/sw/qa/extras/ooxmlexport/data/table-style-conf-nested.docx
new file mode 100644
index 0000000000..e35612addc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-style-conf-nested.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-style-parprop.docx b/sw/qa/extras/ooxmlexport/data/table-style-parprop.docx
new file mode 100644
index 0000000000..1c68c704e7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-style-parprop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-style-rPr-sz.docx b/sw/qa/extras/ooxmlexport/data/table-style-rPr-sz.docx
new file mode 100644
index 0000000000..6b6f694247
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-style-rPr-sz.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table-theme-preservation.docx b/sw/qa/extras/ooxmlexport/data/table-theme-preservation.docx
new file mode 100644
index 0000000000..ae4ede04b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table-theme-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table.fodt b/sw/qa/extras/ooxmlexport/data/table.fodt
new file mode 100644
index 0000000000..e8346ca421
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table.fodt
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2020-02-07T17:21:48.094426929</meta:creation-date><dc:date>2020-02-07T17:22:23.469846014</dc:date><meta:editing-duration>PT37S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="1" meta:character-count="3" meta:non-whitespace-character-count="3"/><meta:generator>LibreOfficeDev/7.0.0.0.alpha0$Linux_X86_64 LibreOffice_project/d2eff4b08869dd15b025c5801896e0332b14ba59</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:orphans="0" fo:widows="0" text:number-lines="false" text:line-number="0"/>
+ </style:style>
+
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="17cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="17cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="0006f2af" officeooo:paragraph-rsid="0006f2af"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">foo</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/table.odt b/sw/qa/extras/ooxmlexport/data/table.odt
new file mode 100644
index 0000000000..25b2a5fea2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tableCurrupt.docx b/sw/qa/extras/ooxmlexport/data/tableCurrupt.docx
new file mode 100644
index 0000000000..1deda7ddcb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tableCurrupt.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tablePreferredWidth.docx b/sw/qa/extras/ooxmlexport/data/tablePreferredWidth.docx
new file mode 100644
index 0000000000..6546be9b63
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tablePreferredWidth.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table_atleast.docx b/sw/qa/extras/ooxmlexport/data/table_atleast.docx
new file mode 100644
index 0000000000..ec751aa58a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table_atleast.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table_cross_reference.odt b/sw/qa/extras/ooxmlexport/data/table_cross_reference.odt
new file mode 100644
index 0000000000..bd9c840161
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table_cross_reference.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table_cross_reference_custom_format.odt b/sw/qa/extras/ooxmlexport/data/table_cross_reference_custom_format.odt
new file mode 100644
index 0000000000..cbf03d34ed
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table_cross_reference_custom_format.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/table_lineRule.docx b/sw/qa/extras/ooxmlexport/data/table_lineRule.docx
new file mode 100644
index 0000000000..d1d47ff240
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table_lineRule.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tableborder-finedash.docx b/sw/qa/extras/ooxmlexport/data/tableborder-finedash.docx
new file mode 100644
index 0000000000..003167ac3a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tableborder-finedash.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tblppr-shape.docx b/sw/qa/extras/ooxmlexport/data/tblppr-shape.docx
new file mode 100644
index 0000000000..470bce4247
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tblppr-shape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tblr-height.docx b/sw/qa/extras/ooxmlexport/data/tblr-height.docx
new file mode 100644
index 0000000000..6a16c81dd5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tblr-height.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tbrl-frame-vml.docx b/sw/qa/extras/ooxmlexport/data/tbrl-frame-vml.docx
new file mode 100644
index 0000000000..c697e5846c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tbrl-frame-vml.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tbrl-textbox.docx b/sw/qa/extras/ooxmlexport/data/tbrl-textbox.docx
new file mode 100644
index 0000000000..bdfcc5fff1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tbrl-textbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf100075.docx b/sw/qa/extras/ooxmlexport/data/tdf100075.docx
new file mode 100644
index 0000000000..6312050aaf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf100075.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf100581.odt b/sw/qa/extras/ooxmlexport/data/tdf100581.odt
new file mode 100644
index 0000000000..f098385e3c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf100581.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf100751_arrowBothFlip.docx b/sw/qa/extras/ooxmlexport/data/tdf100751_arrowBothFlip.docx
new file mode 100644
index 0000000000..8a57f69eae
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf100751_arrowBothFlip.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odt b/sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odt
new file mode 100644
index 0000000000..8cc2a13f85
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf101122_noFillForCustomShape.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf101589_dontSplitTable.odt b/sw/qa/extras/ooxmlexport/data/tdf101589_dontSplitTable.odt
new file mode 100644
index 0000000000..4a05018823
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf101589_dontSplitTable.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf102466.docx b/sw/qa/extras/ooxmlexport/data/tdf102466.docx
new file mode 100644
index 0000000000..68a88799ce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf102466.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103001.docx b/sw/qa/extras/ooxmlexport/data/tdf103001.docx
new file mode 100644
index 0000000000..332d415698
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103001.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103090.odt b/sw/qa/extras/ooxmlexport/data/tdf103090.odt
new file mode 100644
index 0000000000..d264f255ab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103090.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103389.docx b/sw/qa/extras/ooxmlexport/data/tdf103389.docx
new file mode 100644
index 0000000000..0ef80e6a18
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103389.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103544.docx b/sw/qa/extras/ooxmlexport/data/tdf103544.docx
new file mode 100644
index 0000000000..2e18f21213
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103544.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103573.docx b/sw/qa/extras/ooxmlexport/data/tdf103573.docx
new file mode 100644
index 0000000000..34d7e3367d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103573.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103651.docx b/sw/qa/extras/ooxmlexport/data/tdf103651.docx
new file mode 100644
index 0000000000..de4c2d6c34
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103651.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakB.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakB.docx
new file mode 100644
index 0000000000..a7b880d00e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakB.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakC.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakC.docx
new file mode 100644
index 0000000000..52767abb8c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakC.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakD.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakD.docx
new file mode 100644
index 0000000000..37c752499f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakD.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakE.docx b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakE.docx
new file mode 100644
index 0000000000..ac3eb9f7c7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103975_notPageBreakE.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103976.docx b/sw/qa/extras/ooxmlexport/data/tdf103976.docx
new file mode 100644
index 0000000000..2081fcf078
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103976.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103982.docx b/sw/qa/extras/ooxmlexport/data/tdf103982.docx
new file mode 100644
index 0000000000..13e645356b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103982.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx b/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx
new file mode 100644
index 0000000000..b5d2a4fee9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104061_tableSectionColumns.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104115.docx b/sw/qa/extras/ooxmlexport/data/tdf104115.docx
new file mode 100644
index 0000000000..9236f0e3a5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104115.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104150.docx b/sw/qa/extras/ooxmlexport/data/tdf104150.docx
new file mode 100644
index 0000000000..9898846426
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104150.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104162.docx b/sw/qa/extras/ooxmlexport/data/tdf104162.docx
new file mode 100644
index 0000000000..61b51c0077
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104162.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docx
new file mode 100644
index 0000000000..ef3d06533b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104348_contextMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104354-2.docx b/sw/qa/extras/ooxmlexport/data/tdf104354-2.docx
new file mode 100644
index 0000000000..5b67e015fb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104354-2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104354.docx b/sw/qa/extras/ooxmlexport/data/tdf104354.docx
new file mode 100644
index 0000000000..d8655f4e08
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104354.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docx b/sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docx
new file mode 100644
index 0000000000..79ff44f256
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docx b/sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docx
new file mode 100644
index 0000000000..472d0723a9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104418.odt b/sw/qa/extras/ooxmlexport/data/tdf104418.odt
new file mode 100644
index 0000000000..12627ea286
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104418.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docx b/sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docx
new file mode 100644
index 0000000000..b5d9988336
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104420_lostParagraph.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104539.odt b/sw/qa/extras/ooxmlexport/data/tdf104539.odt
new file mode 100644
index 0000000000..76be8af1f5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104539.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104565_ArrowPosition.docx b/sw/qa/extras/ooxmlexport/data/tdf104565_ArrowPosition.docx
new file mode 100644
index 0000000000..514eeddbaf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104565_ArrowPosition.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104707_urlComment.odt b/sw/qa/extras/ooxmlexport/data/tdf104707_urlComment.odt
new file mode 100644
index 0000000000..4c63093fb0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104707_urlComment.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104713_undefinedStyles.docx b/sw/qa/extras/ooxmlexport/data/tdf104713_undefinedStyles.docx
new file mode 100644
index 0000000000..5114a06935
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104713_undefinedStyles.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104797.docx b/sw/qa/extras/ooxmlexport/data/tdf104797.docx
new file mode 100644
index 0000000000..6e52190ce6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104797.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104823.docx b/sw/qa/extras/ooxmlexport/data/tdf104823.docx
new file mode 100644
index 0000000000..4a354b848e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104823.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105035_framePrB.docx b/sw/qa/extras/ooxmlexport/data/tdf105035_framePrB.docx
new file mode 100644
index 0000000000..fe813609fb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105035_framePrB.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105035_framePrC.docx b/sw/qa/extras/ooxmlexport/data/tdf105035_framePrC.docx
new file mode 100644
index 0000000000..4954f8cc62
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105035_framePrC.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105095.docx b/sw/qa/extras/ooxmlexport/data/tdf105095.docx
new file mode 100644
index 0000000000..0a6a7a2ac3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105095.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105215.docx b/sw/qa/extras/ooxmlexport/data/tdf105215.docx
new file mode 100644
index 0000000000..e464d460b2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105215.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105444.docx b/sw/qa/extras/ooxmlexport/data/tdf105444.docx
new file mode 100644
index 0000000000..a6e0ea8732
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105444.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105485.docx b/sw/qa/extras/ooxmlexport/data/tdf105485.docx
new file mode 100644
index 0000000000..be8a10e41a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105485.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105490_negativeMargins.docx b/sw/qa/extras/ooxmlexport/data/tdf105490_negativeMargins.docx
new file mode 100644
index 0000000000..6acb9f383d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105490_negativeMargins.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105688.docx b/sw/qa/extras/ooxmlexport/data/tdf105688.docx
new file mode 100644
index 0000000000..55a2972d39
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105688.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf105875_VmlShapeRotationWithFlip.docx b/sw/qa/extras/ooxmlexport/data/tdf105875_VmlShapeRotationWithFlip.docx
new file mode 100644
index 0000000000..e6512e075c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf105875_VmlShapeRotationWithFlip.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106001-2.odt b/sw/qa/extras/ooxmlexport/data/tdf106001-2.odt
new file mode 100644
index 0000000000..36d2650f4c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106001-2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106001.docx b/sw/qa/extras/ooxmlexport/data/tdf106001.docx
new file mode 100644
index 0000000000..efe4104cf8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106001.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106062_nonHangingFootnote.odt b/sw/qa/extras/ooxmlexport/data/tdf106062_nonHangingFootnote.odt
new file mode 100644
index 0000000000..af5e225ea0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106062_nonHangingFootnote.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106132.docx b/sw/qa/extras/ooxmlexport/data/tdf106132.docx
new file mode 100644
index 0000000000..e342898141
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106132.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106174_rtlParaAlign.docx b/sw/qa/extras/ooxmlexport/data/tdf106174_rtlParaAlign.docx
new file mode 100644
index 0000000000..a222f58814
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106174_rtlParaAlign.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106492.docx b/sw/qa/extras/ooxmlexport/data/tdf106492.docx
new file mode 100644
index 0000000000..72ff4be5d0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106492.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106541_noinheritChapterNumbering.odt b/sw/qa/extras/ooxmlexport/data/tdf106541_noinheritChapterNumbering.odt
new file mode 100644
index 0000000000..2408ecf550
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106541_noinheritChapterNumbering.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106690-cell.docx b/sw/qa/extras/ooxmlexport/data/tdf106690-cell.docx
new file mode 100644
index 0000000000..e2ea6f4b09
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106690-cell.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106690.docx b/sw/qa/extras/ooxmlexport/data/tdf106690.docx
new file mode 100644
index 0000000000..b233ef81c6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106690.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106724.docx b/sw/qa/extras/ooxmlexport/data/tdf106724.docx
new file mode 100644
index 0000000000..3cce6ea7c3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106724.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106843.fodt b/sw/qa/extras/ooxmlexport/data/tdf106843.fodt
new file mode 100644
index 0000000000..37a97489a3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106843.fodt
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:settings>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary">h/jtkVcSX/xNqeBqe4ARrYClP+E=</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct101395712" text:id="ct101395712">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Ismeretlen szerző</dc:creator>
+ <dc:date>2018-12-03T20:35:00</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct101395264" text:id="ct101395264">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Ismeretlen szerző</dc:creator>
+ <dc:date>2018-12-03T20:34:58</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P1">Par1<text:change-start text:change-id="ct101395712"/>Par2<text:change-end text:change-id="ct101395712"/><text:change-start text:change-id="ct101395264"/></text:p>
+ <text:p text:style-name="P1"/>
+ <text:p text:style-name="P1"><text:change-end text:change-id="ct101395264"/><text:span text:style-name="T1">Format this...</text:span></text:p>
+ <text:p text:style-name="P1">Par3</text:p>
+ <text:p text:style-name="P1"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106953.docx b/sw/qa/extras/ooxmlexport/data/tdf106953.docx
new file mode 100644
index 0000000000..31dc0e28e4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106953.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106970.docx b/sw/qa/extras/ooxmlexport/data/tdf106970.docx
new file mode 100644
index 0000000000..8a534558b6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106970.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106974_int32Crop.docx b/sw/qa/extras/ooxmlexport/data/tdf106974_int32Crop.docx
new file mode 100644
index 0000000000..e73cf5e28d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf106974_int32Crop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107020.docx b/sw/qa/extras/ooxmlexport/data/tdf107020.docx
new file mode 100644
index 0000000000..9c6cf6d958
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107020.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107033.docx b/sw/qa/extras/ooxmlexport/data/tdf107033.docx
new file mode 100644
index 0000000000..f4e08a3d36
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107033.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107035.docx b/sw/qa/extras/ooxmlexport/data/tdf107035.docx
new file mode 100644
index 0000000000..a8ab045b61
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107035.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107104.docx b/sw/qa/extras/ooxmlexport/data/tdf107104.docx
new file mode 100644
index 0000000000..2f8c87d8d3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107104.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107111.docx b/sw/qa/extras/ooxmlexport/data/tdf107111.docx
new file mode 100644
index 0000000000..f89436fda7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107111.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107119.docx b/sw/qa/extras/ooxmlexport/data/tdf107119.docx
new file mode 100644
index 0000000000..98de4f2ac7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107119.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docx b/sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docx
new file mode 100644
index 0000000000..970d722d31
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107618.doc b/sw/qa/extras/ooxmlexport/data/tdf107618.doc
new file mode 100644
index 0000000000..8a6972f45b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107618.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107626.odt b/sw/qa/extras/ooxmlexport/data/tdf107626.odt
new file mode 100644
index 0000000000..b7c8489cd3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107626.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107684.odt b/sw/qa/extras/ooxmlexport/data/tdf107684.odt
new file mode 100644
index 0000000000..0ca7c53d23
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107684.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107837.odt b/sw/qa/extras/ooxmlexport/data/tdf107837.odt
new file mode 100644
index 0000000000..a31a70c523
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107837.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107889.docx b/sw/qa/extras/ooxmlexport/data/tdf107889.docx
new file mode 100644
index 0000000000..452c4aa130
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107889.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107969.docx b/sw/qa/extras/ooxmlexport/data/tdf107969.docx
new file mode 100644
index 0000000000..e674bcb5db
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf107969.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108269.docm b/sw/qa/extras/ooxmlexport/data/tdf108269.docm
new file mode 100644
index 0000000000..44e943531d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108269.docm
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docx b/sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docx
new file mode 100644
index 0000000000..ea81722799
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108350_noFontdefaults.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108493.docx b/sw/qa/extras/ooxmlexport/data/tdf108493.docx
new file mode 100644
index 0000000000..f1a51525ee
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108493.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108496.docx b/sw/qa/extras/ooxmlexport/data/tdf108496.docx
new file mode 100644
index 0000000000..123d9e0a65
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108496.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108505.docx b/sw/qa/extras/ooxmlexport/data/tdf108505.docx
new file mode 100644
index 0000000000..50ebc37708
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108505.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108682.docx b/sw/qa/extras/ooxmlexport/data/tdf108682.docx
new file mode 100644
index 0000000000..1364025b82
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108682.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odt b/sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odt
new file mode 100644
index 0000000000..17e0c6029f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108944_footnoteSeparator2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docx b/sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docx
new file mode 100644
index 0000000000..177cb5b779
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docx b/sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docx
new file mode 100644
index 0000000000..fb81047c39
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf109063.docx b/sw/qa/extras/ooxmlexport/data/tdf109063.docx
new file mode 100644
index 0000000000..70f4fe4e2f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf109063.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf109184.docx b/sw/qa/extras/ooxmlexport/data/tdf109184.docx
new file mode 100644
index 0000000000..36e5232ae6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf109184.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf109306.docx b/sw/qa/extras/ooxmlexport/data/tdf109306.docx
new file mode 100644
index 0000000000..d46049f83b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf109306.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf109310_endnoteStyleForMSO.docx b/sw/qa/extras/ooxmlexport/data/tdf109310_endnoteStyleForMSO.docx
new file mode 100644
index 0000000000..9949b98d5f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf109310_endnoteStyleForMSO.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf111964.docx b/sw/qa/extras/ooxmlexport/data/tdf111964.docx
new file mode 100644
index 0000000000..7cb85a1d87
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf111964.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112103_tablebgnofill.docx b/sw/qa/extras/ooxmlexport/data/tdf112103_tablebgnofill.docx
new file mode 100644
index 0000000000..cee8756ec3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112103_tablebgnofill.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112118.docx b/sw/qa/extras/ooxmlexport/data/tdf112118.docx
new file mode 100644
index 0000000000..3ddb068394
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112118.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112169.odt b/sw/qa/extras/ooxmlexport/data/tdf112169.odt
new file mode 100644
index 0000000000..51bb97f2e1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112169.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112287.docx b/sw/qa/extras/ooxmlexport/data/tdf112287.docx
new file mode 100644
index 0000000000..ca22693186
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112287.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112287B.docx b/sw/qa/extras/ooxmlexport/data/tdf112287B.docx
new file mode 100644
index 0000000000..945d3d026b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112287B.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112312_AutoFitForLegacyShapes.odt b/sw/qa/extras/ooxmlexport/data/tdf112312_AutoFitForLegacyShapes.odt
new file mode 100644
index 0000000000..b5ccb35620
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112312_AutoFitForLegacyShapes.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docx b/sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docx
new file mode 100644
index 0000000000..f14681dd51
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docx
new file mode 100644
index 0000000000..7c92ae36f4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113183.docx b/sw/qa/extras/ooxmlexport/data/tdf113183.docx
new file mode 100644
index 0000000000..197f483ba0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113183.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113258.docx b/sw/qa/extras/ooxmlexport/data/tdf113258.docx
new file mode 100644
index 0000000000..d60a2ee641
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113258.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113258_noBeforeAutospacing.docx b/sw/qa/extras/ooxmlexport/data/tdf113258_noBeforeAutospacing.docx
new file mode 100644
index 0000000000..de74eb2268
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113258_noBeforeAutospacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113399.doc b/sw/qa/extras/ooxmlexport/data/tdf113399.doc
new file mode 100644
index 0000000000..1f3ddc993d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113399.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113547.docx b/sw/qa/extras/ooxmlexport/data/tdf113547.docx
new file mode 100644
index 0000000000..7b35ad72ba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113547.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docx
new file mode 100644
index 0000000000..f31cc80150
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf114308.docx b/sw/qa/extras/ooxmlexport/data/tdf114308.docx
new file mode 100644
index 0000000000..0796200fc5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf114308.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf114537_conditional-text2.doc b/sw/qa/extras/ooxmlexport/data/tdf114537_conditional-text2.doc
new file mode 100644
index 0000000000..16f8076dc3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf114537_conditional-text2.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf114703.docx b/sw/qa/extras/ooxmlexport/data/tdf114703.docx
new file mode 100644
index 0000000000..116b56a2b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf114703.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf114734_commentFormating.docx b/sw/qa/extras/ooxmlexport/data/tdf114734_commentFormating.docx
new file mode 100644
index 0000000000..5c8edb1689
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf114734_commentFormating.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf114882.docx b/sw/qa/extras/ooxmlexport/data/tdf114882.docx
new file mode 100644
index 0000000000..8663f6b155
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf114882.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf115030.docx b/sw/qa/extras/ooxmlexport/data/tdf115030.docx
new file mode 100644
index 0000000000..71b983295c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf115030.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf115094v3.docx b/sw/qa/extras/ooxmlexport/data/tdf115094v3.docx
new file mode 100644
index 0000000000..6c7535f7b7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf115094v3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf115212.docx b/sw/qa/extras/ooxmlexport/data/tdf115212.docx
new file mode 100644
index 0000000000..1a44fbd776
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf115212.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf115557.docx b/sw/qa/extras/ooxmlexport/data/tdf115557.docx
new file mode 100644
index 0000000000..1edceac485
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf115557.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf115719.docx b/sw/qa/extras/ooxmlexport/data/tdf115719.docx
new file mode 100644
index 0000000000..99806d4dc8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf115719.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf115719b.docx b/sw/qa/extras/ooxmlexport/data/tdf115719b.docx
new file mode 100644
index 0000000000..f3e3925c88
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf115719b.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf115861.docx b/sw/qa/extras/ooxmlexport/data/tdf115861.docx
new file mode 100644
index 0000000000..f42a7bad2c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf115861.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116084.docx b/sw/qa/extras/ooxmlexport/data/tdf116084.docx
new file mode 100644
index 0000000000..61a9fdb13a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116084.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116194.docx b/sw/qa/extras/ooxmlexport/data/tdf116194.docx
new file mode 100644
index 0000000000..feec3ee987
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116194.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116371.odt b/sw/qa/extras/ooxmlexport/data/tdf116371.odt
new file mode 100644
index 0000000000..257696616e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116371.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116394.docx b/sw/qa/extras/ooxmlexport/data/tdf116394.docx
new file mode 100644
index 0000000000..b152a0f3db
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116394.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116410.docx b/sw/qa/extras/ooxmlexport/data/tdf116410.docx
new file mode 100644
index 0000000000..5352a233ed
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116410.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116436_rowFill.odt b/sw/qa/extras/ooxmlexport/data/tdf116436_rowFill.odt
new file mode 100644
index 0000000000..45f4a1c54b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116436_rowFill.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116801.docx b/sw/qa/extras/ooxmlexport/data/tdf116801.docx
new file mode 100644
index 0000000000..f904546cf3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116801.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116883.docx b/sw/qa/extras/ooxmlexport/data/tdf116883.docx
new file mode 100644
index 0000000000..52a9c42218
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116883.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116976.docx b/sw/qa/extras/ooxmlexport/data/tdf116976.docx
new file mode 100644
index 0000000000..70492a4af2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116976.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf116985.docx b/sw/qa/extras/ooxmlexport/data/tdf116985.docx
new file mode 100644
index 0000000000..2a8e202388
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf116985.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf117137.docx b/sw/qa/extras/ooxmlexport/data/tdf117137.docx
new file mode 100644
index 0000000000..1c2cc92b20
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf117137.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf117297_tableStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf117297_tableStyle.docx
new file mode 100644
index 0000000000..57260f8160
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf117297_tableStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx b/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx
new file mode 100644
index 0000000000..d86b0b4f1a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf117805.odt b/sw/qa/extras/ooxmlexport/data/tdf117805.odt
new file mode 100644
index 0000000000..828384b361
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf117805.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf117988.docx b/sw/qa/extras/ooxmlexport/data/tdf117988.docx
new file mode 100644
index 0000000000..5c92f209a9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf117988.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118169.docx b/sw/qa/extras/ooxmlexport/data/tdf118169.docx
new file mode 100644
index 0000000000..2510fb3e59
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118169.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118242.odt b/sw/qa/extras/ooxmlexport/data/tdf118242.odt
new file mode 100644
index 0000000000..14b468d750
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118242.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118361_RTLfootnoteSeparator.docx b/sw/qa/extras/ooxmlexport/data/tdf118361_RTLfootnoteSeparator.docx
new file mode 100644
index 0000000000..8545cbf253
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118361_RTLfootnoteSeparator.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docx b/sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docx
new file mode 100644
index 0000000000..66170ede47
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118521_marginsLR.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118535.odt b/sw/qa/extras/ooxmlexport/data/tdf118535.odt
new file mode 100644
index 0000000000..146c6f471a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118535.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118682.fodt b/sw/qa/extras/ooxmlexport/data/tdf118682.fodt
new file mode 100644
index 0000000000..b80074592d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118682.fodt
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <table:table>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>2</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p><text:table-formula text:formula="ooow: &lt;A1&gt;+&lt;A2&gt;" style:data-style-name="N0">3</text:table-formula></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p><text:table-formula text:formula="ooow:SUM(&lt;A1:A3&gt;)" style:data-style-name="N0">6</text:table-formula></text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118691.docx b/sw/qa/extras/ooxmlexport/data/tdf118691.docx
new file mode 100644
index 0000000000..ce6c6c5cf7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118691.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118701.docx b/sw/qa/extras/ooxmlexport/data/tdf118701.docx
new file mode 100644
index 0000000000..8fb26669d1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118701.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118702.odt b/sw/qa/extras/ooxmlexport/data/tdf118702.odt
new file mode 100644
index 0000000000..d55099242d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118702.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118812_tableStyles-comprehensive.docx b/sw/qa/extras/ooxmlexport/data/tdf118812_tableStyles-comprehensive.docx
new file mode 100644
index 0000000000..e2cbffc20a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118812_tableStyles-comprehensive.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle.docx
new file mode 100644
index 0000000000..b5c55f6f3b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle2.docx b/sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle2.docx
new file mode 100644
index 0000000000..7c0825feba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118947_tableStyle2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119037.odt b/sw/qa/extras/ooxmlexport/data/tdf119037.odt
new file mode 100644
index 0000000000..b795b6b34b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119037.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119054.docx b/sw/qa/extras/ooxmlexport/data/tdf119054.docx
new file mode 100644
index 0000000000..9c3657c24a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119054.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119143.docx b/sw/qa/extras/ooxmlexport/data/tdf119143.docx
new file mode 100644
index 0000000000..be0bc03f71
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119143.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119188_list_margin_in_cell.docx b/sw/qa/extras/ooxmlexport/data/tdf119188_list_margin_in_cell.docx
new file mode 100644
index 0000000000..02b538685f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119188_list_margin_in_cell.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119201.docx b/sw/qa/extras/ooxmlexport/data/tdf119201.docx
new file mode 100644
index 0000000000..d454d6731b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119201.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119760_positionCellBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf119760_positionCellBorder.docx
new file mode 100644
index 0000000000..17a570e063
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119760_positionCellBorder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119760_tableInTablePosition.docx b/sw/qa/extras/ooxmlexport/data/tdf119760_tableInTablePosition.docx
new file mode 100644
index 0000000000..0456fe206e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119760_tableInTablePosition.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119800.docx b/sw/qa/extras/ooxmlexport/data/tdf119800.docx
new file mode 100644
index 0000000000..35c4108d3b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119800.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119809.docx b/sw/qa/extras/ooxmlexport/data/tdf119809.docx
new file mode 100644
index 0000000000..9779382531
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119809.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119952_negativeMargins.docx b/sw/qa/extras/ooxmlexport/data/tdf119952_negativeMargins.docx
new file mode 100644
index 0000000000..9b5a98d3f1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf119952_negativeMargins.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120224_textControlCrossRef.docx b/sw/qa/extras/ooxmlexport/data/tdf120224_textControlCrossRef.docx
new file mode 100644
index 0000000000..c76bbd691c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120224_textControlCrossRef.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120315.docx b/sw/qa/extras/ooxmlexport/data/tdf120315.docx
new file mode 100644
index 0000000000..d3943ea0b2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120315.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120338.docx b/sw/qa/extras/ooxmlexport/data/tdf120338.docx
new file mode 100644
index 0000000000..94e0023cea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120338.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx b/sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx
new file mode 100644
index 0000000000..74bcd59e24
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120344_FontTypes.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120394.docx b/sw/qa/extras/ooxmlexport/data/tdf120394.docx
new file mode 100644
index 0000000000..39bd5886c0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120394.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docx b/sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docx
new file mode 100644
index 0000000000..526d7d2c18
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docx b/sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docx
new file mode 100644
index 0000000000..6a6d6f17ba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120511_eatenSection.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docx b/sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docx
new file mode 100644
index 0000000000..77a6d48dd8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120760_ZOrderInHeader.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyProtection.docx b/sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyProtection.docx
new file mode 100644
index 0000000000..02869aa5a7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyProtection.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyUnProtected.docx b/sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyUnProtected.docx
new file mode 100644
index 0000000000..143799ddb6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf120852_readOnlyUnProtected.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121045.docx b/sw/qa/extras/ooxmlexport/data/tdf121045.docx
new file mode 100644
index 0000000000..271aca1ec0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121045.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121176.docx b/sw/qa/extras/ooxmlexport/data/tdf121176.docx
new file mode 100644
index 0000000000..f95c023b05
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121176.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF.odt b/sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF.odt
new file mode 100644
index 0000000000..392fae1b66
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF2.doc b/sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF2.doc
new file mode 100644
index 0000000000..56a33d260e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121374_sectionHF2.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121441.docx b/sw/qa/extras/ooxmlexport/data/tdf121441.docx
new file mode 100644
index 0000000000..d4c67feb52
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121441.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121456.docx b/sw/qa/extras/ooxmlexport/data/tdf121456.docx
new file mode 100644
index 0000000000..a65870a9b7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121456.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121456_tabsOffset.odt b/sw/qa/extras/ooxmlexport/data/tdf121456_tabsOffset.odt
new file mode 100644
index 0000000000..ff8d540095
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121456_tabsOffset.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121597.odt b/sw/qa/extras/ooxmlexport/data/tdf121597.odt
new file mode 100644
index 0000000000..760b46e763
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121597.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121658.docx b/sw/qa/extras/ooxmlexport/data/tdf121658.docx
new file mode 100644
index 0000000000..fe42b5cde8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121658.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121659_loseColumnBrNextToShape.docx b/sw/qa/extras/ooxmlexport/data/tdf121659_loseColumnBrNextToShape.docx
new file mode 100644
index 0000000000..1fda1422e3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121659_loseColumnBrNextToShape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121661.docx b/sw/qa/extras/ooxmlexport/data/tdf121661.docx
new file mode 100644
index 0000000000..dfd2f291e3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121661.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121663.docx b/sw/qa/extras/ooxmlexport/data/tdf121663.docx
new file mode 100644
index 0000000000..dd2614169a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121663.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121665_back2backColumnBreaks.docx b/sw/qa/extras/ooxmlexport/data/tdf121665_back2backColumnBreaks.docx
new file mode 100644
index 0000000000..e9173a9acf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121665_back2backColumnBreaks.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx
new file mode 100644
index 0000000000..195f574d1c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docx b/sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docx
new file mode 100644
index 0000000000..4f962e1bdd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121669_equalColumns.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121670_columnsInSectionsOnly.docx b/sw/qa/extras/ooxmlexport/data/tdf121670_columnsInSectionsOnly.docx
new file mode 100644
index 0000000000..d8ba105440
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121670_columnsInSectionsOnly.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121784.docx b/sw/qa/extras/ooxmlexport/data/tdf121784.docx
new file mode 100644
index 0000000000..30faeb2841
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121784.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf121867.odt b/sw/qa/extras/ooxmlexport/data/tdf121867.odt
new file mode 100644
index 0000000000..361121d23b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121867.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odt b/sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odt
new file mode 100644
index 0000000000..76a6289f70
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122186_input_list.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122201_editUnprotectedText.odt b/sw/qa/extras/ooxmlexport/data/tdf122201_editUnprotectedText.odt
new file mode 100644
index 0000000000..217c8c38a4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122201_editUnprotectedText.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122342.docx b/sw/qa/extras/ooxmlexport/data/tdf122342.docx
new file mode 100644
index 0000000000..0c7ecd67a5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122342.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122563.docx b/sw/qa/extras/ooxmlexport/data/tdf122563.docx
new file mode 100644
index 0000000000..69168a3826
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122563.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122594.docx b/sw/qa/extras/ooxmlexport/data/tdf122594.docx
new file mode 100644
index 0000000000..847d8ef590
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122594.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122648.docx b/sw/qa/extras/ooxmlexport/data/tdf122648.docx
new file mode 100644
index 0000000000..900a9f30b2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122648.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123054.docx b/sw/qa/extras/ooxmlexport/data/tdf123054.docx
new file mode 100644
index 0000000000..d857479d5a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123054.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123104.docx b/sw/qa/extras/ooxmlexport/data/tdf123104.docx
new file mode 100644
index 0000000000..73cad8617c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123104.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123116_oversizedRowSplit.odt b/sw/qa/extras/ooxmlexport/data/tdf123116_oversizedRowSplit.odt
new file mode 100644
index 0000000000..aafc27ae22
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123116_oversizedRowSplit.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123243.docx b/sw/qa/extras/ooxmlexport/data/tdf123243.docx
new file mode 100644
index 0000000000..9519a2a145
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123243.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docx b/sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docx
new file mode 100644
index 0000000000..ceccb767e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginHasHeader.docx b/sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginHasHeader.docx
new file mode 100644
index 0000000000..b978eec993
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginHasHeader.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginNoHeader.docx b/sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginNoHeader.docx
new file mode 100644
index 0000000000..70c2793cbf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123324_testRelativeAnchorHeightFromTopMarginNoHeader.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123346_ArrowMarker.docx b/sw/qa/extras/ooxmlexport/data/tdf123346_ArrowMarker.docx
new file mode 100644
index 0000000000..770bab263d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123346_ArrowMarker.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123351_UnderlineGroupSapeText.docx b/sw/qa/extras/ooxmlexport/data/tdf123351_UnderlineGroupSapeText.docx
new file mode 100644
index 0000000000..8726f7ee6f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123351_UnderlineGroupSapeText.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123354.fodt b/sw/qa/extras/ooxmlexport/data/tdf123354.fodt
new file mode 100644
index 0000000000..5e75b21295
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123354.fodt
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <table:table>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>-10</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>10</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:ABS(&lt;A1&gt;)" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:ABS(&lt;B1&gt;)" office:value-type="float" office:value="10">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:ABS(&lt;C1&gt;)" office:value-type="float" office:value="0">
+ <text:p>10</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123355.docx b/sw/qa/extras/ooxmlexport/data/tdf123355.docx
new file mode 100644
index 0000000000..da36db29f7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123355.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123356.fodt b/sw/qa/extras/ooxmlexport/data/tdf123356.fodt
new file mode 100644
index 0000000000..c7dc5d1e61
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123356.fodt
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <table:table>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>-10</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>10</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:COUNT(&lt;A1&gt;)" office:value-type="float" office:value="1">
+ <text:p>1</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:COUNT(&lt;A1:B2&gt;)" office:value-type="float" office:value="4">
+ <text:p>4</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123381.docx b/sw/qa/extras/ooxmlexport/data/tdf123381.docx
new file mode 100644
index 0000000000..a019560d51
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123381.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123382.docx b/sw/qa/extras/ooxmlexport/data/tdf123382.docx
new file mode 100644
index 0000000000..cac27ef518
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123382.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123386.docx b/sw/qa/extras/ooxmlexport/data/tdf123386.docx
new file mode 100644
index 0000000000..1278068dde
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123386.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123388.docx b/sw/qa/extras/ooxmlexport/data/tdf123388.docx
new file mode 100644
index 0000000000..7d1da2b05e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123388.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123389.docx b/sw/qa/extras/ooxmlexport/data/tdf123389.docx
new file mode 100644
index 0000000000..4245464b82
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123389.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123390.fodt b/sw/qa/extras/ooxmlexport/data/tdf123390.fodt
new file mode 100644
index 0000000000..6512425bda
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123390.fodt
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <table:table>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>-10</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>10</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:SIGN(&lt;A1&gt;)" office:value-type="float" office:value="-1">
+ <text:p>-1</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:SIGN(&lt;B1&gt;)" office:value-type="float" office:value="1">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:SIGN(&lt;C1&gt;)" office:value-type="float" office:value="1">
+ <text:p>1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123401.fodt b/sw/qa/extras/ooxmlexport/data/tdf123401.fodt
new file mode 100644
index 0000000000..d0cdfe2c90
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123401.fodt
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <table:table>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>2</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>4</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:mean(&lt;A1:A2&gt;)" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:AVERAGE(&lt;A1:A3&gt;)" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123435.docx b/sw/qa/extras/ooxmlexport/data/tdf123435.docx
new file mode 100644
index 0000000000..02d8cd1e9b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123435.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123460.docx b/sw/qa/extras/ooxmlexport/data/tdf123460.docx
new file mode 100644
index 0000000000..c3b723b4e5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123460.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123569_rotWriterImage_46deg.odt b/sw/qa/extras/ooxmlexport/data/tdf123569_rotWriterImage_46deg.odt
new file mode 100644
index 0000000000..b452852afe
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123569_rotWriterImage_46deg.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docx b/sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docx
new file mode 100644
index 0000000000..d7dc1978a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123610_handle_upright.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123621.docx b/sw/qa/extras/ooxmlexport/data/tdf123621.docx
new file mode 100644
index 0000000000..471b6ef71e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123621.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123622.docx b/sw/qa/extras/ooxmlexport/data/tdf123622.docx
new file mode 100644
index 0000000000..54ef0cbd76
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123622.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123627.docx b/sw/qa/extras/ooxmlexport/data/tdf123627.docx
new file mode 100644
index 0000000000..a85d440005
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123627.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123628.odt b/sw/qa/extras/ooxmlexport/data/tdf123628.odt
new file mode 100644
index 0000000000..53ce54ad2e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123628.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak.docx b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak.docx
new file mode 100644
index 0000000000..6f7b4b1445
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak2.docx b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak2.docx
new file mode 100644
index 0000000000..a876bea84e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak3.docx b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak3.docx
new file mode 100644
index 0000000000..1bcc335fdc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak4.docx b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak4.docx
new file mode 100644
index 0000000000..3a9d86ee21
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123636_newlinePageBreak4.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123642.docx b/sw/qa/extras/ooxmlexport/data/tdf123642.docx
new file mode 100644
index 0000000000..9817093e02
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123642.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123705.docx b/sw/qa/extras/ooxmlexport/data/tdf123705.docx
new file mode 100644
index 0000000000..46e053fd46
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123705.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123757.docx b/sw/qa/extras/ooxmlexport/data/tdf123757.docx
new file mode 100644
index 0000000000..6cfc8210c0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123757.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123873.docx b/sw/qa/extras/ooxmlexport/data/tdf123873.docx
new file mode 100644
index 0000000000..b1de7f71f7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123873.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123912_protectedForm.odt b/sw/qa/extras/ooxmlexport/data/tdf123912_protectedForm.odt
new file mode 100644
index 0000000000..34e87467ee
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123912_protectedForm.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124367.docx b/sw/qa/extras/ooxmlexport/data/tdf124367.docx
new file mode 100644
index 0000000000..0a1356dd0d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124367.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124384.docx b/sw/qa/extras/ooxmlexport/data/tdf124384.docx
new file mode 100644
index 0000000000..a41be4b115
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124384.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124399_SingleCellTableBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf124399_SingleCellTableBorders.docx
new file mode 100644
index 0000000000..edb93b76e1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124399_SingleCellTableBorders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124472.docx b/sw/qa/extras/ooxmlexport/data/tdf124472.docx
new file mode 100644
index 0000000000..7d7f275be7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124472.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124491.docx b/sw/qa/extras/ooxmlexport/data/tdf124491.docx
new file mode 100644
index 0000000000..dad4d7c54b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124491.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124594.docx b/sw/qa/extras/ooxmlexport/data/tdf124594.docx
new file mode 100644
index 0000000000..27abe18419
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124594.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124600b.docx b/sw/qa/extras/ooxmlexport/data/tdf124600b.docx
new file mode 100644
index 0000000000..aa25ada91b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124600b.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124604.docx b/sw/qa/extras/ooxmlexport/data/tdf124604.docx
new file mode 100644
index 0000000000..1bac640ecc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124604.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124637_sectionMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf124637_sectionMargin.docx
new file mode 100644
index 0000000000..19aa819aca
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124637_sectionMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odt b/sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odt
new file mode 100644
index 0000000000..a694ff6136
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.odt b/sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.odt
new file mode 100644
index 0000000000..cb14c8ea4d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124795-5.docx b/sw/qa/extras/ooxmlexport/data/tdf124795-5.docx
new file mode 100644
index 0000000000..19fd5f49c8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124795-5.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124986.docx b/sw/qa/extras/ooxmlexport/data/tdf124986.docx
new file mode 100644
index 0000000000..e5bb8f4966
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124986.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125038_conditionalText3.docx b/sw/qa/extras/ooxmlexport/data/tdf125038_conditionalText3.docx
new file mode 100644
index 0000000000..ec5698eeae
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125038_conditionalText3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125268.odt b/sw/qa/extras/ooxmlexport/data/tdf125268.odt
new file mode 100644
index 0000000000..ebdc206191
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125268.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125298_crossreflink_nonascii_charlimit.docx b/sw/qa/extras/ooxmlexport/data/tdf125298_crossreflink_nonascii_charlimit.docx
new file mode 100644
index 0000000000..d15739971c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125298_crossreflink_nonascii_charlimit.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125324.docx b/sw/qa/extras/ooxmlexport/data/tdf125324.docx
new file mode 100644
index 0000000000..9382e295f0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125324.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125338.docm b/sw/qa/extras/ooxmlexport/data/tdf125338.docm
new file mode 100644
index 0000000000..44e943531d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125338.docm
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125518.odt b/sw/qa/extras/ooxmlexport/data/tdf125518.odt
new file mode 100644
index 0000000000..92df094a89
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125518.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125546.docx b/sw/qa/extras/ooxmlexport/data/tdf125546.docx
new file mode 100644
index 0000000000..92e3bdcd15
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125546.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125657.docx b/sw/qa/extras/ooxmlexport/data/tdf125657.docx
new file mode 100644
index 0000000000..eeaad7a4bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125657.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125778_lostPageBreakTOX.docx b/sw/qa/extras/ooxmlexport/data/tdf125778_lostPageBreakTOX.docx
new file mode 100644
index 0000000000..dd5d323e57
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125778_lostPageBreakTOX.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125894.docx b/sw/qa/extras/ooxmlexport/data/tdf125894.docx
new file mode 100644
index 0000000000..1214f2c09c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125894.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx b/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx
new file mode 100644
index 0000000000..eb856fb3b0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126206.docx b/sw/qa/extras/ooxmlexport/data/tdf126206.docx
new file mode 100644
index 0000000000..166125e7a7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126206.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126245.docx b/sw/qa/extras/ooxmlexport/data/tdf126245.docx
new file mode 100644
index 0000000000..7cdc261431
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126245.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126287.docx b/sw/qa/extras/ooxmlexport/data/tdf126287.docx
new file mode 100644
index 0000000000..cf2250b9f9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126287.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docx b/sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docx
new file mode 100644
index 0000000000..180383ec68
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126590.docx b/sw/qa/extras/ooxmlexport/data/tdf126590.docx
new file mode 100644
index 0000000000..147db45652
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126590.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126723.docx b/sw/qa/extras/ooxmlexport/data/tdf126723.docx
new file mode 100644
index 0000000000..297ea322fa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126723.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126768.docx b/sw/qa/extras/ooxmlexport/data/tdf126768.docx
new file mode 100644
index 0000000000..7a3440e791
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126768.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126792.odt b/sw/qa/extras/ooxmlexport/data/tdf126792.odt
new file mode 100644
index 0000000000..7eb43e78a7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126792.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odt b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odt
new file mode 100644
index 0000000000..e650076a09
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odt b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odt
new file mode 100644
index 0000000000..da2eae76bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126994_lostPageBreak.docx b/sw/qa/extras/ooxmlexport/data/tdf126994_lostPageBreak.docx
new file mode 100644
index 0000000000..9025ce652e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126994_lostPageBreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127085.docx b/sw/qa/extras/ooxmlexport/data/tdf127085.docx
new file mode 100644
index 0000000000..65556fe38a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127085.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127116.odt b/sw/qa/extras/ooxmlexport/data/tdf127116.odt
new file mode 100644
index 0000000000..2825b34c07
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127116.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127316_autoEscapement.odt b/sw/qa/extras/ooxmlexport/data/tdf127316_autoEscapement.odt
new file mode 100644
index 0000000000..95987d4562
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127316_autoEscapement.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127339.docx b/sw/qa/extras/ooxmlexport/data/tdf127339.docx
new file mode 100644
index 0000000000..7f0239ddb0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127339.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127362.odt b/sw/qa/extras/ooxmlexport/data/tdf127362.odt
new file mode 100644
index 0000000000..488f1528fd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127362.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127579.odt b/sw/qa/extras/ooxmlexport/data/tdf127579.odt
new file mode 100644
index 0000000000..a35fb47a03
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127579.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127605.odt b/sw/qa/extras/ooxmlexport/data/tdf127605.odt
new file mode 100644
index 0000000000..583f7fdeeb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127605.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127622_framePr.docx b/sw/qa/extras/ooxmlexport/data/tdf127622_framePr.docx
new file mode 100644
index 0000000000..5440a81985
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127622_framePr.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127741.docx b/sw/qa/extras/ooxmlexport/data/tdf127741.docx
new file mode 100644
index 0000000000..1bedb9ade5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127741.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127814.docx b/sw/qa/extras/ooxmlexport/data/tdf127814.docx
new file mode 100644
index 0000000000..10ed2348f1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127814.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127864.docx b/sw/qa/extras/ooxmlexport/data/tdf127864.docx
new file mode 100644
index 0000000000..a9e59d9331
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127864.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127925.odt b/sw/qa/extras/ooxmlexport/data/tdf127925.odt
new file mode 100644
index 0000000000..b91e48f055
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127925.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128156.docx b/sw/qa/extras/ooxmlexport/data/tdf128156.docx
new file mode 100644
index 0000000000..b499f6e50b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128156.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128207.docx b/sw/qa/extras/ooxmlexport/data/tdf128207.docx
new file mode 100644
index 0000000000..c234ec8bc1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128207.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128245.docx b/sw/qa/extras/ooxmlexport/data/tdf128245.docx
new file mode 100644
index 0000000000..618f720305
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128245.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128290.odt b/sw/qa/extras/ooxmlexport/data/tdf128290.odt
new file mode 100644
index 0000000000..81ea0c6773
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128290.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128304.odt b/sw/qa/extras/ooxmlexport/data/tdf128304.odt
new file mode 100644
index 0000000000..6c5cbd1200
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128304.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128646.docx b/sw/qa/extras/ooxmlexport/data/tdf128646.docx
new file mode 100644
index 0000000000..9648df35a2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128646.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128752.docx b/sw/qa/extras/ooxmlexport/data/tdf128752.docx
new file mode 100644
index 0000000000..0e49291414
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128752.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128820.fodt b/sw/qa/extras/ooxmlexport/data/tdf128820.fodt
new file mode 100644
index 0000000000..576fd966e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128820.fodt
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:p><draw:g text:anchor-type="as-char" draw:name="A">
+ <draw:frame svg:width="1cm" svg:height="1cm" svg:x="1cm" svg:y="1cm">
+ <draw:image>
+ <office:binary-data>PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4</office:binary-data>
+ <text:p>json</text:p>
+ </draw:image>
+ </draw:frame>
+ </draw:g></text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128889.fodt b/sw/qa/extras/ooxmlexport/data/tdf128889.fodt
new file mode 100644
index 0000000000..6dc1c42026
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128889.fodt
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:break-after="page"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1">para1</text:p>
+ <text:p>para2</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/ooxmlexport/data/tdf128913.docx b/sw/qa/extras/ooxmlexport/data/tdf128913.docx
new file mode 100644
index 0000000000..42cc2d75d3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf128913.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129242_InsideBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf129242_InsideBorders.docx
new file mode 100644
index 0000000000..58045c971c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129242_InsideBorders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129353.docx b/sw/qa/extras/ooxmlexport/data/tdf129353.docx
new file mode 100644
index 0000000000..c5cf8865ed
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129353.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129442_RightBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf129442_RightBorder.docx
new file mode 100644
index 0000000000..57ad24b614
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129442_RightBorder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx
new file mode 100644
index 0000000000..df00bfe044
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docx
new file mode 100644
index 0000000000..399c06be1a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129452_BottomBorders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129452_excessBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf129452_excessBorder.docx
new file mode 100644
index 0000000000..2bce3ff883
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129452_excessBorder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129522_removeShadowStyle.odt b/sw/qa/extras/ooxmlexport/data/tdf129522_removeShadowStyle.odt
new file mode 100644
index 0000000000..7ced9fc647
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129522_removeShadowStyle.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129525.rtf b/sw/qa/extras/ooxmlexport/data/tdf129525.rtf
new file mode 100644
index 0000000000..1865d15ca9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129525.rtf
@@ -0,0 +1,262 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang3082\deflangfe3082\themelang3082\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}
+{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma{\*\falt Times};}
+{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}
+{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}
+{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}
+{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times};}
+{\f1577\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}{\f1578\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\f1580\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}
+{\f1581\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}{\f1582\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\f1583\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}
+{\f1584\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}{\f1585\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\f1917\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
+{\f1918\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f1920\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f1921\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f1924\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
+{\f1925\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f1957\fbidi \fswiss\fcharset238\fprq2 Tahoma CE{\*\falt Times};}{\f1958\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr{\*\falt Times};}
+{\f1960\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek{\*\falt Times};}{\f1961\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur{\*\falt Times};}{\f1962\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew){\*\falt Times};}
+{\f1963\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic){\*\falt Times};}{\f1964\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic{\*\falt Times};}{\f1965\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese){\*\falt Times};}
+{\f1966\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai){\*\falt Times};}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}
+{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}
+{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}
+{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}
+{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}
+{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}
+{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}
+{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}
+{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}
+{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}
+{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}
+{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}
+{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}
+{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}
+{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}
+{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}
+{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}
+{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}
+{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}
+{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}
+{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
+{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times};}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times};}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times};}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times};}
+{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times};}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times};}
+{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times};}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;
+\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;
+\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }
+\noqfpromote {\stylesheet{\ql \li0\ri0\sa120\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082
+\snext0 \sqformat \spriority0 Normal;}{\s1\qj \li0\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af0\afs32\alang1025 \ltrch\fcs0
+\b\fs32\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \slink15 \sqformat heading 1;}{\s2\qj \fi-360\li360\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\adjustright\rin0\lin360\itap0
+\rtlch\fcs1 \ab\af0\afs24\alang1025 \ltrch\fcs0 \b\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \slink16 \sqformat heading 2;}{
+\s3\qj \li0\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ai\af0\afs24\alang1025 \ltrch\fcs0 \i\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082
+\sbasedon0 \snext0 \slink17 \sqformat heading 3;}{\s4\qc \fi-360\li720\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel3\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \ab\af0\afs32\alang1025 \ltrch\fcs0
+\b\fs32\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \slink18 \sqformat heading 4;}{\s5\qj \fi-720\li720\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel4\adjustright\rin0\lin720\itap0
+\rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \slink19 \sqformat heading 5;}{
+\s6\qj \fi720\li0\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel5\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082
+\sbasedon0 \snext0 \slink20 \sqformat heading 6;}{\s7\qj \li720\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel6\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \ab\af0\afs24\alang1025 \ltrch\fcs0
+\b\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \slink21 \sqformat heading 7;}{\s8\qj \li720\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel7\adjustright\rin0\lin720\itap0 \rtlch\fcs1
+\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \slink22 \sqformat heading 8;}{
+\s9\qj \fi720\li720\ri0\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel8\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \ab\af0\afs24\alang1025 \ltrch\fcs0 \b\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082
+\sbasedon0 \snext0 \slink23 \sqformat heading 9;}{\*\cs10 \additive Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang3082\langfe3082\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp3082\langfenp3082 \snext11 \ssemihidden \sunhideused
+Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af31503\afs32 \ltrch\fcs0 \b\fs32\lang1033\langfe0\kerning32\loch\f31502\hich\af31502\dbch\af31501\langnp1033 \sbasedon10 \slink1 \slocked \spriority9 Heading 1 Char;}{\*\cs16 \additive \rtlch\fcs1
+\ab\ai\af31503\afs28 \ltrch\fcs0 \b\i\fs28\lang1033\langfe0\loch\f31502\hich\af31502\dbch\af31501\langnp1033 \sbasedon10 \slink2 \slocked \ssemihidden \spriority9 Heading 2 Char;}{\*\cs17 \additive \rtlch\fcs1 \ab\af31503\afs26 \ltrch\fcs0
+\b\fs26\lang1033\langfe0\loch\f31502\hich\af31502\dbch\af31501\langnp1033 \sbasedon10 \slink3 \slocked \ssemihidden \spriority9 Heading 3 Char;}{\*\cs18 \additive \rtlch\fcs1 \ab\af0\afs28 \ltrch\fcs0 \b\fs28\lang1033\langfe0\langnp1033
+\sbasedon10 \slink4 \slocked \ssemihidden \spriority9 Heading 4 Char;}{\*\cs19 \additive \rtlch\fcs1 \ab\ai\af0\afs26 \ltrch\fcs0 \b\i\fs26\lang1033\langfe0\langnp1033 \sbasedon10 \slink5 \slocked \ssemihidden \spriority9 Heading 5 Char;}{\*\cs20
+\additive \rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b\lang1033\langfe0\langnp1033 \sbasedon10 \slink6 \slocked \ssemihidden \spriority9 Heading 6 Char;}{\*\cs21 \additive \rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \fs24\lang1033\langfe0\langnp1033
+\sbasedon10 \slink7 \slocked \ssemihidden \spriority9 Heading 7 Char;}{\*\cs22 \additive \rtlch\fcs1 \ai\af0\afs24 \ltrch\fcs0 \i\fs24\lang1033\langfe0\langnp1033 \sbasedon10 \slink8 \slocked \ssemihidden \spriority9 Heading 8 Char;}{\*\cs23 \additive
+\rtlch\fcs1 \af31503 \ltrch\fcs0 \lang1033\langfe0\loch\f31502\hich\af31502\dbch\af31501\langnp1033 \sbasedon10 \slink9 \slocked \ssemihidden \spriority9 Heading 9 Char;}{\s24\ql \li0\ri0\sa120\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0
+\cbpat9 \rtlch\fcs1 \af38\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f38\hich\af38\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext24 \slink25 Document Map;}{\*\cs25 \additive \rtlch\fcs1 \af38\afs16 \ltrch\fcs0
+\f38\fs16\lang1033\langfe0\langnp1033 \sbasedon10 \slink24 \slocked \ssemihidden Document Map Char;}{\s26\qj \li0\ri0\sa120\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext26 \slink27 Body Text;}{\*\cs27 \additive \rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\lang1033\langfe0\langnp1033
+\sbasedon10 \slink26 \slocked \ssemihidden Body Text Char;}{\s28\qj \fi360\li0\ri0\sa120\nowidctlpar\tx0\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext28 \slink29 Body Text 2;}{\*\cs29 \additive \rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\lang1033\langfe0\langnp1033
+\sbasedon10 \slink28 \slocked \ssemihidden Body Text 2 Char;}{\s30\qc \li0\ri0\sa120\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af0\afs40\alang1025 \ltrch\fcs0
+\b\fs40\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext30 \slink31 \sqformat Title;}{\*\cs31 \additive \rtlch\fcs1 \ab\af31503\afs32 \ltrch\fcs0
+\b\fs32\lang1033\langfe0\kerning28\loch\f31502\hich\af31502\dbch\af31501\langnp1033 \sbasedon10 \slink30 \slocked \spriority10 Title Char;}{\s32\qj \fi-270\li630\ri0\sa120\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin630\itap0 \rtlch\fcs1
+\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext32 \slink33 Body Text Indent 2;}{\*\cs33 \additive \rtlch\fcs1 \af0\afs24 \ltrch\fcs0
+\f0\fs24\lang1033\langfe0\langnp1033 \sbasedon10 \slink32 \slocked \ssemihidden Body Text Indent 2 Char;}{\s34\qj \fi-270\li720\ri0\sa120\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext34 \slink35 Body Text Indent 3;}{\*\cs35 \additive \rtlch\fcs1 \af0\afs16 \ltrch\fcs0 \f0\fs16\lang1033\langfe0\langnp1033
+\sbasedon10 \slink34 \slocked \ssemihidden Body Text Indent 3 Char;}{\s36\qc \li0\ri0\sa120\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\ai\af0\afs28\alang1025 \ltrch\fcs0
+\b\i\fs28\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext36 \slink37 \sqformat Subtitle;}{\*\cs37 \additive \rtlch\fcs1 \af31503\afs24 \ltrch\fcs0
+\fs24\lang1033\langfe0\loch\f31502\hich\af31502\dbch\af31501\langnp1033 \sbasedon10 \slink36 \slocked \spriority11 Subtitle Char;}{\s38\ql \li0\ri0\sa120\nowidctlpar\tqc\tx4320\tqr\tx8640\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1
+\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext38 \slink39 footer;}{\*\cs39 \additive \rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \f0\fs24\lang1033\langfe0\langnp1033
+\sbasedon10 \slink38 \slocked \ssemihidden Footer Char;}{\*\cs40 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 page number;}{\s41\ql \li0\ri0\sa120\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1
+\ab\af0\afs24\alang1025 \ltrch\fcs0 \b\caps\fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd \spriority39 toc 1;}{\s42\ql \li245\ri0\sa120\nowidctlpar
+\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin245\itap0 \rtlch\fcs1 \ab\af0\afs20\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd toc 2;}{
+\s43\ql \li480\ri0\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin480\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd
+toc 3;}{\s44\ql \li720\ri0\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082
+\sbasedon0 \snext0 \sautoupd toc 4;}{\s45\ql \li960\ri0\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin960\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0
+\fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd toc 5;}{\s46\ql \li1200\ri0\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin1200\itap0 \rtlch\fcs1 \af0\afs20\alang1025
+\ltrch\fcs0 \fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd toc 6;}{\s47\ql \li1440\ri0\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin1440\itap0 \rtlch\fcs1
+\af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd toc 7;}{\s48\ql \li1680\ri0\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin1680\itap0
+\rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd toc 8;}{\s49\ql \li1920\ri0\nowidctlpar
+\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin1920\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext0 \sautoupd toc 9;}{
+\s50\qj \fi-270\li1710\ri-720\sa120\widctlpar\wrapdefault\faauto\adjustright\rin-720\lin1710\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sbasedon0 \snext50
+Block Text;}}{\*\listtable{\list\listtemplateid0\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat3\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li1800
+\jclisttab\tx1800\lin1800 }{\listname ;}\listid1}{\list\listtemplateid-1315301230\listsimple{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat4\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0
+\ltrch\fcs0 \fbias0 \fi-720\li720\jclisttab\tx720\lin720 }{\listname ;}\listid323165344}{\list\listtemplateid-2135629362\listsimple{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab\ai0\af0 \ltrch\fcs0 \b\i0\fbias0 \fi-720\li720\jclisttab\tx720\lin720 }{\listname ;}\listid429664987}{\list\listtemplateid1066166024\listsimple{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\levelold\levelspace0\levelindent720{\leveltext\'03(\'00);}{\levelnumbers\'02;}\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b \fi-720\li720\lin720 }{\listname ;}\listid467551770}{\list\listtemplateid67698707\listsimple{\listlevel\levelnfc1\levelnfcn1
+\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-720\li720\jclisttab\tx720\lin720 }{\listname ;}\listid499321070}{\list\listtemplateid67698707
+\listsimple{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-720\li720\jclisttab\tx720\lin720 }{\listname
+;}\listid505092311}{\list\listtemplateid67698709\listsimple{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat10\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li360
+\jclisttab\tx360\lin360 }{\listname ;}\listid1328901394}{\list\listtemplateid266515624\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1
+\af0 \ltrch\fcs0 \fbias0 \fi-360\li1800\jclisttab\tx1800\lin1800 }{\listname ;}\listid1822691375}{\list\listtemplateid2081336888\listsimple{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat3\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-420\li420\jclisttab\tx420\lin420 }{\listname ;}\listid1903103825}}{\*\listoverridetable{\listoverride\listid467551770\listoverridecount0\ls1}{\listoverride\listid1822691375
+\listoverridecount0\ls2}{\listoverride\listid1\listoverridecount0\ls3}{\listoverride\listid1328901394\listoverridecount0\ls4}{\listoverride\listid429664987\listoverridecount0\ls5}{\listoverride\listid505092311\listoverridecount0\ls6}
+{\listoverride\listid499321070\listoverridecount0\ls7}{\listoverride\listid1903103825\listoverridecount0\ls8}{\listoverride\listid323165344\listoverridecount0\ls9}}{\*\rsidtbl \rsid1993739\rsid4991862\rsid7286274\rsid7288753}{\mmathPr\mmathFont34\mbrkBin0
+\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\title VARIFLEX MANUAL}{\author Chemistry Department}{\operator xisco}{\creatim\yr1999\mo7\dy16\hr9\min53}{\revtim\yr2020\mo4\dy20\hr14\min59}
+{\printim\yr1999\mo7\dy16\hr10\min14}{\version9}{\edmins34}{\nofpages1}{\nofwords25}{\nofchars142}{\*\company }{\nofcharsws166}{\vern49247}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}
+\paperw12240\paperh15840\margl1440\margr1440\margt1296\margb1296\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\hyphcaps0\horzdoc\dghspace120\dgvspace120
+\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot7286274 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0{\*\ftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0
+\rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid4991862 \chftnsep
+\par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid4991862 \chftnsepc
+\par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid4991862 \chftnsep
+\par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe3082\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid4991862 \chftnsepc
+\par }}\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\footerr \ltrpar \pard\plain \ltrpar\s38\ql \li0\ri0\sa120\nowidctlpar\tqc\tx4320\tqr\tx8640\pvpara\phmrg\posxc\posy0\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025
+\ltrch\fcs0 \fs24\lang1033\langfe3082\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 {\field{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \cs40\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 PAGE }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0
+\cs40\lang1024\langfe1024\noproof\insrsid1993739 \hich\af0\dbch\af31505\loch\f0 1}}}\sectd \ltrsect\linex0\endnhere\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \cs40\insrsid4991862
+\par }\pard \ltrpar\s38\ql \li0\ri0\sa120\nowidctlpar\tqc\tx4320\tqr\tx8640\wrapdefault\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid4991862
+\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}
+{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\s41\ql \li0\ri0\sa120\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin0\itap0
+\rtlch\fcs1 \ab\af0\afs24\alang1025 \ltrch\fcs0 \b\caps\fs24\lang1033\langfe3082\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 {\field\fldedit{\*\fldinst {\rtlch\fcs1 \ai\af0 \ltrch\fcs0 \i\insrsid4991862 \hich\af0\dbch\af31505\loch\f0
+ TOC \\o "1-3" }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 Overv\hich\af0\dbch\af31505\loch\f0 iew\tab }{\field\flddirty{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0
+\caps0\lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 GOTOBUTTON _Toc434317063 }{\field{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \caps0\lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0
+ PAGEREF _Toc434317063 }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \caps0\lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 3}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj }}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1
+\af0 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid4991862
+\par }\pard \ltrpar\s41\ql \li0\ri0\sa120\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin0\itap0\pararsid1993739 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 More detailed description
+\tab }{\field\flddirty{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0 \caps0\lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 GOTOBUTTON _Toc434317064 }{\field{\*\fldinst {\rtlch\fcs1 \af0 \ltrch\fcs0
+\caps0\lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 PAGEREF _Toc434317064 }}{\fldrslt {\rtlch\fcs1 \af0 \ltrch\fcs0 \caps0\lang1024\langfe1024\noproof\insrsid4991862 \hich\af0\dbch\af31505\loch\f0 4}}}\sectd \ltrsect
+\linex0\sectdefaultcl\sftnbj }}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid4991862
+\par }}}\pard\plain \ltrpar\s41\ql \li0\ri0\sa120\nowidctlpar\tqr\tx9360\wrapdefault\faauto\adjustright\rin0\lin0\itap0\pararsid1993739 \rtlch\fcs1 \ab\af0\afs24\alang1025 \ltrch\fcs0
+\b\caps\fs24\lang1033\langfe3082\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp3082 \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid4991862
+\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210030dd4329a8060000a41b0000160000007468656d652f7468656d652f
+7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
+615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
+79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
+5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
+999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
+699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
+8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
+0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
+9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
+15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
+3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
+32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
+f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
+e877f0034e16bafb0e258ebb4faf06b769e888340b103d331115bebc4eb813bf83291b63624a0d1475a756c734f9bbc2cd28546ecbe1e20a3794ca175f3fae90
+fb6d2dd99bb07b55e5ccf68942bd0877b23c77b908e8db5f9db7f024d9239010f35bd4bbe2fcae387bfff9e2bc289f2fbe24cfaa301468dd8bd846dbb4ddf1c2
+ae7b4c191ba8292337a469bc25ec3d411f06f53a73e224c5292c8de0516732307070a1c0660d125c7d44553488700a4d7bddd3444299910e254ab984c3a219ae
+a4adf1d0f82b7bd46cea4388ad1c12ab5d1ed8e1153d9c9f350a3246aad01c6873462b9ac05999ad5cc988826eafc3acae853a33b7ba11cd1445875ba1b236b1
+399483c90bd560b0b0263435085a21b0f22a9cf9356b38ec6046026d77eba3dc2dc60b17e92219e180643ed27acffba86e9c94c7ca9c225a0f1b0cfae0788ad5
+4adc5a9aec1b703b8b93caec1a0bd8e5de7b132fe5113cf312503b998e2c2927274bd051db6b35979b1ef271daf6c6704e86c73805af4bdd476216c26593af84
+0dfb5393d964f9cc9bad5c313709ea70f561ed3ea7b053075221d51696910d0d339585004b34272bff7213cc7a510a5454a3b349b1b206c1f0af490176745d4b
+c663e2abb2b34b23da76f6352ba57ca2881844c1111ab189d8c7e07e1daaa04f40255c77988aa05fe06e4e5bdb4cb9c5394bbaf28d98c1d971ccd20867e556a7
+689ec9166e0a522183792b8907ba55ca6e943bbf2a26e52f48957218ffcf54d1fb09dc3eac04da033e5c0d0b8c74a6b43d2e54c4a10aa511f5fb021a07533b20
+5ae07e17a621a8e082dafc17e450ffb739676998b48643a4daa7211214f623150942f6a02c99e83b85583ddbbb2c4996113211551257a656ec1139246ca86be0
+aadedb3d1441a89b6a929501833b197fee7b9641a3503739e57c732a59b1f7da1cf8a73b1f9bcca0945b874d4393dbbf10b1680f66bbaa5d6f96e77b6f59113d
+316bb31a795600b3d256d0cad2fe354538e7566b2bd69cc6cbcd5c38f0e2bcc63058344429dc2121fd07f63f2a7c66bf76e80d75c8f7a1b622f878a18941d840
+545fb28d07d205d20e8ea071b283369834296bdaac75d256cb37eb0bee740bbe278cad253b8bbfcf69eca23973d939b97891c6ce2cecd8da8e2d343578f6648a
+c2d0383fc818c798cf64e52f597c740f1cbd05df0c264c49134cf09d4a60e8a107260f20f92d47b374e32f000000ffff0300504b030414000600080000002100
+0dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f7
+8277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89
+d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd500
+1996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0f
+bfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6
+a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a
+0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021
+0030dd4329a8060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d001400060008
+00000021000dd1909fb60000001b0100002700000000000000000000000000b20900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ad0a00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 1;
+\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 2;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 3;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 4;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 5;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 6;
+\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 7;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 8;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 heading 9;\lsdunhideused1 \lsdlocked0 index 1;\lsdunhideused1 \lsdlocked0 index 2;
+\lsdunhideused1 \lsdlocked0 index 3;\lsdunhideused1 \lsdlocked0 index 4;\lsdunhideused1 \lsdlocked0 index 5;\lsdunhideused1 \lsdlocked0 index 6;\lsdunhideused1 \lsdlocked0 index 7;\lsdunhideused1 \lsdlocked0 index 8;\lsdunhideused1 \lsdlocked0 index 9;
+\lsdpriority39 \lsdlocked0 toc 1;\lsdunhideused1 \lsdlocked0 Normal Indent;\lsdunhideused1 \lsdlocked0 footnote text;\lsdunhideused1 \lsdlocked0 annotation text;\lsdunhideused1 \lsdlocked0 header;\lsdunhideused1 \lsdlocked0 index heading;
+\lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdunhideused1 \lsdlocked0 table of figures;\lsdunhideused1 \lsdlocked0 envelope address;\lsdunhideused1 \lsdlocked0 envelope return;\lsdunhideused1 \lsdlocked0 footnote reference;
+\lsdunhideused1 \lsdlocked0 annotation reference;\lsdunhideused1 \lsdlocked0 line number;\lsdunhideused1 \lsdlocked0 endnote reference;\lsdunhideused1 \lsdlocked0 endnote text;\lsdunhideused1 \lsdlocked0 table of authorities;
+\lsdunhideused1 \lsdlocked0 macro;\lsdunhideused1 \lsdlocked0 toa heading;\lsdunhideused1 \lsdlocked0 List;\lsdunhideused1 \lsdlocked0 List Bullet;\lsdunhideused1 \lsdlocked0 List Number;\lsdunhideused1 \lsdlocked0 List 2;
+\lsdunhideused1 \lsdlocked0 List 3;\lsdunhideused1 \lsdlocked0 List 4;\lsdunhideused1 \lsdlocked0 List 5;\lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdunhideused1 \lsdlocked0 List Bullet 3;\lsdunhideused1 \lsdlocked0 List Bullet 4;
+\lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdunhideused1 \lsdlocked0 List Number 2;\lsdunhideused1 \lsdlocked0 List Number 3;\lsdunhideused1 \lsdlocked0 List Number 4;\lsdunhideused1 \lsdlocked0 List Number 5;
+\lsdsemihidden0 \lsdqformat1 \lsdlocked0 Title;\lsdunhideused1 \lsdlocked0 Closing;\lsdunhideused1 \lsdlocked0 Signature;\lsdunhideused1 \lsdlocked0 Body Text Indent;\lsdunhideused1 \lsdlocked0 List Continue;\lsdunhideused1 \lsdlocked0 List Continue 2;
+\lsdunhideused1 \lsdlocked0 List Continue 3;\lsdunhideused1 \lsdlocked0 List Continue 4;\lsdunhideused1 \lsdlocked0 List Continue 5;\lsdunhideused1 \lsdlocked0 Message Header;\lsdsemihidden0 \lsdqformat1 \lsdlocked0 Subtitle;
+\lsdunhideused1 \lsdlocked0 Salutation;\lsdunhideused1 \lsdlocked0 Date;\lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdunhideused1 \lsdlocked0 Note Heading;
+\lsdunhideused1 \lsdlocked0 Body Text 3;\lsdunhideused1 \lsdlocked0 Hyperlink;\lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdsemihidden0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
+\lsdunhideused1 \lsdlocked0 Plain Text;\lsdunhideused1 \lsdlocked0 E-mail Signature;\lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdunhideused1 \lsdlocked0 Normal (Web);
+\lsdunhideused1 \lsdlocked0 HTML Acronym;\lsdunhideused1 \lsdlocked0 HTML Address;\lsdunhideused1 \lsdlocked0 HTML Cite;\lsdunhideused1 \lsdlocked0 HTML Code;\lsdunhideused1 \lsdlocked0 HTML Definition;\lsdunhideused1 \lsdlocked0 HTML Keyboard;
+\lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdunhideused1 \lsdlocked0 HTML Sample;\lsdunhideused1 \lsdlocked0 HTML Typewriter;\lsdunhideused1 \lsdlocked0 HTML Variable;\lsdunhideused1 \lsdlocked0 Normal Table;
+\lsdunhideused1 \lsdlocked0 annotation subject;\lsdunhideused1 \lsdlocked0 No List;\lsdunhideused1 \lsdlocked0 Outline List 1;\lsdunhideused1 \lsdlocked0 Outline List 2;\lsdunhideused1 \lsdlocked0 Outline List 3;\lsdunhideused1 \lsdlocked0 Table Simple 1;
+\lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdunhideused1 \lsdlocked0 Table Classic 1;\lsdunhideused1 \lsdlocked0 Table Classic 2;\lsdunhideused1 \lsdlocked0 Table Classic 3;
+\lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdunhideused1 \lsdlocked0 Table Colorful 1;\lsdunhideused1 \lsdlocked0 Table Colorful 2;\lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdunhideused1 \lsdlocked0 Table Columns 1;
+\lsdunhideused1 \lsdlocked0 Table Columns 2;\lsdunhideused1 \lsdlocked0 Table Columns 3;\lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdunhideused1 \lsdlocked0 Table Grid 1;
+\lsdunhideused1 \lsdlocked0 Table Grid 2;\lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdunhideused1 \lsdlocked0 Table Grid 5;\lsdunhideused1 \lsdlocked0 Table Grid 6;\lsdunhideused1 \lsdlocked0 Table Grid 7;
+\lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdunhideused1 \lsdlocked0 Table List 1;\lsdunhideused1 \lsdlocked0 Table List 2;\lsdunhideused1 \lsdlocked0 Table List 3;\lsdunhideused1 \lsdlocked0 Table List 4;\lsdunhideused1 \lsdlocked0 Table List 5;
+\lsdunhideused1 \lsdlocked0 Table List 6;\lsdunhideused1 \lsdlocked0 Table List 7;\lsdunhideused1 \lsdlocked0 Table List 8;\lsdunhideused1 \lsdlocked0 Table 3D effects 1;\lsdunhideused1 \lsdlocked0 Table 3D effects 2;
+\lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdunhideused1 \lsdlocked0 Table Elegant;\lsdunhideused1 \lsdlocked0 Table Professional;\lsdunhideused1 \lsdlocked0 Table Subtle 1;
+\lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdunhideused1 \lsdlocked0 Table Web 1;\lsdunhideused1 \lsdlocked0 Table Web 2;\lsdunhideused1 \lsdlocked0 Table Web 3;\lsdunhideused1 \lsdlocked0 Balloon Text;
+\lsdsemihidden0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdsemihidden0 \lsdpriority60 \lsdlocked0 Light Shading;
+\lsdsemihidden0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdpriority62 \lsdlocked0 Light Grid;\lsdsemihidden0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdpriority64 \lsdlocked0 Medium Shading 2;
+\lsdsemihidden0 \lsdpriority65 \lsdlocked0 Medium List 1;\lsdsemihidden0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
+\lsdsemihidden0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdpriority71 \lsdlocked0 Colorful Shading;\lsdsemihidden0 \lsdpriority72 \lsdlocked0 Colorful List;
+\lsdsemihidden0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdsemihidden0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;
+\lsdsemihidden0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdsemihidden0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;
+\lsdsemihidden0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
+\lsdsemihidden0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
+\lsdsemihidden0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
+\lsdsemihidden0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
+\lsdsemihidden0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
+\lsdsemihidden0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
+\lsdsemihidden0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
+\lsdsemihidden0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
+\lsdsemihidden0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
+\lsdsemihidden0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
+\lsdsemihidden0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
+\lsdsemihidden0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
+\lsdsemihidden0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
+\lsdsemihidden0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
+\lsdsemihidden0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
+\lsdsemihidden0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
+\lsdsemihidden0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
+\lsdsemihidden0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
+\lsdsemihidden0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
+\lsdsemihidden0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
+\lsdsemihidden0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
+\lsdsemihidden0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
+\lsdsemihidden0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
+\lsdsemihidden0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
+\lsdsemihidden0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
+\lsdsemihidden0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
+\lsdsemihidden0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
+\lsdsemihidden0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;\lsdsemihidden0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;
+\lsdsemihidden0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdsemihidden0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography;
+\lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000b09e
+73861317d601feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129575-directAfter.docx b/sw/qa/extras/ooxmlexport/data/tdf129575-directAfter.docx
new file mode 100644
index 0000000000..c9856b0285
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129575-directAfter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129575-directBefore.docx b/sw/qa/extras/ooxmlexport/data/tdf129575-directBefore.docx
new file mode 100644
index 0000000000..5e75ef1be5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129575-directBefore.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129575-docDefault.docx b/sw/qa/extras/ooxmlexport/data/tdf129575-docDefault.docx
new file mode 100644
index 0000000000..d7cdf2ec43
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129575-docDefault.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129575-styleAfter.docx b/sw/qa/extras/ooxmlexport/data/tdf129575-styleAfter.docx
new file mode 100644
index 0000000000..97439011ff
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129575-styleAfter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129888dml.docx b/sw/qa/extras/ooxmlexport/data/tdf129888dml.docx
new file mode 100644
index 0000000000..1f6b03034f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129888dml.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf129888vml.docx b/sw/qa/extras/ooxmlexport/data/tdf129888vml.docx
new file mode 100644
index 0000000000..ee7c60f8a8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf129888vml.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf130088.docx b/sw/qa/extras/ooxmlexport/data/tdf130088.docx
new file mode 100644
index 0000000000..8d5a7a604b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf130088.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf130120.docx b/sw/qa/extras/ooxmlexport/data/tdf130120.docx
new file mode 100644
index 0000000000..5ca2adc76d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf130120.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf130494.docx b/sw/qa/extras/ooxmlexport/data/tdf130494.docx
new file mode 100644
index 0000000000..bc2050feaa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf130494.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott b/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott
new file mode 100644
index 0000000000..35937d9a8a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf130610_bold_in_2_styles.ott
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf130690.docx b/sw/qa/extras/ooxmlexport/data/tdf130690.docx
new file mode 100644
index 0000000000..ab08dd99a3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf130690.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf130814.docx b/sw/qa/extras/ooxmlexport/data/tdf130814.docx
new file mode 100644
index 0000000000..30c17120ec
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf130814.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf130907.docx b/sw/qa/extras/ooxmlexport/data/tdf130907.docx
new file mode 100644
index 0000000000..c0c25fc895
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf130907.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131203.docx b/sw/qa/extras/ooxmlexport/data/tdf131203.docx
new file mode 100644
index 0000000000..2fd0dcabde
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131203.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131258.docx b/sw/qa/extras/ooxmlexport/data/tdf131258.docx
new file mode 100644
index 0000000000..10b8f9de21
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131258.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131260.docx b/sw/qa/extras/ooxmlexport/data/tdf131260.docx
new file mode 100644
index 0000000000..72e07abfd4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131260.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131420.docx b/sw/qa/extras/ooxmlexport/data/tdf131420.docx
new file mode 100644
index 0000000000..3600735245
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131420.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131537.odt b/sw/qa/extras/ooxmlexport/data/tdf131537.odt
new file mode 100644
index 0000000000..21f3963689
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131537.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131539.odt b/sw/qa/extras/ooxmlexport/data/tdf131539.odt
new file mode 100644
index 0000000000..d0e446522a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131539.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131540.odt b/sw/qa/extras/ooxmlexport/data/tdf131540.odt
new file mode 100644
index 0000000000..541ab20931
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131540.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131561_necessaryBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf131561_necessaryBorder.docx
new file mode 100644
index 0000000000..51d1c52022
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131561_necessaryBorder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131594.docx b/sw/qa/extras/ooxmlexport/data/tdf131594.docx
new file mode 100644
index 0000000000..009c6d56bd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131594.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131722.docx b/sw/qa/extras/ooxmlexport/data/tdf131722.docx
new file mode 100644
index 0000000000..8b72ad4b86
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131722.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131775_SpacingGroupShapeText.docx b/sw/qa/extras/ooxmlexport/data/tdf131775_SpacingGroupShapeText.docx
new file mode 100644
index 0000000000..a7d34d6f24
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131775_SpacingGroupShapeText.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docx b/sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docx
new file mode 100644
index 0000000000..3fd4ab1f5f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131776_StrikeoutGroupShapeText.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131801.docx b/sw/qa/extras/ooxmlexport/data/tdf131801.docx
new file mode 100644
index 0000000000..61872b5399
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131801.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf131922_LanguageInGroupShape.docx b/sw/qa/extras/ooxmlexport/data/tdf131922_LanguageInGroupShape.docx
new file mode 100644
index 0000000000..afd5ec57ae
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf131922_LanguageInGroupShape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak.odt b/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak.odt
new file mode 100644
index 0000000000..b88e660a74
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak2.odt b/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak2.odt
new file mode 100644
index 0000000000..afa7961cb2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreak2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreakB.odt b/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreakB.odt
new file mode 100644
index 0000000000..86ea177a9f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132149_pgBreakB.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132185.docx b/sw/qa/extras/ooxmlexport/data/tdf132185.docx
new file mode 100644
index 0000000000..955de50979
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132185.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132271.docx b/sw/qa/extras/ooxmlexport/data/tdf132271.docx
new file mode 100644
index 0000000000..202bfdda2b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132271.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132305.docx b/sw/qa/extras/ooxmlexport/data/tdf132305.docx
new file mode 100644
index 0000000000..e6b9ad6b70
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132305.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132475_printField.docx b/sw/qa/extras/ooxmlexport/data/tdf132475_printField.docx
new file mode 100644
index 0000000000..032a58d238
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132475_printField.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132483.docx b/sw/qa/extras/ooxmlexport/data/tdf132483.docx
new file mode 100644
index 0000000000..e4ebf4b785
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132483.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132491_UnderlineColorGroupedShapes.docx b/sw/qa/extras/ooxmlexport/data/tdf132491_UnderlineColorGroupedShapes.docx
new file mode 100644
index 0000000000..aa5528b310
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132491_UnderlineColorGroupedShapes.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132514.docx b/sw/qa/extras/ooxmlexport/data/tdf132514.docx
new file mode 100644
index 0000000000..d32f84104e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132514.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132752.docx b/sw/qa/extras/ooxmlexport/data/tdf132752.docx
new file mode 100644
index 0000000000..a94fc498a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132752.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132754.docx b/sw/qa/extras/ooxmlexport/data/tdf132754.docx
new file mode 100644
index 0000000000..baec54f5e0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132754.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132766.docx b/sw/qa/extras/ooxmlexport/data/tdf132766.docx
new file mode 100644
index 0000000000..aba5e82312
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132766.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132802.docx b/sw/qa/extras/ooxmlexport/data/tdf132802.docx
new file mode 100644
index 0000000000..c4c2d9a1e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132802.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132807.docx b/sw/qa/extras/ooxmlexport/data/tdf132807.docx
new file mode 100644
index 0000000000..b1e4115c5d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132807.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132898_extraBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf132898_extraBorder.docx
new file mode 100644
index 0000000000..50ebe7a297
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132898_extraBorder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132898_missingBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf132898_missingBorder.docx
new file mode 100644
index 0000000000..54856dea55
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132898_missingBorder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132976_testRelativeAnchorWidthFromLeftMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf132976_testRelativeAnchorWidthFromLeftMargin.docx
new file mode 100644
index 0000000000..2f1c5560c1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132976_testRelativeAnchorWidthFromLeftMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133000_numStyleFormatting.docx b/sw/qa/extras/ooxmlexport/data/tdf133000_numStyleFormatting.docx
new file mode 100644
index 0000000000..567f38265c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133000_numStyleFormatting.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133030.docx b/sw/qa/extras/ooxmlexport/data/tdf133030.docx
new file mode 100644
index 0000000000..e23f09adfc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133030.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133035.docx b/sw/qa/extras/ooxmlexport/data/tdf133035.docx
new file mode 100644
index 0000000000..c28c119dbc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133035.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
new file mode 100644
index 0000000000..aa976e7cc9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133052.docx b/sw/qa/extras/ooxmlexport/data/tdf133052.docx
new file mode 100644
index 0000000000..937554facd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133052.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133065.odt b/sw/qa/extras/ooxmlexport/data/tdf133065.odt
new file mode 100644
index 0000000000..a5e1b3587a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133065.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginHasFooter.docx b/sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginHasFooter.docx
new file mode 100644
index 0000000000..2625a9a56a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginHasFooter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx b/sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx
new file mode 100644
index 0000000000..155e748574
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133163.fodt b/sw/qa/extras/ooxmlexport/data/tdf133163.fodt
new file mode 100644
index 0000000000..8fdda1cdc5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133163.fodt
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <table:table>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>2</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:&lt;A1&gt;+&lt;A2&gt;" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:SUM(&lt;A1:A3&gt;)" office:value-type="float" office:value="6">
+ <text:p>6</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt b/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt
new file mode 100644
index 0000000000..56f21545a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133334_followPgStyle.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133363.docx b/sw/qa/extras/ooxmlexport/data/tdf133363.docx
new file mode 100644
index 0000000000..937554facd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133363.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odt b/sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odt
new file mode 100644
index 0000000000..1848638aba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133455.docx b/sw/qa/extras/ooxmlexport/data/tdf133455.docx
new file mode 100644
index 0000000000..e852976995
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133455.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133457.docx b/sw/qa/extras/ooxmlexport/data/tdf133457.docx
new file mode 100644
index 0000000000..8fb6730b09
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133457.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133473.docx b/sw/qa/extras/ooxmlexport/data/tdf133473.docx
new file mode 100644
index 0000000000..c351db9502
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133473.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133605.docx b/sw/qa/extras/ooxmlexport/data/tdf133605.docx
new file mode 100644
index 0000000000..d248d5e1a9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133605.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133605_2.docx b/sw/qa/extras/ooxmlexport/data/tdf133605_2.docx
new file mode 100644
index 0000000000..8d3c5acba6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133605_2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133643.doc b/sw/qa/extras/ooxmlexport/data/tdf133643.doc
new file mode 100644
index 0000000000..52db5e344f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133643.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133647.docx b/sw/qa/extras/ooxmlexport/data/tdf133647.docx
new file mode 100644
index 0000000000..fb525446c7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133647.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133670_testRelativeAnchorWidthFromRightMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf133670_testRelativeAnchorWidthFromRightMargin.docx
new file mode 100644
index 0000000000..68f24370a3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133670_testRelativeAnchorWidthFromRightMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133701.docx b/sw/qa/extras/ooxmlexport/data/tdf133701.docx
new file mode 100644
index 0000000000..dfef409c26
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133701.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133702.docx b/sw/qa/extras/ooxmlexport/data/tdf133702.docx
new file mode 100644
index 0000000000..46e08a920c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133702.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133771.odt b/sw/qa/extras/ooxmlexport/data/tdf133771.odt
new file mode 100644
index 0000000000..fd54160af9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133771.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133861_RelativeAnchorWidthFromInsideOutsideMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf133861_RelativeAnchorWidthFromInsideOutsideMargin.docx
new file mode 100644
index 0000000000..216434db3c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133861_RelativeAnchorWidthFromInsideOutsideMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133924.docx b/sw/qa/extras/ooxmlexport/data/tdf133924.docx
new file mode 100644
index 0000000000..3bdbe8d6f1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf133924.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134063.docx b/sw/qa/extras/ooxmlexport/data/tdf134063.docx
new file mode 100644
index 0000000000..864c90db1c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134063.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134114_allowOverlap.docx b/sw/qa/extras/ooxmlexport/data/tdf134114_allowOverlap.docx
new file mode 100644
index 0000000000..637d4b6b94
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134114_allowOverlap.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134260.docx b/sw/qa/extras/ooxmlexport/data/tdf134260.docx
new file mode 100644
index 0000000000..98c4107f48
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134260.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docx b/sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docx
new file mode 100644
index 0000000000..7fb07eb32a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134606.docx b/sw/qa/extras/ooxmlexport/data/tdf134606.docx
new file mode 100644
index 0000000000..c5b95cef32
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134606.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134609_gridAfter.docx b/sw/qa/extras/ooxmlexport/data/tdf134609_gridAfter.docx
new file mode 100644
index 0000000000..64f8e08186
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134609_gridAfter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134618.doc b/sw/qa/extras/ooxmlexport/data/tdf134618.doc
new file mode 100644
index 0000000000..693ab87e21
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134618.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.doc b/sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.doc
new file mode 100644
index 0000000000..742b45ce65
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134648.docx b/sw/qa/extras/ooxmlexport/data/tdf134648.docx
new file mode 100644
index 0000000000..36e856ca05
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134648.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134649_pageBreak.fodt b/sw/qa/extras/ooxmlexport/data/tdf134649_pageBreak.fodt
new file mode 100644
index 0000000000..7d05c3e3ce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134649_pageBreak.fodt
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="11.509cm" table:align="left"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table" style:master-page-name="Landscape">
+ <style:table-properties style:page-number="auto" table:align="margins"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:print-orientation="portrait"/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-height="21.59cm" fo:page-width="27.94cm" style:print-orientation="landscape"/>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="Landscape" style:page-layout-name="pm2"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:p>Two tables, one pagebreak:</text:p>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>Hello1</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>World1</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>Hello2</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>World2</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134784.docx b/sw/qa/extras/ooxmlexport/data/tdf134784.docx
new file mode 100644
index 0000000000..2099db66e0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134784.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134951_duplicates.odt b/sw/qa/extras/ooxmlexport/data/tdf134951_duplicates.odt
new file mode 100644
index 0000000000..d7089944d0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf134951_duplicates.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135047_ImageSpaceSettings.fodt b/sw/qa/extras/ooxmlexport/data/tdf135047_ImageSpaceSettings.fodt
new file mode 100644
index 0000000000..47dac15a5b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135047_ImageSpaceSettings.fodt
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Arial" fo:font-size="12pt"/>
+ </style:default-style>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.25cm" fo:margin-right="0.25cm" fo:margin-top="0.25cm" fo:margin-bottom="0.25cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Standard">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:color-mode="standard"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Pic1" text:anchor-type="paragraph" svg:x="4.877cm" svg:y="2.103cm" svg:width="6.724cm" svg:height="8.075cm" draw:z-index="0"><draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgK
+ CgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/wAALCAACAAIBAREA/8QAFAAB
+ AAAAAAAAAAAAAAAAAAAACP/EAB4QAAAEBwAAAAAAAAAAAAAAAAACBAUGFiU0Q1Nh/9oACAEB
+ AAA/AD/CzM0Sw0UpHYJ8BdZeD//Z
+ </office:binary-data>
+ </draw:image>
+ </draw:frame>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum consequat mi quis pretium semper. Proin luctus orci ac neque venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. Donec blandit auctor arcu, nec pellentesque eros molestie eget. In consectetur aliquam hendrerit. Sed cursus mauris vitae ligula pellentesque, non pellentesque urna aliquet. Fusce placerat mauris enim, nec rutrum purus semper vel. Praesent tincidunt neque eu pellentesque pharetra. Fusce pellentesque est orci.</text:p>
+ <text:p text:style-name="Standard">Integer sodales tincidunt tristique. Sed a metus posuere, adipiscing nunc et, viverra odio. Donec auctor molestie sem, sit amet tristique lectus hendrerit sed. Cras sodales nisl sed orci mattis iaculis. Nunc eget dolor accumsan, pharetra risus a, vestibulum mauris. Nunc vulputate lobortis mollis. Vivamus nec tellus faucibus, tempor magna nec, facilisis felis. Donec commodo enim a vehicula pellentesque. Nullam vehicula vestibulum est vel ultricies.</text:p>
+ <text:p text:style-name="Standard">Aliquam velit massa, laoreet vel leo nec, volutpat facilisis eros. Donec consequat arcu ut diam tempor luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent vitae lacus vel leo sodales pharetra a a nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam luctus tempus nibh, fringilla dictum augue consectetur eget. Curabitur at ante sit amet tortor pharetra molestie eu nec ante. Mauris tincidunt, nibh eu sollicitudin molestie, dolor sapien congue tortor, a pulvinar sapien turpis sed ante. Donec nec est elementum, euismod nulla in, mollis nunc.</text:p>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docx
new file mode 100644
index 0000000000..47008b69d9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135164_cancelledNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135187.docx b/sw/qa/extras/ooxmlexport/data/tdf135187.docx
new file mode 100644
index 0000000000..98a151048f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135187.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135329_lostImage.odt b/sw/qa/extras/ooxmlexport/data/tdf135329_lostImage.odt
new file mode 100644
index 0000000000..234109a141
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135329_lostImage.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c12v3.docx b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c12v3.docx
new file mode 100644
index 0000000000..b51e53124b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c12v3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14.docx b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14.docx
new file mode 100644
index 0000000000..25505bddda
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14v2.docx b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14v2.docx
new file mode 100644
index 0000000000..064e62f707
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c14v2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c15.docx b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c15.docx
new file mode 100644
index 0000000000..f4bd1ff12e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135343_columnSectionBreak_c15.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap.odt b/sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap.odt
new file mode 100644
index 0000000000..145a6af8da
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap_c12.docx b/sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap_c12.docx
new file mode 100644
index 0000000000..00c1353d98
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135595_HFtableWrap_c12.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135653.docx b/sw/qa/extras/ooxmlexport/data/tdf135653.docx
new file mode 100644
index 0000000000..b53777f819
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135653.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135655.odt b/sw/qa/extras/ooxmlexport/data/tdf135655.odt
new file mode 100644
index 0000000000..06933eb3fa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135655.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135660.docx b/sw/qa/extras/ooxmlexport/data/tdf135660.docx
new file mode 100644
index 0000000000..2309c9b0ac
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135660.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135665.docx b/sw/qa/extras/ooxmlexport/data/tdf135665.docx
new file mode 100644
index 0000000000..2400a1c1a4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135665.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135667.odt b/sw/qa/extras/ooxmlexport/data/tdf135667.odt
new file mode 100644
index 0000000000..2db8ade966
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135667.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135774_numberingCRProps.docx b/sw/qa/extras/ooxmlexport/data/tdf135774_numberingCRProps.docx
new file mode 100644
index 0000000000..697db308e3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135774_numberingCRProps.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135774_numberingShading.docx b/sw/qa/extras/ooxmlexport/data/tdf135774_numberingShading.docx
new file mode 100644
index 0000000000..9f62ef2a5a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135774_numberingShading.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135786.docx b/sw/qa/extras/ooxmlexport/data/tdf135786.docx
new file mode 100644
index 0000000000..b766b1905a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135786.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135906.docx b/sw/qa/extras/ooxmlexport/data/tdf135906.docx
new file mode 100644
index 0000000000..701fccff5e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135906.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135923-min.docx b/sw/qa/extras/ooxmlexport/data/tdf135923-min.docx
new file mode 100644
index 0000000000..34bc964214
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135923-min.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135943_shapeWithText_LayoutInCell0_compat15.docx b/sw/qa/extras/ooxmlexport/data/tdf135943_shapeWithText_LayoutInCell0_compat15.docx
new file mode 100644
index 0000000000..b4bbcb94e8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135943_shapeWithText_LayoutInCell0_compat15.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135949_anchoredBeforeBreak.docx b/sw/qa/extras/ooxmlexport/data/tdf135949_anchoredBeforeBreak.docx
new file mode 100644
index 0000000000..6b61be383d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135949_anchoredBeforeBreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135973.odt b/sw/qa/extras/ooxmlexport/data/tdf135973.odt
new file mode 100644
index 0000000000..0eb42080f9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135973.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136059.odt b/sw/qa/extras/ooxmlexport/data/tdf136059.odt
new file mode 100644
index 0000000000..50d808d12f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136059.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonCurve.odt b/sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonCurve.odt
new file mode 100644
index 0000000000..70a8b7a5b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonCurve.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonLineShape.odt b/sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonLineShape.odt
new file mode 100644
index 0000000000..5d193f56ed
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136386_WrapPolygonLineShape.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136404.fodt b/sw/qa/extras/ooxmlexport/data/tdf136404.fodt
new file mode 100644
index 0000000000..9ac902d45b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136404.fodt
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <table:table>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>6</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p></text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p></text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>text</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>text</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:COUNT(&lt;A1:F1&gt;)" office:value-type="float" office:value="2">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:AVERAGE(&lt;A1:F1&gt;)" office:value-type="float" office:value="0">
+ <text:p>8</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:PRODUCT(&lt;A1:F1&gt;)" office:value-type="float" office:value="60">
+ <text:p>60</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:COUNT(&lt;B1&gt;)" office:value-type="float" office:value="0">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:COUNT(&lt;B1:C1&gt;)" office:value-type="float" office:value="0">
+ <text:p>0</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:AVERAGE(&lt;B1&gt;)" office:value-type="float" office:value="1.79769313486232E+308">
+ <text:p text:style-name="P1">** Expression is faulty **</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="ooow:AVERAGE(&lt;B1:C1&gt;)" office:value-type="float" office:value="1.79769313486232E+308">
+ <text:p text:style-name="P1">** Expression is faulty **</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136441_commentInFootnote.odt b/sw/qa/extras/ooxmlexport/data/tdf136441_commentInFootnote.odt
new file mode 100644
index 0000000000..61c9632b39
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136441_commentInFootnote.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docx b/sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docx
new file mode 100644
index 0000000000..c4cf7a139a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136589_paraHadField.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136617.docx b/sw/qa/extras/ooxmlexport/data/tdf136617.docx
new file mode 100644
index 0000000000..e7b35aa295
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136617.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136667.docx b/sw/qa/extras/ooxmlexport/data/tdf136667.docx
new file mode 100644
index 0000000000..e5b047ee33
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136667.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136814.odt b/sw/qa/extras/ooxmlexport/data/tdf136814.odt
new file mode 100644
index 0000000000..2318de04b7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136814.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136841.docx b/sw/qa/extras/ooxmlexport/data/tdf136841.docx
new file mode 100644
index 0000000000..6f9020ee17
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136841.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136850.docx b/sw/qa/extras/ooxmlexport/data/tdf136850.docx
new file mode 100644
index 0000000000..e94a66208e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136850.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136929_framesOfParagraph.odt b/sw/qa/extras/ooxmlexport/data/tdf136929_framesOfParagraph.odt
new file mode 100644
index 0000000000..918b24f670
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136929_framesOfParagraph.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136952_pgBreak3B.odt b/sw/qa/extras/ooxmlexport/data/tdf136952_pgBreak3B.odt
new file mode 100644
index 0000000000..e39ebdef2b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136952_pgBreak3B.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137295.doc b/sw/qa/extras/ooxmlexport/data/tdf137295.doc
new file mode 100644
index 0000000000..915b7d62d9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137295.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137466.docx b/sw/qa/extras/ooxmlexport/data/tdf137466.docx
new file mode 100644
index 0000000000..3c5977251b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137466.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137593.docx b/sw/qa/extras/ooxmlexport/data/tdf137593.docx
new file mode 100644
index 0000000000..8b63fd39a8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137593.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137641_RelativeFromTopMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf137641_RelativeFromTopMargin.docx
new file mode 100644
index 0000000000..2cd299ff21
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137641_RelativeFromTopMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx b/sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx
new file mode 100644
index 0000000000..fbe8b264bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137642_Vertical_Alignment_toppage.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137655.docx b/sw/qa/extras/ooxmlexport/data/tdf137655.docx
new file mode 100644
index 0000000000..d87d434b32
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137655.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137678_testVmlLineShapeMirroredY.docx b/sw/qa/extras/ooxmlexport/data/tdf137678_testVmlLineShapeMirroredY.docx
new file mode 100644
index 0000000000..1559358b56
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137678_testVmlLineShapeMirroredY.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137683_charHighlightTests.docx b/sw/qa/extras/ooxmlexport/data/tdf137683_charHighlightTests.docx
new file mode 100644
index 0000000000..7d1e3be60f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137683_charHighlightTests.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137742.docx b/sw/qa/extras/ooxmlexport/data/tdf137742.docx
new file mode 100644
index 0000000000..26b3e91860
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137742.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137765_testVmlLineShapeRotated.docx b/sw/qa/extras/ooxmlexport/data/tdf137765_testVmlLineShapeRotated.docx
new file mode 100644
index 0000000000..d411d7cda6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137765_testVmlLineShapeRotated.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137850_compat14ZOrder.docx b/sw/qa/extras/ooxmlexport/data/tdf137850_compat14ZOrder.docx
new file mode 100644
index 0000000000..ab2715c1a2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137850_compat14ZOrder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137850_compat15ZOrder.docx b/sw/qa/extras/ooxmlexport/data/tdf137850_compat15ZOrder.docx
new file mode 100644
index 0000000000..07158e4c73
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137850_compat15ZOrder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138093.docx b/sw/qa/extras/ooxmlexport/data/tdf138093.docx
new file mode 100644
index 0000000000..097fbb1351
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138093.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138345_charStyleHighlight.docx b/sw/qa/extras/ooxmlexport/data/tdf138345_charStyleHighlight.docx
new file mode 100644
index 0000000000..14c9aac9ff
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138345_charStyleHighlight.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138345_numberingHighlight.docx b/sw/qa/extras/ooxmlexport/data/tdf138345_numberingHighlight.docx
new file mode 100644
index 0000000000..0083b1b38d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138345_numberingHighlight.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138374.odt b/sw/qa/extras/ooxmlexport/data/tdf138374.odt
new file mode 100644
index 0000000000..86e3f87099
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138374.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138612.docx b/sw/qa/extras/ooxmlexport/data/tdf138612.docx
new file mode 100644
index 0000000000..dd116044b5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138612.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138739.docx b/sw/qa/extras/ooxmlexport/data/tdf138739.docx
new file mode 100644
index 0000000000..7b5bb302bf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138739.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138771.docx b/sw/qa/extras/ooxmlexport/data/tdf138771.docx
new file mode 100644
index 0000000000..70b035508b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138771.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138780.odt b/sw/qa/extras/ooxmlexport/data/tdf138780.odt
new file mode 100644
index 0000000000..3e7a96a029
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138780.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx
new file mode 100644
index 0000000000..5c0a0176e3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138899.docx b/sw/qa/extras/ooxmlexport/data/tdf138899.docx
new file mode 100644
index 0000000000..3e346ac0e4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138899.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf139128.odt b/sw/qa/extras/ooxmlexport/data/tdf139128.odt
new file mode 100644
index 0000000000..544527c069
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf139128.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf139549.docx b/sw/qa/extras/ooxmlexport/data/tdf139549.docx
new file mode 100644
index 0000000000..6e76ae57c0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf139549.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf139580.odt b/sw/qa/extras/ooxmlexport/data/tdf139580.odt
new file mode 100644
index 0000000000..48224c8dab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf139580.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf139759_commentHighlightBackground.docx b/sw/qa/extras/ooxmlexport/data/tdf139759_commentHighlightBackground.docx
new file mode 100644
index 0000000000..487439a5cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf139759_commentHighlightBackground.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf139948.docx b/sw/qa/extras/ooxmlexport/data/tdf139948.docx
new file mode 100644
index 0000000000..1b3f7df000
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf139948.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140137.docx b/sw/qa/extras/ooxmlexport/data/tdf140137.docx
new file mode 100644
index 0000000000..d03925e75e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140137.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx b/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx
new file mode 100644
index 0000000000..be47d79c5b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt b/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt
new file mode 100644
index 0000000000..c4bd80f1a6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140572_docDefault_superscript.docx b/sw/qa/extras/ooxmlexport/data/tdf140572_docDefault_superscript.docx
new file mode 100644
index 0000000000..fd176dc8c8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140572_docDefault_superscript.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140597.docx b/sw/qa/extras/ooxmlexport/data/tdf140597.docx
new file mode 100644
index 0000000000..36db7d9bea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140597.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140668.docx b/sw/qa/extras/ooxmlexport/data/tdf140668.docx
new file mode 100644
index 0000000000..d7072187bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140668.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141172.docx b/sw/qa/extras/ooxmlexport/data/tdf141172.docx
new file mode 100644
index 0000000000..0e1647ae27
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141172.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf b/sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf
new file mode 100644
index 0000000000..6ccc1de58e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf
@@ -0,0 +1,61 @@
+{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang3082\deflangfe3082{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
+{\f36\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Frutiger LT 65 Bold;}{\f37\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Frutiger LT 45 Light;}{\f38\fscript\fcharset0\fprq2{\*\panose 00000000000000000000}Comic Sans MS;}
+{\f39\froman\fcharset238\fprq2 Times New Roman CE;}{\f40\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\froman\fcharset162\fprq2 Times New Roman Tur;}
+{\f44\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\f49\fswiss\fcharset238\fprq2 Arial CE;}{\f50\fswiss\fcharset204\fprq2 Arial Cyr;}{\f52\fswiss\fcharset161\fprq2 Arial Greek;}{\f53\fswiss\fcharset162\fprq2 Arial Tur;}{\f54\fswiss\fcharset177\fprq2 Arial (Hebrew);}
+{\f55\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f56\fswiss\fcharset186\fprq2 Arial Baltic;}{\f57\fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f419\fscript\fcharset238\fprq2 Comic Sans MS CE;}{\f420\fscript\fcharset204\fprq2 Comic Sans MS Cyr;}
+{\f422\fscript\fcharset161\fprq2 Comic Sans MS Greek;}{\f423\fscript\fcharset162\fprq2 Comic Sans MS Tur;}{\f426\fscript\fcharset186\fprq2 Comic Sans MS Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
+\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
+\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang3082\langfe3082\cgrid\langnp3082\langfenp3082 \snext0 Normal;}{\*\cs10 \additive \ssemihidden
+Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid10428813\rsid14756311}
+{\*\generator Microsoft Word 11.0.5604;}{\info{\author Crystal Reports}{\doccomm Powered By Crystal}{\operator GESTION}{\creatim\yr2014\mo7\dy4\hr10\min47}{\revtim\yr2014\mo7\dy4\hr11\min19}{\version3}{\edmins7}{\nofpages2}{\nofwords155}{\nofchars857}
+{\*\company Crystal Decisions}{\nofcharsws1010}{\vern24689}}\paperw11904\paperh16836\margl192\margr192\margt240\margb242 \widowctrl\ftnbj\aenddoc\hyphhotz425\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120
+\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot14756311 \fet0\sectd \sbknone\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
+\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\pvpg\phpg\posx762\posy1182\absh-228\absw1653\faauto\rin0\lin0\itap0 \fs24\lang3082\langfe3082\cgrid\langnp3082\langfenp3082 {
+\lang1024\langfe1024\noproof\insrsid10428813 {\shp{\shprslt{\*\do\dobxpage\dobypage\dodhgt1\dpline\dpptx0\dppty0\dpptx10945\dppty0\dpx306\dpy16065\dpxsize10945\dpysize0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}}{\f36\insrsid14756311
+
+\par }\pard \qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\pvpg\phpg\posx2944\posy3235\absh-1764\absw5927\faauto\rin0\lin0\itap0 {
+\lang1024\langfe1024\noproof\insrsid10428813 {\shp{\*\shpinst\shpleft192\shptop840\shpright670\shpbottom1852\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz3\shplid1028
+{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn pib}{\sv
+}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}}{\shprslt\par\pard
+\ql \li0\ri0\widctlpar\pvpg\phpg\posx191\posy839\dxfrtext180\dfrmtxtx180\dfrmtxty0\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \par}}
+}{\f38\fs23\cf1\insrsid14756311\charrsid14756311 Se convoca CONSEJO ESCOLAR}{\f38\insrsid14756311\charrsid14756311
+\par }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 de car\'e1cter ORDINARIO,}{\f38\insrsid14756311\charrsid14756311
+\par }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 que tendr\'e1 lugar el pr\'f3ximo d\'eda 09/07/2014, }{\f38\fs23\cf1\insrsid14756311 a las 7 de la tarde }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 en SALA DE PROFESORES ,}{
+\f38\insrsid14756311\charrsid14756311
+\par }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 con el siguiente }{\b\f38\fs23\ul\cf1\insrsid14756311\charrsid14756311 ORDEN DEL D\'cdA:}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\pvpg\phpg
+\posx707\posy6035\absh-5856\absw10180\faauto\rin0\lin0\itap0 {\f38\fs28\cf1\insrsid14756311\charrsid14756311 1.- Lectura y aprobaci\'f3n del acta anterior, si procede.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid14756311\charrsid14756311 2.- An\'e1lisis de los resultados de la evaluaci\'f3n Final.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid14756311\charrsid14756311 3.- Resultados de la prueba de diagn\'f3stico de los alumnos de 4\'ba de Primaria.}{\f38\fs28\cf1\insrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 4.- Normativa de biling\'fce para el curso pr\'f3ximo.}{\f38\fs28\insrsid10428813\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 5}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Aprobaci\'f3n de la MEMORIA del curso 2013-2014.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 6}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Proceso de elecci\'f3n de directores.}{\f38\fs28\cf1\insrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 7.- Libros de texto para el curso que viene.}{\f38\fs28\insrsid10428813\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 8}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Implantaci\'f3n de la LOMCE para el curso 2014-2015.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 9}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Ruegos y preguntas.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\pvpg\phpg\posx621\posy12184\absh-480\absw1869\faauto\rin0\lin0\itap0\pararsid14756311 {\f38\fs19\cf1\insrsid14756311\charrsid14756311 V\'baB\'ba}{\f38\insrsid14756311\charrsid14756311
+
+\par }{\f38\fs19\cf1\insrsid14756311\charrsid14756311 El Director,}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\pvpg\phpg\posx642\posy13627\absh-221\absw4950\faauto\rin0\lin0\itap0 {\f1\fs19\cf1\insrsid14756311 Fdo.: Jose Garcia Ros}{
+\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\pvpg\phpg\posx3981\posy11104\absh-510\absw5120\faauto\rin0\lin0\itap0\pararsid14756311 {
+\f38\fs19\cf1\insrsid14756311\charrsid14756311 ROLDAN, a 4 de julio de 2014}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\pvpg\phpg
+\posx732\posy2715\absh-349\absw10155\faauto\rin0\lin0\itap0 {\b\f1\fs27\ul\cf1\insrsid14756311 Convocatoria de CONSEJO ESCOLAR}{\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\pvpg\phpg\posx6087\posy12551\absh-221\absw1995\faauto\rin0\lin0\itap0 {\f38\fs19\cf1\insrsid14756311\charrsid14756311 La Secretaria,}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\pvpg\phpg\posx6097\posy13616\absh-221\absw5070\faauto\rin0\lin0\itap0 {\f1\fs19\cf1\insrsid14756311
+Fdo.: Luz Maria Ferreiro Fraga}{\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\pvpg\phpg\posx306\posy16179\absh-221\absw1083\faauto\rin0\lin0\itap0 {\f1\fs17\cf1\insrsid14756311 04/07/2014}{\f36\insrsid14756311
+\par }\pard \qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\pvpg\phpg\posx4695\posy16179\absh-221\absw1710\faauto\rin0\lin0\itap0 {\f1\fs17\cf1\insrsid14756311 2013/14}{\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\lang1024\langfe1024\noproof\insrsid10428813
+{\shp{\*\shpinst\shpleft741\shptop2464\shpright10955\shpbottom5065\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz0\shplid1029{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 12700}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}
+{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}{\shprslt{\*\do\dobxpage\dobypage\dodhgt0\dprect\dpx741\dpy2464\dpxsize10214\dpysize2601
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}}{\f36\insrsid14756311 \page \sect }\sectd \sbknone\linex0\sectdefaultcl\sftnbj \pard\plain
+\qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\pvpg\phpg\posx2093\posy1866\absh-228\absw7011\faauto\rin0\lin0\itap0\pararsid14756311
+\fs24\lang3082\langfe3082\cgrid\langnp3082\langfenp3082 {\insrsid14756311
+\par }}
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docx
new file mode 100644
index 0000000000..01bc2667a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141548.docx b/sw/qa/extras/ooxmlexport/data/tdf141548.docx
new file mode 100644
index 0000000000..65c4e8b907
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141548.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141550.docx b/sw/qa/extras/ooxmlexport/data/tdf141550.docx
new file mode 100644
index 0000000000..170ebebba6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141550.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141660.docx b/sw/qa/extras/ooxmlexport/data/tdf141660.docx
new file mode 100644
index 0000000000..dbcceeebd2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141660.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumberTortureTest.docx b/sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumberTortureTest.docx
new file mode 100644
index 0000000000..808a708466
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumberTortureTest.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumbering.docx
new file mode 100644
index 0000000000..3957fadf43
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141966_chapterNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odt b/sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odt
new file mode 100644
index 0000000000..78372e6035
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142387.docx b/sw/qa/extras/ooxmlexport/data/tdf142387.docx
new file mode 100644
index 0000000000..c4dc0d280c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142387.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx b/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx
new file mode 100644
index 0000000000..60af474b5c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverSpacingC15.odt b/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverSpacingC15.odt
new file mode 100644
index 0000000000..971a0a3a6e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverSpacingC15.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docx b/sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docx
new file mode 100644
index 0000000000..c819c55416
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142407.docx b/sw/qa/extras/ooxmlexport/data/tdf142407.docx
new file mode 100644
index 0000000000..38397a4de9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142407.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142433_WrapPolygonCustomShape.odt b/sw/qa/extras/ooxmlexport/data/tdf142433_WrapPolygonCustomShape.odt
new file mode 100644
index 0000000000..fbe0b97d6d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142433_WrapPolygonCustomShape.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142464_ampm.docx b/sw/qa/extras/ooxmlexport/data/tdf142464_ampm.docx
new file mode 100644
index 0000000000..d633984888
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142464_ampm.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142486_FrameShadow.odt b/sw/qa/extras/ooxmlexport/data/tdf142486_FrameShadow.odt
new file mode 100644
index 0000000000..6556d695cb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142486_FrameShadow.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142486_LeftMarginShadowLeft.docx b/sw/qa/extras/ooxmlexport/data/tdf142486_LeftMarginShadowLeft.docx
new file mode 100644
index 0000000000..07478e2b8b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142486_LeftMarginShadowLeft.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142542_cancelledAutospacing.docx b/sw/qa/extras/ooxmlexport/data/tdf142542_cancelledAutospacing.docx
new file mode 100644
index 0000000000..615799fd75
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142542_cancelledAutospacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docx b/sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docx
new file mode 100644
index 0000000000..6ec35a7684
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142700.docx b/sw/qa/extras/ooxmlexport/data/tdf142700.docx
new file mode 100644
index 0000000000..393e2ff477
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142700.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143175.docx b/sw/qa/extras/ooxmlexport/data/tdf143175.docx
new file mode 100644
index 0000000000..bcfbd2db76
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143175.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_glow_rotate.docx b/sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_glow_rotate.docx
new file mode 100644
index 0000000000..b83188073b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_glow_rotate.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_stroke_shadow.docx b/sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_stroke_shadow.docx
new file mode 100644
index 0000000000..53dfb488a2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143219ContourWrap_stroke_shadow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143384_tableInFoot_negativeMargins.docx b/sw/qa/extras/ooxmlexport/data/tdf143384_tableInFoot_negativeMargins.docx
new file mode 100644
index 0000000000..918c1029fb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143384_tableInFoot_negativeMargins.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143399.docx b/sw/qa/extras/ooxmlexport/data/tdf143399.docx
new file mode 100644
index 0000000000..1d9749a0cc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143399.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143432_Frame_WrapTextMode.odt b/sw/qa/extras/ooxmlexport/data/tdf143432_Frame_WrapTextMode.odt
new file mode 100644
index 0000000000..6390c12db0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143432_Frame_WrapTextMode.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143583_emptyParaAtEndOfFootnote.docx b/sw/qa/extras/ooxmlexport/data/tdf143583_emptyParaAtEndOfFootnote.docx
new file mode 100644
index 0000000000..e8b42b840a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143583_emptyParaAtEndOfFootnote.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143692_outlineLevelTortureTest.docx b/sw/qa/extras/ooxmlexport/data/tdf143692_outlineLevelTortureTest.docx
new file mode 100644
index 0000000000..7072b47218
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143692_outlineLevelTortureTest.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt b/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt
new file mode 100644
index 0000000000..6a12228770
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf144362.odt b/sw/qa/extras/ooxmlexport/data/tdf144362.odt
new file mode 100644
index 0000000000..9c161dbdeb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf144362.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf144563.docx b/sw/qa/extras/ooxmlexport/data/tdf144563.docx
new file mode 100644
index 0000000000..59d64d2d1b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf144563.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf144668.odt b/sw/qa/extras/ooxmlexport/data/tdf144668.odt
new file mode 100644
index 0000000000..7504adce40
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf144668.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf145998_unnecessaryPageStyles.odt b/sw/qa/extras/ooxmlexport/data/tdf145998_unnecessaryPageStyles.odt
new file mode 100644
index 0000000000..82087eb691
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf145998_unnecessaryPageStyles.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146171.docx b/sw/qa/extras/ooxmlexport/data/tdf146171.docx
new file mode 100644
index 0000000000..bdd534527a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146171.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146346.docx b/sw/qa/extras/ooxmlexport/data/tdf146346.docx
new file mode 100644
index 0000000000..846a33e9ae
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146346.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146491.odt b/sw/qa/extras/ooxmlexport/data/tdf146491.odt
new file mode 100644
index 0000000000..2ee08f1d3e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146491.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146515.odt b/sw/qa/extras/ooxmlexport/data/tdf146515.odt
new file mode 100644
index 0000000000..139126d022
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146515.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146802.docx b/sw/qa/extras/ooxmlexport/data/tdf146802.docx
new file mode 100644
index 0000000000..80d2ee17a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146802.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx b/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx
new file mode 100644
index 0000000000..b4456bf400
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146851_1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146851_2.docx b/sw/qa/extras/ooxmlexport/data/tdf146851_2.docx
new file mode 100644
index 0000000000..fbd5f40a68
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146851_2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146955.odt b/sw/qa/extras/ooxmlexport/data/tdf146955.odt
new file mode 100644
index 0000000000..71e86e0e66
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146955.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf146984_anchorInShape.docx b/sw/qa/extras/ooxmlexport/data/tdf146984_anchorInShape.docx
new file mode 100644
index 0000000000..38fcaf9abe
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf146984_anchorInShape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf147115_defaultStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf147115_defaultStyle.docx
new file mode 100644
index 0000000000..e75099c6aa
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf147115_defaultStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf147646_mergedCellNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf147646_mergedCellNumbering.docx
new file mode 100644
index 0000000000..6801447376
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf147646_mergedCellNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf147724.docx b/sw/qa/extras/ooxmlexport/data/tdf147724.docx
new file mode 100644
index 0000000000..97f05c921b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf147724.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf147810.odt b/sw/qa/extras/ooxmlexport/data/tdf147810.odt
new file mode 100644
index 0000000000..eb0d1a8846
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf147810.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf147861_customField.docx b/sw/qa/extras/ooxmlexport/data/tdf147861_customField.docx
new file mode 100644
index 0000000000..70071fa7e8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf147861_customField.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf147892.fodt b/sw/qa/extras/ooxmlexport/data/tdf147892.fodt
new file mode 100644
index 0000000000..bb3ffc324d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf147892.fodt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct12345678" text:id="ct12345678">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Bob</dc:creator>
+ <dc:date>2023-01-02T00:00:00</dc:date>
+ </office:change-info>
+ </text:deletion>
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>Alice</dc:creator>
+ <dc:date>2023-01-01T00:00:00</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p><text:change-start text:change-id="ct12345678"/></text:p>
+ <text:p><text:change-end text:change-id="ct12345678"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf147978_enhancedPath_commandABVW.odt b/sw/qa/extras/ooxmlexport/data/tdf147978_enhancedPath_commandABVW.odt
new file mode 100644
index 0000000000..d9ef07db59
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf147978_enhancedPath_commandABVW.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148026.fodt b/sw/qa/extras/ooxmlexport/data/tdf148026.fodt
new file mode 100644
index 0000000000..80d958a694
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148026.fodt
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Internet_20_link" style:display-name="Internet link" style:family="text">
+ <style:text-properties fo:color="#000080" loext:opacity="100%" fo:language="zxx" fo:country="none" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
+ </style:style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="https://bugs.documentfoundation.org/a#b" office:target-frame-name="_self" xlink:show="replace" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link"><text:span text:style-name="T1">https://bugs.documentfoundation.org/a#b _self frame</text:span></text:a> </text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148052.docx b/sw/qa/extras/ooxmlexport/data/tdf148052.docx
new file mode 100644
index 0000000000..4e0dad0f5b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148052.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148111.docx b/sw/qa/extras/ooxmlexport/data/tdf148111.docx
new file mode 100644
index 0000000000..a46fb508dc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148111.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148132.docx b/sw/qa/extras/ooxmlexport/data/tdf148132.docx
new file mode 100644
index 0000000000..6ee2359795
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148132.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148273_sectionBulletFormatLeak.docx b/sw/qa/extras/ooxmlexport/data/tdf148273_sectionBulletFormatLeak.docx
new file mode 100644
index 0000000000..1ebb1e8b41
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148273_sectionBulletFormatLeak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148360.docx b/sw/qa/extras/ooxmlexport/data/tdf148360.docx
new file mode 100644
index 0000000000..8f09f685d2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148360.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148361.docx b/sw/qa/extras/ooxmlexport/data/tdf148361.docx
new file mode 100644
index 0000000000..ecf9a5f008
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148361.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148380_createField.docx b/sw/qa/extras/ooxmlexport/data/tdf148380_createField.docx
new file mode 100644
index 0000000000..c31ed72141
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148380_createField.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148380_fldLocked.docx b/sw/qa/extras/ooxmlexport/data/tdf148380_fldLocked.docx
new file mode 100644
index 0000000000..2ac77223b2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148380_fldLocked.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148380_modifiedField.docx b/sw/qa/extras/ooxmlexport/data/tdf148380_modifiedField.docx
new file mode 100644
index 0000000000..14f6e319e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148380_modifiedField.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148380_printField.docx b/sw/qa/extras/ooxmlexport/data/tdf148380_printField.docx
new file mode 100644
index 0000000000..44145748c6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148380_printField.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docx b/sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docx
new file mode 100644
index 0000000000..241632bc80
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148380_usernameField.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148455_1.docx b/sw/qa/extras/ooxmlexport/data/tdf148455_1.docx
new file mode 100644
index 0000000000..295d3ee744
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148455_1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148455_2.docx b/sw/qa/extras/ooxmlexport/data/tdf148455_2.docx
new file mode 100644
index 0000000000..3cde58ce5a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148455_2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148494.docx b/sw/qa/extras/ooxmlexport/data/tdf148494.docx
new file mode 100644
index 0000000000..c60c73a206
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148494.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148671.docx b/sw/qa/extras/ooxmlexport/data/tdf148671.docx
new file mode 100644
index 0000000000..d4ed09fa96
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148671.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148720.odt b/sw/qa/extras/ooxmlexport/data/tdf148720.odt
new file mode 100644
index 0000000000..771c845053
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148720.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148834_lineNumbering.odt b/sw/qa/extras/ooxmlexport/data/tdf148834_lineNumbering.odt
new file mode 100644
index 0000000000..4006cfe662
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148834_lineNumbering.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148952.odt b/sw/qa/extras/ooxmlexport/data/tdf148952.odt
new file mode 100644
index 0000000000..b4f40f617d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148952.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148956_directEndFormatting.docx b/sw/qa/extras/ooxmlexport/data/tdf148956_directEndFormatting.docx
new file mode 100644
index 0000000000..0ed542643e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148956_directEndFormatting.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149089.docx b/sw/qa/extras/ooxmlexport/data/tdf149089.docx
new file mode 100644
index 0000000000..2390476841
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149089.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149198.docx b/sw/qa/extras/ooxmlexport/data/tdf149198.docx
new file mode 100644
index 0000000000..61e2bfddba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149198.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149200.docx b/sw/qa/extras/ooxmlexport/data/tdf149200.docx
new file mode 100644
index 0000000000..811f594b64
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149200.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149313.docx b/sw/qa/extras/ooxmlexport/data/tdf149313.docx
new file mode 100644
index 0000000000..4c0c454b42
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149313.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149388.docx b/sw/qa/extras/ooxmlexport/data/tdf149388.docx
new file mode 100644
index 0000000000..9b97028199
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149388.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149388_fly.docx b/sw/qa/extras/ooxmlexport/data/tdf149388_fly.docx
new file mode 100644
index 0000000000..92b9cf92ba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149388_fly.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149546.docx b/sw/qa/extras/ooxmlexport/data/tdf149546.docx
new file mode 100644
index 0000000000..2811ec1898
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149546.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149551_mongolianVert.docx b/sw/qa/extras/ooxmlexport/data/tdf149551_mongolianVert.docx
new file mode 100644
index 0000000000..2f562757a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149551_mongolianVert.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149649.docx b/sw/qa/extras/ooxmlexport/data/tdf149649.docx
new file mode 100644
index 0000000000..8d6fded674
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149649.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149708.docx b/sw/qa/extras/ooxmlexport/data/tdf149708.docx
new file mode 100644
index 0000000000..5eee4a124f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149708.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf149711.docx b/sw/qa/extras/ooxmlexport/data/tdf149711.docx
new file mode 100644
index 0000000000..d90efa7c1f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf149711.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf150166.docx b/sw/qa/extras/ooxmlexport/data/tdf150166.docx
new file mode 100644
index 0000000000..f802ac611e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf150166.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf150542.docx b/sw/qa/extras/ooxmlexport/data/tdf150542.docx
new file mode 100644
index 0000000000..3f115fa693
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf150542.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf150824.fodt b/sw/qa/extras/ooxmlexport/data/tdf150824.fodt
new file mode 100644
index 0000000000..c1e437a121
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf150824.fodt
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94228217946240" text:id="ct94228217946240">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2022-09-06T14:47:25</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:change-start text:change-id="ct94228217946240"/>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-column table:style-name="Table1.B"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"><text:change-end text:change-id="ct94228217946240"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf150966_regularInset.docx b/sw/qa/extras/ooxmlexport/data/tdf150966_regularInset.docx
new file mode 100644
index 0000000000..0d07a5453e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf150966_regularInset.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm b/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm
new file mode 100644
index 0000000000..80886d864a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf151704_thinColumnHeight.docx b/sw/qa/extras/ooxmlexport/data/tdf151704_thinColumnHeight.docx
new file mode 100644
index 0000000000..7e7cd57e13
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf151704_thinColumnHeight.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf151912.docx b/sw/qa/extras/ooxmlexport/data/tdf151912.docx
new file mode 100644
index 0000000000..65e8d5a93f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf151912.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf152200-field+textbox.docx b/sw/qa/extras/ooxmlexport/data/tdf152200-field+textbox.docx
new file mode 100644
index 0000000000..606d1346a2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf152200-field+textbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf152203.docx b/sw/qa/extras/ooxmlexport/data/tdf152203.docx
new file mode 100644
index 0000000000..f8ba96ea59
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf152203.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf152425.docx b/sw/qa/extras/ooxmlexport/data/tdf152425.docx
new file mode 100644
index 0000000000..53a65cc634
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf152425.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf152506.docx b/sw/qa/extras/ooxmlexport/data/tdf152506.docx
new file mode 100644
index 0000000000..34f0130fdd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf152506.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak.odt b/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak.odt
new file mode 100644
index 0000000000..434c30ed31
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docx b/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docx
new file mode 100644
index 0000000000..255bf795a5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153042_largeTab.docx b/sw/qa/extras/ooxmlexport/data/tdf153042_largeTab.docx
new file mode 100644
index 0000000000..87730d6d12
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153042_largeTab.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153042_noTab.docx b/sw/qa/extras/ooxmlexport/data/tdf153042_noTab.docx
new file mode 100644
index 0000000000..38b5208eab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153042_noTab.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153104.docx b/sw/qa/extras/ooxmlexport/data/tdf153104.docx
new file mode 100644
index 0000000000..d70b09852a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153104.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153128.docx b/sw/qa/extras/ooxmlexport/data/tdf153128.docx
new file mode 100644
index 0000000000..97f08827d9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153128.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153255.docx b/sw/qa/extras/ooxmlexport/data/tdf153255.docx
new file mode 100644
index 0000000000..e9f2892d56
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153255.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153526_commentInNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf153526_commentInNumbering.docx
new file mode 100644
index 0000000000..f26240092c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153526_commentInNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docx b/sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docx
new file mode 100644
index 0000000000..ea6acac29b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak.docx
new file mode 100644
index 0000000000..4501082086
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak2.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak2.docx
new file mode 100644
index 0000000000..c29f8a4951
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak3.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak3.docx
new file mode 100644
index 0000000000..5dd61ec7f4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak6.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak6.docx
new file mode 100644
index 0000000000..f8b540012d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_anchoredAfterPgBreak6.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak.docx
new file mode 100644
index 0000000000..6b25d6c70c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak2.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak2.docx
new file mode 100644
index 0000000000..c8fe50ea3f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_inlineAfterPgBreak2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docx
new file mode 100644
index 0000000000..fa62b475cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_sdtAfterPgBreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docx b/sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docx
new file mode 100644
index 0000000000..29c63ad71e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153613_textboxAfterPgBreak3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153804.docx b/sw/qa/extras/ooxmlexport/data/tdf153804.docx
new file mode 100644
index 0000000000..65a1fdfa8e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153804.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153891.docx b/sw/qa/extras/ooxmlexport/data/tdf153891.docx
new file mode 100644
index 0000000000..6fe8092982
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153891.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153964_firstIndentAfterBreak14.docx b/sw/qa/extras/ooxmlexport/data/tdf153964_firstIndentAfterBreak14.docx
new file mode 100644
index 0000000000..696c4b4278
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153964_firstIndentAfterBreak14.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153964_numberingAfterBreak14.docx b/sw/qa/extras/ooxmlexport/data/tdf153964_numberingAfterBreak14.docx
new file mode 100644
index 0000000000..a94a3c9736
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153964_numberingAfterBreak14.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak14.docx b/sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak14.docx
new file mode 100644
index 0000000000..6c57bcfdc8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak14.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak15.docx b/sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak15.docx
new file mode 100644
index 0000000000..e4d5c45ed0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf153964_topMarginAfterBreak15.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docx b/sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docx
new file mode 100644
index 0000000000..27ba6055c2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154129_framePr1.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154478.docx b/sw/qa/extras/ooxmlexport/data/tdf154478.docx
new file mode 100644
index 0000000000..bfbfeda768
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154478.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154481.docx b/sw/qa/extras/ooxmlexport/data/tdf154481.docx
new file mode 100644
index 0000000000..bfbfeda768
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154481.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docx b/sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docx
new file mode 100644
index 0000000000..2ec5b493ec
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154703_framePr2.rtf b/sw/qa/extras/ooxmlexport/data/tdf154703_framePr2.rtf
new file mode 100644
index 0000000000..614c539120
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154703_framePr2.rtf
@@ -0,0 +1,187 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2057\themelang2057\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
+{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
+{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f237\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f238\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f240\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f241\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f242\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f243\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\f244\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f245\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f247\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f248\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
+{\f250\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f251\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f252\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f253\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
+{\f254\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f255\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f577\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f578\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}
+{\f580\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f581\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f584\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f585\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}
+{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
+{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
+{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
+{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\ctexttwo\ctint153\cshade255\red84\green141\blue212;}{\*\defchp \fs22 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \snext11 \ssemihidden \sunhideused Normal Table;}{\s15\ql \li0\ri0\widctlpar
+\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 \sbasedon0 \snext15 \slink16 \sunhideused \styrsid7478253 header;}
+{\*\cs16 \additive \rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \fs24\lang1060\langfe1060\langnp1060\langfenp1060 \sbasedon10 \slink15 \slocked \styrsid7478253 Header Char;}{\s17\ql \li0\ri0\widctlpar
+\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 \sbasedon0 \snext17 \slink18 \sunhideused \styrsid7478253 footer;}
+{\*\cs18 \additive \rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \fs24\lang1060\langfe1060\langnp1060\langfenp1060 \sbasedon10 \slink17 \slocked \styrsid7478253 Footer Char;}}{\*\rsidtbl \rsid1707623\rsid2377995\rsid3551688\rsid4459474\rsid7478253\rsid8597786
+\rsid8659540\rsid10968976\rsid13382084\rsid13460485\rsid13894473\rsid13975497\rsid13991539\rsid14048189\rsid16266111\rsid16739686}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0
+\mnaryLim1}{\info{\author robi01}{\doccomm Produced by: PsQRFilters V2.11 for QuickReport (www.pragnaan.com)}{\operator JLAutoBuild}{\creatim\yr2023\mo4\dy12\hr22\min30}{\revtim\yr2023\mo4\dy12\hr23\min56}{\version12}{\edmins52}{\nofpages1}{\nofwords4}
+{\nofchars23}{\nofcharsws26}{\vern49273}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw8392\paperh5954\margl283\margr283\margt567\margb567\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0
+\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot3551688 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0
+{\*\ftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7478253 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {\rtlch\fcs1
+\af0 \ltrch\fcs0 \insrsid16739686 \chftnsep
+\par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7478253 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid16739686 \chftnsepc
+\par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7478253 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid16739686 \chftnsep
+\par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7478253 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid16739686 \chftnsepc
+\par }}\ltrpar \sectd \ltrsect\lndscpsxn\psz70\linex0\headery0\footery0\colsx708\sectlinegrid326\sectdefaultcl\sectrsid13382084\sftnbj {\headerl \ltrpar \pard\plain \ltrpar\s15\ql \li0\ri0\widctlpar
+\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid7478253
+\par }}{\headerr \ltrpar \pard\plain \ltrpar\s15\qc \li0\ri0\widctlpar\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7478253 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang2057\langfe1060\langnp2057\insrsid7478253 Exactly 6cm frame does NOT include border spacing}{\rtlch\fcs1 \af0 \ltrch\fcs0
+\lang2057\langfe1060\langnp2057\insrsid7478253\charrsid7478253
+\par }}{\footerl \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid7478253
+\par }}{\footerr \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid7478253
+\par }}{\headerf \ltrpar \pard\plain \ltrpar\s15\ql \li0\ri0\widctlpar\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid7478253
+\par }}{\footerf \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid7478253
+\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}
+{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\qc \li0\ri0\nowidctlpar\brdrt\brdrs\brdrw10\brsp620 \brdrl\brdrs\brdrw10\brsp300 \brdrb
+\brdrs\brdrw10\brsp620 \brdrr\brdrs\brdrw10\brsp300 \pvpg\phpg\posxc\posyc\absw3402\wraparound\faauto\rin0\lin0\itap0\pararsid2377995 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1060\langfe1060\cgrid\langnp1060\langfenp1060 {\rtlch\fcs1 \af1
+\ltrch\fcs0 \f1\cf1\insrsid13382084\charrsid10968976 framePr}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\cf1\insrsid8597786\charrsid10968976
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\brdrt\brdrs\brdrw10\brsp620 \brdrl\brdrs\brdrw10\brsp300 \brdrb\brdrs\brdrw10\brsp620 \brdrr\brdrs\brdrw10\brsp300 \pvpg\phpg\posxc\posyc\absw3402\wraparound\faauto\rin0\lin0\itap0\pararsid2377995 \cbpat17 {
+\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\cf1\insrsid13382084\charrsid10968976 background color
+\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\brdrt\brdrs\brdrw10\brsp620 \brdrl\brdrs\brdrw10\brsp300 \brdrb\brdrs\brdrw10\brsp620 \brdrr\brdrs\brdrw10\brsp300 \pvpg\phpg\posxc\posyc\absw3402\wraparound\faauto\rin0\lin0\itap0\pararsid2377995 {\rtlch\fcs1 \af0
+\ltrch\fcs0 \insrsid13382084\charrsid10968976
+\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid14048189
+\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210030dd4329a8060000a41b0000160000007468656d652f7468656d652f
+7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
+615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
+79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
+5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
+999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
+699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
+8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
+0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
+9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
+15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
+3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
+32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
+f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
+e877f0034e16bafb0e258ebb4faf06b769e888340b103d331115bebc4eb813bf83291b63624a0d1475a756c734f9bbc2cd28546ecbe1e20a3794ca175f3fae90
+fb6d2dd99bb07b55e5ccf68942bd0877b23c77b908e8db5f9db7f024d9239010f35bd4bbe2fcae387bfff9e2bc289f2fbe24cfaa301468dd8bd846dbb4ddf1c2
+ae7b4c191ba8292337a469bc25ec3d411f06f53a73e224c5292c8de0516732307070a1c0660d125c7d44553488700a4d7bddd3444299910e254ab984c3a219ae
+a4adf1d0f82b7bd46cea4388ad1c12ab5d1ed8e1153d9c9f350a3246aad01c6873462b9ac05999ad5cc988826eafc3acae853a33b7ba11cd1445875ba1b236b1
+399483c90bd560b0b0263435085a21b0f22a9cf9356b38ec6046026d77eba3dc2dc60b17e92219e180643ed27acffba86e9c94c7ca9c225a0f1b0cfae0788ad5
+4adc5a9aec1b703b8b93caec1a0bd8e5de7b132fe5113cf312503b998e2c2927274bd051db6b35979b1ef271daf6c6704e86c73805af4bdd476216c26593af84
+0dfb5393d964f9cc9bad5c313709ea70f561ed3ea7b053075221d51696910d0d339585004b34272bff7213cc7a510a5454a3b349b1b206c1f0af490176745d4b
+c663e2abb2b34b23da76f6352ba57ca2881844c1111ab189d8c7e07e1daaa04f40255c77988aa05fe06e4e5bdb4cb9c5394bbaf28d98c1d971ccd20867e556a7
+689ec9166e0a522183792b8907ba55ca6e943bbf2a26e52f48957218ffcf54d1fb09dc3eac04da033e5c0d0b8c74a6b43d2e54c4a10aa511f5fb021a07533b20
+5ae07e17a621a8e082dafc17e450ffb739676998b48643a4daa7211214f623150942f6a02c99e83b85583ddbbb2c4996113211551257a656ec1139246ca86be0
+aadedb3d1441a89b6a929501833b197fee7b9641a3503739e57c732a59b1f7da1cf8a73b1f9bcca0945b874d4393dbbf10b1680f66bbaa5d6f96e77b6f59113d
+316bb31a795600b3d256d0cad2fe354538e7566b2bd69cc6cbcd5c38f0e2bcc63058344429dc2121fd07f63f2a7c66bf76e80d75c8f7a1b622f878a18941d840
+545fb28d07d205d20e8ea071b283369834296bdaac75d256cb37eb0bee740bbe278cad253b8bbfcf69eca23973d939b97891c6ce2cecd8da8e2d343578f6648a
+c2d0383fc818c798cf64e52f597c740f1cbd05df0c264c49134cf09d4a60e8a107260f20f92d47b374e32f000000ffff0300504b030414000600080000002100
+0dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f7
+8277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89
+d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd500
+1996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0f
+bfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6
+a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a
+0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021
+0030dd4329a8060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d001400060008
+00000021000dd1909fb60000001b0100002700000000000000000000000000b20900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ad0a00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
+\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
+\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
+\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
+\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
+4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000000021
+3733816dd901feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154703_framePrTextDirection.docx b/sw/qa/extras/ooxmlexport/data/tdf154703_framePrTextDirection.docx
new file mode 100644
index 0000000000..e01c2cf9f4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154703_framePrTextDirection.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154703_framePrWrapSpacing.docx b/sw/qa/extras/ooxmlexport/data/tdf154703_framePrWrapSpacing.docx
new file mode 100644
index 0000000000..57a9bea5a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154703_framePrWrapSpacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf154751_dualStrikethrough.docx b/sw/qa/extras/ooxmlexport/data/tdf154751_dualStrikethrough.docx
new file mode 100644
index 0000000000..4669be366a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf154751_dualStrikethrough.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf155690.docx b/sw/qa/extras/ooxmlexport/data/tdf155690.docx
new file mode 100644
index 0000000000..1839862688
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf155690.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf155736_PageNumbers_footer.docx b/sw/qa/extras/ooxmlexport/data/tdf155736_PageNumbers_footer.docx
new file mode 100644
index 0000000000..58e3698800
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf155736_PageNumbers_footer.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf155903.odt b/sw/qa/extras/ooxmlexport/data/tdf155903.odt
new file mode 100644
index 0000000000..97ba58d892
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf155903.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf155945.docx b/sw/qa/extras/ooxmlexport/data/tdf155945.docx
new file mode 100644
index 0000000000..9858ac7117
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf155945.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf156372.doc b/sw/qa/extras/ooxmlexport/data/tdf156372.doc
new file mode 100644
index 0000000000..3b8ade19f8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf156372.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docx b/sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docx
new file mode 100644
index 0000000000..5ebb98fda0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf157011_ins_del_empty_cols.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docx b/sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docx
new file mode 100644
index 0000000000..f4e898cb05
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf157136_TwoContentControls.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf157572_defaultVAnchor.docx b/sw/qa/extras/ooxmlexport/data/tdf157572_defaultVAnchor.docx
new file mode 100644
index 0000000000..9f63950693
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf157572_defaultVAnchor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf157572_insidiousCombination.docx b/sw/qa/extras/ooxmlexport/data/tdf157572_insidiousCombination.docx
new file mode 100644
index 0000000000..d7437aedec
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf157572_insidiousCombination.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf157572_noVAlignAsText.docx b/sw/qa/extras/ooxmlexport/data/tdf157572_noVAlignAsText.docx
new file mode 100644
index 0000000000..98f1bb195c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf157572_noVAlignAsText.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf157598.docx b/sw/qa/extras/ooxmlexport/data/tdf157598.docx
new file mode 100644
index 0000000000..7a5a2b1599
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf157598.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf158044.odt b/sw/qa/extras/ooxmlexport/data/tdf158044.odt
new file mode 100755
index 0000000000..ca17b66256
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf158044.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf158436.docx b/sw/qa/extras/ooxmlexport/data/tdf158436.docx
new file mode 100644
index 0000000000..8cdcd21b4c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf158436.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docx b/sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docx
new file mode 100644
index 0000000000..70fdec72dd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf36117_verticalAdjustment.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docx b/sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docx
new file mode 100644
index 0000000000..d89baaf084
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf38778_properties_in_run_for_field.doc b/sw/qa/extras/ooxmlexport/data/tdf38778_properties_in_run_for_field.doc
new file mode 100644
index 0000000000..5f0f7238a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf38778_properties_in_run_for_field.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf41466_testVmlShapeWithTextbox.docx b/sw/qa/extras/ooxmlexport/data/tdf41466_testVmlShapeWithTextbox.docx
new file mode 100644
index 0000000000..2dfeb909cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf41466_testVmlShapeWithTextbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odt b/sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odt
new file mode 100644
index 0000000000..9585041de3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf41542_imagePadding.odt b/sw/qa/extras/ooxmlexport/data/tdf41542_imagePadding.odt
new file mode 100644
index 0000000000..019e19f247
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf41542_imagePadding.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf44278.docx b/sw/qa/extras/ooxmlexport/data/tdf44278.docx
new file mode 100644
index 0000000000..588416cdb0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf44278.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odt b/sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odt
new file mode 100644
index 0000000000..9db311db1f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf44832_section_new_header.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf44986.docx b/sw/qa/extras/ooxmlexport/data/tdf44986.docx
new file mode 100644
index 0000000000..7859ab4020
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf44986.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf46938_clearTabStop.docx b/sw/qa/extras/ooxmlexport/data/tdf46938_clearTabStop.docx
new file mode 100644
index 0000000000..8dea12fcb5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf46938_clearTabStop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf46940_dontEquallyDistributeColumns.docx b/sw/qa/extras/ooxmlexport/data/tdf46940_dontEquallyDistributeColumns.docx
new file mode 100644
index 0000000000..657da5eb09
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf46940_dontEquallyDistributeColumns.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf48569.odt b/sw/qa/extras/ooxmlexport/data/tdf48569.odt
new file mode 100644
index 0000000000..3ae5ac3939
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf48569.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf49073.docx b/sw/qa/extras/ooxmlexport/data/tdf49073.docx
new file mode 100644
index 0000000000..ddcbb62fbb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf49073.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf53856_conflictingStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf53856_conflictingStyle.docx
new file mode 100644
index 0000000000..71b925a9a3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf53856_conflictingStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf55427_footnote2endnote.odt b/sw/qa/extras/ooxmlexport/data/tdf55427_footnote2endnote.odt
new file mode 100644
index 0000000000..7f77f6d39e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf55427_footnote2endnote.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf57589_hashColor.docx b/sw/qa/extras/ooxmlexport/data/tdf57589_hashColor.docx
new file mode 100644
index 0000000000..d12b85b2da
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf57589_hashColor.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docx b/sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docx
new file mode 100644
index 0000000000..56e37362ad
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf59274.docx b/sw/qa/extras/ooxmlexport/data/tdf59274.docx
new file mode 100644
index 0000000000..38aad9ae91
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf59274.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf59699.docx b/sw/qa/extras/ooxmlexport/data/tdf59699.docx
new file mode 100644
index 0000000000..158ac338f8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf59699.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docx b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docx
new file mode 100644
index 0000000000..228b9b5478
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docx b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docx
new file mode 100644
index 0000000000..cf674f3c46
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf64264.docx b/sw/qa/extras/ooxmlexport/data/tdf64264.docx
new file mode 100644
index 0000000000..e2fea64dad
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf64264.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf64372_continuousBreaks.docx b/sw/qa/extras/ooxmlexport/data/tdf64372_continuousBreaks.docx
new file mode 100644
index 0000000000..20ad82bb51
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf64372_continuousBreaks.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf64531.docx b/sw/qa/extras/ooxmlexport/data/tdf64531.docx
new file mode 100644
index 0000000000..ae9d232ac9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf64531.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf65955.odt b/sw/qa/extras/ooxmlexport/data/tdf65955.odt
new file mode 100644
index 0000000000..e133938e03
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf65955.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf65955_2.odt b/sw/qa/extras/ooxmlexport/data/tdf65955_2.odt
new file mode 100644
index 0000000000..5ad9146dc2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf65955_2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf66039.docx b/sw/qa/extras/ooxmlexport/data/tdf66039.docx
new file mode 100644
index 0000000000..f17032b3f9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf66039.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf66398_permissions.docx b/sw/qa/extras/ooxmlexport/data/tdf66398_permissions.docx
new file mode 100644
index 0000000000..d5c8559948
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf66398_permissions.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf66401.docx b/sw/qa/extras/ooxmlexport/data/tdf66401.docx
new file mode 100644
index 0000000000..2e2ddca375
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf66401.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf66496.docx b/sw/qa/extras/ooxmlexport/data/tdf66496.docx
new file mode 100644
index 0000000000..6f168d38e8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf66496.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf67207.docx b/sw/qa/extras/ooxmlexport/data/tdf67207.docx
new file mode 100644
index 0000000000..b0604c2663
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf67207.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf70234.docx b/sw/qa/extras/ooxmlexport/data/tdf70234.docx
new file mode 100644
index 0000000000..33ef99430b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf70234.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf73499.docx b/sw/qa/extras/ooxmlexport/data/tdf73499.docx
new file mode 100644
index 0000000000..605c01e2b3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf73499.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf73547-dash.docx b/sw/qa/extras/ooxmlexport/data/tdf73547-dash.docx
new file mode 100644
index 0000000000..40e741ebb3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf73547-dash.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf76022_textboxWrap.odt b/sw/qa/extras/ooxmlexport/data/tdf76022_textboxWrap.odt
new file mode 100644
index 0000000000..b08fe002f3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf76022_textboxWrap.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf76683_negativeTwipsMeasure.docx b/sw/qa/extras/ooxmlexport/data/tdf76683_negativeTwipsMeasure.docx
new file mode 100644
index 0000000000..eb769fdcc3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf76683_negativeTwipsMeasure.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx b/sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx
new file mode 100644
index 0000000000..bcfdcf3774
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx b/sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx
new file mode 100644
index 0000000000..7de2b4c390
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx b/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx
new file mode 100644
index 0000000000..2bb2c09783
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf77417.docx b/sw/qa/extras/ooxmlexport/data/tdf77417.docx
new file mode 100644
index 0000000000..4b4fb20fee
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf77417.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf77796.docx b/sw/qa/extras/ooxmlexport/data/tdf77796.docx
new file mode 100644
index 0000000000..e42c37daa3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf77796.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf78352.docx b/sw/qa/extras/ooxmlexport/data/tdf78352.docx
new file mode 100644
index 0000000000..6f85f2e2ab
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf78352.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docx b/sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docx
new file mode 100644
index 0000000000..bc4759ecc3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf78657_picture_hyperlink.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf78749.docx b/sw/qa/extras/ooxmlexport/data/tdf78749.docx
new file mode 100644
index 0000000000..db498849e6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf78749.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf78902.docx b/sw/qa/extras/ooxmlexport/data/tdf78902.docx
new file mode 100644
index 0000000000..3cf3a443a9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf78902.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf79272_strictDxa.docx b/sw/qa/extras/ooxmlexport/data/tdf79272_strictDxa.docx
new file mode 100644
index 0000000000..4d5ea67bd8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf79272_strictDxa.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf79329.docx b/sw/qa/extras/ooxmlexport/data/tdf79329.docx
new file mode 100644
index 0000000000..142f29522d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf79329.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf79435_legacyInputFields.doc b/sw/qa/extras/ooxmlexport/data/tdf79435_legacyInputFields.doc
new file mode 100644
index 0000000000..da7fade809
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf79435_legacyInputFields.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docx b/sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docx
new file mode 100644
index 0000000000..abf5ee5ed2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf81100.docx b/sw/qa/extras/ooxmlexport/data/tdf81100.docx
new file mode 100644
index 0000000000..cd46100f05
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf81100.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf81345.docx b/sw/qa/extras/ooxmlexport/data/tdf81345.docx
new file mode 100644
index 0000000000..4f18b1eead
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf81345.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf81507.docx b/sw/qa/extras/ooxmlexport/data/tdf81507.docx
new file mode 100644
index 0000000000..2c00ee44cb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf81507.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf81567.odt b/sw/qa/extras/ooxmlexport/data/tdf81567.odt
new file mode 100644
index 0000000000..93e449754b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf81567.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx b/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx
new file mode 100644
index 0000000000..6cbdbdc97c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx
new file mode 100644
index 0000000000..d38a65943c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82173_endnoteStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82173_footnoteStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf82173_footnoteStyle.docx
new file mode 100644
index 0000000000..4fa7b0a24d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82173_footnoteStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docx b/sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docx
new file mode 100644
index 0000000000..e9df3b7048
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82175_noStyleInheritance.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docx
new file mode 100644
index 0000000000..f1f0d272d0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82177_insideCellBorders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82177_outsideCellBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf82177_outsideCellBorders.docx
new file mode 100644
index 0000000000..75c9a656da
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82177_outsideCellBorders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82177_tblBorders.docx b/sw/qa/extras/ooxmlexport/data/tdf82177_tblBorders.docx
new file mode 100644
index 0000000000..88a237cf69
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82177_tblBorders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf8255.docx b/sw/qa/extras/ooxmlexport/data/tdf8255.docx
new file mode 100644
index 0000000000..366e498856
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf8255.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf83227.docx b/sw/qa/extras/ooxmlexport/data/tdf83227.docx
new file mode 100644
index 0000000000..bca19a955e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf83227.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf83300.docx b/sw/qa/extras/ooxmlexport/data/tdf83300.docx
new file mode 100644
index 0000000000..aa3ad22d10
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf83300.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf83309.docx b/sw/qa/extras/ooxmlexport/data/tdf83309.docx
new file mode 100644
index 0000000000..184018bb56
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf83309.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf84678.docx b/sw/qa/extras/ooxmlexport/data/tdf84678.docx
new file mode 100644
index 0000000000..f79922861c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf84678.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf85161.docx b/sw/qa/extras/ooxmlexport/data/tdf85161.docx
new file mode 100644
index 0000000000..e079b49066
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf85161.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf86374.docx b/sw/qa/extras/ooxmlexport/data/tdf86374.docx
new file mode 100644
index 0000000000..7fd772d79b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf86374.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx b/sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx
new file mode 100644
index 0000000000..a4392dcf28
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf86926_A3.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf87348_linkedTextboxes.docx b/sw/qa/extras/ooxmlexport/data/tdf87348_linkedTextboxes.docx
new file mode 100644
index 0000000000..8f9eb97d83
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf87348_linkedTextboxes.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf87460.docx b/sw/qa/extras/ooxmlexport/data/tdf87460.docx
new file mode 100644
index 0000000000..c443dbe456
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf87460.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf87569_drawingml.docx b/sw/qa/extras/ooxmlexport/data/tdf87569_drawingml.docx
new file mode 100644
index 0000000000..7f00a46e2c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf87569_drawingml.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf87569_vml.docx b/sw/qa/extras/ooxmlexport/data/tdf87569_vml.docx
new file mode 100644
index 0000000000..0223ad71d4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf87569_vml.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf87924.docx b/sw/qa/extras/ooxmlexport/data/tdf87924.docx
new file mode 100644
index 0000000000..5265d6638a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf87924.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf88496.docx b/sw/qa/extras/ooxmlexport/data/tdf88496.docx
new file mode 100644
index 0000000000..b34f30389e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf88496.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf88583.odt b/sw/qa/extras/ooxmlexport/data/tdf88583.odt
new file mode 100644
index 0000000000..307ab1e780
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf88583.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89165.docx b/sw/qa/extras/ooxmlexport/data/tdf89165.docx
new file mode 100644
index 0000000000..a060ca444e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89165.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89377_tableWithBreakBeforeParaStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf89377_tableWithBreakBeforeParaStyle.docx
new file mode 100644
index 0000000000..bf673e86e7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89377_tableWithBreakBeforeParaStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89702.docx b/sw/qa/extras/ooxmlexport/data/tdf89702.docx
new file mode 100644
index 0000000000..5542d1cbe5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89702.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89774.fodt b/sw/qa/extras/ooxmlexport/data/tdf89774.fodt
new file mode 100644
index 0000000000..18e1e7ac49
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89774.fodt
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta>
+ <meta:editing-duration>PT1M5S</meta:editing-duration>
+ </office:meta>
+ <office:body>
+ <office:text>
+ <text:p>hello</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89791.docx b/sw/qa/extras/ooxmlexport/data/tdf89791.docx
new file mode 100644
index 0000000000..7ea98aa581
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89791.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89890.docx b/sw/qa/extras/ooxmlexport/data/tdf89890.docx
new file mode 100644
index 0000000000..8b3e8ebe18
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89890.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89991.docx b/sw/qa/extras/ooxmlexport/data/tdf89991.docx
new file mode 100644
index 0000000000..a074d9679a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf89991.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90153.docx b/sw/qa/extras/ooxmlexport/data/tdf90153.docx
new file mode 100644
index 0000000000..decbfa29d3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90153.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90611.docx b/sw/qa/extras/ooxmlexport/data/tdf90611.docx
new file mode 100644
index 0000000000..ac54feedd0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90611.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90681-1.odt b/sw/qa/extras/ooxmlexport/data/tdf90681-1.odt
new file mode 100644
index 0000000000..009e006caf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90681-1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90681-2.odt b/sw/qa/extras/ooxmlexport/data/tdf90681-2.odt
new file mode 100644
index 0000000000..3d9d46fc4a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90681-2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90697_complexBreaksHeaders.docx b/sw/qa/extras/ooxmlexport/data/tdf90697_complexBreaksHeaders.docx
new file mode 100644
index 0000000000..b5e7ef0234
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90697_complexBreaksHeaders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx b/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx
new file mode 100644
index 0000000000..2f831d722b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90789.docx b/sw/qa/extras/ooxmlexport/data/tdf90789.docx
new file mode 100644
index 0000000000..b94b2ad7f7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90789.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90810short.docx b/sw/qa/extras/ooxmlexport/data/tdf90810short.docx
new file mode 100644
index 0000000000..85b6369fbf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90810short.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90906_colAuto.docx b/sw/qa/extras/ooxmlexport/data/tdf90906_colAuto.docx
new file mode 100644
index 0000000000..3df6b65c8a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90906_colAuto.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90906_colAutoB.docx b/sw/qa/extras/ooxmlexport/data/tdf90906_colAutoB.docx
new file mode 100644
index 0000000000..84825201b0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf90906_colAutoB.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf91122.docx b/sw/qa/extras/ooxmlexport/data/tdf91122.docx
new file mode 100644
index 0000000000..c7a45e4dd9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf91122.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf91260.docx b/sw/qa/extras/ooxmlexport/data/tdf91260.docx
new file mode 100644
index 0000000000..4888f498dd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf91260.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf91261.docx b/sw/qa/extras/ooxmlexport/data/tdf91261.docx
new file mode 100644
index 0000000000..6edb8b8755
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf91261.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf91417.docx b/sw/qa/extras/ooxmlexport/data/tdf91417.docx
new file mode 100644
index 0000000000..1427f8cb3a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf91417.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf91429.docx b/sw/qa/extras/ooxmlexport/data/tdf91429.docx
new file mode 100644
index 0000000000..5fc5f533a8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf91429.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf91594.docx b/sw/qa/extras/ooxmlexport/data/tdf91594.docx
new file mode 100644
index 0000000000..ea539afa3a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf91594.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92045.docx b/sw/qa/extras/ooxmlexport/data/tdf92045.docx
new file mode 100644
index 0000000000..d41f523c79
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92045.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92124.docx b/sw/qa/extras/ooxmlexport/data/tdf92124.docx
new file mode 100644
index 0000000000..2999311930
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92124.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92157.docx b/sw/qa/extras/ooxmlexport/data/tdf92157.docx
new file mode 100644
index 0000000000..ba5bc2a8f5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92157.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92335.docx b/sw/qa/extras/ooxmlexport/data/tdf92335.docx
new file mode 100644
index 0000000000..28cf521c2a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92335.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92454.docx b/sw/qa/extras/ooxmlexport/data/tdf92454.docx
new file mode 100644
index 0000000000..70426685e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92454.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docx b/sw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docx
new file mode 100644
index 0000000000..b8746968b4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92470_footnoteRestart.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92472.docx b/sw/qa/extras/ooxmlexport/data/tdf92472.docx
new file mode 100644
index 0000000000..6cf2b50e91
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92472.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92521.odt b/sw/qa/extras/ooxmlexport/data/tdf92521.odt
new file mode 100644
index 0000000000..8148e49a22
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92521.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92524_autoColor.doc b/sw/qa/extras/ooxmlexport/data/tdf92524_autoColor.doc
new file mode 100644
index 0000000000..147e9c133b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92524_autoColor.doc
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92526_ShapeLineWidth.odt b/sw/qa/extras/ooxmlexport/data/tdf92526_ShapeLineWidth.odt
new file mode 100644
index 0000000000..fffd9b9b20
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92526_ShapeLineWidth.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex.docx b/sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex.docx
new file mode 100644
index 0000000000..808d05697b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex2.docx b/sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex2.docx
new file mode 100644
index 0000000000..18b63c07c4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92724_continuousBreaksComplex2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf93676-1.odt b/sw/qa/extras/ooxmlexport/data/tdf93676-1.odt
new file mode 100644
index 0000000000..37d621b903
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf93676-1.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf93919.docx b/sw/qa/extras/ooxmlexport/data/tdf93919.docx
new file mode 100644
index 0000000000..c7454690c8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf93919.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf94043.docx b/sw/qa/extras/ooxmlexport/data/tdf94043.docx
new file mode 100644
index 0000000000..fa47be0760
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf94043.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf94374.docx b/sw/qa/extras/ooxmlexport/data/tdf94374.docx
new file mode 100644
index 0000000000..d5d8d43ebd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf94374.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf94628.docx b/sw/qa/extras/ooxmlexport/data/tdf94628.docx
new file mode 100644
index 0000000000..aa1d226841
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf94628.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf94801.docx b/sw/qa/extras/ooxmlexport/data/tdf94801.docx
new file mode 100644
index 0000000000..bdbd3f5e54
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf94801.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95031.docx b/sw/qa/extras/ooxmlexport/data/tdf95031.docx
new file mode 100644
index 0000000000..ef082f7520
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95031.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95033.docx b/sw/qa/extras/ooxmlexport/data/tdf95033.docx
new file mode 100644
index 0000000000..5d2cc73db9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95033.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95189.docx b/sw/qa/extras/ooxmlexport/data/tdf95189.docx
new file mode 100644
index 0000000000..456276b20d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95189.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95213.docx b/sw/qa/extras/ooxmlexport/data/tdf95213.docx
new file mode 100644
index 0000000000..831d543b90
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95213.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95367_inheritFollowStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf95367_inheritFollowStyle.docx
new file mode 100644
index 0000000000..96d91ddcaf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95367_inheritFollowStyle.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95374.docx b/sw/qa/extras/ooxmlexport/data/tdf95374.docx
new file mode 100644
index 0000000000..49599953a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95374.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95376.docx b/sw/qa/extras/ooxmlexport/data/tdf95376.docx
new file mode 100644
index 0000000000..9bd2d05b2e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95376.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95377.docx b/sw/qa/extras/ooxmlexport/data/tdf95377.docx
new file mode 100644
index 0000000000..be5551dca2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95377.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95495.docx b/sw/qa/extras/ooxmlexport/data/tdf95495.docx
new file mode 100644
index 0000000000..21f534b112
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95495.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95775.docx b/sw/qa/extras/ooxmlexport/data/tdf95775.docx
new file mode 100644
index 0000000000..a4c1293a56
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95775.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95777.docx b/sw/qa/extras/ooxmlexport/data/tdf95777.docx
new file mode 100644
index 0000000000..e71fdea609
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95777.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95848.docx b/sw/qa/extras/ooxmlexport/data/tdf95848.docx
new file mode 100644
index 0000000000..3bf17f6928
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95848.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95848_2.docx b/sw/qa/extras/ooxmlexport/data/tdf95848_2.docx
new file mode 100644
index 0000000000..33c1773d5f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf95848_2.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf96750_landscapeFollow.docx b/sw/qa/extras/ooxmlexport/data/tdf96750_landscapeFollow.docx
new file mode 100644
index 0000000000..612078b26b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf96750_landscapeFollow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97090.docx b/sw/qa/extras/ooxmlexport/data/tdf97090.docx
new file mode 100644
index 0000000000..3ba402718e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf97090.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97371.docx b/sw/qa/extras/ooxmlexport/data/tdf97371.docx
new file mode 100644
index 0000000000..87e67ddf87
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf97371.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97517_testVmlLineShapeMirroredX.docx b/sw/qa/extras/ooxmlexport/data/tdf97517_testVmlLineShapeMirroredX.docx
new file mode 100644
index 0000000000..75e9d8573b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf97517_testVmlLineShapeMirroredX.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docx b/sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docx
new file mode 100644
index 0000000000..eb31a1244c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf97618_testVmlShapeTextWordWrap.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97648_relativeWidth.docx b/sw/qa/extras/ooxmlexport/data/tdf97648_relativeWidth.docx
new file mode 100644
index 0000000000..686fd6803a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf97648_relativeWidth.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odt b/sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odt
new file mode 100644
index 0000000000..95f65e919f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odt b/sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odt
new file mode 100644
index 0000000000..ae675b82ff
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf98700_keepWithNext.odt b/sw/qa/extras/ooxmlexport/data/tdf98700_keepWithNext.odt
new file mode 100644
index 0000000000..4ed96da554
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf98700_keepWithNext.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99074.docx b/sw/qa/extras/ooxmlexport/data/tdf99074.docx
new file mode 100644
index 0000000000..d7be418fb1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99074.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99090_pgbrkAfterTable.docx b/sw/qa/extras/ooxmlexport/data/tdf99090_pgbrkAfterTable.docx
new file mode 100644
index 0000000000..c914f350ea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99090_pgbrkAfterTable.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99140.docx b/sw/qa/extras/ooxmlexport/data/tdf99140.docx
new file mode 100644
index 0000000000..42fa73d2f8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99140.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99227.docx b/sw/qa/extras/ooxmlexport/data/tdf99227.docx
new file mode 100644
index 0000000000..27ec4eb383
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99227.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript.docx b/sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript.docx
new file mode 100644
index 0000000000..a88c122eeb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript2.odt b/sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript2.odt
new file mode 100644
index 0000000000..a82c815646
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99602_charStyleSubscript2.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99602_subscript_charStyleSize.docx b/sw/qa/extras/ooxmlexport/data/tdf99602_subscript_charStyleSize.docx
new file mode 100644
index 0000000000..6283b8de73
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99602_subscript_charStyleSize.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docx b/sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docx
new file mode 100644
index 0000000000..825108a3cb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99616_hidemarkb.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99631.docx b/sw/qa/extras/ooxmlexport/data/tdf99631.docx
new file mode 100644
index 0000000000..c72950b724
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99631.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odt b/sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odt
new file mode 100644
index 0000000000..20e60f6cef
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf99810-lost-arrow.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test76108.docx b/sw/qa/extras/ooxmlexport/data/test76108.docx
new file mode 100644
index 0000000000..3476dc58cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test76108.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test76317.docx b/sw/qa/extras/ooxmlexport/data/test76317.docx
new file mode 100644
index 0000000000..2c86cdc384
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test76317.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test76317_2K10.docx b/sw/qa/extras/ooxmlexport/data/test76317_2K10.docx
new file mode 100644
index 0000000000..5532063408
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test76317_2K10.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test76734_2K7.docx b/sw/qa/extras/ooxmlexport/data/test76734_2K7.docx
new file mode 100644
index 0000000000..5e0e114a5d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test76734_2K7.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test77219.docx b/sw/qa/extras/ooxmlexport/data/test77219.docx
new file mode 100644
index 0000000000..29aca1bebb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test77219.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testCrashWhileSave.docx b/sw/qa/extras/ooxmlexport/data/testCrashWhileSave.docx
new file mode 100644
index 0000000000..2059951711
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testCrashWhileSave.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testCustomShapePresetExport.odt b/sw/qa/extras/ooxmlexport/data/testCustomShapePresetExport.odt
new file mode 100644
index 0000000000..4f132e7604
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testCustomShapePresetExport.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testFootnote.docx b/sw/qa/extras/ooxmlexport/data/testFootnote.docx
new file mode 100644
index 0000000000..5bba6d8c95
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testFootnote.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testGlossary.docx b/sw/qa/extras/ooxmlexport/data/testGlossary.docx
new file mode 100644
index 0000000000..eb05758d2e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testGlossary.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testOuterShdw.docx b/sw/qa/extras/ooxmlexport/data/testOuterShdw.docx
new file mode 100644
index 0000000000..cc559a323c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testOuterShdw.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testPageref.docx b/sw/qa/extras/ooxmlexport/data/testPageref.docx
new file mode 100644
index 0000000000..65ca38aedd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testPageref.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testParaListRightIndent.docx b/sw/qa/extras/ooxmlexport/data/testParaListRightIndent.docx
new file mode 100644
index 0000000000..975b598f47
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testParaListRightIndent.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testPgMargin.docx b/sw/qa/extras/ooxmlexport/data/testPgMargin.docx
new file mode 100644
index 0000000000..aa54f6ad70
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testPgMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTOCFlag_u.docx b/sw/qa/extras/ooxmlexport/data/testTOCFlag_u.docx
new file mode 100644
index 0000000000..077bccfef8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTOCFlag_u.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTcBorders.docx b/sw/qa/extras/ooxmlexport/data/testTcBorders.docx
new file mode 100644
index 0000000000..b7fb81ad4c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTcBorders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTdf130167_spilloverHeader.docx b/sw/qa/extras/ooxmlexport/data/testTdf130167_spilloverHeader.docx
new file mode 100644
index 0000000000..6bcafa285f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTdf130167_spilloverHeader.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTextBoxZOrder.docx b/sw/qa/extras/ooxmlexport/data/testTextBoxZOrder.docx
new file mode 100644
index 0000000000..c6dd0b8f30
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTextBoxZOrder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTitlePage.docx b/sw/qa/extras/ooxmlexport/data/testTitlePage.docx
new file mode 100644
index 0000000000..72bfdf81f8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTitlePage.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedEmptyParagraph.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedEmptyParagraph.docx
new file mode 100644
index 0000000000..bd332efa4c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedEmptyParagraph.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedParagraphMark.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedParagraphMark.docx
new file mode 100644
index 0000000000..5d85f326d3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedParagraphMark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docx
new file mode 100644
index 0000000000..c4d8394bf1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableRow.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableRow.docx
new file mode 100644
index 0000000000..71c4998786
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableRow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesEmptyParagraphsInADeletion.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesEmptyParagraphsInADeletion.docx
new file mode 100644
index 0000000000..fcd78e9cd1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesEmptyParagraphsInADeletion.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedParagraphMark.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedParagraphMark.docx
new file mode 100644
index 0000000000..33b4516137
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedParagraphMark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docx
new file mode 100644
index 0000000000..d1450be673
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableRow.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableRow.docx
new file mode 100644
index 0000000000..a7c0f56ed6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableRow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesParagraphProperties.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesParagraphProperties.docx
new file mode 100644
index 0000000000..4a8585c1d0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testTrackChangesParagraphProperties.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testWPGZOrder.docx b/sw/qa/extras/ooxmlexport/data/testWPGZOrder.docx
new file mode 100644
index 0000000000..664f47a0b6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testWPGZOrder.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testWPGtextboxes.docx b/sw/qa/extras/ooxmlexport/data/testWPGtextboxes.docx
new file mode 100644
index 0000000000..eb7486f2a3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testWPGtextboxes.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/testWordArtWithinDraingtool.docx b/sw/qa/extras/ooxmlexport/data/testWordArtWithinDraingtool.docx
new file mode 100644
index 0000000000..c860828fa8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/testWordArtWithinDraingtool.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_GIF_ImageCrop.docx b/sw/qa/extras/ooxmlexport/data/test_GIF_ImageCrop.docx
new file mode 100644
index 0000000000..8fe7ff2225
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_GIF_ImageCrop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_PNG_ImageCrop.docx b/sw/qa/extras/ooxmlexport/data/test_PNG_ImageCrop.docx
new file mode 100644
index 0000000000..7fda32144d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_PNG_ImageCrop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_extra_image.docx b/sw/qa/extras/ooxmlexport/data/test_extra_image.docx
new file mode 100644
index 0000000000..cdb05afa44
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_extra_image.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_indentation.docx b/sw/qa/extras/ooxmlexport/data/test_indentation.docx
new file mode 100644
index 0000000000..b39e066584
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_indentation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_line_spacing.docx b/sw/qa/extras/ooxmlexport/data/test_line_spacing.docx
new file mode 100644
index 0000000000..2f92afbb70
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_line_spacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_msword_hang.docx b/sw/qa/extras/ooxmlexport/data/test_msword_hang.docx
new file mode 100644
index 0000000000..cae7814f98
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_msword_hang.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_ole_object.docx b/sw/qa/extras/ooxmlexport/data/test_ole_object.docx
new file mode 100644
index 0000000000..4391946f08
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_ole_object.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docx b/sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docx
new file mode 100644
index 0000000000..3ff04cb60b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx b/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx
new file mode 100644
index 0000000000..1c364dd0de
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx b/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx
new file mode 100644
index 0000000000..6ce527842c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textWatermark.docx b/sw/qa/extras/ooxmlexport/data/textWatermark.docx
new file mode 100644
index 0000000000..c8bff75e02
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textWatermark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/text_cardinal_list.docx b/sw/qa/extras/ooxmlexport/data/text_cardinal_list.docx
new file mode 100644
index 0000000000..9a1efd7c69
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/text_cardinal_list.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/text_number_list.docx b/sw/qa/extras/ooxmlexport/data/text_number_list.docx
new file mode 100644
index 0000000000..674c4e797c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/text_number_list.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/text_ordinal_list.docx b/sw/qa/extras/ooxmlexport/data/text_ordinal_list.docx
new file mode 100644
index 0000000000..bb5b4f520e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/text_ordinal_list.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textbox-right-edge.docx b/sw/qa/extras/ooxmlexport/data/textbox-right-edge.docx
new file mode 100644
index 0000000000..990d1e49ea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textbox-right-edge.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textbox-rounded-corners.docx b/sw/qa/extras/ooxmlexport/data/textbox-rounded-corners.docx
new file mode 100644
index 0000000000..012e071cd1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textbox-rounded-corners.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textbox-table.docx b/sw/qa/extras/ooxmlexport/data/textbox-table.docx
new file mode 100644
index 0000000000..8c06f5eeb0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textbox-table.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textbox-wpg-only.docx b/sw/qa/extras/ooxmlexport/data/textbox-wpg-only.docx
new file mode 100644
index 0000000000..cd853f97d5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textbox-wpg-only.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textbox_picturefill.docx b/sw/qa/extras/ooxmlexport/data/textbox_picturefill.docx
new file mode 100644
index 0000000000..f4fab1b1fe
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textbox_picturefill.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textframe-borders.docx b/sw/qa/extras/ooxmlexport/data/textframe-borders.docx
new file mode 100644
index 0000000000..424ed2a32c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textframe-borders.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx
new file mode 100644
index 0000000000..edbfe53b16
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textframes.odt b/sw/qa/extras/ooxmlexport/data/textframes.odt
new file mode 100644
index 0000000000..301744af3e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textframes.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textinput.odt b/sw/qa/extras/ooxmlexport/data/textinput.odt
new file mode 100644
index 0000000000..3a5da684a0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/textinput.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/theme-preservation.docx b/sw/qa/extras/ooxmlexport/data/theme-preservation.docx
new file mode 100644
index 0000000000..2de4374da5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/theme-preservation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/toc_doc.docx b/sw/qa/extras/ooxmlexport/data/toc_doc.docx
new file mode 100644
index 0000000000..26fa3dc715
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/toc_doc.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tools-line-numbering.docx b/sw/qa/extras/ooxmlexport/data/tools-line-numbering.docx
new file mode 100644
index 0000000000..8fb2668b32
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tools-line-numbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/toxmarkhyperlink.fodt b/sw/qa/extras/ooxmlexport/data/toxmarkhyperlink.fodt
new file mode 100644
index 0000000000..b1323f6f41
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/toxmarkhyperlink.fodt
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Normal" svg:font-family="&apos;Source Han Sans CN Normal&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Normal" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Internet_20_link" style:display-name="Internet link" style:family="text">
+ <style:text-properties fo:color="#000080" fo:language="zxx" fo:country="none" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
+ </style:style>
+
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="001000a5" officeooo:paragraph-rsid="001000a5"/>
+ </style:style>
+ <style:style style:name="Ru1" style:family="ruby">
+ <style:ruby-properties style:ruby-align="left" style:ruby-position="above"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/></text:p>
+ <text:p text:style-name="P1"><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/><text:alphabetical-index-mark text:string-value="foo" text:key1="baz"/><text:alphabetical-index-mark text:string-value="foo" text:key1="quux"/></text:p>
+ <text:p text:style-name="P1"><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link"><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/>foo</text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo<text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/></text:a></text:p>
+ <text:p text:style-name="P1"><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/><text:alphabetical-index-mark text:string-value="foo" text:key1="baz"/><text:alphabetical-index-mark text:string-value="foo" text:key1="quux"/><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/><text:alphabetical-index-mark text:string-value="foo" text:key1="baz"/><text:alphabetical-index-mark text:string-value="foo" text:key1="quux"/></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link"><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/><text:alphabetical-index-mark text:string-value="foo" text:key1="baz"/><text:alphabetical-index-mark text:string-value="foo" text:key1="quux"/>foo</text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo<text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/><text:alphabetical-index-mark text:string-value="foo" text:key1="baz"/><text:alphabetical-index-mark text:string-value="foo" text:key1="quux"/></text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:alphabetical-index-mark text:string-value="foo" text:key1="bar"/><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">bar</text:a></text:p>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a><text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link"><text:bibliography-mark text:identifier="fuh" text:bibliography-type="www" text:author="FB" text:title="foobar" text:url="http://example.com/">[fuh]</text:bibliography-mark></text:a></text:p>
+
+ <!--
+<text:a xlink:type="simple" xlink:href="http://example.com/" text:style-name="Internet_20_link" text:visited-style-name="Visited_20_Internet_20_Link">foo</text:a>
+ -->
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/transparent-shadow.docx b/sw/qa/extras/ooxmlexport/data/transparent-shadow.docx
new file mode 100644
index 0000000000..267eb1a863
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/transparent-shadow.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tscp.docx b/sw/qa/extras/ooxmlexport/data/tscp.docx
new file mode 100644
index 0000000000..bbb32b178b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tscp.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/unbalanced-columns.docx b/sw/qa/extras/ooxmlexport/data/unbalanced-columns.docx
new file mode 100644
index 0000000000..da6f93f760
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/unbalanced-columns.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/unwanted-section-break.docx b/sw/qa/extras/ooxmlexport/data/unwanted-section-break.docx
new file mode 100644
index 0000000000..a8565742f5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/unwanted-section-break.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/vml-text-vertical-adjust.docx b/sw/qa/extras/ooxmlexport/data/vml-text-vertical-adjust.docx
new file mode 100644
index 0000000000..1b05dbd6ed
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/vml-text-vertical-adjust.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/watermark-font.docx b/sw/qa/extras/ooxmlexport/data/watermark-font.docx
new file mode 100644
index 0000000000..5a09dc9f78
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/watermark-font.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/watermark-shapetype.docx b/sw/qa/extras/ooxmlexport/data/watermark-shapetype.docx
new file mode 100644
index 0000000000..423f3cf718
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/watermark-shapetype.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/watermark.docx b/sw/qa/extras/ooxmlexport/data/watermark.docx
new file mode 100644
index 0000000000..98c305af8c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/watermark.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/wpg-nested.docx b/sw/qa/extras/ooxmlexport/data/wpg-nested.docx
new file mode 100644
index 0000000000..eba2aad0e7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/wpg-nested.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/wpg-only.docx b/sw/qa/extras/ooxmlexport/data/wpg-only.docx
new file mode 100644
index 0000000000..7c86361f9d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/wpg-only.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/wps-char-color.docx b/sw/qa/extras/ooxmlexport/data/wps-char-color.docx
new file mode 100644
index 0000000000..a027e92be1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/wps-char-color.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/wps-only.docx b/sw/qa/extras/ooxmlexport/data/wps-only.docx
new file mode 100644
index 0000000000..7f7b8c75bc
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/wps-only.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/wrap-tight-through.docx b/sw/qa/extras/ooxmlexport/data/wrap-tight-through.docx
new file mode 100644
index 0000000000..1ea9e14788
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/wrap-tight-through.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/zoom.docx b/sw/qa/extras/ooxmlexport/data/zoom.docx
new file mode 100644
index 0000000000..ce93a1a9bb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/zoom.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx b/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx
new file mode 100644
index 0000000000..a0ffe87d00
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+#include <o3tl/string_view.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
+#include <docmodel/color/ComplexColor.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text")
+ {
+ }
+};
+
+DECLARE_SW_ROUNDTRIP_TEST(testThemePortionLevelCharColor_ODF,
+ "Test_ThemePortionLevel_CharColor.fodt", nullptr, Test)
+{
+ auto xParagraph = getParagraph(1);
+ CPPUNIT_ASSERT(xParagraph.is());
+ auto xComplexColor = getProperty<uno::Reference<util::XComplexColor>>(getRun(xParagraph, 1),
+ "CharComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent2, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), rTransforms[0].mnValue);
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testThemePortionLevelCharColor_DOCX,
+ "Test_ThemePortionLevel_CharColor.docx", nullptr, Test)
+{
+ auto xParagraph = getParagraph(1);
+ CPPUNIT_ASSERT(xParagraph.is());
+ auto xComplexColor = getProperty<uno::Reference<util::XComplexColor>>(getRun(xParagraph, 1),
+ "CharComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent2, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), rTransforms[0].mnValue);
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testThemePortionBorderColor_DOCX, "Test_ThemeBorderColor.docx", nullptr,
+ Test)
+{
+ auto xParagraph = getParagraph(1);
+ CPPUNIT_ASSERT(xParagraph.is());
+ {
+ auto xComplexColor
+ = getProperty<uno::Reference<util::XComplexColor>>(xParagraph, "TopBorderComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent2, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), rTransforms[0].mnValue);
+ }
+ {
+ auto xComplexColor = getProperty<uno::Reference<util::XComplexColor>>(
+ xParagraph, "BottomBorderComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent4, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), rTransforms[0].mnValue);
+ }
+
+ CPPUNIT_ASSERT(isPropertyVoid(xParagraph, "LeftBorderComplexColor"));
+ CPPUNIT_ASSERT(isPropertyVoid(xParagraph, "RightBorderComplexColor"));
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testCharUnderlineTheme_DOCX, "Test_CharUnderlineThemeColor.docx", nullptr,
+ Test)
+{
+ auto xParagraph = getParagraph(1);
+ CPPUNIT_ASSERT(xParagraph.is());
+ auto xRun = getRun(xParagraph, 1);
+ auto xComplexColor
+ = getProperty<uno::Reference<util::XComplexColor>>(xRun, "CharUnderlineComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Shade, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2509), rTransforms[0].mnValue);
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testParaBackgroundTheme_DOCX, "Test_ThemeTextParaBackgroundColor.docx",
+ nullptr, Test)
+{
+ {
+ auto xParagraph = getParagraph(1);
+ CPPUNIT_ASSERT(xParagraph.is());
+ auto xComplexColor = getProperty<uno::Reference<util::XComplexColor>>(
+ xParagraph, "ParaBackgroundComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent3, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(8000), rTransforms[0].mnValue);
+ }
+
+ {
+ auto xParagraph = getParagraph(2);
+ CPPUNIT_ASSERT(xParagraph.is());
+ auto xComplexColor = getProperty<uno::Reference<util::XComplexColor>>(
+ xParagraph, "ParaBackgroundComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent6, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(8000), rTransforms[0].mnValue);
+ }
+
+ {
+ auto xParagraph = getParagraph(3);
+ CPPUNIT_ASSERT(xParagraph.is());
+ auto xComplexColor = getProperty<uno::Reference<util::XComplexColor>>(
+ xParagraph, "ParaBackgroundComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent3, aComplexColor.getThemeColorType());
+ auto const& rTransforms = aComplexColor.getTransformations();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rTransforms.size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTransforms[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(8000), rTransforms[0].mnValue);
+ }
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
new file mode 100644
index 0000000000..1c15b6efa3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+#include <o3tl/string_view.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text")
+ {
+ }
+};
+
+DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2007, "Encrypted_MSO2007_abc.docx", "abc", Test)
+{
+ // Standard encryption format, AES 128, SHA1
+ uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("abc"), xParagraph->getString());
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2010, "Encrypted_MSO2010_abc.docx", "abc", Test)
+{
+ // Agile encryption format, AES 128, CBC, SHA1
+ uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("abc"), xParagraph->getString());
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2013, "Encrypted_MSO2013_abc.docx", "abc", Test)
+{
+ // Agile encryption format, AES 256, CBC, SHA512
+ uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("ABC"), xParagraph->getString());
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testPasswordLOStandard, "Encrypted_LO_Standard_abc.docx", "abc", Test)
+{
+ // Standard encryption format, AES 128, SHA1
+ uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("ABC"), xParagraph->getString());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
new file mode 100644
index 0000000000..6293b6c44d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -0,0 +1,982 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/style/BreakType.hpp>
+#include <com/sun/star/text/FontEmphasis.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/TableColumnSeparator.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+
+#include <o3tl/cppunittraitshelper.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/processfactory.hxx>
+#include <tools/UnitConversion.hxx>
+#include <frameformats.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo81381)
+{
+ loadAndSave("fdo81381.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:object[1]/o:OLEObject[1]"_ostr, "DrawAspect"_ostr, "Icon");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtAlias)
+{
+ loadAndSave("sdt-alias.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // <w:alias> was completely missing.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:alias"_ostr, "val"_ostr, "Subtitle");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFooterBodyDistance)
+{
+ loadAndSave("footer-body-distance.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Page break was exported as section break, this was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testfdo81031, "fdo81031.docx")
+{
+ // vml image was not rendered
+ // As there are also numPicBullets in the file,
+ // the fragmentPath was not changed hence relationships were not resolved.
+
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> xImage(image, uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
+ uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(381), xBitmap->getSize().Width );
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(148), xBitmap->getSize().Height );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPlausableBorder)
+{
+ loadAndSave("plausable-border.docx");
+ // sw::util::IsPlausableSingleWordSection() did not merge two page styles due to borders.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Page break was exported as section break, this was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br"_ostr, 1);
+
+ CPPUNIT_ASSERT_EQUAL( 2, getPages() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testUnwantedSectionBreak)
+{
+ loadAndSave("unwanted-section-break.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 2: an additional sectPr was added to the document.
+ assertXPath(pXmlDoc, "//w:sectPr"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo80897 )
+{
+ loadAndSave("fdo80897.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr/a:prstTxWarp"_ostr, "prst"_ostr, "textTriangle");
+}
+
+
+DECLARE_OOXMLEXPORT_TEST(testFdo80997, "fdo80997.docx")
+{
+ // The problem was that the DOCX exporter not able to export text behind textbox, if textbox has a wrap property.
+ uno::Reference< text::XTextRange > xParagraph = getParagraph( 1 );
+ getRun( xParagraph, 1, " text");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo80902)
+{
+ loadAndSave("fdo80902.docx");
+ // The problem was that the docGrid type was set as default so fix it for other grid type
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:docGrid"_ostr, "type"_ostr, "lines");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParaShading)
+{
+ loadAndSave("para-shading.docx");
+ // Make sure the themeColor attribute is not written when it would be empty.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:shd"_ostr, "themeColor"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO83044)
+{
+ loadAndSave("fdo83044.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:text"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testfdo83428, "fdo83428.docx")
+{
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xProps(xDocumentPropertiesSupplier->getDocumentProperties());
+ uno::Reference<beans::XPropertySet> xUDProps(xProps->getUserDefinedProperties(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Document"), getProperty<OUString>(xUDProps, "Testing"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testShapeInFloattable)
+{
+ loadAndSave("shape-in-floattable.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // No nested drawingML w:txbxContent.
+ assertXPath(pXmlDoc, "//mc:Choice//w:txbxContent//w:txbxContent"_ostr, 0);
+ // Instead, make sure we have a separate shape and a table
+ assertXPath(pXmlDoc, "//mc:AlternateContent//mc:Choice[@Requires='wpg']"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testEmptyAnnotationMark)
+{
+ loadAndReload("empty-annotation-mark.docx");
+ // Delete the word that is commented, and save again.
+ uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 3);
+ CPPUNIT_ASSERT_EQUAL(OUString("with"), xRun->getString());
+ xRun->setString("");
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ xStorable->store();
+
+ // Then inspect the OOXML markup of the modified document model.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // There were two commentReference nodes.
+ assertXPath(pXmlDoc, "//w:commentReference"_ostr, "id"_ostr, "0");
+ // Empty comment range was not ignored on export, this was 1.
+ assertXPath(pXmlDoc, "//w:commentRangeStart"_ostr, 0);
+ // Ditto.
+ assertXPath(pXmlDoc, "//w:commentRangeEnd"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDropdownInCell, "dropdown-in-cell.docx")
+{
+ // First problem: table was missing from the document, this was 0.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // Second problem: dropdown shape wasn't anchored inside the B1 cell.
+ if (getShapes() > 0)
+ {
+ uno::Reference<text::XTextContent> xShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xAnchor = xShape->getAnchor();
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("B1"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRangeCompare> xTextRangeCompare(xCell, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextRangeCompare->compareRegionStarts(xAnchor, xCell));
+ }
+ else if (!isExported())
+ {
+ // ComboBox was imported as DropDown text field
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Any aField = xFields->nextElement();
+ uno::Reference<lang::XServiceInfo> xServiceInfo(aField, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown"));
+ }
+ else
+ {
+ // DropDown text field is exported as inline SDT, we import that back here.
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("B1");
+ uno::Reference<container::XEnumerationAccess> xParagraphsAccess(xCell, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParagraphs = xParagraphsAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphs->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
+ uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValues> aListItems;
+ xContentControlProps->getPropertyValue("ListItems") >>= aListItems;
+ CPPUNIT_ASSERT(aListItems.hasElements());
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableAlignment, "table-alignment.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // This was LEFT_AND_WIDTH, i.e. table alignment wasn't imported correctly.
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::RIGHT, getProperty<sal_Int16>(xTable, "HoriOrient"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtIgnoredFooter)
+{
+ loadAndSave("sdt-ignored-footer.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 1, make sure no w:sdt sneaks into the main document from the footer.
+ assertXPath(pXmlDoc, "//w:sdt"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtRunPicture)
+{
+ loadAndSave("sdt-run-picture.docx");
+ // SDT around run was exported as SDT around paragraph
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 1: there was an SDT around w:p.
+ assertXPath(pXmlDoc, "//w:body/w:sdt"_ostr, 0);
+ // This was 0: there were no SDT around w:r.
+ assertXPath(pXmlDoc, "//w:body/w:p/w:sdt"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testChartDupe, "chart-dupe.docx")
+{
+ // Single chart was exported back as two charts.
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
+ // This was 2, on second import we got a duplicated chart copy.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xEmbeddedObjects->getCount());
+
+
+ if (!isExported())
+ return; // initial import
+
+ xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDocCT,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/charts/chart1.xml']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml");
+ assertXPath(pXmlDocCT, "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/Microsoft_Excel_Worksheet1.xlsx']"_ostr, "ContentType"_ostr, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/charts/_rels/chart1.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='../embeddings/Microsoft_Excel_Worksheet1.xlsx']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocChart1 = parseExport("word/charts/chart1.xml");
+ assertXPath(pXmlDocChart1,
+ "/c:chartSpace/c:externalData"_ostr,
+ "id"_ostr,
+ "rId1");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPositionAndRotation, "position-and-rotation.docx")
+{
+ // The document should look like: "This line is tricky, <image> because only 'This line is tricky,' is on the left."
+ // But the image was pushed down, so it did not break the line into two text portions.
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // Should be 1559, was -5639
+ CPPUNIT_ASSERT(xShape->getPosition().X > 1500);
+ // Should be 88, was 473
+ CPPUNIT_ASSERT(xShape->getPosition().Y < 100);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNumberingFont, "numbering-font.docx")
+{
+ // check that the original numrule font name is still Calibri
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName("ListLabel 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Calibri"), getProperty<OUString>(xStyle, "CharFontName"));
+
+ uno::Reference<text::XTextRange> xPara = getParagraph(2);
+ uno::Reference<beans::XPropertySet> properties(xPara, uno::UNO_QUERY);
+ uno::Any aValue = properties->getPropertyValue("ListAutoFormat");
+ CPPUNIT_ASSERT(aValue.hasValue());
+ uno::Sequence<beans::NamedValue> aListAutoFormat;
+ CPPUNIT_ASSERT(aValue >>= aListAutoFormat);
+ auto it = std::find_if(std::cbegin(aListAutoFormat), std::cend(aListAutoFormat),
+ [](const css::beans::NamedValue& val) { return val.Name == "CharFontName"; });
+ CPPUNIT_ASSERT(it != std::cend(aListAutoFormat));
+ OUString sOverrideFontName;
+ CPPUNIT_ASSERT(it->Value >>= sOverrideFontName);
+ // but the overridden font name is Verdana
+ CPPUNIT_ASSERT_EQUAL(OUString("Verdana"), sOverrideFontName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf106541_noinheritChapterNumbering)
+{
+ loadAndReload("tdf106541_noinheritChapterNumbering.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // in LO, it appears that styles based on the Chapter Numbering style explicitly set the
+ // numbering style/outline level to 0 by default, and that LO prevents inheriting directly from "Outline" style.
+ // Adding this preventative unit test to ensure that any fix for tdf106541 doesn't make incorrect assumptions.
+
+//reverting tdf#76817 hard-codes the numbering style on the paragraph, preventing RT of "Outline" style
+// CPPUNIT_ASSERT_EQUAL(OUString("Outline"), getProperty<OUString>(getParagraph(1), "NumberingStyleName"));
+
+ OUString sPara3NumberingStyle = getProperty<OUString>(getParagraph(3), "NumberingStyleName");
+ CPPUNIT_ASSERT_EQUAL(sPara3NumberingStyle, getProperty<OUString>(getParagraph(4), "NumberingStyleName"));
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//body/txt/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr, 3); //three of the four paragraphs have numbering
+ assertXPath(pXmlDoc, "//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr, "expand"_ostr, "1");
+ assertXPath(pXmlDoc, "//body/txt[2]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr, 0); //second paragraph style disables numbering
+ assertXPath(pXmlDoc, "//body/txt[3]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr, "expand"_ostr, "I.");
+ assertXPath(pXmlDoc, "//body/txt[4]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr, "expand"_ostr, "II.");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf53856_conflictingStyle, "tdf53856_conflictingStyle.docx")
+{
+ // The "Text" style conflicted with builtin paragraph style Caption -> Text
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Text"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Times New Roman"), getProperty<OUString>(xStyle, "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xStyle, "CharPosture"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104713_undefinedStyles, "tdf104713_undefinedStyles.docx")
+{
+ // Normal paragraph style was not defined, so don't replace conflicting styles
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(212), getProperty<sal_Int32>(xStyle, "ParaBottomMargin"));
+
+ // tdf108765: once importing is finished, use default values for any styles not yet defined.
+ xStyle.set( getStyles("ParagraphStyles")->getByName("Footnote"), uno::UNO_QUERY );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Font size", 10.f, getProperty<float>(xStyle, "CharHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDrawingmlFlipv)
+{
+ loadAndSave("drawingml-flipv.docx");
+ // The problem was that the shape had vertical flip only, but then we added rotation as well on export.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathNoAttribute(pXmlDoc, "//a:xfrm"_ostr, "rot"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRot90Fliph)
+{
+ loadAndSave("rot90-fliph.docx");
+ // The problem was that a shape rotation of 90° got turned into 270° after roundtrip.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "flipH"_ostr, "1");
+ // This was 16200000 (270 * 60000).
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "rot"_ostr, "5400000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRot180Flipv)
+{
+ loadAndSave("rot180-flipv.docx");
+ // 180° rotation got lost after roundtrip.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "flipV"_ostr, "1");
+ // This attribute was completely missing.
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "rot"_ostr, "10800000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRot270Flipv)
+{
+ loadAndSave("rot270-flipv.docx");
+ // 270° rotation got turned into 90° after roundtrip.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "flipV"_ostr, "1");
+ // This was 5400000.
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "rot"_ostr, "16200000");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWpsCharColor, "wps-char-color.docx")
+{
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ // This was -1, i.e. the character color was default (-1), not white.
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(xShape->getStart(), "CharColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableStyleCellBackColor, "table-style-cell-back-color.docx")
+{
+ // The problem was that cell background was white, not green.
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ // This was 0xffffff.
+ CPPUNIT_ASSERT_EQUAL(Color(0x00ff00), getProperty<Color>(xCell, "BackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableStyleBorder, "table-style-border.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // This was 0, the second cell was missing its right border.
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A2");
+ CPPUNIT_ASSERT(getProperty<table::BorderLine2>(xCell, "RightBorder").LineWidth > 0);
+
+ // This was also 0 (even after fixing the previous problem), the first cell was missing its right border, too.
+ xCell = xTable->getCellByName("A1");
+ CPPUNIT_ASSERT(getProperty<table::BorderLine2>(xCell, "RightBorder").LineWidth > 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableStyleBorderExport, "table-style-border-export.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A3");
+ // Bottom border was white, so this was 0xffffff.
+ CPPUNIT_ASSERT_EQUAL(Color(0x8064A2), Color(ColorTransparency, getProperty<table::BorderLine2>(xCell, "BottomBorder").Color));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testAnchorPosition, "anchor-position.docx")
+{
+ // The problem was that the at-char anchored picture was at the end of the
+ // paragraph, so there were only two positions: a Text, then a Frame one.
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty<OUString>(getRun(getParagraph(1), 1), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Frame"), getProperty<OUString>(getRun(getParagraph(1), 2), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty<OUString>(getRun(getParagraph(1), 3), "TextPortionType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMultiPageToc, "multi-page-toc.docx")
+{
+ // Import of this document triggered an STL assertion.
+
+ // Document has a ToC from its second paragraph.
+ uno::Reference<container::XNamed> xTextSection = getProperty< uno::Reference<container::XNamed> >(getParagraph(2), "TextSection");
+ CPPUNIT_ASSERT_EQUAL(OUString("Table of Contents1"), xTextSection->getName());
+ // There should be a field in the header as well.
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty<OUString>(getRun(getParagraphOfText(1, xHeaderText), 1), "TextPortionType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextboxTable, "textbox-table.docx")
+{
+ // We wrote not-well-formed XML during export for this one:
+ // Shape with textbox, having a table and also anchored inside a table.
+
+ // Just make sure that we have both tables.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCropPixel)
+{
+ loadAndSave("crop-pixel.docx");
+ // If map mode of the graphic is in pixels, then we used to handle original
+ // size of the graphic as mm100, but it was in pixels.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This is 17667 in the original document, was 504666 (so the image
+ // become invisible), now is around 19072.
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "//a:srcRect"_ostr, "l"_ostr).toInt32() <= 22452);
+}
+/* FixMe: tdf#142805 Test disabled, because the picture is not load at all.
+CPPUNIT_TEST_FIXTURE(Test, testEffectExtent)
+{
+ loadAndSave("effect-extent.docx");
+ // The problem was that in case there were no shadows on the picture, we
+ // wrote a <wp:effectExtent> full or zeros.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // E.g. this was 0.
+ assertXPath(pXmlDoc, "//wp:effectExtent", "l", "114300");
+}
+*/
+CPPUNIT_TEST_FIXTURE(Test, testEffectExtentInline)
+{
+ loadAndSave("effect-extent-inline.docx");
+ // The problem was that in case there was inline rotated picture, we
+ // wrote a <wp:effectExtent> full or zeros.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // E.g. this was 0.
+ assertXPath(pXmlDoc, "//wp:effectExtent"_ostr, "l"_ostr, "609600");
+ assertXPath(pXmlDoc, "//wp:effectExtent"_ostr, "r"_ostr, "590550");
+ assertXPath(pXmlDoc, "//wp:effectExtent"_ostr, "t"_ostr, "590550");
+ assertXPath(pXmlDoc, "//wp:effectExtent"_ostr, "b"_ostr, "571500");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testEm, "em.docx")
+{
+ // Test all possible <w:em> arguments.
+ CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::NONE, getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharEmphasis"));
+ // This was ACCENT_ABOVE.
+ CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_ABOVE, getProperty<sal_Int16>(getRun(getParagraph(1), 2), "CharEmphasis"));
+ // This was DOT_ABOVE.
+ CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::ACCENT_ABOVE, getProperty<sal_Int16>(getRun(getParagraph(1), 3), "CharEmphasis"));
+ CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::CIRCLE_ABOVE, getProperty<sal_Int16>(getRun(getParagraph(1), 4), "CharEmphasis"));
+ CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_BELOW, getProperty<sal_Int16>(getRun(getParagraph(1), 5), "CharEmphasis"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo77716, "fdo77716.docx")
+{
+ // The problem was that there should be 200 twips spacing between the two paragraphs, but there wasn't any.
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Standard"), uno::UNO_QUERY);
+ // This was 0.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(convertTwipToMm100(200)), getProperty<sal_Int32>(xStyle, "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testAfterlines, "afterlines.docx")
+{
+ // This was 353, i.e. the value of <w:spacing w:after="200"> from <w:pPrDefault>, instead of <w:spacing w:afterLines="100"/> from <w:pPr>.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(423), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testParagraphMark, "paragraph-mark.docx")
+{
+ // The problem was that we didn't handle the situation when an empty paragraph's marker had both a char style and some direct formatting.
+
+ // This was 11.
+ CPPUNIT_ASSERT_EQUAL(12.f, getProperty<float>(getParagraph(1), "CharHeight"));
+ // This was empty.
+ CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharStyleName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testParagraphMark2, "paragraph-mark2.docx")
+{
+ // The problem was that we didn't handle the situation when an empty paragraph's marker had both a char style and some direct formatting.
+
+ // This was Segoe UI, set by Char Style FontStyle11 presumably.
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName"));
+ // This was 11, set by Char Style FontStyle11 presumably.
+ CPPUNIT_ASSERT_EQUAL(10.f, getProperty<float>(getRun(getParagraph(1), 1), "CharHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParagraphMarkNonempty)
+{
+ loadAndSave("paragraph-mark-nonempty.odt");
+ validate(maTempFile.GetFileName(), test::OOXML);
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // There were two <w:sz> elements, make sure the 40 one is dropped and the 20 one is kept.
+ assertXPath(pXmlDoc, "//w:p/w:pPr/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPageBreakBefore, "page-break-before.docx")
+{
+ // This was style::BreakType_PAGE_BEFORE, i.e. page break wasn't ignored, as it should have been.
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableRtl, "table-rtl.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // This was text::WritingMode2::LR_TB, i.e. direction of the table was ignored.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>(xTable, "WritingMode"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableLr, "table-ltr.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // This was text::WritingMode2::RL_TB, i.e. direction of the table was wrongly guessed.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::CONTEXT, getProperty<sal_Int16>(xTable, "WritingMode"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlCjklist30, "cjklist30.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::TIAN_GAN_ZH, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlCjklist31, "cjklist31.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::DI_ZI_ZH, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlCjklist34, "cjklist34.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_UPPER_ZH_TW, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlCjklist35, "cjklist35.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_LOWER_ZH, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlCjklist44, "cjklist44.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_DIGITAL2_KO, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlTextNumberList, "text_number_list.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::TEXT_NUMBER, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlTextCardinalList, "text_cardinal_list.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::TEXT_CARDINAL, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlTextOrdinalList, "text_ordinal_list.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::TEXT_ORDINAL, numFormat);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlSymbolChicagoList, "symbol_chicago_list.docx")
+{
+ sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::SYMBOL_CHICAGO, numFormat);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHTW)
+{
+ loadAndSave("numlist-zhtw.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+
+ assertXPath ( pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:numFmt"_ostr,"val"_ostr,"taiwaneseCountingThousand" );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOoxmlNumListZHCN)
+{
+ loadAndSave("numlist-zhcn.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+
+ assertXPath ( pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:numFmt"_ostr,"val"_ostr,"chineseCountingThousand" );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOOxmlOutlineNumberTypes)
+{
+ loadAndSave("outline-number-types.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:pStyle"_ostr, "val"_ostr, "Heading1");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:numFmt"_ostr, "val"_ostr, "none");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[2]/w:numFmt"_ostr, "val"_ostr, "decimalEnclosedCircle");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[3]/w:numFmt"_ostr, "val"_ostr, "decimal"); // CHARS_GREEK_UPPER_LETTER fallback to decimal
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[4]/w:numFmt"_ostr, "val"_ostr, "decimal"); // CHARS_GREEK_LOWER_LETTER fallback to decimal
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[5]/w:numFmt"_ostr, "val"_ostr, "arabicAlpha");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[6]/w:numFmt"_ostr, "val"_ostr, "hindiVowels");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[7]/w:numFmt"_ostr, "val"_ostr, "thaiLetters");
+
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[1]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[2]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[3]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[4]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[5]/w:numFmt"_ostr, "val"_ostr, "russianUpper");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[6]/w:numFmt"_ostr, "val"_ostr, "russianLower");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[7]/w:numFmt"_ostr, "val"_ostr, "russianUpper");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[8]/w:numFmt"_ostr, "val"_ostr, "russianLower");
+
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[1]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[2]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[3]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[4]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[5]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[6]/w:numFmt"_ostr, "val"_ostr, "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[7]/w:numFmt"_ostr, "val"_ostr, "decimal");
+
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNumParentStyle, "num-parent-style.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ getProperty<sal_Int32>(getParagraph(1), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(getParagraph(1), "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(2), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(getParagraph(2), "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ getProperty<sal_Int32>(getParagraph(3), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(getParagraph(3), "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(4), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2.1"), getProperty<OUString>(getParagraph(4), "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNumOverrideLvltext, "num-override-lvltext.docx")
+{
+ uno::Reference<container::XIndexAccess> xRules = getProperty< uno::Reference<container::XIndexAccess> >(getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
+ // This was 1, i.e. the numbering on the second level was "1", not "1.1".
+ // Check the paragraph properties, not the list ones, since they can differ due to overrides
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString"));
+
+ // The paragraph marker's red font color was inherited by the number portion, this was ff0000.
+ CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), parseDump("//SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']/SwFont"_ostr, "color"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNumOverrideStart, "num-override-start.docx")
+{
+ uno::Reference<container::XIndexAccess> xRules = getProperty< uno::Reference<container::XIndexAccess> >(getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
+ // List starts with "1.1"
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), comphelper::SequenceAsHashMap(xRules->getByIndex(1))["StartWith"].get<sal_Int16>());
+ // But paragraph starts with "1.3"
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ OUString listId;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("ListId") >>= listId);
+ CPPUNIT_ASSERT_EQUAL(OUString("1.3"), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextboxRightEdge, "textbox-right-edge.docx")
+{
+ // I'm fairly sure this is not specific to DOCX, but the doc model created
+ // by the ODF import doesn't trigger this bug, so let's test this here
+ // instead of uiwriter.
+ int nShapeLeft = parseDump("//anchored/SwAnchoredDrawObject/bounds"_ostr, "left"_ostr).toInt32();
+ int nShapeWidth = parseDump("//anchored/SwAnchoredDrawObject/bounds"_ostr, "width"_ostr).toInt32();
+ int nTextboxLeft = parseDump("//anchored/fly/infos/bounds"_ostr, "left"_ostr).toInt32();
+ int nTextboxWidth = parseDump("//anchored/fly/infos/bounds"_ostr, "width"_ostr).toInt32();
+ // This is a rectangle, make sure the right edge of the textbox is still
+ // inside the draw shape.
+ CPPUNIT_ASSERT(nShapeLeft + nShapeWidth >= nTextboxLeft + nTextboxWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testEffectExtentMargin, "effectextent-margin.docx")
+{
+ // This was 318, i.e. oox::drawingml::convertEmuToHmm(114300), effectExtent
+ // wasn't part of the margin, leading to the fly not taking enough space
+ // around itself.
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(114300+95250), getProperty<sal_Int32>(getShape(1), "LeftMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf88583)
+{
+ loadAndReload("tdf88583.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x00cc00), getProperty<sal_Int32>(getParagraph(1), "FillColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf97090, "tdf97090.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x95B3D7), getProperty<Color>(xTable->getCellByName("A1"), "BackColor"));
+
+ uno::Reference<container::XEnumerationAccess> paraEnumAccess(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ assert( paraEnumAccess.is() );
+ uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration();
+
+ assert( paraEnum.is() );
+ uno::Reference<beans::XPropertySet> paragraphProperties(paraEnum->nextElement(), uno::UNO_QUERY);
+ assert( paragraphProperties.is() );
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(paragraphProperties, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xffffff), getProperty<Color>(paragraphProperties, "FillColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf89791, "tdf89791.docx")
+{
+ if (isExported())
+ {
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess->hasByName("docProps/custom.xml")));
+ }
+
+ //tdf#102619 - setting FollowStyle with a not-yet-created style was failing. (Titre is created before Corps de texte).
+ uno::Reference< beans::XPropertySet > properties(getStyles("ParagraphStyles")->getByName("Titre"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Corps de texte"), getProperty<OUString>(properties, "FollowStyle"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf91261, "tdf91261.docx")
+{
+ bool snapToGrid = true;
+ uno::Reference< text::XTextRange > xPara = getParagraph( 2 );
+ uno::Reference< beans::XPropertySet > properties( xPara, uno::UNO_QUERY);
+ properties->getPropertyValue("SnapToGrid") >>= snapToGrid ;
+ CPPUNIT_ASSERT_EQUAL(false, snapToGrid);
+
+ uno::Reference< beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ sal_Int16 nGridMode;
+ xStyle->getPropertyValue("GridMode") >>= nGridMode;
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(2), nGridMode);
+
+ bool bGridSnapToChars;
+ xStyle->getPropertyValue("GridSnapToChars") >>= bGridSnapToChars;
+ CPPUNIT_ASSERT_EQUAL(true, bGridSnapToChars);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf89890, "tdf89890.docx")
+{
+ // Numbering picture bullet was too large.
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+
+ bool bFound = false;
+ for (beans::PropertyValue const & rProp : std::as_const(aProps))
+ {
+ if (rProp.Name == "GraphicSize")
+ {
+ // Height of the graphic was too large: 4382 after import, then 2485 after roundtrip.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(279), rProp.Value.get<awt::Size>().Height);
+ bFound = true;
+ }
+ }
+ CPPUNIT_ASSERT(bFound);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf91594, "tdf91594.docx")
+{
+ uno::Reference<text::XTextRange> xPara1(getParagraph(1));
+ CPPUNIT_ASSERT_EQUAL(u'\xf0fb', xPara1->getString()[0] );
+ uno::Reference<text::XTextRange> xPara2(getParagraph(2));
+ CPPUNIT_ASSERT_EQUAL(u'\xf0fc', xPara2->getString()[0] );
+ uno::Reference<text::XTextRange> xPara3(getParagraph(3));
+ CPPUNIT_ASSERT_EQUAL(u'\xf0fd', xPara3->getString()[0] );
+ uno::Reference<text::XTextRange> xPara4(getParagraph(4));
+ CPPUNIT_ASSERT_EQUAL(u'\xf0fe', xPara4->getString()[0] );
+
+ uno::Reference<beans::XPropertySet> xRun(getRun(xPara1,1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontNameAsian"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontNameComplex"));
+}
+DECLARE_OOXMLEXPORT_TEST(testTDF99434, "protectedform.docx")
+{
+ css::uno::Reference<css::lang::XMultiServiceFactory> m_xTextFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference< beans::XPropertySet > xSettings(m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ uno::Any aProtect = xSettings->getPropertyValue("ProtectForm");
+ bool bProt = false;
+ aProtect >>= bProt;
+ CPPUNIT_ASSERT(bProt);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf44986, "tdf44986.docx")
+{
+ // Check that the table at the second paragraph.
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTable->getRows();
+ // Check the first row of the table, it should have two cells (one separator).
+ // This was 0: the first row had no separators, so it had only one cell, which was too wide.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength());
+ // Check content of cells, including the newly added gridAfter cell
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), uno::Reference<text::XTextRange>(xTable->getCellByName("A1"), uno::UNO_QUERY_THROW)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("A2"), uno::Reference<text::XTextRange>(xTable->getCellByName("A2"), uno::UNO_QUERY_THROW)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), uno::Reference<text::XTextRange>(xTable->getCellByName("B1"), uno::UNO_QUERY_THROW)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf118682)
+{
+ loadAndSave("tdf118682.fodt");
+ // Support cell references in table formulas
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Formula fields were completely missing.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r/w:fldChar"_ostr, 3);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r/w:fldChar"_ostr, 3);
+
+ // Cell references were parenthesized: <A1>+<A2> and SUM(<A1:A3>)
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[2]/w:instrText"_ostr, " =A1+A2");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[2]/w:instrText"_ostr, " =SUM(A1:A3)");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133163)
+{
+ loadAndSave("tdf133163.fodt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Formula cells were completely missing.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r/w:fldChar"_ostr, 3);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r/w:fldChar"_ostr, 3);
+
+ // Cell references were parenthesized: <A1>+<A2> and SUM(<A1:A3>)
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[2]/w:instrText"_ostr, " =A1+A2");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[2]/w:instrText"_ostr, " =SUM(A1:A3)");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133647)
+{
+ loadAndSave("tdf133647.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Keep original formula during round-trip
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =SUM(A1,B1)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =SUM(C1:D1)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =SUM(A1,5,B1:C1,6)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[7]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =(1+2)*SUM(C1,D1)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[8]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =3*(2+SUM(A1:C1)+7)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[9]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =1+(SUM(1,2))");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[10]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =(SUM(C1,5)*(2+7))*(3+SUM(1,B1))");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[11]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =sum(a1,b1)");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123386)
+{
+ loadAndSave("tdf123386.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Keep original formula during round-trip
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =A1 < 2");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =B1 > 1");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =C1=3");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =D1 <> 3");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[7]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =AND(A1=1,B1=2)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[8]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =AND((A1<1),(B1<>2))");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[9]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =OR(A1=1,B1=2)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[10]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =OR(TRUE,FALSE)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[11]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =NOT(TRUE)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[12]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =AND(1,DEFINED(ABC1))");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123389)
+{
+ loadAndSave("tdf123389.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Keep original formula during round-trip
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =ROUND(2.345,1)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =ROUND(A1,2)");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106953, "tdf106953.docx")
+{
+ uno::Reference<container::XIndexAccess> xRules = getProperty< uno::Reference<container::XIndexAccess> >(getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
+ // This was -635, so the tab of the numbering expanded to a small value instead of matching Word's larger value.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), comphelper::SequenceAsHashMap(xRules->getByIndex(0))["FirstLineIndent"].get<sal_Int32>());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf115094v3)
+{
+ createSwDoc("tdf115094v3.docx");
+ {
+ SwDoc* pDoc = getSwDoc();
+ auto& rSpzFormats = *pDoc->GetSpzFrameFormats();
+ auto pFormat = rSpzFormats[0];
+ // Without the fix, this has failed with:
+ // - Expected: 1991
+ // - Actual : 1883
+ // i.e. some unwanted ~-2mm left margin appeared.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(1991), pFormat->GetHoriOrient().GetPos());
+ }
+ save(mpFilter);
+ // floating table is now exported directly without surrounding frame
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblpPr"_ostr, "tblpX"_ostr, "1996");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblpPr"_ostr, "tblpY"_ostr, "1064");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
new file mode 100644
index 0000000000..44c93c5886
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -0,0 +1,739 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/FontUnderline.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/TableColumnSeparator.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
+#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+
+#include <tools/UnitConversion.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <comphelper/scopeguard.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+DECLARE_OOXMLEXPORT_TEST(testWPGtextboxes, "testWPGtextboxes.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ auto MyShape = getShape(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GroupShape"), MyShape->getShapeType());
+
+ uno::Reference<drawing::XShapes> xGroup(MyShape, uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xTriangle(xGroup->getByIndex(0), uno::UNO_QUERY_THROW);
+ uno::Reference<drawing::XShapes> xEmbedGroup(xGroup->getByIndex(1), uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xCircle(xEmbedGroup->getByIndex(0), uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDiamond(xEmbedGroup->getByIndex(1), uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The circle lost its textbox", true, xCircle->getPropertyValue("TextBox").get<bool>());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The diamond lost its textbox", true, xDiamond->getPropertyValue("TextBox").get<bool>());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The triangle lost its textbox", true, xTriangle->getPropertyValue("TextBox").get<bool>());
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSmartart)
+{
+ SvtFilterOptions::Get().SetSmartArt2Shape(true);
+ comphelper::ScopeGuard g([] { SvtFilterOptions::Get().SetSmartArt2Shape(false); });
+
+ auto verify = [this]() {
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xGroup->getCount()); // background, 3 rectangles and an arrow in the group
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xGroup->getByIndex(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x4f81bd), getProperty<Color>(xPropertySet, "FillColor")); // If fill color is right, theme import is OK
+
+ uno::Reference<text::XTextRange> xTextRange(xGroup->getByIndex(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Sample"), xTextRange->getString()); // Shape has text
+
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextRange->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ xPropertySet.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_CENTER), getProperty<sal_Int32>( xPropertySet, "ParaAdjust")); // Paragraph properties are imported
+ };
+ createSwDoc("smartart.docx");
+ verify();
+ saveAndReload(mpFilter);
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo69548)
+{
+ loadAndReload("fdo69548.docx");
+ // The problem was that the last space in target URL was removed
+ CPPUNIT_ASSERT_EQUAL(OUString("#this_is_a_bookmark"), getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWpsOnly, "wps-only.docx")
+{
+ // Document has wp:anchor, not wp:inline, so handle it accordingly.
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ text::TextContentAnchorType eValue = getProperty<text::TextContentAnchorType>(xShape, "AnchorType");
+ // Word only as as-char and at-char, so at-char is our only choice.
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, eValue);
+
+ // Check position, it was 0. This is a shape, so use getPosition(), not a property.
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(671830), xShape->getPosition().X);
+
+ // Wrap type was PARALLEL.
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGH, getProperty<text::WrapTextMode>(xShape, "Surround"));
+ // Confirm that the deprecated (incorrectly spelled) _THROUGHT also matches
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGHT, getProperty<text::WrapTextMode>(xShape, "Surround"));
+
+ // This should be in front of text.
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xShape, "Opaque"));
+ // And this should be behind the document.
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(2), "Opaque"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedDOCXExport)
+{
+ // Given a document with nested floating tables:
+ createSwDoc("floattable-nested.odt");
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure both floating table is exported:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with
+ // - Expected: 2
+ // - Actual : 1
+ // i.e. the inner floating table was lost.
+ assertXPath(pXmlDoc, "//w:tblpPr"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableNestedCellStartDOCXExport)
+{
+ // Given a document with a nested floating table at cell start:
+ createSwDoc("floattable-nested-cell-start.odt");
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure both floating table is exported at the right position:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the inner <w:tbl> was between the two <w:tr>, not inside the C1 cell.
+ assertXPath(pXmlDoc, "//w:tc/w:tbl/w:tblPr/w:tblpPr"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWpgOnly, "wpg-only.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // Check position, it was nearly 0. This is a shape, so use getPosition(), not a property.
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(548005), xShape->getPosition().X);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWpgNested, "wpg-nested.docx")
+{
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // This was a com.sun.star.drawing.CustomShape, due to lack of handling of groupshapes inside groupshapes.
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GroupShape"), xShapeDescriptor->getShapeType());
+
+ // This failed, the right edge of the shape was outside the page
+ // boundaries.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nPageLeft = getXPath(pXmlDoc, "/root/page[1]/infos/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nPageWidth = getXPath(pXmlDoc, "/root/page[1]/infos/bounds"_ostr, "width"_ostr).toInt32();
+ sal_Int32 nShapeLeft
+ = getXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/SwAnchoredDrawObject/bounds"_ostr, "left"_ostr)
+ .toInt32();
+ sal_Int32 nShapeWidth
+ = getXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/SwAnchoredDrawObject/bounds"_ostr, "width"_ostr)
+ .toInt32();
+ // Make sure the shape is within the page bounds.
+ CPPUNIT_ASSERT_GREATEREQUAL(nShapeLeft + nShapeWidth, nPageLeft + nPageWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // The relativeFrom attribute was ignored for groupshapes, i.e. these were text::RelOrientation::FRAME.
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
+ // Make sure the shape is not in the background, as we have behindDoc="0" in the doc.
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xShape, "Opaque"));
+
+ // The 3 paragraphs on the rectangles inside the groupshape ended up in the
+ // body text, make sure we don't have multiple paragraphs there anymore.
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); // was 4
+
+ // Character escapement was enabled by default, this was 58.
+ uno::Reference<container::XIndexAccess> xGroup(xShape, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(0), uno::UNO_QUERY_THROW)->getText();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xText), 1), "CharEscapementHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf120412_400PercentSubscript, "tdf120412_400PercentSubscript.docx")
+{
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ // The word "Base" should not be subscripted.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Base"), "CharEscapement"), 0);
+ // The word "Subscript" should be 12pt, subscripted by 400% (48pt).
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -400.f, getProperty<float>(getRun(xPara, 2, "Subscript"), "CharEscapement"), 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFontEsc)
+{
+ loadAndSave("test_tdf120412.docx");
+ xmlDocUniquePtr pXmlDoc =parseExport("word/document.xml");
+ // don't lose the run with superscript formatting
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r"_ostr, 2);
+ // Superscript should be raised by 100% (11pt). Was 110% (12pt)
+ // calculated using docDefault with fontsize 10pt (note only w:szCs defined as 11pt, not w:sz)
+ // instead of inherited normal paraStyle fontsize 11pt (related to tdf#99602)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w:position"_ostr,"val"_ostr, "22");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMceWpg, "mce-wpg.docx")
+{
+ // Make sure that we read the primary branch, if wpg is requested as a feature.
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(0), uno::UNO_QUERY_THROW)->getText();
+ // This was VML1.
+ getParagraphOfText(1, xText, "DML1");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMceNested, "mce-nested.docx")
+{
+ // Vertical position of the shape was incorrect due to incorrect nested mce handling.
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ // positionV's posOffset from the bugdoc, was 0.
+ CPPUNIT_ASSERT(6879 <= getProperty<sal_Int32>(xShape, "VertOrientPosition"));
+ // This was -1 (default), make sure the background color is set.
+ CPPUNIT_ASSERT_EQUAL(Color(0x4f81bd), getProperty<Color>(xShape, "FillColor"));
+
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor = getShape(2);
+ // This was a com.sun.star.drawing.CustomShape, due to incorrect handling of wpg elements after a wps textbox.
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GroupShape"), xShapeDescriptor->getShapeType());
+
+ // Now check the top right textbox.
+ uno::Reference<container::XIndexAccess> xGroup(getShape(2), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY_THROW)->getText();
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText, "[Year]");
+ CPPUNIT_ASSERT_EQUAL(48.f, getProperty<float>(getRun(xParagraph, 1), "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(getRun(xParagraph, 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(xParagraph, 1), "CharWeight"));
+ //FIXME: CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xGroup->getByIndex(1), "TextVerticalAdjust"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMissingPath, "missing-path.docx")
+{
+ comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty<beans::PropertyValues>(getShape(1), "CustomShapeGeometry"));
+ comphelper::SequenceAsHashMap aPath(aCustomShapeGeometry["Path"].get<beans::PropertyValues>());
+ uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aCoordinates = aPath["Coordinates"].get< uno::Sequence<drawing::EnhancedCustomShapeParameterPair> >();
+ // This was 0, the coordinate list was empty.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(19), aCoordinates.getLength());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo70457, "fdo70457.docx")
+{
+ // The document contains a rotated bitmap
+ // It must be imported as a XShape object with the proper rotation value
+
+ // Check: there is one shape in the doc
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ // Check: the angle of the shape is 45º
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4500), getProperty<sal_Int32>(getShape(1), "RotateAngle"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testLOCrash, "file_crash.docx")
+{
+ //The problem was libreoffice crash while opening the file.
+ getParagraph(1,"Contents");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo72560, "fdo72560.docx")
+{
+ // The problem was libreoffice confuse when there RTL default style for paragraph
+ uno::Reference<uno::XInterface> xParaLeftRTL(getParagraph( 1, "RTL LEFT"));
+ uno::Reference<uno::XInterface> xParaRightLTR(getParagraph( 2, "LTR RIGHT"));
+
+ // this will test the text direction and alignment for paragraphs
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( xParaLeftRTL, "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), getProperty< sal_Int32 >( xParaLeftRTL, "ParaAdjust" ));
+
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( xParaRightLTR, "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( xParaRightLTR, "ParaAdjust" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo72560b, "fdo72560b.docx")
+{
+ // The problem was libreoffice confuse when RTL was specified in non-default style
+ uno::Reference<uno::XInterface> xParaEndRTL(getParagraph( 2, "RTL END"));
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( xParaEndRTL, "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_LEFT), getProperty< sal_Int32 >( xParaEndRTL, "ParaAdjust" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo72560c, "fdo72560c.docx")
+{
+ // The problem was libreoffice confuse when RTL was specified in DocDefaults
+ uno::Reference<uno::XInterface> xParaEndRTL(getParagraph( 2, "RTL END"));
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( xParaEndRTL, "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_LEFT), getProperty< sal_Int32 >( xParaEndRTL, "ParaAdjust" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo72560d, "fdo72560d.docx")
+{
+ // The problem was libreoffice confuse when RTL was specified in "Normal" when not using Normal at all
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( getParagraph(1), "ParaAdjust" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( getParagraph(2), "ParaAdjust" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo72560e, "fdo72560e.docx")
+{
+ // The problem was libreoffice confuse when *locale* is RTL, but w:bidi / w:jc are never defined.
+ // This unit test would only be noticed if the testing environment is set to something like an Arabic locale.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( getParagraph(2), "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_LEFT), getProperty<sal_Int32>( getParagraph(2), "ParaAdjust" ));
+
+ // widow/orphan control is on when never specified.
+ CPPUNIT_ASSERT_EQUAL(sal_Int8(2), getProperty<sal_Int8>( getParagraph(2), "ParaWidows" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testRPrChangeClosed, "rprchange_closed.docx")
+{
+ // Redline defined by rPrChanged wasn't removed.
+ // First paragraph has an rPrChange element, make sure it doesn't appear in the second paragraph.
+ CPPUNIT_ASSERT_EQUAL(false, hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo65090, "fdo65090.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+ // The first row had two cells, instead of a single horizontally merged one.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
+{
+ // The DOCX containing the Table of Contents was not imported with correct page nos
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes( );
+ uno::Reference<text::XDocumentIndex> xTOCIndex(xIndexes->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange = xTOCIndex->getAnchor();
+ uno::Reference<text::XText> xText = xTextRange->getText( );
+ uno::Reference<text::XTextCursor> xTextCursor = xText->createTextCursor( );
+ xTextCursor->gotoRange(xTextRange->getStart(),false);
+ xTextCursor->gotoRange(xTextRange->getEnd(),true);
+ OUString aTocString(xTextCursor->getString());
+
+ // heading 15 on the 15th page
+ aTocString = aTocString.copy(aTocString.indexOf("Heading 15.1:\t") + strlen("Heading 15.1:\t"));
+ CPPUNIT_ASSERT(aTocString.startsWithIgnoreAsciiCase( "15" ) );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo73389)
+{
+ loadAndSave("fdo73389.docx");
+ // The width of the inner table was too large. The first fix still converted
+ // the "auto" table width to a fixed one. The second fix used variable width.
+ // The recent fix uses fixed width again, according to the fixed width cells.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW"_ostr,"type"_ostr,"dxa");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tblPr/w:tblW"_ostr,"w"_ostr,"1611");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133735)
+{
+ loadAndSave("fdo73389.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tr[2]/w:tc[1]/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+ // This was 200
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tr[1]/w:tc[2]/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tr[1]/w:tc[3]/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134569_nestedTable)
+{
+ loadAndReload("tdf134569_nestedTable.docx");
+ // non-overridden w:after spacing in the table was pushing the document to the second page.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf59274)
+{
+ loadAndSave("tdf59274.docx");
+ // Table with "auto" table width and incomplete grid: 11 columns, but only 4 gridCol elements.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblW"_ostr, "type"_ostr, "dxa");
+ // This was 7349: sum of the cell widths in first row, but the table width is determined by a longer row later.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblW"_ostr, "w"_ostr, "9048");
+ // This was 1224: too narrow first cell in first row
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcW"_ostr, "w"_ostr, "4291");
+ // This was 3674: too wide last cell in first row
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[4]/w:tcPr/w:tcW"_ostr, "w"_ostr, "1695");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLGroupshapeSdt, "dml-groupshape-sdt.docx")
+{
+ uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+ // The text in the groupshape was missing due to the w:sdt and w:sdtContent wrapper around it.
+ CPPUNIT_ASSERT_EQUAL(OUString("sdt and sdtContent inside groupshape"), uno::Reference<text::XTextRange>(xGroupShape->getByIndex(1), uno::UNO_QUERY_THROW)->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDmlCharheightDefault, "dml-charheight-default.docx")
+{
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // This was 16: the first run of the second para incorrectly inherited the char height of the first para.
+ CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(getRun(getParagraphOfText(2, xShape->getText()), 1), "CharHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeCapitalization, "dml-groupshape-capitalization.docx")
+{
+ // Capitalization inside a group shape was not imported
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY_THROW)->getText();
+ // 2nd line is written with uppercase letters
+ CPPUNIT_ASSERT_EQUAL(style::CaseMap::UPPERCASE, getProperty<sal_Int16>(getRun(getParagraphOfText(2, xText), 1), "CharCaseMap"));
+ // 3rd line has no capitalization
+ CPPUNIT_ASSERT_EQUAL(style::CaseMap::NONE, getProperty<sal_Int16>(getRun(getParagraphOfText(3, xText), 1), "CharCaseMap"));
+ // 4th line has written with small capitals
+ CPPUNIT_ASSERT_EQUAL(style::CaseMap::SMALLCAPS, getProperty<sal_Int16>(getRun(getParagraphOfText(4, xText), 1), "CharCaseMap"));
+ // 5th line has no capitalization
+ CPPUNIT_ASSERT_EQUAL(style::CaseMap::NONE, getProperty<sal_Int16>(getRun(getParagraphOfText(5, xText), 1), "CharCaseMap"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.docx")
+{
+ // At the start of the document, a picture which has a color specified with a color scheme, lost
+ // it's color during import.
+ uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
+ Graphic aVclGraphic(xGraphic);
+ BitmapEx aBitmap(aVclGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(341), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(181), aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(Color( 0xad, 0xc5, 0xdb ), aBitmap.GetPixelColor(120, 30));
+ CPPUNIT_ASSERT_EQUAL(Color( 0xad, 0xc5, 0xdb ), aBitmap.GetPixelColor(260, 130));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo69656, "Table_cell_auto_width_fdo69656.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8153), getProperty<sal_Int32>(xTables->getByIndex(0), "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFloatingTablesAnchor, "floating-tables-anchor.docx")
+{
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xBodyText = xTextDocument->getText();
+ // Problem was one of the two text frames was anchored to the other text frame
+ // Both frames should be anchored to the body text
+ uno::Reference<text::XTextContent> xTextContent(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xTextContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(xBodyText, xRange->getText());
+
+ xTextContent.set(getShape(2), uno::UNO_QUERY);
+ xRange = xTextContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(xBodyText, xRange->getText());
+
+ // tdf#149292 pre-emptive test - ensure "First Page" page style
+ // TODO - FIRST HEADER CHANGE - Need to find a solution to this
+ //CPPUNIT_ASSERT_EQUAL(OUString("First Page"), getProperty<OUString>(getParagraph(1), "PageDescName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testAnnotationFormatting, "annotation-formatting.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(2), 2), "TextField");
+ uno::Reference<text::XText> xText = getProperty< uno::Reference<text::XText> >(xTextField, "TextRange");
+ // Make sure we test the right annotation.
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText, "days");
+ // Formatting was lost: the second text portion was NONE, not SINGLE.
+ CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::SINGLE, getProperty<sal_Int16>(getRun(xParagraph, 1), "CharUnderline"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeRunFonts, "dml-groupshape-runfonts.docx")
+{
+ // Fonts defined by w:rFonts was not imported and so the font specified by a:fontRef was used.
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY_THROW)->getText();
+ uno::Reference<text::XTextRange> xRun = getRun(getParagraphOfText(1, xText),1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(xRun, "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial Unicode MS"), getProperty<OUString>(xRun, "CharFontNameComplex"));
+ CPPUNIT_ASSERT_EQUAL(OUString("MS Mincho"), getProperty<OUString>(xRun, "CharFontNameAsian"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testStrict, "strict.docx")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ // This was only 127, pt suffix was ignored, so this got parsed as twips instead of points.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(72 * 20)), getProperty<sal_Int32>(xPageStyle, "BottomMargin"));
+ // This was only 1397, same issue
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(792 * 20)), getProperty<sal_Int32>(xPageStyle, "Height"));
+ // Text was missing, due to not handling the strict namespaces.
+ getParagraph(1, "Hello world!");
+
+ // Header in the document caused a crash on import.
+ uno::Reference<text::XText> xHeaderText(xPageStyle->getPropertyValue("HeaderText"), uno::UNO_QUERY);
+ getParagraphOfText(1, xHeaderText, "This is a header.");
+
+ // Picture was missing.
+ uno::Reference<lang::XServiceInfo> xServiceInfo(getShapeByName(u"Picture 2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject"));
+
+ // SmartArt was missing.
+ xServiceInfo.set(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"));
+
+ // Chart was missing.
+ xServiceInfo.set(getShape(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject"));
+
+ // Math was missing.
+ xServiceInfo.set(getShape(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSmartartStrict)
+{
+ SvtFilterOptions::Get().SetSmartArt2Shape(true);
+ comphelper::ScopeGuard g([] { SvtFilterOptions::Get().SetSmartArt2Shape(false); });
+
+ auto verify = [this]() {
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ // This was 0, SmartArt was visually missing.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), xGroup->getCount()); // background, 3 ellipses + 3 arrows
+ };
+ createSwDoc("strict-smartart.docx");
+ verify();
+ saveAndReload(mpFilter);
+ verify();
+}
+
+DECLARE_OOXMLEXPORT_TEST(testLibreOfficeHang, "frame-wrap-auto.docx")
+{
+ // fdo#72775
+ // This was text::WrapTextMode_NONE.
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_DYNAMIC, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
+
+ // tdf#154703 top/bottom margins should not be duplicated from paragraph(s)
+ uno::Reference<text::XTextRange> xTextRange(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), getParagraphOfText(1, xText)->getString());
+
+ sal_Int32 nFrame = getProperty<sal_Int32>(getShape(1), "TopBorderDistance");
+ sal_Int32 nPara = getProperty<sal_Int32>(getParagraphOfText(1, xText), "TopBorderDistance");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(141), nFrame + nPara);
+ // NOTE: left/right are different because of compat flag INVERT_BORDER_SPACING]
+ nFrame = getProperty<sal_Int32>(getShape(1), "LeftBorderDistance");
+ nPara = getProperty<sal_Int32>(getParagraphOfText(1, xText), "LeftBorderDistance");
+ CPPUNIT_ASSERT_EQUAL(nFrame, nPara);
+ CPPUNIT_ASSERT(nPara);
+
+ // Additionally, the width of the frame needs to grow by the size of the left/right spacing
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7064), getProperty<sal_Int32>(getShape(1), "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testI124106, "i124106.docx")
+{
+ // This was 2.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testLargeTwips, "large-twips.docx" )
+{
+ // cp#1000043: MSO seems to ignore large twips values, we didn't, which resulted in different
+ // layout of broken documents (text not visible in this specific document).
+ OUString width = parseDump( "/root/page/body/tab/row[1]/cell[1]/txt/infos/bounds"_ostr, "width"_ostr );
+ CPPUNIT_ASSERT( width.toInt32() > 0 );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNegativeCellMarginTwips, "negative-cell-margin-twips.docx")
+{
+ // Slightly related to cp#1000043, the twips value was negative, which wrapped around somewhere,
+ // while MSO seems to ignore that as well.
+ OUString width = parseDump( "/root/page/body/tab/row[1]/cell[1]/txt/infos/bounds"_ostr, "width"_ostr );
+ CPPUNIT_ASSERT( width.toInt32() > 0 );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo38414, "fdo38414.docx")
+{
+ // The cells in the last (4th) column were merged properly and so the result didn't have the same height.
+ // (Since w:gridBefore is worked around by faking another cell in the row, so column count is thus 5
+ // instead of 4, therefore compare height of cells 4 and 5 rather than 3 and 4.)
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableColumns> xTableColumns = xTextTable->getColumns();
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 5 ), xTableColumns->getCount());
+ OUString height3 = parseDump("/root/page/body/tab/row[1]/cell[4]/infos/bounds"_ostr, "height"_ostr );
+ OUString height4 = parseDump("/root/page/body/tab/row[1]/cell[5]/infos/bounds"_ostr, "height"_ostr );
+ CPPUNIT_ASSERT_EQUAL( height3, height4 );
+}
+
+DECLARE_OOXMLEXPORT_TEST(test_extra_image, "test_extra_image.docx")
+{
+ // fdo#74652 Check there is no shape added to the doc during import
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo74401, "fdo74401.docx")
+{
+ uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShapeDescriptor> xShape(xGroupShape->getByIndex(1), uno::UNO_QUERY);
+ // The triangle (second child) was a TextShape before, so it was shown as a rectangle.
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"), xShape->getShapeType());
+
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText();
+ uno::Reference<text::XTextRange> xCharRun = getRun(getParagraphOfText(1, xText), 1, "Triangle ");
+
+ // tdf#128153 Paragraph Style Normal (Web) should not overwrite the 11pt directly applied fontsize.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Fontsize", 11.f, getProperty<float>(xCharRun, "CharHeight"));
+ // but paragraph Style Normal (Web) should provide the font name
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Font", OUString("Times New Roman"), getProperty<OUString>(xCharRun, "CharFontName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGridBefore, "gridbefore.docx")
+{
+ // w:gridBefore is faked by inserting two cells without border (because Writer can't do non-rectangular tables).
+ // So check the first cell in the first row is in fact 3rd and that it's more to the right than the second
+ // cell on the second row.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableColumns> xTableColumns = xTextTable->getColumns();
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 3 ), xTableColumns->getCount());
+ OUString textA3 = parseDump("/root/page/body/tab/row[1]/cell[3]/txt/text()"_ostr );
+ OUString leftA3 = parseDump("/root/page/body/tab/row[1]/cell[3]/infos/bounds"_ostr, "left"_ostr );
+ OUString leftB2 = parseDump("/root/page/body/tab/row[2]/cell[2]/infos/bounds"_ostr, "left"_ostr );
+ CPPUNIT_ASSERT_EQUAL( OUString( "A3" ), textA3 );
+ CPPUNIT_ASSERT( leftA3.toInt32() > leftB2.toInt32());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf116194)
+{
+ loadAndSave("tdf116194.docx");
+ // The problem was that the importer lost consecutive tables with w:gridBefore
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134606)
+{
+ loadAndSave("tdf134606.docx");
+ // The problem was that the importer lost the nested table structure with w:gridBefore
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx")
+{
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> graphic;
+ imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
+ Graphic aVclGraphic(graphic);
+ BitmapEx aBitmap(aVclGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(58), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(320), aBitmap.GetSizePixel().Height());
+ Color aColor(aBitmap.GetPixelColor(20, 30));
+ CPPUNIT_ASSERT_EQUAL(Color( 0xce, 0xce, 0xce ), aColor);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
+{
+ // When chart was in a TextFrame, its size was too large.
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
+ // This was 10954.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6008), getProperty<sal_Int32>(xEmbeddedObjects->getByIndex(0), "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testInlineGroupshape, "inline-groupshape.docx")
+{
+ // Inline groupshape was in the background, so it was hidden sometimes by other shapes.
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Opaque"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo78883, "fdo78883.docx")
+{
+ // fdo#78883 : LO was getting hang while opening document
+ // Checking there is a single page after loading a doc in LO.
+ // Check to make sure the document loaded. Note that the page number may
+ // be 1 or 2 depending on the environment.
+ CPPUNIT_ASSERT(getPages() > 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo79535, "fdo79535.docx")
+{
+ // fdo#79535 : LO was crashing while opening document
+ // Checking there is a single page after loading a doc successfully in LO.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testCaption, "caption.docx")
+{
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Caption"), uno::UNO_QUERY);
+ // This was awt::FontSlant_ITALIC: Writer default was used instead of what is in the document.
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xStyle, "CharPosture"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGroupshapeTrackedchanges, "groupshape-trackedchanges.docx")
+{
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // Shape text was completely missing, ensure inserted text is available.
+ uno::Reference<text::XText> xText
+ = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText();
+ auto xParagraph = getParagraphOfText(1, xText);
+
+ CPPUNIT_ASSERT(hasProperty(getRun(xParagraph, 1), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"),
+ getProperty<OUString>(getRun(xParagraph, 1), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Deleted"), getRun(xParagraph, 2)->getString());
+
+ CPPUNIT_ASSERT(hasProperty(getRun(xParagraph, 4), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Insert"),
+ getProperty<OUString>(getRun(xParagraph, 4), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString(" Inserted"), getRun(xParagraph, 5)->getString());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
new file mode 100644
index 0000000000..f7df210641
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -0,0 +1,874 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/style/BreakType.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/XDependentTextField.hpp>
+#include <com/sun/star/text/RubyAdjust.hpp>
+#include <com/sun/star/text/RubyPosition.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/style/TabStop.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+#include <o3tl/string_view.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+DECLARE_OOXMLEXPORT_TEST(testTdf57589_hashColor, "tdf57589_hashColor.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA, getProperty<Color>(getParagraph(1), "ParaBackColor"));
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(2), "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(getParagraph(2), "ParaBackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAuto, "tdf90906_colAuto.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(getRun(xPara, 1, "Nazwa"), "CharBackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAutoB, "tdf90906_colAutoB.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTGREEN, getProperty<Color>(xCell, "BackColor"));
+ xCell.set(xTable->getCellByName("A2"));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+ xCell.set(xTable->getCellByName("B1"));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+ xCell.set(xTable->getCellByName("B2"));
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, getProperty<Color>(xCell, "BackColor"));
+
+ uno::Reference<text::XTextRange> xText(getParagraph(2, "Paragraphs too"));
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xText, "ParaBackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf92524_autoColor)
+{
+ loadAndReload("tdf92524_autoColor.doc");
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(getParagraph(1), "ParaBackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf116436_rowFill)
+{
+ loadAndReload("tdf116436_rowFill.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ CPPUNIT_ASSERT_EQUAL(Color(0xF8DF7C), getProperty<Color>(xCell, "BackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf121665_back2backColumnBreaks, "tdf121665_back2backColumnBreaks.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Column break type",
+ style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent0)
+{
+ loadAndReload("tdf126795_TabsRelativeToIndent0.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), "ParaTabStops");
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength());
+ CPPUNIT_ASSERT_EQUAL( css::style::TabAlign_LEFT, stops[ 0 ].Alignment );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(499), stops[ 0 ].Position );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf126795_TabsRelativeToIndent1)
+{
+ loadAndReload("tdf126795_TabsRelativeToIndent1.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), "ParaTabStops");
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength());
+ CPPUNIT_ASSERT_EQUAL( css::style::TabAlign_LEFT, stops[ 0 ].Alignment );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(499), stops[ 0 ].Position );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf46938_clearTabStop, "tdf46938_clearTabStop.docx")
+{
+ // Number of tabstops should be zero, overriding the one in the style
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs, "tdf63561_clearTabs.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), getProperty< uno::Sequence<style::TabStop> >(getParagraph(3), "ParaTabStops").getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< uno::Sequence<style::TabStop> >(getParagraph(4), "ParaTabStops").getLength());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs2, "tdf63561_clearTabs2.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty< uno::Sequence<style::TabStop> >(getParagraph(3), "ParaTabStops").getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< uno::Sequence<style::TabStop> >(getParagraph(4), "ParaTabStops").getLength());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf124384, "tdf124384.docx")
+{
+ // There should be no crash during loading of the document
+ // so, let's check just how much pages we have
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121456_tabsOffset)
+{
+ loadAndReload("tdf121456_tabsOffset.odt");
+ for (int i=2; i<8; i++)
+ {
+ uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( i ), "ParaTabStops");
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength());
+ CPPUNIT_ASSERT_EQUAL( css::style::TabAlign_RIGHT, stops[ 0 ].Alignment );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(17000), stops[ 0 ].Position );
+ }
+}
+
+// tdf#121561: make sure w:sdt/w:sdtContent around TOC is written during ODT->DOCX conversion
+CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitle)
+{
+ loadAndSave("tdf121456_tabsOffset.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r/w:t"_ostr, "Inhaltsverzeichnis");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r/w:instrText"_ostr, " TOC \\f \\o \"1-9\" \\h");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartGallery"_ostr, "val"_ostr, "Table of Contents");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartUnique"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf129525)
+{
+ loadAndSave("tdf129525.rtf");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[4]/w:t"_ostr, "Overview");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[5]/w:t"_ostr, "3");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:r[1]/w:t"_ostr, "More detailed description");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:r[2]/w:t"_ostr, "4");
+}
+
+// Related issue tdf#121561: w:sdt/w:sdtContent around TOC
+DECLARE_OOXMLEXPORT_TEST(testTdf124106, "tdf121456.docx")
+{
+ uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> text = textDocument->getText();
+ // -1 if the 'Y' character does not occur
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), text->getString().indexOf('Y'));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), text->getString().indexOf('y'));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121561_tocTitleDocx)
+{
+ loadAndSave("tdf121456_tabsOffset.odt");
+ CPPUNIT_ASSERT_EQUAL(7, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // get TOC node
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes( );
+ uno::Reference<text::XDocumentIndex> xTOCIndex(xIndexes->getByIndex(0), uno::UNO_QUERY);
+
+ // ensure TOC title was set in TOC properties
+ CPPUNIT_ASSERT_EQUAL(OUString("Inhaltsverzeichnis"), getProperty<OUString>(xTOCIndex, "Title"));
+
+ // ensure TOC end-field mark is placed inside TOC section
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[16]/w:r/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(1), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(2), "ParaAdjust"));
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("ParagraphStyles")->getByName("Another paragraph aligned to right"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(xPropertySet, "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(3), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(4), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(5), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(6), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(7), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(8), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(9), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(10), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(11), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(12), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT), getProperty<sal_Int16>(getParagraph(13), "ParaAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_RIGHT), getProperty<sal_Int16>(getParagraph(14), "ParaAdjust"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_strict.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+ bool bFoundIndentAt = false;
+ for (beans::PropertyValue const & rProp : std::as_const(aProps))
+ {
+ if (rProp.Name == "IndentAt")
+ {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("IndentAt", double(6001), rProp.Value.get<double>(), 10 );
+ bFoundIndentAt = true;
+ }
+ }
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("IndentAt defined", true, bFoundIndentAt);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf76683_negativeTwipsMeasure)
+{
+ loadAndSave("tdf76683_negativeTwipsMeasure.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col"_ostr, 2);
+ sal_uInt32 nColumn1 = getXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col[1]"_ostr, "w"_ostr).toUInt32();
+ sal_uInt32 nColumn2 = getXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col[2]"_ostr, "w"_ostr).toUInt32();
+ CPPUNIT_ASSERT( nColumn1 > nColumn2 );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf118361_RTLfootnoteSeparator, "tdf118361_RTLfootnoteSeparator.docx")
+{
+ uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footnote separator RTL", sal_Int16(2), getProperty<sal_Int16>(aPageStyle, "FootnoteLineAdjust"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf115861, "tdf115861.docx")
+{
+ // Second item in the paragraph enumeration was a table, 2nd paragraph was
+ // lost.
+ CPPUNIT_ASSERT_EQUAL(OUString("(k)"), getParagraph(2)->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD, "mailmerge.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 2), "TextField");
+ CPPUNIT_ASSERT(xTextField.is());
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xTextField, uno::UNO_QUERY_THROW);
+ uno::Reference<text::XDependentTextField> xDependent(xTextField, uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextField.Database"));
+ OUString sValue;
+ xTextField->getPropertyValue("Content") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(u"«Name»"_ustr, sValue);
+
+ uno::Reference<beans::XPropertySet> xFiledMaster = xDependent->getTextFieldMaster();
+ uno::Reference<lang::XServiceInfo> xFiledMasterServiceInfo(xFiledMaster, uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(xFiledMasterServiceInfo->supportsService("com.sun.star.text.fieldmaster.Database"));
+
+ // Defined properties: DataBaseName, Name, DataTableName, DataColumnName, DependentTextFields, DataCommandType, InstanceName, DataBaseURL
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("Name") >>= sValue);
+ CPPUNIT_ASSERT_EQUAL(OUString("Name"), sValue);
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("DataColumnName") >>= sValue);
+ CPPUNIT_ASSERT_EQUAL(OUString("Name"), sValue);
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("InstanceName") >>= sValue);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.text.fieldmaster.DataBase.Name"), sValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf115719, "tdf115719.docx")
+{
+ // This was a single page, instead of pushing the textboxes to the second
+ // page.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf115719b, "tdf115719b.docx")
+{
+ // This is similar to testTdf115719, but here the left textbox is not aligned "from left, by
+ // 0cm" but simply aligned to left, which is a different codepath.
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 1
+ // i.e. the textboxes did not appear on the 2nd page, but everything was on a single page.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123243, "tdf123243.docx")
+{
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 1; Actual:
+ // 2'; i.e. unexpected paragraph margin created 2 pages.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf116410, "tdf116410.docx")
+{
+ // Opposite of the above, was 2 pages, should be 1 page.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDefaultStyle, "defaultStyle.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Default Style", OUString("Title"), getProperty<OUString>(getParagraph(1), "ParaStyleName") );
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf147115_defaultStyle, "tdf147115_defaultStyle.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Default Style", OUString("Standard"), getProperty<OUString>(getParagraph(1), "ParaStyleName") );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf117988, "tdf117988.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf94801, "tdf94801.docx")
+{
+ // This was a 2-page document with unwanted line breaking in table cells, because
+ // the table was narrower, than defined (< 1/100 mm loss during twip to 1/100 mm conversion)
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParagraphSplitOnSectionBorder)
+{
+ loadAndSave("parasplit-on-section-border.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Test document has only two paragraphs. After splitting, it should contain
+ // three of them.
+ assertXPath(pXmlDoc, "//w:sectPr"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:p"_ostr, 3);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf44832_testSectionWithDifferentHeader)
+{
+ loadAndSave("tdf44832_section_new_header.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:headerReference"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape, "signature-line-all-props-set.docx")
+{
+ uno::Reference<drawing::XShape> xSignatureLineShape = getShape(1);
+ uno::Reference<beans::XPropertySet> xPropSet(xSignatureLineShape, uno::UNO_QUERY);
+
+ bool bIsSignatureLine;
+ xPropSet->getPropertyValue("IsSignatureLine") >>= bIsSignatureLine;
+ CPPUNIT_ASSERT_EQUAL(true, bIsSignatureLine);
+
+ bool bShowSignDate;
+ xPropSet->getPropertyValue("SignatureLineShowSignDate") >>= bShowSignDate;
+ CPPUNIT_ASSERT_EQUAL(true, bShowSignDate);
+
+ bool bCanAddComment;
+ xPropSet->getPropertyValue("SignatureLineCanAddComment") >>= bCanAddComment;
+ CPPUNIT_ASSERT_EQUAL(true, bCanAddComment);
+
+ OUString aSignatureLineId;
+ xPropSet->getPropertyValue("SignatureLineId") >>= aSignatureLineId;
+ CPPUNIT_ASSERT_EQUAL(OUString("{0EBE47D5-A1BD-4C9E-A52E-6256E5C345E9}"), aSignatureLineId);
+
+ OUString aSuggestedSignerName;
+ xPropSet->getPropertyValue("SignatureLineSuggestedSignerName") >>= aSuggestedSignerName;
+ CPPUNIT_ASSERT_EQUAL(OUString("John Doe"), aSuggestedSignerName);
+
+ OUString aSuggestedSignerTitle;
+ xPropSet->getPropertyValue("SignatureLineSuggestedSignerTitle") >>= aSuggestedSignerTitle;
+ CPPUNIT_ASSERT_EQUAL(OUString("Farmer"), aSuggestedSignerTitle);
+
+ OUString aSuggestedSignerEmail;
+ xPropSet->getPropertyValue("SignatureLineSuggestedSignerEmail") >>= aSuggestedSignerEmail;
+ CPPUNIT_ASSERT_EQUAL(OUString("john@thefarmers.com"), aSuggestedSignerEmail);
+
+ OUString aSigningInstructions;
+ xPropSet->getPropertyValue("SignatureLineSigningInstructions") >>= aSigningInstructions;
+ CPPUNIT_ASSERT_EQUAL(OUString("Check the machines!"), aSigningInstructions);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf117805)
+{
+ loadAndSave("tdf117805.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
+ = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
+ maTempFile.GetURL());
+ // This failed, the header was lost. It's still referenced at an incorrect
+ // location in document.xml, though.
+ CPPUNIT_ASSERT(xNameAccess->hasByName("word/header1.xml"));
+
+ uno::Reference<text::XText> textbox(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(8, getParagraphs(textbox));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf113183, "tdf113183.docx")
+{
+ // The horizontal positioning of the star shape affected the positioning of
+ // the triangle one, so the triangle was outside the page frame.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nPageLeft = getXPath(pXmlDoc, "/root/page[1]/infos/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nPageWidth = getXPath(pXmlDoc, "/root/page[1]/infos/bounds"_ostr, "width"_ostr).toInt32();
+ sal_Int32 nShapeLeft
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "left"_ostr)
+ .toInt32();
+ sal_Int32 nShapeWidth
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "width"_ostr)
+ .toInt32();
+ // Make sure the second triangle shape is within the page bounds (with ~1px tolerance).
+ CPPUNIT_ASSERT_GREATEREQUAL(nShapeLeft + nShapeWidth, nPageLeft + nPageWidth + 21);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGraphicObjectFliph, "graphic-object-fliph.docx")
+{
+ CPPUNIT_ASSERT(getProperty<bool>(getShape(1), "HoriMirroredOnEvenPages"));
+ CPPUNIT_ASSERT(getProperty<bool>(getShape(1), "HoriMirroredOnOddPages"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf113547, "tdf113547.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aProps(xLevels->getByIndex(0)); // 1st level
+ // This was 0, first-line left margin of the numbering was lost.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-635), aProps["FirstLineIndent"].get<sal_Int32>());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf113399)
+{
+ loadAndReload("tdf113399.doc");
+ // 0 padding was not preserved
+ // In LO 0 is the default, but in OOXML format the default is 254 / 127
+ uno::Reference<beans::XPropertySet> xPropSet(getShape(1), uno::UNO_QUERY);
+ sal_Int32 nPaddingValue;
+ xPropSet->getPropertyValue("TextLeftDistance") >>= nPaddingValue;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nPaddingValue);
+ xPropSet->getPropertyValue("TextRightDistance") >>= nPaddingValue;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nPaddingValue);
+ xPropSet->getPropertyValue("TextUpperDistance") >>= nPaddingValue;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nPaddingValue);
+ xPropSet->getPropertyValue("TextLowerDistance") >>= nPaddingValue;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nPaddingValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf114882, "tdf114882.docx")
+{
+ // fastserializer must not fail assertion because of mismatching elements
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf49073, "tdf49073.docx")
+{
+ // test case for Asian phontic guide (ruby text.)
+ sal_Unicode aRuby[3] = {0x304D,0x3082,0x3093};
+ OUString sRuby(aRuby, SAL_N_ELEMENTS(aRuby));
+ CPPUNIT_ASSERT_EQUAL(sRuby,getProperty<OUString>(getParagraph(1)->getStart(), "RubyText"));
+ OUString sStyle = getProperty<OUString>( getParagraph(1)->getStart(), "RubyCharStyleName");
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("CharacterStyles")->getByName(sStyle), uno::UNO_QUERY );
+ CPPUNIT_ASSERT_EQUAL(5.f, getProperty<float>(xPropertySet, "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::RubyAdjust_CENTER) ,getProperty<sal_Int16>(getParagraph(2)->getStart(),"RubyAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::RubyAdjust_BLOCK) ,getProperty<sal_Int16>(getParagraph(3)->getStart(),"RubyAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::RubyAdjust_INDENT_BLOCK),getProperty<sal_Int16>(getParagraph(4)->getStart(),"RubyAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::RubyAdjust_LEFT) ,getProperty<sal_Int16>(getParagraph(5)->getStart(),"RubyAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::RubyAdjust_RIGHT) ,getProperty<sal_Int16>(getParagraph(6)->getStart(),"RubyAdjust"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::RubyPosition::INTER_CHARACTER) ,getProperty<sal_Int16>(getParagraph(7)->getStart(),"RubyPosition"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf114703, "tdf114703.docx")
+{
+ uno::Reference<container::XIndexAccess> xRules
+ = getProperty<uno::Reference<container::XIndexAccess>>(
+ getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
+ // This was 0, level override "default" replaced the non-default value from
+ // the abstract level.
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(-1000),
+ comphelper::SequenceAsHashMap(xRules->getByIndex(0))["FirstLineIndent"].get<sal_Int32>());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf113258, "tdf113258.docx")
+{
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ // This was 494, i.e. automatic spacing resulted in non-zero paragraph top
+ // margin for the first paragraph in a shape.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(xShape->getStart(), "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf113258_noBeforeAutospacing, "tdf113258_noBeforeAutospacing.docx")
+{
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ // This was 0, i.e. disabled automatic spacing still resulted in zero paragraph
+ // top margin for the first paragraph in a shape.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1764),
+ getProperty<sal_Int32>(xShape->getStart(), "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf142542_cancelledAutospacing, "tdf142542_cancelledAutospacing.docx")
+{
+ //Direct formatting disabling autoSpacing must override paragraph-style's autoSpacing.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf137655)
+{
+ loadAndSave("tdf137655.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // These were 280.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p[1]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:p[1]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+
+ //tdf#142542: ensure that the original beforeAutospacing = 0 is not changed.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p[1]/w:pPr/w:spacing"_ostr, "beforeAutospacing"_ostr, "0");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf120511_eatenSection, "tdf120511_eatenSection.docx")
+{
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nHeight = getXPath(pXmlDoc, "/root/page[1]/infos/prtBounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nWidth = getXPath(pXmlDoc, "/root/page[1]/infos/prtBounds"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE( "Page1 is portrait", nWidth < nHeight );
+ nHeight = getXPath(pXmlDoc, "/root/page[2]/infos/prtBounds"_ostr, "height"_ostr).toInt32();
+ nWidth = getXPath(pXmlDoc, "/root/page[2]/infos/prtBounds"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE( "Page2 is landscape", nWidth > nHeight );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104354, "tdf104354.docx")
+{
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ // This was 494, i.e. automatic spacing resulted in non-zero paragraph top
+ // margin for the first paragraph in a text frame.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(xShape->getStart(), "ParaTopMargin"));
+ // still 494 in the second paragraph
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494),
+ getProperty<sal_Int32>(xShape->getEnd(), "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104354_firstParaInSection, "tdf104354_firstParaInSection.docx")
+{
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XText> xText(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494),
+ getProperty<sal_Int32>(getParagraphOfText(1, xText), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageBreak_after)
+{
+ loadAndReload("pageBreak_after.odt");
+ // The problem was that the page breakAfter put the empty page BEFORE the table
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ assertXPath(pDump, "/root/page[1]/body/tab"_ostr, 1);
+ // There should be two pages actually - a blank page after a page break.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Did you fix?? Table should be on page one of two", 1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf107035, "tdf107035.docx")
+{
+ // Select the second run containing the page number field
+ auto xPgNumRun = getRun(getParagraph(1), 2, "1");
+
+ // Check that the page number field colour is set to "automatic".
+ Color nPgNumColour = getProperty<Color>(xPgNumRun, "CharColor");
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, nPgNumColour);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, "tdf112118.docx")
+{
+ // The resulting left margin width (2081) differs from its DOC counterpart from ww8export2.cxx,
+ // because DOCX import does two conversions between mm/100 and twips on the route, losing one
+ // twip on the road and arriving with a value that is 2 mm/100 less. I don't see an obvious way
+ // to avoid that.
+ static const struct {
+ const char* styleName;
+ struct {
+ const char* sideName;
+ sal_Int32 nMargin;
+ sal_Int32 nBorderDistance;
+ sal_Int32 nBorderWidth;
+ } sideParams[4];
+ } styleParams[] = { // Margin (MS-style), border distance, border width
+ {
+ "Standard",
+ {
+ { "Top", 496, 847, 159 }, // 851 twip, 24 pt (from text), 4.5 pt
+ { "Left", 2081, 706, 212 }, // 1701 twip, 20 pt (from text), 6.0 pt
+ { "Bottom", 1401, 564, 35 }, // 1134 twip, 16 pt (from text), 1.0 pt
+ { "Right", 3471, 423, 106 } // 2268 twip, 12 pt (from text), 3.0 pt
+ }
+ },
+ {
+ "Converted1",
+ {
+ { "Top", 847, 496, 159 }, // 851 twip, 24 pt (from edge), 4.5 pt
+ { "Left", 706, 2081, 212 }, // 1701 twip, 20 pt (from edge), 6.0 pt
+ { "Bottom", 564, 1401, 35 }, // 1134 twip, 16 pt (from edge), 1.0 pt
+ { "Right", 423, 3471, 106 } // 2268 twip, 12 pt (from edge), 3.0 pt
+ }
+ }
+ };
+ auto xStyles = getStyles("PageStyles");
+
+ for (const auto& style : styleParams)
+ {
+ const OUString sName = OUString::createFromAscii(style.styleName);
+ uno::Reference<beans::XPropertySet> xStyle(xStyles->getByName(sName), uno::UNO_QUERY_THROW);
+ for (const auto& side : style.sideParams)
+ {
+ const OUString sSide = OUString::createFromAscii(side.sideName);
+ const OString sStage = style.styleName + OString::Concat(" ") + side.sideName;
+
+ sal_Int32 nMargin = getProperty<sal_Int32>(xStyle, sSide + "Margin");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(sStage + " margin width").getStr(),
+ side.nMargin, nMargin);
+
+ sal_Int32 nBorderDistance = getProperty<sal_Int32>(xStyle, sSide + "BorderDistance");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(sStage + " border distance").getStr(),
+ side.nBorderDistance, nBorderDistance);
+
+ table::BorderLine aBorder = getProperty<table::BorderLine>(xStyle, sSide + "Border");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(sStage + " border width").getStr(),
+ side.nBorderWidth,
+ sal_Int32(aBorder.OuterLineWidth + aBorder.InnerLineWidth + aBorder.LineDistance));
+
+ // tdf#116472: check that AUTO border color is imported as black
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(sStage + " border color").getStr(),
+ sal_Int32(COL_BLACK), aBorder.Color);
+ }
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf82177_outsideCellBorders, "tdf82177_outsideCellBorders.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference< text::XTextTable > xTable( xTables->getByIndex(0), uno::UNO_QUERY );
+ uno::Reference< table::XCell > xCell = xTable->getCellByName( "E4" );
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "TopBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "LeftBorder").LineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf82177_insideCellBorders, "tdf82177_insideCellBorders.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference< text::XTextTable > xTable( xTables->getByIndex(0), uno::UNO_QUERY );
+ uno::Reference< table::XCell > xCell = xTable->getCellByName( "E4" );
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "TopBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "LeftBorder").LineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf82177_tblBorders, "tdf82177_tblBorders.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference< text::XTextTable > xTable( xTables->getByIndex(0), uno::UNO_QUERY );
+ uno::Reference< table::XCell > xCell = xTable->getCellByName( "A5" );
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "BottomBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "LeftBorder").LineWidth);
+ xCell.set(xTable->getCellByName( "E5" ));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "TopBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(xCell, "LeftBorder").LineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf119760_positionCellBorder, "tdf119760_positionCellBorder.docx")
+{
+ //inconsistent in Word even. 2016 positions on last row, 2003 positions on first cell.
+ sal_Int32 nRowLeft = parseDump("/root/page/body/tab[4]/row[1]/infos/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nTextLeft = parseDump("/root/page/body/tab[4]/row[1]/cell[1]/txt/infos/bounds"_ostr, "left"_ostr).toInt32();
+ CPPUNIT_ASSERT( nRowLeft < nTextLeft );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf98620_environmentBiDi)
+{
+ loadAndReload("tdf98620_environmentBiDi.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( getParagraph(1), "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_RIGHT), getProperty<sal_Int32>( getParagraph(1), "ParaAdjust" ));
+
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( getParagraph(2), "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_RIGHT), getProperty<sal_Int32>( getParagraph(2), "ParaAdjust" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf116976, "tdf116976.docx")
+{
+ // This was 0, relative size of shape after bitmap was ignored.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(40),
+ getProperty<sal_Int16>(getShape(1), "RelativeWidth"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf116985, "tdf116985.docx")
+{
+ // Body frame width is 10800, 40% is the requested relative width, with 144
+ // spacing to text on the left/right side. So ideal width would be 4032,
+ // was 3431. Allow one pixel tolerance, though.
+ sal_Int32 nWidth
+ = parseDump("/root/page[1]/body/txt[1]/anchored/fly/infos/bounds"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT(nWidth > 4000);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // This raised a lang::IndexOutOfBoundsException, table was missing from
+ // the import result.
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("D1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("D1"), xCell->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf107969, "tdf107969.docx")
+{
+ // A VML object in a footnote's tracked changes caused write past end of document.xml at export to docx.
+ // After that, importing after export failed with
+ // SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word/document.xml'.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOpenDocumentAsReadOnly, "open-as-read-only.docx")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ CPPUNIT_ASSERT(pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNoDefault, "noDefault.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+
+ // Row 1: color directly applied to the paragraph, overrides table and style colors
+ CPPUNIT_ASSERT_EQUAL(Color(0x2E74B5), getProperty<Color>(getRun(xPara,1), "CharColor"));
+
+ // Row2: (still part of firstRow table-style) ought to use the Normal style color, not the table-style color(5B9BD5)
+ //xCell.set(xTable->getCellByName("A2"), uno::UNO_QUERY);
+ //xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ //xParaEnum = xParaEnumAccess->createEnumeration();
+ //xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ //CPPUNIT_ASSERT_EQUAL(sal_Int32(COL_LIGHTMAGENTA), getProperty<sal_Int32>(getRun(xPara,1), "CharColor"));
+
+ // Row 3+: Normal style still applied, even if nothing is specified with w:default="1"
+ xCell.set(xTable->getCellByName("A3"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum = xParaEnumAccess->createEnumeration();
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(COL_LIGHTMAGENTA), getProperty<sal_Int32>(getRun(xPara,1), "CharColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMarginsFromStyle, "margins_from_style.docx")
+{
+ // tdf#118521 paragraphs with direct formatting of top or bottom margins have
+ // lost the other margin comes from paragraph style, getting a bad
+ // margin from the default style
+
+ // from direct formatting
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(35), getProperty<sal_Int32>(getParagraph(1), "ParaTopMargin"));
+ // from paragraph style
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(106), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
+
+ // from paragraph style
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(388), getProperty<sal_Int32>(getParagraph(3), "ParaTopMargin"));
+ // from direct formatting
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(600), getProperty<sal_Int32>(getParagraph(3), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf134784, "tdf134784.docx")
+{
+ uno::Reference<text::XText> textbox(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(3, getParagraphs(textbox));
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, textbox);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(212), getProperty<sal_Int32>(xParagraph, "ParaBottomMargin"));
+
+ // This wasn't zero (it was inherited from style of the previous paragraph in the main text)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xParagraph, "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf136955, "tdf134784.docx")
+{
+ uno::Reference<text::XText> textbox(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(3, getParagraphs(textbox));
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(2, textbox);
+
+ // These weren't zero (values inherited from style of the previous paragraph in the main text)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xParagraph, "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xParagraph, "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104348_contextMargin, "tdf104348_contextMargin.docx")
+{
+ // tdf#104348 shows that ContextMargin belongs with Top/Bottom handling
+
+ uno::Reference<beans::XPropertySet> xMyStyle(getStyles("ParagraphStyles")->getByName("MyStyle"), uno::UNO_QUERY);
+ // from paragraph style - this is what direct formatting should equal
+ sal_Int32 nMargin = getProperty<sal_Int32>(xMyStyle, "ParaBottomMargin");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nMargin);
+ // from direct formatting
+ CPPUNIT_ASSERT_EQUAL(nMargin, getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf152310, "ColorOverwritten.docx")
+{
+ uno::Reference<text::XText> xShape(getShape(1), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(Color(0xFF0000),
+ getProperty<Color>(getParagraphOfText(1, xShape), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0x00b050),
+ getProperty<Color>(getParagraphOfText(2, xShape), "CharColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf149996, "lorem_hyperlink.fodt")
+{
+ // Without the accompanying fix in place, this test would have crashed,
+ // because the exported file was corrupted.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGroupedShapeLink, "grouped_link.docx")
+{
+ // tdf#145147 Hyperlink in grouped shape not imported
+ // tdf#154469 Hyperlink in grouped shape not exported
+ uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.libreoffice.org"),
+ getProperty<OUString>(xGroupShape->getByIndex(0), "Hyperlink"));
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.documentfoundation.org"),
+ getProperty<OUString>(xGroupShape->getByIndex(1), "Hyperlink"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf147810, "tdf147810.odt")
+{
+ // Without the accompanying fix in place, this test would have crashed,
+ // because the exported file was corrupted.
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
new file mode 100644
index 0000000000..c77936a8d6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -0,0 +1,2348 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XDependentTextField.hpp>
+#include <com/sun/star/text/XFormField.hpp>
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/document/XViewDataSupplier.hpp>
+#include <o3tl/string_view.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTableCrossReference)
+{
+ loadAndReload("table_cross_reference.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // tdf#42346: Cross references to tables were not saved
+ // MSO uses simple bookmarks for referencing table caption, so we do the same by export
+
+ // Check whether we have all the necessary bookmarks exported and imported back
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), xBookmarksByIdx->getCount());
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_number_only"));
+
+ // Check bookmark text ranges
+ {
+ uno::Reference<text::XTextContent> xContent(xBookmarksByName->getByName("Ref_Table0_full"),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table 1: Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table0_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table 1"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table0_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table0_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xRange->getString());
+ }
+
+ // Check reference fields
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+
+ sal_uInt16 nIndex = 0;
+ while (xFields->hasMoreElements())
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xFields->nextElement(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xServiceInfo, uno::UNO_QUERY);
+ switch (nIndex)
+ {
+ // Full reference to table caption
+ case 0:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Table 1: Table caption"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Table0_full"), sValue);
+ xPropertySet->getPropertyValue("SequenceNumber") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nValue);
+ break;
+ }
+ // Page style reference / exported as simple page reference
+ case 1:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Table0_full"), sValue);
+ xPropertySet->getPropertyValue("SequenceNumber") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nValue);
+ break;
+ }
+ // Reference to table number
+ case 2:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Table0_number_only"), sValue);
+ xPropertySet->getPropertyValue("SequenceNumber") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nValue);
+ break;
+ }
+ // Reference to caption only
+ case 3:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Table caption"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Table0_caption_only"), sValue);
+ xPropertySet->getPropertyValue("SequenceNumber") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nValue);
+ break;
+ }
+ // Reference to category and number
+ case 4:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Table 1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Table0_label_and_number"), sValue);
+ xPropertySet->getPropertyValue("SequenceNumber") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nValue);
+ break;
+ }
+ // Reference to page of the table
+ case 5:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Table0_full"), sValue);
+ xPropertySet->getPropertyValue("SequenceNumber") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nValue);
+ break;
+ }
+ // Above / below reference
+ case 6:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ sal_Int16 nValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("above"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Table0_full"), sValue);
+ xPropertySet->getPropertyValue("SequenceNumber") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nValue);
+ break;
+ }
+ default:
+ break;
+ }
+ ++nIndex;
+ }
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(8), nIndex);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableCrossReferenceCustomFormat)
+{
+ loadAndReload("table_cross_reference_custom_format.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // tdf#42346: Cross references to tables were not saved
+ // Check also captions with custom formatting
+
+ // Check whether we have all the necessary bookmarks exported and imported back
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(16), xBookmarksByIdx->getCount());
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table0_number_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table1_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table1_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table1_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table1_number_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table2_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table2_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table2_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table2_number_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table3_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table3_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table3_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Table3_number_only"));
+
+ // Check bookmark text ranges
+ // First table's caption
+ {
+ uno::Reference<text::XTextContent> xContent(xBookmarksByName->getByName("Ref_Table0_full"),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("1. Table: Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table0_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("1. Table"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table0_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table0_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xRange->getString());
+ }
+ // Second table's caption
+ {
+ uno::Reference<text::XTextContent> xContent(xBookmarksByName->getByName("Ref_Table1_full"),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("2. TableTable caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table1_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("2. Table"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table1_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table1_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), xRange->getString());
+ }
+ // Third table's caption
+ {
+ uno::Reference<text::XTextContent> xContent(xBookmarksByName->getByName("Ref_Table2_full"),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("3) Table Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table2_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("3) Table"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table2_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table2_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), xRange->getString());
+ }
+ // Fourth table's caption
+ {
+ uno::Reference<text::XTextContent> xContent(xBookmarksByName->getByName("Ref_Table3_full"),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table 4- Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table3_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table 4"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table3_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Table caption"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Table3_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("4"), xRange->getString());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testObjectCrossReference)
+{
+ loadAndReload("object_cross_reference.odt");
+ CPPUNIT_ASSERT_EQUAL(10, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ // tdf#42346: Cross references to objects were not saved
+ // MSO uses simple bookmarks for referencing table caption, so we do the same by export
+
+ // Check whether we have all the necessary bookmarks exported and imported back
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(15), xBookmarksByIdx->getCount());
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Drawing0_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Drawing0_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Drawing0_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Drawing0_number_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Drawing1_full"));
+
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Illustration0_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Illustration0_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Illustration0_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Illustration0_number_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Illustration1_caption_only"));
+
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Text0_full"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Text0_label_and_number"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Text0_caption_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Text0_number_only"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Ref_Text1_label_and_number"));
+
+ // Check bookmark text ranges
+ // Cross references to shapes
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Drawing0_full"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Drawing 1: A rectangle"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Drawing0_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Drawing 1"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Drawing0_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("A rectangle"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Drawing0_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Drawing1_full"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Drawing 2: a circle"), xRange->getString());
+ }
+
+ // Cross references to pictures
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Illustration0_full"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Illustration 1: A picture"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Illustration0_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Illustration 1"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Illustration0_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("A picture"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Illustration0_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Illustration1_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("another image"), xRange->getString());
+ }
+
+ // Cross references to text frames
+ {
+ uno::Reference<text::XTextContent> xContent(xBookmarksByName->getByName("Ref_Text0_full"),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Text 1: A frame"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Text0_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Text 1"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Text0_caption_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("A frame"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Text0_number_only"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xRange->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xContent(
+ xBookmarksByName->getByName("Ref_Text1_label_and_number"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("Text 2"), xRange->getString());
+ }
+
+ // Check reference fields
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+
+ sal_uInt16 nIndex = 0;
+ while (xFields->hasMoreElements())
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xFields->nextElement(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xServiceInfo, uno::UNO_QUERY);
+ switch (nIndex)
+ {
+ // Reference to image number
+ case 0:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Illustration0_number_only"), sValue);
+ break;
+ }
+ // Full reference to the circle shape
+ case 1:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Drawing 2: a circle"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Drawing1_full"), sValue);
+ break;
+ }
+ // Caption only reference to the second picture
+ case 2:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("another image"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Illustration1_caption_only"), sValue);
+ break;
+ }
+ // Category and number reference to second text frame
+ case 3:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Text 2"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Text1_label_and_number"), sValue);
+ break;
+ }
+ // Full reference to rectangle shape
+ case 4:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Drawing 1: A rectangle"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Drawing0_full"), sValue);
+ break;
+ }
+ // Caption only reference to rectangle shape
+ case 5:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("A rectangle"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Drawing0_caption_only"), sValue);
+ break;
+ }
+ // Category and number reference to rectangle shape
+ case 6:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Drawing 1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Drawing0_label_and_number"), sValue);
+ break;
+ }
+ // Reference to rectangle shape's number
+ case 7:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Drawing0_number_only"), sValue);
+ break;
+ }
+ // Full reference to first text frame
+ case 8:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Text 1: A frame"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Text0_full"), sValue);
+ break;
+ }
+ // Caption only reference to first text frame
+ case 9:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("A frame"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Text0_caption_only"), sValue);
+ break;
+ }
+ // Category and number reference to first text frame
+ case 10:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Text 1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Text0_label_and_number"), sValue);
+ break;
+ }
+ // Number only reference to first text frame
+ case 11:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Text0_number_only"), sValue);
+ break;
+ }
+ // Full reference to first picture
+ case 12:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Illustration 1: A picture"),
+ sValue.trim()); // fails on MAC without trim
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Illustration0_full"), sValue);
+ break;
+ }
+ // Reference to first picture' caption
+ case 13:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("A picture"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Illustration0_caption_only"), sValue);
+ break;
+ }
+ // Category and number reference to first picture
+ case 14:
+ {
+ CPPUNIT_ASSERT(
+ xServiceInfo->supportsService("com.sun.star.text.TextField.GetReference"));
+ OUString sValue;
+ xPropertySet->getPropertyValue("CurrentPresentation") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Illustration 1"), sValue);
+ xPropertySet->getPropertyValue("SourceName") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("Ref_Illustration0_label_and_number"), sValue);
+ break;
+ }
+ default:
+ break;
+ }
+ ++nIndex;
+ }
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(21), nIndex);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf112202, "090716_Studentische_Arbeit_VWS.docx")
+{
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // page 1 header: 1 paragraph, 2 flys, 1 draw object
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt/anchored/fly"_ostr, 2);
+ if (isExported()) // somehow there's an additional shape on re-import?
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt/anchored/SwAnchoredDrawObject"_ostr, 2);
+ else
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt/anchored/SwAnchoredDrawObject"_ostr, 1);
+
+ // page 2 header: 3 paragraphs, 1 table, 1 fly on last paragraph
+ assertXPath(pXmlDoc, "/root/page[2]/header/txt"_ostr, 3);
+ assertXPath(pXmlDoc, "/root/page[2]/header/tab"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page[2]/header/txt/anchored/fly"_ostr, 1);
+
+ // page 3 header: 1 table, 1 paragraph, no text
+ assertXPath(pXmlDoc, "/root/page[3]/header/txt"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page[3]/header/tab"_ostr, 1);
+ assertXPath(pXmlDoc,
+ "/root/page[3]/header/tab/row/cell/txt/SwParaPortion/SwLineLayout/child::*"_ostr,
+ 0);
+ assertXPath(pXmlDoc, "/root/page[3]/header//anchored"_ostr, 0);
+ // tdf#149313: ensure 3rd page does not have extra empty paragraph at top
+ assertXPathContent(pXmlDoc, "/root/page[3]/body//txt"_ostr, "AUFGABENSTELLUNG");
+
+ // page 4 header: 1 table, 1 paragraph, with text
+ assertXPath(pXmlDoc, "/root/page[4]/header/txt"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page[4]/header/tab"_ostr, 1);
+ assertXPath(
+ pXmlDoc,
+ "/root/page[4]/header/tab/row[1]/cell[1]/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr, "Titel der studentischen Arbeit");
+ assertXPath(pXmlDoc, "/root/page[4]/header//anchored"_ostr, 0);
+
+ // page 5: same as page 4
+ assertXPath(pXmlDoc, "/root/page[5]/header/txt"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page[5]/header/tab"_ostr, 1);
+ assertXPath(
+ pXmlDoc,
+ "/root/page[5]/header/tab/row[1]/cell[1]/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr, "Titel der studentischen Arbeit");
+ assertXPath(pXmlDoc, "/root/page[5]/header//anchored"_ostr, 0);
+
+ // page 6: same as page 4
+ assertXPath(pXmlDoc, "/root/page[6]/header/txt"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page[6]/header/tab"_ostr, 1);
+ assertXPath(
+ pXmlDoc,
+ "/root/page[6]/header/tab/row[1]/cell[1]/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr, "Titel der studentischen Arbeit");
+ assertXPath(pXmlDoc, "/root/page[6]/header//anchored"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf79435_legacyInputFields)
+{
+ loadAndReload("tdf79435_legacyInputFields.doc");
+ //using .doc input file to verify cross-format compatibility.
+ uno::Reference<text::XFormField> xFormField
+ = getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(5), 3), "Bookmark");
+ uno::Reference<container::XNameContainer> xParameters(xFormField->getParameters());
+
+ OUString sTmp;
+ // Doc import problems, so disabling tests
+ //xParameters->getByName("EntryMacro") >>= sTmp;
+ //CPPUNIT_ASSERT_EQUAL(OUString("test"), sTmp);
+ //xParameters->getByName("Help") >>= sTmp;
+ //CPPUNIT_ASSERT_EQUAL(OUString("F1Help"), sTmp);
+ //xParameters->getByName("ExitMacro") >>= sTmp;
+ //CPPUNIT_ASSERT_EQUAL(OUString("test"), sTmp);
+ xParameters->getByName("Hint") >>= sTmp;
+ CPPUNIT_ASSERT_EQUAL(OUString("StatusHelp"), sTmp);
+ //xParameters->getByName("Content") >>= sTmp;
+ //CPPUNIT_ASSERT_EQUAL(OUString("Camelcase"), sTmp);
+ //xParameters->getByName("Format") >>= sTmp;
+ //CPPUNIT_ASSERT_EQUAL(OUString("TITLE CASE"), sTmp);
+
+ sal_uInt16 nMaxLength = 0;
+ xParameters->getByName("MaxLength") >>= nMaxLength;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Max Length", sal_uInt16(10), nMaxLength);
+
+ // too bad this is based on character runs - just found try trial and error.
+ xFormField
+ = getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(6), 2), "Bookmark");
+ xParameters.set(xFormField->getParameters());
+ xParameters->getByName("Type") >>= sTmp;
+ CPPUNIT_ASSERT_EQUAL(OUString("calculated"), sTmp);
+
+ xFormField
+ = getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(7), 2), "Bookmark");
+ xParameters.set(xFormField->getParameters());
+ xParameters->getByName("Type") >>= sTmp;
+ CPPUNIT_ASSERT_EQUAL(OUString("currentDate"), sTmp);
+
+ xFormField
+ = getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(7), 7), "Bookmark");
+ xParameters.set(xFormField->getParameters());
+ xParameters->getByName("Type") >>= sTmp;
+ CPPUNIT_ASSERT_EQUAL(OUString("currentTime"), sTmp);
+
+ xFormField
+ = getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(8), 2), "Bookmark");
+ xParameters.set(xFormField->getParameters());
+ xParameters->getByName("Type") >>= sTmp;
+ CPPUNIT_ASSERT_EQUAL(OUString("number"), sTmp);
+
+ xFormField
+ = getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(8), 7), "Bookmark");
+ xParameters.set(xFormField->getParameters());
+ xParameters->getByName("Type") >>= sTmp;
+ CPPUNIT_ASSERT_EQUAL(OUString("date"), sTmp);
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "name"_ostr,
+ "compatibilityMode");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "uri"_ostr,
+ "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "val"_ostr, "11");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf120224_textControlCrossRef, "tdf120224_textControlCrossRef.docx")
+{
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+ xRunEnum->nextElement(); //Text
+ uno::Reference<beans::XPropertySet> xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("TextFieldStart"),
+ getProperty<OUString>(xPropertySet, "TextPortionType"));
+ uno::Reference<container::XNamed> xBookmark(
+ getProperty<uno::Reference<beans::XPropertySet>>(xPropertySet, "Bookmark"), uno::UNO_QUERY);
+
+ // Critical test: does TextField's bookmark name match cross-reference?
+ const OUString& sTextFieldName(xBookmark->getName());
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sTextFieldName, getProperty<OUString>(xPropertySet, "SourceName"));
+
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ // TextFields should not be turned into real bookmarks.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xBookmarksByIdx->getCount());
+
+ // The actual name isn't critical, but if it fails, it is worth asking why.
+ CPPUNIT_ASSERT_EQUAL(OUString("Text1"), sTextFieldName);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf117504_numberingIndent, "tdf117504_numberingIndent.docx")
+{
+ OUString sName = getProperty<OUString>(getParagraph(1), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Paragraph has numbering style", !sName.isEmpty());
+
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ getStyles("ParagraphStyles")->getByName("Revision"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(353), getProperty<sal_Int32>(xPropertySet, "ParaBottomMargin"));
+ xPropertySet.set(getStyles("ParagraphStyles")->getByName("Body Note"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPropertySet, "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+
+ sal_Int32 nHeight = xShape->getSize().Height;
+
+ // Rounding errors
+ sal_Int32 nDifference = 5150 - nHeight;
+ std::stringstream ss;
+ ss << "Difference: " << nDifference << " TotalHeight: " << nHeight;
+ CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference <= 4);
+ CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference >= -4);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+
+ // Rounding errors
+ sal_Int32 nHeight = xShape->getSize().Height;
+ sal_Int32 nDifference = 8729 - nHeight;
+ std::stringstream ss;
+ ss << "Difference: " << nDifference << " TotalHeight: " << nHeight;
+ CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference <= 4);
+ CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference >= -4);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVMLShapetypeId)
+{
+ loadAndSave("controlshape.fodt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // must be _x0000_t<NR>
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:r/mc:AlternateContent/"
+ "mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wps:wsp/wps:txbx/"
+ "w:txbxContent/w:p/w:r/w:object/v:shapetype"_ostr,
+ "id"_ostr, "_x0000_t75");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:r/mc:AlternateContent/"
+ "mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wps:wsp/wps:txbx/"
+ "w:txbxContent/w:p/w:r/w:object/v:shape"_ostr,
+ "type"_ostr, "#_x0000_t75");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf73547)
+{
+ loadAndSave("tdf73547-dash.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ double nD = getXPath(pXmlDoc, "//a:custDash/a:ds[1]"_ostr, "d"_ostr).toDouble();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(105000.0, nD, 5000.0); // was 100000
+ double nSp = getXPath(pXmlDoc, "//a:custDash/a:ds[1]"_ostr, "sp"_ostr).toDouble();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(35000.0, nSp, 5000.0); // was 100000
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf119143, "tdf119143.docx")
+{
+ // The runs inside <w:dir> were ignored
+ const OUString sParaText = getParagraph(1)->getString();
+ CPPUNIT_ASSERT_EQUAL(
+ u"عندما يريد العالم أن يتكلّم ‬ ، فهو يتحدّث "
+ u"بلغة "
+ u"يونيكود. تسجّل الآن لحضور المؤتمر الدولي العاشر "
+ u"ليونيكود (Unicode Conference)، الذي سيعقد في 10-12 "
+ u"آذار 1997 بمدينة مَايِنْتْس، ألمانيا. و سيجمع المؤتمر "
+ u"بين خبراء من كافة قطاعات الصناعة على الشبكة "
+ u"العالمية انترنيت ويونيكود، حيث ستتم، على الصعيدين "
+ u"الدولي والمحلي على حد سواء مناقشة سبل استخدام "
+ u"يونكود في النظم القائمة وفيما يخص التطبيقات "
+ u"الحاسوبية، الخطوط، تصميم النصوص والحوسبة متعددة "
+ u"اللغات."_ustr,
+ sParaText);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf105444)
+{
+ loadAndSave("tdf105444.docx");
+ xmlDocUniquePtr pXmlComm = parseExport("word/comments.xml");
+ // there is no extra paragraph on Win32, only a single one.
+ assertXPath(pXmlComm, "/w:comments/w:comment/w:p"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx")
+{
+ // Paragraphs were not part of a numbering anymore after roundtrip.
+ uno::Reference<beans::XPropertySet> xPara1(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara1.is());
+ CPPUNIT_ASSERT(xPara1->getPropertyValue("NumberingRules").hasValue());
+
+ uno::Reference<beans::XPropertySet> xPara2(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara2.is());
+ CPPUNIT_ASSERT(xPara2->getPropertyValue("NumberingRules").hasValue());
+
+ uno::Reference<beans::XPropertySet> xPara3(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara3.is());
+ CPPUNIT_ASSERT(xPara3->getPropertyValue("NumberingRules").hasValue());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf138780)
+{
+ loadAndReload("tdf138780.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Paragraphs were not part of a numbering anymore after roundtrip.
+ uno::Reference<beans::XPropertySet> xPara1(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara1.is());
+ CPPUNIT_ASSERT(xPara1->getPropertyValue("NumberingRules").hasValue());
+
+ uno::Reference<beans::XPropertySet> xPara2(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara2.is());
+ CPPUNIT_ASSERT(xPara2->getPropertyValue("NumberingRules").hasValue());
+
+ uno::Reference<beans::XPropertySet> xPara3(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara3.is());
+ CPPUNIT_ASSERT(xPara3->getPropertyValue("NumberingRules").hasValue());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134618)
+{
+ loadAndSave("tdf134618.doc");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ //Without the fix it in place, it would have failed with
+ //- Expected: 1
+ //- Actual : 9
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r"_ostr, 1);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf99631)
+{
+ loadAndSave("tdf99631.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "//w:object"_ostr, 2);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object"_ostr, 2);
+ // first XSLX OLE object (1:1 scale)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:object[1]"_ostr, "dxaOrig"_ostr,
+ "2561");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:object[1]"_ostr, "dyaOrig"_ostr,
+ "513");
+ // second XLSX OLE object (same content + 1 row, but zoomed)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:object[1]"_ostr, "dxaOrig"_ostr,
+ "2561");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:object[1]"_ostr, "dyaOrig"_ostr,
+ "769");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf138899)
+{
+ loadAndSave("tdf138899.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ // This was 6, not removed empty temporary paragraph at the end of the section
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p"_ostr, 5);
+
+ //tdf#134385: Paragraph property to "add space between paragraphs of the same style" was lost
+ assertXPath(pXmlDocument, "//w:p[1]/w:pPr/w:contextualSpacing"_ostr, "val"_ostr, "false");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf122563)
+{
+ loadAndSave("tdf122563.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object"_ostr, 1);
+ // Size of the embedded OLE spreadsheet was the bad "width:28.35pt;height:28.35pt"
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:object/v:shape"_ostr, "style"_ostr,
+ "width:255.75pt;height:63.75pt;mso-wrap-distance-right:0pt");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf94628)
+{
+ loadAndReload("tdf94628.docx");
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+
+ OUString sBulletChar = std::find_if(std::cbegin(aProps), std::cend(aProps),
+ [](const beans::PropertyValue& rValue) {
+ return rValue.Name == "BulletChar";
+ })
+ ->Value.get<OUString>();
+ // Actually for 'BLACK UPPER RIGHT TRIANGLE' is \u25E5
+ // But we use Wingdings 3 font here, so code is different
+ CPPUNIT_ASSERT_EQUAL(u"\uF07B"_ustr, sBulletChar);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf122594, "tdf122594.docx")
+{
+ // test import/export of ActiveTable (visible sheet) of embedded XLSX OLE objects
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xEmbeddedObjectsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xObjects(xEmbeddedObjectsSupplier->getEmbeddedObjects(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xObjects->getCount());
+
+ uno::Reference<beans::XPropertySet> xSheets;
+ xObjects->getByIndex(0) >>= xSheets;
+
+ uno::Reference<frame::XModel> xModel;
+ xSheets->getPropertyValue("Model") >>= xModel;
+ uno::Reference<document::XViewDataSupplier> xViewDataSupplier(xModel, uno::UNO_QUERY);
+
+ uno::Reference<container::XIndexAccess> xIndexAccess(xViewDataSupplier->getViewData());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xIndexAccess->getCount());
+
+ uno::Sequence<beans::PropertyValue> aSeq;
+ sal_Int32 nCheck = 0;
+ if (xIndexAccess->getByIndex(0) >>= aSeq)
+ {
+ sal_Int32 nCount(aSeq.getLength());
+ for (sal_Int32 i = 0; i < nCount; ++i)
+ {
+ OUString sName(aSeq[i].Name);
+ if (sName == "ActiveTable")
+ {
+ OUString sTabName;
+ if (aSeq[i].Value >>= sTabName)
+ {
+ // Sheet2, not Sheet1
+ CPPUNIT_ASSERT_EQUAL(OUString("Munka2"), sTabName);
+ nCheck++;
+ }
+ }
+ // tdf#122624 column and row viewarea positions
+ else if (sName == "PositionLeft")
+ {
+ sal_Int32 nPosLeft;
+ aSeq[i].Value >>= nPosLeft;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nPosLeft);
+ nCheck++;
+ }
+ else if (sName == "PositionTop")
+ {
+ sal_Int32 nPosTop;
+ aSeq[i].Value >>= nPosTop;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nPosTop);
+ nCheck++;
+ }
+ }
+ }
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), nCheck);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLanguageInGroupShape)
+{
+ loadAndSave("tdf131922_LanguageInGroupShape.docx");
+ // tdf#131922: Check if good language is used in shape group texts
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ assertXPath(pXml,
+ "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/"
+ "a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:lang"_ostr,
+ "val"_ostr, "de-DE");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf116883, "tdf116883.docx")
+{
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>1>"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2>"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2>1>1>"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2>2>"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2>3>"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>1)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(7), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(8), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2>1<1)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(9), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2.2)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(10), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1>2.3)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131420)
+{
+ loadAndSave("tdf131420.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:pPr/w:pBdr/w:top"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf80526_word_wrap, "tdf80526_word_wrap.docx")
+{
+ // tdf#80526: check whether the "wrap" property has been set
+ // TODO: fix export too
+ if (isExported())
+ return;
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xShape, "TextWordWrap"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf118521_marginsLR, "tdf118521_marginsLR.docx")
+{
+ // tdf#118521 paragraphs with direct formatting of only some of left, right, or first margins have
+ // lost the other unset margins coming from paragraph style, getting a bad margin from the default style instead
+
+ uno::Reference<beans::XPropertySet> xMyStyle(getStyles("ParagraphStyles")->getByName("MyStyle"),
+ uno::UNO_QUERY);
+ // from paragraph style - this is what direct formatting should equal
+ sal_Int32 nMargin = getProperty<sal_Int32>(xMyStyle, "ParaLeftMargin");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nMargin);
+ // from direct formatting
+ CPPUNIT_ASSERT_EQUAL(nMargin, getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+
+ nMargin = getProperty<sal_Int32>(xMyStyle, "ParaRightMargin");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1900), nMargin);
+ CPPUNIT_ASSERT_EQUAL(nMargin, getProperty<sal_Int32>(getParagraph(2), "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(882),
+ getProperty<sal_Int32>(getParagraph(2), "ParaFirstLineIndent"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104797, "tdf104797.docx")
+{
+ // check moveFrom and moveTo
+ CPPUNIT_ASSERT_EQUAL(OUString("Will this sentence be duplicated?"),
+ getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(1), 1)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 3), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"),
+ getProperty<OUString>(getRun(getParagraph(1), 3), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getRun(getParagraph(1), 3), "IsStart"));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("This is a filler sentence. Will this sentence be duplicated ADDED STUFF?"),
+ getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(2), 1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("This is a filler sentence."),
+ getRun(getParagraph(2), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(2), 3)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 3), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Insert"),
+ getProperty<OUString>(getRun(getParagraph(2), 3), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getRun(getParagraph(2), 3), "IsStart"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), getRun(getParagraph(2), 4)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(2), 5)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 6), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Insert"),
+ getProperty<OUString>(getRun(getParagraph(2), 6), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(2), 7)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 7), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getRun(getParagraph(2), 7), "IsStart"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Will this sentence be duplicated"),
+ getRun(getParagraph(2), 8)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(" ADDED STUFF"), getRun(getParagraph(2), 11)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("?"), getRun(getParagraph(2), 14)->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf145720, "tdf104797.docx")
+{
+ // check moveFromRangeStart/End and moveToRangeStart/End (to keep tracked text moving)
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // These were 0 (missing move*FromRange* elements)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:moveFrom/w:moveFromRangeStart"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:moveFromRangeEnd"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:moveTo/w:moveToRangeStart"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:moveToRangeEnd"_ostr, 1);
+
+ // paired names
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:moveFrom/w:moveFromRangeStart"_ostr,
+ "name"_ostr, "move471382752");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:moveTo/w:moveToRangeStart"_ostr,
+ "name"_ostr, "move471382752");
+
+ // mandatory authors and dates
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:moveFrom/w:moveFromRangeStart"_ostr,
+ "author"_ostr, u"Tekijä"_ustr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:moveTo/w:moveToRangeStart"_ostr,
+ "author"_ostr, u"Tekijä"_ustr);
+ // no date (anonymized change)
+ // This failed, date was exported as w:date="0-00-00T00:00:00Z", and later "1970-01-01T00:00:00Z"
+ assertXPathNoAttribute(
+ pXmlDoc, "/w:document/w:body/w:p[1]/w:moveFrom/w:moveFromRangeStart"_ostr, "date"_ostr);
+ assertXPathNoAttribute(
+ pXmlDoc, "/w:document/w:body/w:p[2]/w:moveTo/w:moveToRangeStart"_ostr, "date"_ostr);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf150166, "tdf150166.docx")
+{
+ // check moveFromRangeStart/End and moveToRangeStart/End (to keep tracked text moving)
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:moveFromRangeStart"_ostr, 0);
+ // This was 2 (missing RangeStart elements, but bad unpaired RangeEnds)
+ assertXPath(pXmlDoc, "//w:moveFromRangeEnd"_ostr, 0);
+
+ // These were 0 (moveFrom, moveTo and t)
+ assertXPath(pXmlDoc, "//w:del"_ostr, 11);
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 12);
+ assertXPath(pXmlDoc, "//w:delText"_ostr, 7);
+
+ // no more moveFrom/moveTo to avoid of problems with ToC
+ assertXPath(pXmlDoc, "//w:moveFrom"_ostr, 0);
+ assertXPath(pXmlDoc, "//w:moveTo"_ostr, 0);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf143510, "TC-table-DnD-move.docx")
+{
+ // check moveFromRangeStart/End and moveToRangeStart/End for tracked table move by drag & drop
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 0 (missing tracked table row deletion/insertion)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:del"_ostr, 2);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr/w:trPr/w:ins"_ostr, 2);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf143510_table_from_row, "TC-table-Separate-Move.docx")
+{
+ // check moveFromRangeStart/End and moveToRangeStart/End for tracked table move by drag & drop
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 0 (missing tracked table row deletion/insertion)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:del"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[3]/w:trPr/w:del"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr/w:trPr/w:ins"_ostr, 1);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf143510_within_table, "TC-table-rowDND.docx")
+{
+ // check moveFromRangeStart/End and moveToRangeStart/End for tracked table row move by DnD
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 0 (missing tracked table row deletion/insertion)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:del"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:trPr/w:ins"_ostr, 1);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf143510_within_table2, "TC-table-rowDND-front.docx")
+{
+ // check moveFromRangeStart/End and moveToRangeStart/End for tracked table row move by DnD
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 0 (missing tracked table row deletion/insertion)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:ins"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:trPr/w:del"_ostr, 1);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf150824, "tdf150824.fodt")
+{
+ // check tracked table row insertion (stored in a single redline)
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 0 (missing tracked table row deletion/insertion)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:ins"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:trPr/w:ins"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:trPr/w:ins"_ostr, 1);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf157011, "tdf157011_ins_del_empty_cols.docx")
+{
+ // check tracked table column insertions and deletions with empty cells
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // This was 1 (missing tracked table cell insertions)
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 3);
+
+ // This was 4 (missing tracked table cell deletions)
+ assertXPath(pXmlDoc, "//w:del"_ostr, 6);
+
+ // tdf#157187 This was false (dummy w:tc/w:p/w:sdt/w:sdtContent content box)
+ assertXPath(pXmlDoc, "//w:tc/w:p/w:del"_ostr, 6);
+ assertXPath(pXmlDoc, "//w:tc/w:p/w:ins"_ostr, 3);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf150824_regression, "ooo30436-1-minimized.sxw")
+{
+ // There should be no crash during loading of the document
+ // so, let's check just how much pages we have
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf113608_runAwayNumbering, "tdf113608_runAwayNumbering.docx")
+{
+ // check that an incorrect numbering style is not applied
+ // after removing a w:r-less paragraph
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf119188_list_margin_in_cell, "tdf119188_list_margin_in_cell.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+
+ // lists with auto margins in cells: top margin of the first paragraph is zero,
+ // but not the bottom margin of the last paragraph, also other list items have got
+ // zero margins.
+
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(494),
+ getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), "ParaBottomMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testChart_BorderLine_Style)
+{
+ loadAndSave("Chart_BorderLine_Style.docx");
+ /* DOCX containing Chart with BorderLine Style as Dash Type should get preserved
+ * inside an XML tag <a:prstDash> with value "dash", "sysDot, "lgDot", etc.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:spPr/a:ln/a:prstDash"_ostr,
+ "val"_ostr, "sysDot");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:spPr/a:ln/a:prstDash"_ostr,
+ "val"_ostr, "sysDash");
+ assertXPath(pXmlDoc,
+ "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:spPr/a:ln/a:prstDash"_ostr,
+ "val"_ostr, "dash");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testChart_Plot_BorderLine_Style)
+{
+ loadAndSave("Chart_Plot_BorderLine_Style.docx");
+ /* DOCX containing Chart wall (plot area) and Chart Page with BorderLine Style as Dash Type
+ * should get preserved inside an XML tag <a:prstDash> with value "dash", "sysDot, "lgDot", etc.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:ln/a:prstDash"_ostr, "val"_ostr,
+ "lgDashDot");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "sysDash");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesDeletedEmptyParagraph)
+{
+ loadAndSave("testTrackChangesDeletedEmptyParagraph.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:rPr/w:del"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesEmptyParagraphsInADeletion)
+{
+ loadAndSave("testTrackChangesEmptyParagraphsInADeletion.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ for (int i = 1; i < 12; ++i)
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[" + OString::number(i) + "]/w:pPr/w:rPr/w:del");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf149708)
+{
+ loadAndSave("tdf149708.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // keep tracked insertion of a list item
+ // This was 0 (missing tracked insertion of the paragraph mark)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:ins"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf149707)
+{
+ loadAndSave("tdf149711.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:moveFrom"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:moveTo"_ostr);
+ // These were missing
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:moveFrom"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:rPr/w:moveTo"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf70234)
+{
+ loadAndSave("tdf70234.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import field with tracked deletion
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:del/w:r[1]/w:fldChar"_ostr);
+
+ // export multiple runs of a field with tracked deletion
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:del/w:r"_ostr, 6);
+
+ // export w:delInstrText
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:del/w:r/w:delInstrText"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf115212)
+{
+ loadAndSave("tdf115212.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // export field with tracked deletion
+ assertXPath(pXmlDoc, "//w:p[2]/w:del[1]/w:r[1]/w:fldChar"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf126243)
+{
+ loadAndSave("tdf120338.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // export change tracking rejection data for tracked paragraph style change
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pPrChange/w:pPr/w:pStyle"_ostr,
+ "val"_ostr, "Heading3");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf126245)
+{
+ loadAndSave("tdf126245.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // export change tracking rejection data for tracked numbering change
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pPrChange/w:pPr/w:numPr/w:numId"_ostr,
+ "val"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf124491)
+{
+ loadAndSave("tdf124491.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import format change of empty lines, FIXME: change w:r with w:pPr in export
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/*/w:rPr/w:rPrChange"_ostr);
+ // empty line without format change
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/*/w:rPrChange"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/*/*/w:rPrChange"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf143911)
+{
+ loadAndSave("tdf126206.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // export format change of text portions
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w:rPrChange"_ostr);
+ // This was without tracked bold formatting
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w:rPrChange/w:rPr/w:b"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf105485)
+{
+ loadAndSave("tdf105485.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import change tracking of deleted comments
+ assertXPath(pXmlDoc, "//w:del/w:r/w:commentReference"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf125894)
+{
+ loadAndSave("tdf125894.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import change tracking in frames
+ assertXPath(pXmlDoc, "//w:del"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:ins"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf149388)
+{
+ // see also testTdf132371
+ loadAndSave("tdf132271.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import change tracking in floating tables
+ // (don't recognize tracked text moving during the import,
+ // because the text is too short and it's only a single word)
+ assertXPath(pXmlDoc, "//w:del"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:moveFrom"_ostr, 0);
+ assertXPath(pXmlDoc, "//w:moveTo"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132271)
+{
+ // see also testTdf149388
+ loadAndSave("tdf149388.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import change tracking in floating tables
+ if (!isExported())
+ {
+ assertXPath(pXmlDoc, "//w:del"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:moveFrom"_ostr, 0);
+ assertXPath(pXmlDoc, "//w:moveTo"_ostr, 0);
+ }
+ else
+ {
+ assertXPath(pXmlDoc, "//w:del"_ostr, 1);
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 1);
+ // tracked text moving recognized during the import
+ assertXPath(pXmlDoc, "//w:moveFrom"_ostr, 1);
+ assertXPath(pXmlDoc, "//w:moveTo"_ostr, 1);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf149388_fly)
+{
+ // see also testTdf136667
+ loadAndSave("tdf136667.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import change tracking in floating tables
+ assertXPath(pXmlDoc, "//w:del"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 4);
+ assertXPath(pXmlDoc, "//w:moveFrom"_ostr, 0);
+ assertXPath(pXmlDoc, "//w:moveTo"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136667)
+{
+ // see also testTdf149388_fly
+ loadAndSave("tdf149388_fly.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import change tracking in floating tables
+ if (!isExported())
+ {
+ assertXPath(pXmlDoc, "//w:del"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 4);
+ assertXPath(pXmlDoc, "//w:moveFrom"_ostr, 0);
+ assertXPath(pXmlDoc, "//w:moveTo"_ostr, 0);
+ }
+ else
+ {
+ assertXPath(pXmlDoc, "//w:del"_ostr, 1);
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 3);
+ // tracked text moving recognized during the import
+ assertXPath(pXmlDoc, "//w:moveFrom"_ostr, 1);
+ assertXPath(pXmlDoc, "//w:moveTo"_ostr, 1);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136850)
+{
+ loadAndSave("tdf136850.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // import change tracking in floating tables
+ assertXPath(pXmlDoc, "//w:del"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128156)
+{
+ loadAndSave("tdf128156.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // keep tracked insertion of a paragraph
+ // This was 0 before 350972a8bffc1a74b531e0336954bf54b1356025,
+ // and 1 later (missing tracked insertion of the paragraph mark)
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf125546)
+{
+ loadAndSave("tdf125546.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // compress redlines (it was 15)
+ assertXPath(pXmlDoc, "//w:rPrChange"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLabelWidthAndPosition_Left_FirstLineIndent)
+{
+ loadAndSave("Hau_min_list2.fodt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // list is LABEL_WIDTH_AND_POSITION with SvxAdjust::Left
+ // I) LTR
+ // a) all LTR cases with no number text look good in Word
+ // 1) negative first line indent on paragraph:
+ // no list width/indent: this one was 0 previously; this looks good
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "hanging"_ostr, "399");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:ind"_ostr, "hanging"_ostr, "966");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind"_ostr, "hanging"_ostr, "399");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width + list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind"_ostr, "start"_ostr, "1134");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind"_ostr, "hanging"_ostr, "966");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // 2) positive first line indent on paragraph:
+ // no list width/indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind"_ostr, "firstLine"_ostr, "420");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:pPr/w:ind"_ostr, "hanging"_ostr, "147");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind"_ostr, "firstLine"_ostr, "420");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width + list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:ind"_ostr, "start"_ostr, "1134");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:ind"_ostr, "hanging"_ostr, "147");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // b) all LTR cases with number text: the indent looks good but some tabs are wrong
+ // 1) negative first line indent on paragraph:
+ // no list width/indent: this one was 0 previously; this looks good
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:ind"_ostr, "hanging"_ostr, "399");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:ind"_ostr, "hanging"_ostr, "966");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:ind"_ostr, "hanging"_ostr, "399");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width + list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:pPr/w:ind"_ostr, "start"_ostr, "1134");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:pPr/w:ind"_ostr, "hanging"_ostr, "966");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // 2) positive first line indent on paragraph:
+ // no list width/indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:ind"_ostr, "firstLine"_ostr, "420");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:pPr/w:ind"_ostr, "hanging"_ostr, "147");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:ind"_ostr, "start"_ostr, "567");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:ind"_ostr, "firstLine"_ostr, "420");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // list width + list indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[16]/w:pPr/w:ind"_ostr, "start"_ostr, "1134");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[16]/w:pPr/w:ind"_ostr, "hanging"_ostr, "147");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[16]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // (w:p[17] is empty)
+ // I) RTL
+ // a) only RTL cases with no number text and no width/indent look good in Word
+ // 1) negative first line indent on paragraph:
+ // no list width/indent
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[18]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[18]/w:pPr/w:ind"_ostr, "hanging"_ostr, "399");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[18]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // 2) positive first line indent on paragraph:
+ // no list width/indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[22]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[22]/w:pPr/w:ind"_ostr, "firstLine"_ostr, "420");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[22]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // b) RTL cases with number text: the indent looks good but some tabs are wrong
+ // 1) negative first line indent on paragraph:
+ // no list width/indent
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[26]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[26]/w:pPr/w:ind"_ostr, "hanging"_ostr, "399");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[26]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // 2) positive first line indent on paragraph:
+ // no list width/indent:
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[30]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[30]/w:pPr/w:ind"_ostr, "firstLine"_ostr, "420");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[30]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ // TODO: other cases
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf124604)
+{
+ loadAndSave("tdf124604.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // If the numbering comes from a base style, indentation of the base style has also priority.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf95374)
+{
+ loadAndSave("tdf95374.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Numbering disabled by non-existent numId=0, disabling also inheritance of indentation of parent styles
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "hanging"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "start"_ostr, "1136");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf108493, "tdf108493.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara7(getParagraph(7), uno::UNO_QUERY);
+ // set in the paragraph (709 twips)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1251), getProperty<sal_Int32>(xPara7, "ParaLeftMargin"));
+ // set in the numbering style (this was 0)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1251), getProperty<sal_Int32>(xPara7, "ParaFirstLineIndent"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // Text "Before" stays in the first cell, not removed before the table because of
+ // bad handling of <w:cr>
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Before\nAfter"), xCell->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf64264, "tdf64264.docx")
+{
+ // DOCX table rows with tblHeader setting mustn't modify the count of the
+ // repeated table header rows, when there is rows before them without tblHeader settings.
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ // table starts on page 1 and finished on page 2
+ // and it has got only a single repeating header line
+ assertXPath(pDump, "/root/page[2]/body/tab"_ostr, 1);
+ assertXPath(pDump, "/root/page[2]/body/tab/row"_ostr, 47);
+ CPPUNIT_ASSERT_EQUAL(OUString("Repeating Table Header"),
+ parseDump("/root/page[2]/body/tab/row[1]/cell[1]/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),
+ parseDump("/root/page[2]/body/tab/row[2]/cell[1]/txt/text()"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf58944RepeatingTableHeader, "tdf58944-repeating-table-header.docx")
+{
+ // DOCX tables with more than 10 repeating header lines imported without repeating header lines
+ // as a workaround for MSO's limitation of header line repetition
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ // table starts on page 1 and finished on page 2
+ // instead of showing only a part of it on page 2
+ assertXPath(pDump, "/root/page[1]/body/tab"_ostr, 1);
+ assertXPath(pDump, "/root/page[1]/body/tab/row"_ostr, 11);
+ CPPUNIT_ASSERT_EQUAL(OUString("Test1"),
+ parseDump("/root/page[2]/body/tab/row[1]/cell[1]/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Test2"),
+ parseDump("/root/page[2]/body/tab/row[2]/cell[1]/txt/text()"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf81100)
+{
+ loadAndSave("tdf81100.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // keep "repeat table header" setting of table styles
+ assertXPath(pXmlDoc, "/w:styles/w:style/w:tblStylePr/w:trPr/w:tblHeader"_ostr, 4);
+
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+
+ // table starts on page 1 and finished on page 2
+ // and it has got only a single repeating header line
+ assertXPath(pDump, "/root/page[2]/body/tab[1]"_ostr, 1);
+ assertXPath(pDump, "/root/page[2]/body/tab[1]/row"_ostr, 2);
+ assertXPath(pDump, "/root/page[3]/body/tab"_ostr, 1);
+ if (!isExported()) // TODO export tblHeader=false
+ assertXPath(pDump, "/root/page[3]/body/tab/row"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf88496)
+{
+ loadAndReload("tdf88496.docx");
+ // Switch off repeating header, there is no place for it.
+ // Now there are only 3 pages with complete table content
+ // instead of a 51-page long table only with header.
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+ // (this appears to have the correct result now?)
+ // FIXME: this actually has 3 pages but SwWrtShell::SttPg() puts the cursor
+ // into the single SwTextFrame in the follow-flow-row at the top of the
+ // table but that SwTextFrame 1105 should not exist and the cursor ends up
+ // at the end of its master frame 848 instead; the problem is somewhere in
+ // SwTextFrame::FormatAdjust() which first determines nNew = 1 but then
+ // grows this frame anyway so that the follow is empty, but nothing
+ // invalidates 1105 again.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf77417)
+{
+ loadAndReload("tdf77417.docx");
+ // MSO 2010 compatibility mode: terminating white spaces are ignored in tables.
+ // This was 3 pages with the first invisible blank page.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf130494)
+{
+ loadAndSave("tdf130494.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:highlight"_ostr,
+ "val"_ostr, "yellow");
+ // keep direct formatting of table cell paragraph with removed highlighting
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r/w:rPr/w:highlight"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf130690)
+{
+ loadAndSave("tdf130690.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:highlight"_ostr,
+ "val"_ostr, "yellow");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[1]/w:rPr/w:highlight"_ostr,
+ 1);
+ // keep direct formatting of table cell paragraph with removed highlighting
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[2]/w:rPr/w:highlight"_ostr,
+ 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf105215)
+{
+ loadAndSave("tdf105215.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:pPr/w:rPr/w:rFonts"_ostr,
+ "ascii"_ostr, "Linux Libertine G");
+
+ // These were "Linux Libertine G"
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r/w:rPr"_ostr, 5);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[1]/w:rPr/w:rFonts"_ostr,
+ "ascii"_ostr, "Lohit Devanagari");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[2]/w:rPr/w:rFonts"_ostr,
+ "ascii"_ostr, "Lohit Devanagari");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[3]/w:rPr/w:rFonts"_ostr,
+ "ascii"_ostr, "Lohit Devanagari");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[4]/w:rPr/w:rFonts"_ostr,
+ "ascii"_ostr, "Lohit Devanagari");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[5]/w:rPr/w:rFonts"_ostr,
+ "ascii"_ostr, "Lohit Devanagari");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135187)
+{
+ loadAndSave("tdf135187.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:pPr/w:rPr/w:b"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:pPr/w:rPr/w:b"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:p/w:pPr/w:rPr/w:b"_ostr, 1);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b"_ostr, 1);
+ assertXPathNoAttribute(
+ pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b"_ostr, "val"_ostr);
+ // This was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b"_ostr, 1);
+ assertXPathNoAttribute(
+ pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b"_ostr, "val"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b"_ostr,
+ "val"_ostr, "false");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136617)
+{
+ loadAndSave("tdf136617.docx");
+
+ // This was 2
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:p[2]/w:pPr/w:rPr/w:sz"_ostr,
+ "val"_ostr, "16");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121597TrackedDeletionOfMultipleParagraphs)
+{
+ loadAndSave("tdf121597.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // check paragraphs with removed paragraph mark
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:del"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:del"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:rPr/w:del"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:rPr/w:del"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:rPr/w:del"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:rPr/w:del"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf141660)
+{
+ loadAndSave("tdf141660.docx");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:footnoteReference"_ostr, "id"_ostr,
+ "2");
+ // w:del is imported correctly with its footnote
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:del[2]/w:r/w:footnoteReference"_ostr,
+ "id"_ostr, "3");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/w:footnoteReference"_ostr, "id"_ostr, "4");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133643)
+{
+ loadAndSave("tdf133643.doc");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[1]/w:fldChar"_ostr,
+ "fldCharType"_ostr, "begin");
+ assertXPath(
+ pXmlDoc,
+ "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[1]/w:fldChar/w:ffData/w:ddList/w:listEntry[1]"_ostr,
+ "val"_ostr, "Bourgoin-Jallieu, ");
+ assertXPath(
+ pXmlDoc,
+ "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[1]/w:fldChar/w:ffData/w:ddList/w:listEntry[2]"_ostr,
+ "val"_ostr, "Fontaine, ");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[2]/w:instrText"_ostr,
+ " FORMDROPDOWN ");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[3]/w:fldChar"_ostr,
+ "fldCharType"_ostr, "separate");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[5]/w:fldChar"_ostr,
+ "fldCharType"_ostr, "end");
+
+ // Without the fix in place, this w:r wouldn't exist
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[6]/w:t"_ostr,
+ "le 22 fevrier 2013");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123189_tableBackground, "table-black_fill.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ CPPUNIT_ASSERT_EQUAL(COL_TRANSPARENT, getProperty<Color>(xCell, "BackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf116084, "tdf116084.docx")
+{
+ // tracked line is not a single text portion: w:del is recognized within w:ins
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(1), 1)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 1), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("There "), getRun(getParagraph(1), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(1), 4)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 4), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("must"), getRun(getParagraph(1), 5)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf116084_anonymized)
+{
+ loadAndSave("tdf116084.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:del in w:ins is exported correctly
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText"_ostr, "must");
+
+ // no date (anonymized changes)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins[@date]"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del[@w:date]"_ostr, 0);
+
+ // w:ins and w:del have w:author attributes, and the same
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del[@w:author]"_ostr, 1);
+ OUString sAuthor = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins[2]"_ostr, "author"_ostr);
+ OUString sAuthor2 = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del"_ostr, "author"_ostr);
+ CPPUNIT_ASSERT_EQUAL(sAuthor, sAuthor2);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf121176, "tdf121176.docx")
+{
+ // w:del is imported correctly when it is in a same size w:ins
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(1), 1)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 1), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("must"), getRun(getParagraph(1), 2)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121176_anonymized)
+{
+ loadAndSave("tdf121176.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:del in w:ins is exported correctly
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText"_ostr, "must");
+
+ // no date (anonymized changes)
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p/w:ins"_ostr, "date"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del[@w:date]"_ostr, 0);
+
+ // w:ins and w:del have w:author attributes, and the same
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del[@w:author]"_ostr, 1);
+ OUString sAuthor = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins"_ostr, "author"_ostr);
+ OUString sAuthor2 = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del"_ostr, "author"_ostr);
+ CPPUNIT_ASSERT_EQUAL(sAuthor, sAuthor2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128913)
+{
+ loadAndSave("tdf128913.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:ins and w:del are imported correctly, if they contain only inline images
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:r/w:drawing/wp:inline/a:graphic"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:del/w:r/w:drawing/wp:inline/a:graphic"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf142700)
+{
+ loadAndSave("tdf142700.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:ins and w:del are imported correctly, if they contain only images anchored to character
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:r/w:drawing/wp:anchor/a:graphic"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:del/w:r/w:drawing/wp:anchor/a:graphic"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf142387)
+{
+ loadAndSave("tdf142387.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:del in w:ins is exported correctly (only w:del was exported)
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText"_ostr,
+ "inserts ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147892)
+{
+ loadAndSave("tdf147892.fodt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:del in w:ins is exported correctly
+ // (both w:del and w:ins were exported for para marker)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:del"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:ins"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123054, "tdf123054.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(OUString("No Spacing"),
+ getProperty<OUString>(getParagraph(20), "ParaStyleName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD_DATABASE, "tdf67207.docx")
+{
+ // database fields use the database "database" and its table "Sheet1"
+ uno::Reference<beans::XPropertySet> xTextField
+ = getProperty<uno::Reference<beans::XPropertySet>>(getRun(getParagraph(2), 2), "TextField");
+ CPPUNIT_ASSERT(xTextField.is());
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xTextField, uno::UNO_QUERY_THROW);
+ uno::Reference<text::XDependentTextField> xDependent(xTextField, uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextField.Database"));
+ OUString sValue;
+ xTextField->getPropertyValue("Content") >>= sValue;
+ CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("<c1>"), sValue);
+
+ uno::Reference<beans::XPropertySet> xFiledMaster = xDependent->getTextFieldMaster();
+ uno::Reference<lang::XServiceInfo> xFiledMasterServiceInfo(xFiledMaster, uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(
+ xFiledMasterServiceInfo->supportsService("com.sun.star.text.fieldmaster.Database"));
+
+ // Defined properties: DataBaseName, Name, DataTableName, DataColumnName, DependentTextFields, DataCommandType, InstanceName, DataBaseURL
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("DataBaseName") >>= sValue);
+ CPPUNIT_ASSERT_EQUAL(OUString("database"), sValue);
+ sal_Int32 nCommandType;
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("DataCommandType") >>= nCommandType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nCommandType); // css::sdb::CommandType::TABLE
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("DataTableName") >>= sValue);
+ CPPUNIT_ASSERT_EQUAL(OUString("Sheet1"), sValue);
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("DataColumnName") >>= sValue);
+ CPPUNIT_ASSERT_EQUAL(OUString("c1"), sValue);
+ CPPUNIT_ASSERT(xFiledMaster->getPropertyValue("InstanceName") >>= sValue);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.text.fieldmaster.DataBase.database.Sheet1.c1"),
+ sValue);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf101122_noFillForCustomShape)
+{
+ loadAndSave("tdf101122_noFillForCustomShape.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // tdf#101122 check whether the "F" (noFill) option has been exported to docx
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/"
+ "a:graphic/a:graphicData/wps:wsp/wps:spPr/a:custGeom/a:pathLst/a:path"_ostr,
+ "fill"_ostr, "none");
+ assertXPathNoAttribute(
+ pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/"
+ "a:graphicData/wps:wsp/wps:spPr/a:custGeom/a:pathLst/a:path"_ostr,
+ "fill"_ostr);
+}
+// The (tdf124678_no_leading_paragraph.odt, tdf124678_with_leading_paragraph.odt) documents are the same,
+// except:
+// - tdf124678_no_leading_paragraph.odt doesn't contain leading empty paragraph
+// before the first section
+//
+CPPUNIT_TEST_FIXTURE(Test, testTdf124678_case1)
+{
+ loadAndReload("tdf124678_no_leading_paragraph.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("First page header text", OUString(""),
+ parseDump("/root/page[1]/header/txt"_ostr));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Second page header text", OUString("HEADER"),
+ parseDump("/root/page[2]/header/txt"_ostr));
+}
+
+// The (tdf124678_no_leading_paragraph.odt, tdf124678_with_leading_paragraph.odt) documents are the same,
+// except:
+// - tdf124678_no_leading_paragraph.odt doesn't contain leading empty paragraph
+// before the first section
+//
+CPPUNIT_TEST_FIXTURE(Test, testTdf124678_case2)
+{
+ loadAndReload("tdf124678_with_leading_paragraph.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("First page header text", OUString(""),
+ parseDump("/root/page[1]/header/txt"_ostr));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Second page header text", OUString("HEADER"),
+ parseDump("/root/page[2]/header/txt"_ostr));
+}
+
+static bool lcl_nearEqual(const sal_Int32 nNumber1, const sal_Int32 nNumber2,
+ sal_Int32 nMaxDiff = 5)
+{
+ return std::abs(nNumber1 - nNumber2) < nMaxDiff;
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf119952_negativeMargins, "tdf119952_negativeMargins.docx")
+{
+ // With negative margins (in MS Word) one can set up header (or footer) that overlaps with the body.
+ // LibreOffice unable to display that, so when importing negative margins,
+ // the header (or footer) converted to a flyframe, anchored to the header..
+ // that can overlap with the body, and will appear like in Word.
+ // This conversion modifies the document [i.e. replacing header text with a textbox...]
+ // but its DOCX export looks the same, as the original document in Word, too.
+ xmlDocUniquePtr pDump = parseLayoutDump();
+
+ //Check layout positions / sizes
+ sal_Int32 nLeftHead
+ = getXPath(pDump, "//page[1]/header/infos/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nLeftBody
+ = getXPath(pDump, "//page[1]/body/infos/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nLeftFoot
+ = getXPath(pDump, "//page[1]/footer/infos/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nLeftHFly
+ = getXPath(pDump, "//page[1]/header/txt/anchored/fly/infos/bounds"_ostr, "left"_ostr)
+ .toInt32();
+ sal_Int32 nLeftFFly
+ = getXPath(pDump, "//page[1]/footer/txt/anchored/fly/infos/bounds"_ostr, "left"_ostr)
+ .toInt32();
+
+ sal_Int32 nTopHead
+ = getXPath(pDump, "//page[1]/header/infos/bounds"_ostr, "top"_ostr).toInt32();
+ sal_Int32 nTopBody = getXPath(pDump, "//page[1]/body/infos/bounds"_ostr, "top"_ostr).toInt32();
+ sal_Int32 nTopFoot
+ = getXPath(pDump, "//page[1]/footer/infos/bounds"_ostr, "top"_ostr).toInt32();
+ sal_Int32 nTopHFly
+ = getXPath(pDump, "//page[1]/header/txt/anchored/fly/infos/bounds"_ostr, "top"_ostr)
+ .toInt32();
+ sal_Int32 nTopFFly
+ = getXPath(pDump, "//page[1]/footer/txt/anchored/fly/infos/bounds"_ostr, "top"_ostr)
+ .toInt32();
+
+ sal_Int32 nHeightHead
+ = getXPath(pDump, "//page[1]/header/infos/bounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nHeightBody
+ = getXPath(pDump, "//page[1]/body/infos/bounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nHeightFoot
+ = getXPath(pDump, "//page[1]/footer/infos/bounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nHeightHFly
+ = getXPath(pDump, "//page[1]/header/txt/anchored/fly/infos/bounds"_ostr, "height"_ostr)
+ .toInt32();
+ sal_Int32 nHeightFFly
+ = getXPath(pDump, "//page[1]/footer/txt/anchored/fly/infos/bounds"_ostr, "height"_ostr)
+ .toInt32();
+ sal_Int32 nHeightHFlyBound
+ = getXPath(pDump, "//page[1]/header/infos/prtBounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nHeightFFlyBound
+ = getXPath(pDump, "//page[1]/footer/infos/prtBounds"_ostr, "height"_ostr).toInt32();
+
+ CPPUNIT_ASSERT(lcl_nearEqual(nLeftHead, nLeftBody));
+ CPPUNIT_ASSERT(lcl_nearEqual(nLeftHead, nLeftFoot));
+ CPPUNIT_ASSERT(lcl_nearEqual(nLeftHead, nLeftHFly));
+ CPPUNIT_ASSERT(lcl_nearEqual(nLeftHead, nLeftFFly));
+
+ CPPUNIT_ASSERT(lcl_nearEqual(nTopHead, 851));
+ CPPUNIT_ASSERT(lcl_nearEqual(nTopBody, 1418));
+ CPPUNIT_ASSERT(lcl_nearEqual(nTopFoot, 15875));
+ CPPUNIT_ASSERT(lcl_nearEqual(nTopHFly, 851));
+
+ // this seems to be an import bug
+ if (!isExported())
+ CPPUNIT_ASSERT(lcl_nearEqual(nTopFFly, 14403));
+
+ CPPUNIT_ASSERT(lcl_nearEqual(nHeightHead, 567));
+ CPPUNIT_ASSERT(lcl_nearEqual(nHeightBody, 14457));
+ CPPUNIT_ASSERT(lcl_nearEqual(nHeightFoot, 680));
+ CPPUNIT_ASSERT(lcl_nearEqual(nHeightHFly, 2152));
+ CPPUNIT_ASSERT(lcl_nearEqual(nHeightFFly, 2152));
+
+ // after export these heights increase to like 567.
+ // not sure if it is another import, or export bug... or just the result of the modified document
+ if (!isExported())
+ {
+ CPPUNIT_ASSERT(lcl_nearEqual(nHeightHFlyBound, 57));
+ CPPUNIT_ASSERT(lcl_nearEqual(nHeightFFlyBound, 57));
+ }
+
+ //Check text of header/ footer
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("f1"),
+ getXPath(
+ pDump,
+ "//page[1]/header/txt/anchored/fly/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(" f8"),
+ getXPath(
+ pDump,
+ "//page[1]/header/txt/anchored/fly/txt[8]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(" f8"),
+ getXPath(
+ pDump,
+ "//page[1]/footer/txt/anchored/fly/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("f1"),
+ getXPath(
+ pDump,
+ "//page[1]/footer/txt/anchored/fly/txt[8]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("p1"),
+ getXPath(
+ pDump,
+ "//page[2]/header/txt/anchored/fly/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("p1"),
+ getXPath(
+ pDump,
+ "//page[2]/footer/txt/anchored/fly/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(" aaaa"),
+ getXPath(
+ pDump,
+ "//page[3]/header/txt/anchored/fly/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(" eeee"),
+ getXPath(
+ pDump,
+ "//page[3]/header/txt/anchored/fly/txt[5]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr,
+ "portion"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("f1 f2 f3 f4 f5 f6 "
+ " f7 f8"),
+ parseDump("/root/page[1]/header/txt/anchored/fly"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString(" f8 f7 f6 f5 "
+ " f4 f3 f2f1"),
+ parseDump("/root/page[1]/footer/txt/anchored/fly"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("p1"), parseDump("/root/page[2]/header/txt/anchored/fly"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("p1"), parseDump("/root/page[2]/footer/txt/anchored/fly"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString(" aaaa bbbb cccc dddd eeee"),
+ parseDump("/root/page[3]/header/txt/anchored/fly"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf143384_tableInFoot_negativeMargins,
+ "tdf143384_tableInFoot_negativeMargins.docx")
+{
+ // There should be no crash during loading of the document
+ // so, let's check just how much pages we have
+ // Ideally this would be 1, matching Word.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
new file mode 100644
index 0000000000..c7c670fe30
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -0,0 +1,1341 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/style/BreakType.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+#include <editeng/escapementitem.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <xmloff/odffields.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+
+#include <editsh.hxx>
+#include <frmatr.hxx>
+#include <frameformats.hxx>
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+#include <o3tl/string_view.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+// TODO: the re-import doesn't work just yet, but that isn't a regression...
+DECLARE_SW_EXPORT_TEST(testFlyInFly, "ooo39250-1-min.rtf", nullptr, Test)
+{
+ // check that anchor of text frame is in other text frame
+ uno::Reference<text::XTextContent> const xAnchored(getShape(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xAnchored.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Frame1")/*generated name*/, uno::Reference<container::XNamed>(xAnchored, uno::UNO_QUERY_THROW)->getName());
+ uno::Reference<text::XText> const xAnchorText(xAnchored->getAnchor()->getText());
+ uno::Reference<text::XTextFrame> const xAnchorFrame(xAnchorText, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xAnchorFrame.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Frame3"), uno::Reference<container::XNamed>(xAnchorFrame, uno::UNO_QUERY_THROW)->getName());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf125778_lostPageBreakTOX, "tdf125778_lostPageBreakTOX.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 3, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf126994_lostPageBreak, "tdf126994_lostPageBreak.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 3, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf155690, "tdf155690.docx")
+{
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarks = xBookmarksSupplier->getBookmarks();
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ // the problem was that the start was after the H
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF)
+{
+ loadAndReload("tdf121374_sectionHF.odt");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xFooterText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, "FooterText");
+ CPPUNIT_ASSERT_EQUAL( OUString("footer"), xFooterText->getString() );
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Paragraphs", 6, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 6, getPages() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF2)
+{
+ loadAndReload("tdf121374_sectionHF2.doc");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xHeaderText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, "HeaderText");
+ CPPUNIT_ASSERT( xHeaderText->getString().startsWith("virkamatka-anomus") );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121666_lostPage)
+{
+ loadAndSave("tdf121666_lostPage.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br"_ostr, "type"_ostr, "page");
+ // The second page break is exported too.
+ // Before this fix, if a node had both section break and page break, then only the section break was exported.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:br"_ostr, "type"_ostr, "page");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type"_ostr, "val"_ostr, "nextPage");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf140182_extraPagebreak, "tdf140182_extraPagebreak.docx")
+{
+ // Table, page break, section break should be only 2 pages
+ // 2 breaks would normally results in 3 pages, but page break + section break is a special case
+ // that is handled so to break only 1 page that result only 2 pages.
+ // Because of the table, a hack (m_bDummyParaAddedForTableInSection) is set for the entire section,
+ // that canceled the page break + section break special case handling, resulting 3 pages.
+ // The accompanying fix eliminates this cancellation.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121659_loseColumnBrNextToShape)
+{
+ loadAndSave("tdf121659_loseColumnBrNextToShape.docx");
+ // The third paragraph contains a manual column break and a shape.
+ // The column break was moved into the shape during the first import
+ // (messing also the shape position), and eliminated during the second import,
+ // losing the 2-column text layout. As a workaround, split the paragraph
+ // moving the column break into the fourth paragraph instead of losing it.
+ saveAndReload("Office Open XML Text");
+ bool bBreakOnPara3 = getProperty<style::BreakType>(getParagraph(3), "BreakType") == style::BreakType_COLUMN_BEFORE;
+ bool bBreakOnPara4 = getProperty<style::BreakType>(getParagraph(4), "BreakType") == style::BreakType_COLUMN_BEFORE;
+ CPPUNIT_ASSERT(bBreakOnPara3 || bBreakOnPara4);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95848, "tdf95848.docx")
+{
+ OUString listId;
+ OUString listStyle;
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle);
+ CPPUNIT_ASSERT(listStyle.startsWith("WWNum"));
+ CPPUNIT_ASSERT(xPara->getPropertyValue("ListId") >>= listId);
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1.1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(listStyle, getProperty<OUString>(xPara, "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1.2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ // different numbering style
+ OUString listStyle3;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle3);
+ CPPUNIT_ASSERT(listStyle3.startsWith("WWNum"));
+ CPPUNIT_ASSERT(listStyle3 != listStyle);
+ // but same list
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1.3"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95848_2, "tdf95848_2.docx")
+{
+ OUString listId;
+ OUString listStyle;
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle);
+ CPPUNIT_ASSERT(listStyle.startsWith("WWNum"));
+ CPPUNIT_ASSERT(xPara->getPropertyValue("ListId") >>= listId);
+ CPPUNIT_ASSERT_EQUAL(OUString("1)"), getProperty<OUString>(xPara, "ListLabelString"));
+ // check indent of list style
+ auto xLevels = getProperty<uno::Reference<container::XIndexAccess>>(xPara, "NumberingRules");
+ uno::Sequence<beans::PropertyValue> aLevel;
+ xLevels->getByIndex(0) >>= aLevel; // top level
+ sal_Int32 nIndent = std::find_if(std::cbegin(aLevel), std::cend(aLevel), [](const beans::PropertyValue& rValue) { return rValue.Name == "FirstLineIndent"; })->Value.get<sal_Int32>();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-635), nIndent);
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ // different numbering style
+ OUString listStyle2;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle2);
+ CPPUNIT_ASSERT(listStyle2.startsWith("WWNum"));
+ CPPUNIT_ASSERT(listStyle2 != listStyle);
+ // but same list
+ CPPUNIT_ASSERT_EQUAL(OUString("2)"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ // check indent of list style - override
+ auto xLevels = getProperty<uno::Reference<container::XIndexAccess>>(xPara, "NumberingRules");
+ uno::Sequence<beans::PropertyValue> aLevel;
+ xLevels->getByIndex(0) >>= aLevel; // top level
+ sal_Int32 nIndent = std::find_if(std::cbegin(aLevel), std::cend(aLevel), [](const beans::PropertyValue& rValue) { return rValue.Name == "FirstLineIndent"; })->Value.get<sal_Int32>();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9366), nIndent);
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ // different numbering style
+ OUString listStyle3;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle3);
+ CPPUNIT_ASSERT(listStyle3.startsWith("WWNum"));
+ CPPUNIT_ASSERT(listStyle3 != listStyle);
+ // and different list
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT(listId != getProperty<OUString>(xPara, "ListId"));
+ }
+ {
+ // continue the first list
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(listStyle, getProperty<OUString>(xPara, "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ CPPUNIT_ASSERT_EQUAL(OUString("3)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(listStyle, getProperty<OUString>(xPara, "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ CPPUNIT_ASSERT_EQUAL(OUString("4)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf108496, "tdf108496.docx")
+{
+ OUString listId;
+ OUString listStyle;
+ // Lists with override
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle);
+ CPPUNIT_ASSERT(listStyle.startsWith("WWNum"));
+ CPPUNIT_ASSERT(xPara->getPropertyValue("ListId") >>= listId);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(listStyle, getProperty<OUString>(xPara, "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ // different numbering style
+ OUString listStyle2;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle2);
+ CPPUNIT_ASSERT(listStyle2.startsWith("WWNum"));
+ CPPUNIT_ASSERT(listStyle2 != listStyle);
+ // restarted numeration due to override
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ // different numbering style
+ OUString listStyle2;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle2);
+ CPPUNIT_ASSERT(listStyle2.startsWith("WWNum"));
+ // restarted numeration due to override
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ }
+
+ // Lists without override
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(8), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle);
+ CPPUNIT_ASSERT(listStyle.startsWith("WWNum"));
+ CPPUNIT_ASSERT(xPara->getPropertyValue("ListId") >>= listId);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(9), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(listStyle, getProperty<OUString>(xPara, "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(11), uno::UNO_QUERY);
+ // different numbering style
+ OUString listStyle2;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle2);
+ CPPUNIT_ASSERT(listStyle2.startsWith("WWNum"));
+ CPPUNIT_ASSERT(listStyle2 != listStyle);
+ // numeration is continued
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(12), uno::UNO_QUERY);
+ // different numbering style
+ OUString listStyle2;
+ CPPUNIT_ASSERT(xPara->getPropertyValue("NumberingStyleName") >>= listStyle2);
+ CPPUNIT_ASSERT(listStyle2.startsWith("WWNum"));
+ // numeration is continued
+ CPPUNIT_ASSERT_EQUAL(OUString("4"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(listId, getProperty<OUString>(xPara, "ListId"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf126723, "tdf126723.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(2), "ParaLeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testendingSectionProps, "endingSectionProps.docx")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xHeaderText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, "HeaderText");
+ CPPUNIT_ASSERT_EQUAL( OUString("General header"), xHeaderText->getString());
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("# of paragraphs", 2, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section is RightToLeft", text::WritingMode2::RL_TB, getProperty<sal_Int16>(xSect, "WritingMode"));
+ //regression: tdf124637
+ //CPPUNIT_ASSERT_EQUAL_MESSAGE("Section Left Margin", sal_Int32(2540), getProperty<sal_Int32>(xSect, "SectionLeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTbrlTextbox, "tbrl-textbox.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with 'Expected: -90;
+ // Actual: 0', i.e. tbRl writing direction was imported as lrTb.
+ // Note: Implementation was changed to use WritingMode property instead of TextPreRotateAngle.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL90,
+ getProperty<sal_Int16>(xPropertySet, "WritingMode"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testBtlrShape, "btlr-textbox.docx")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ const auto& rFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rFormats.size());
+ CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(RES_DRAWFRMFMT), rFormats[0]->Which());
+ CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(RES_FLYFRMFMT), rFormats[1]->Which());
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 5, Actual:
+ // 4', i.e. the textbox inherited its writing direction instead of having an explicit btlr
+ // value.
+ CPPUNIT_ASSERT_EQUAL(SvxFrameDirection::Vertical_LR_BT,
+ rFormats[1]->GetAttrSet().GetFrameDir().GetValue());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127316_autoEscapement)
+{
+ loadAndReload("tdf127316_autoEscapement.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // This should be roughly .8*35% of the ORIGINAL(non-reduced) size. However, during export the
+ // proportional height has to be changed into direct formatting, which then changes the relative percent.
+ // In this case, a 24pt font, proportional at 65% becomes roughly a 16pt font.
+ // Thus an escapement of 28% (6.72pt) becomes roughly 42% for the 16pt font.
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1), "CharEscapement"), 0);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(42.f, getProperty<float>(getRun(xPara, 2), "CharEscapement"), 1);
+
+ // Subscripts are different. Automatic escapement SHOULD BE limited by the font bottom line(?)
+ // and so the calculations ought to be different. There is room for a lot of export improvement here.
+ xPara.set(getParagraph(2));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Normal text "), "CharEscapement"), 0);
+ // Negative escapements (subscripts) were decreasing by 1% every round-trip due to bad manual rounding.
+ // This should be roughly .2*35% of the ORIGINAL (non-reduced) size. However, during export the
+ // proportional height has to be changed into direct formatting, which then changes the relative percent.
+ // In this case, a 24pt font, proportional at 65% becomes roughly a 16pt font.
+ // Thus an escapement of 7% (1.68pt) becomes roughly 10.5% for the 16pt font.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Subscript", -10.f, getProperty<float>(getRun(xPara, 2), "CharEscapement"), 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf99602_subscript_charStyleSize, "tdf99602_subscript_charStyleSize.docx")
+{
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ // The word "Base" should not be subscripted.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Base"), "CharEscapement"), 0);
+ // The word "Subscript" should be 48pt, subscripted by 25% (12pt).
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( -25.f, getProperty<float>(getRun(xPara, 2, "Subscript"), "CharEscapement"), 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf99602_charStyleSubscript, "tdf99602_charStyleSubscript.docx")
+{
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ // The word "Base" should not be subscripted.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Base"), "CharEscapement"), 0);
+ // The word "Subscript" should be 48pt, automatically subscripted, and automatic proportioned.
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(DFLT_ESC_AUTO_SUB), getProperty<sal_Int16>(getRun(xPara, 2, "Subscript"), "CharEscapement") );
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(DFLT_ESC_PROP), getProperty<sal_Int16>(getRun(xPara, 2), "CharEscapementHeight") );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf99602_charStyleSubscript2)
+{
+ loadAndReload("tdf99602_charStyleSubscript2.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // *_In styles_*, don't let the proportionality/escapement affect the fontsize - otherwise it starts doubling up,
+ // so instead just throw away the values and use the default settings instead - meaning fontsize is unaffected.
+ // subscript custom: Proportional size is 80%, lower by 25%.
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName("subscript custom"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("CharStyle has 12pt font size", 12.f, getProperty<float>(xStyle, "CharHeight"));
+ // subscript larger font: Proportional size is 80%, lowered by DFLT_ESC_AUTO_SUB
+ xStyle.set(getStyles("CharacterStyles")->getByName("subscript larger font"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Auto CharStyle has 12pt font size", 12.f, getProperty<float>(xStyle, "CharHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf124637_sectionMargin, "tdf124637_sectionMargin.docx")
+{
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ // sections 0 and 1 must be related to footnotes...
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(2), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section Left Margin", sal_Int32(0), getProperty<sal_Int32>(xSect, "SectionLeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123636_newlinePageBreak, "tdf123636_newlinePageBreak.docx")
+{
+ //MS Compatibility flag: SplitPgBreakAndParaMark
+ //special case: split first empty paragraph in a section.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Paragraphs", 2, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 2, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123636_newlinePageBreak2, "tdf123636_newlinePageBreak2.docx")
+{
+ //WITHOUT SplitPgBreakAndParaMark: a following anchored shape should force a page break
+ //CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Paragraphs", 2, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(2, ""), "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 2, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123636_newlinePageBreak3, "tdf123636_newlinePageBreak3.docx")
+{
+ //MS Compatibility flag: SplitPgBreakAndParaMark
+ //proof case: split any non-empty paragraphs, not just the first paragraph of a section.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Paragraphs", 5, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 2, getPages() );
+
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ assertXPath(pDump, "/root/page[1]/body/txt[3]/SwParaPortion/SwLineLayout/SwParaPortion[1]"_ostr, "portion"_ostr, "Last line on page 1");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123636_newlinePageBreak4, "tdf123636_newlinePageBreak4.docx")
+{
+ //MS Compatibility flag: SplitPgBreakAndParaMark
+ //special case: an empty paragraph doesn't split (except if first paragraph).
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Paragraphs", 3, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 2, getPages() );
+
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ assertXPath(pDump, "/root/page[2]/body/txt[1]/SwParaPortion"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf118947_tableStyle, "tdf118947_tableStyle.docx")
+{
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Table grid settings set line-spacing to 250% instead of single-spacing, which is set as a document default."), xPara->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("TextBody has 10pt font size", 11.f, getProperty<float>(xPara, "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("TextBody has 1pt space below paragraph", sal_Int32(35), getProperty<sal_Int32>(xPara, "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table has 10pt space above paragraph", sal_Int32(353), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table style sets 0 right margin", sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaRightMargin"));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("TextBody has 1.07 line-spacing", sal_Int16(107), getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height, 1);
+ // table-style based paragraph background color
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Missing paragraph background color in cell A1", Color(0xCCFFCC), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // This cell is affected by compatSetting overrideTableStyleFontSizeAndJustification=0 (the default value)
+ xCell.set(xTable->getCellByName("A2"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum = xParaEnumAccess->createEnumeration();
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Notice that this is 8pt font, right aligned in compatibility mode."), xPara->getString());
+ // Even though not specified, Table-Style distributes the properties in DocDefault. DocDefault fontsize is 8pt.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Compat mode has 8pt font size", 8.f, getProperty<float>(getRun(xPara,1), "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Normal has 0pt space below paragraph", sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table sets 10pt space above paragraph", sal_Int32(353), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table style sets 0 right margin", sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaRightMargin"));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Table sets 2.5 line-spacing", sal_Int16(250), getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height, 1);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Paragraph background color in cell A2", sal_Int32(-1), getProperty<sal_Int32>(xPara, "ParaBackColor"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Compat mode overrides left adjust", style::ParagraphAdjust_RIGHT,
+ static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xPara, "ParaAdjust")));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf118947_tableStyle2, "tdf118947_tableStyle2.docx")
+{
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ // This cell is affected by compatSetting overrideTableStyleFontSizeAndJustification=1 (no goofy exception)
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A2"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Notice that this is 12pt font, left aligned in non-compatibility mode."), xPara->getString());
+ // Even though not specified, Table-Style tries to distribute the properties in DocDefault. DocDefault fontsize is 8pt.
+ // However, this is overridden by the default style's specified fontsize of 12 and left justify.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Non-Compat mode has 12pt font size", 12.f, getProperty<float>(getRun(xPara,1), "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Non-Compat mode keeps the style's left adjust", style::ParagraphAdjust_LEFT,
+ static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xPara, "ParaAdjust")));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf123912_protectedForm)
+{
+ loadAndReload("tdf123912_protectedForm.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Compatibility: Protect form", true,
+ pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM ) );
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
+ if ( xSect.is() )
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", false, getProperty<bool>(xSect, "IsProtected"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(tdf124600b, "tdf124600b.docx")
+{
+ // <wp:anchor allowOverlap="0"> was lost on roundtrip, we always wrote "1" on export.
+ bool bAllowOverlap1 = getProperty<bool>(getShape(1), "AllowOverlap");
+ CPPUNIT_ASSERT(!bAllowOverlap1);
+ bool bAllowOverlap2 = getProperty<bool>(getShape(2), "AllowOverlap");
+ CPPUNIT_ASSERT(!bAllowOverlap2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDateControl)
+{
+ loadAndReload("empty-date-control.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Check that we exported the empty date control correctly
+ // Date form field is converted to date content control.
+
+ uno::Reference<beans::XPropertySet> xTextPortion(getRun(getParagraph(1), 1), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+
+ OUString sDateFormat;
+ xContentControlProps->getPropertyValue("DateFormat") >>= sDateFormat;
+
+ OUString sLang;
+ xContentControlProps->getPropertyValue("DateLanguage") >>= sLang;
+
+ OUString sCurrentDate;
+ xContentControlProps->getPropertyValue("CurrentDate") >>= sCurrentDate;
+
+ CPPUNIT_ASSERT_EQUAL(OUString("dd/MM/yyyy"), sDateFormat);
+ CPPUNIT_ASSERT_EQUAL(OUString("en-US"), sLang);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), sCurrentDate);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121867)
+{
+ loadAndReload("tdf121867.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwEditShell* pEditShell = pTextDoc->GetDocShell()->GetEditShell();
+ // Without the accompanying fix in place, this test would have failed with
+ // 'Expected: 3; Actual : 0', i.e. page width zoom was lost on export.
+ CPPUNIT_ASSERT_EQUAL(SvxZoomType::PAGEWIDTH, pEditShell->GetViewOptions()->GetZoomType());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testParaAdjustDistribute, "para-adjust-distribute.docx")
+{
+ // Without the accompanying fix in place, this test would have failed with
+ // 'Expected: 2; Actual : 0', i.e. the first paragraph's ParaAdjust was
+ // left, not block.
+ CPPUNIT_ASSERT_EQUAL(
+ style::ParagraphAdjust_BLOCK,
+ static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")));
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_BLOCK,
+ static_cast<style::ParagraphAdjust>(
+ getProperty<sal_Int16>(getParagraph(1), "ParaLastLineAdjust")));
+
+ CPPUNIT_ASSERT_EQUAL(
+ style::ParagraphAdjust_BLOCK,
+ static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(2), "ParaAdjust")));
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_LEFT,
+ static_cast<style::ParagraphAdjust>(
+ getProperty<sal_Int16>(getParagraph(2), "ParaLastLineAdjust")));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testInputListExport)
+{
+ loadAndReload("tdf122186_input_list.odt");
+ if (!isExported()) // importing the ODT, an input field
+ {
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Any aField = xFields->nextElement();
+ uno::Reference<lang::XServiceInfo> xServiceInfo(aField, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown"));
+ }
+ else // importing the DOCX, a content control
+ {
+ uno::Reference<beans::XPropertySet> xTextPortion(getRun(getParagraph(1), 1), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValues> aListItems;
+ xContentControlProps->getPropertyValue("ListItems") >>= aListItems;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), aListItems.getLength());
+ comphelper::SequenceAsHashMap aMap0(aListItems[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), aMap0["Value"].get<OUString>());
+ comphelper::SequenceAsHashMap aMap1(aListItems[1]);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), aMap1["Value"].get<OUString>());
+ comphelper::SequenceAsHashMap aMap2(aListItems[2]);
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), aMap2["Value"].get<OUString>());
+ uno::Reference<container::XEnumerationAccess> xContentEnumAccess(xContentControl, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentEnum = xContentEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xContent(xContentEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xContent->getString());
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123435, "tdf123435.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, it would have failed with
+ // - Expected: 2
+ // - Actual : 1
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf116371)
+{
+ loadAndReload("tdf116371.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Make sure the rotation is exported correctly, and size not distorted
+ auto xShape(getShape(1));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(4700.0, getProperty<double>(xShape, "RotateAngle"), 10);
+ auto frameRect = getProperty<awt::Rectangle>(xShape, "FrameRect");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(24063), frameRect.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(24179), frameRect.Width);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFrameSizeExport)
+{
+ loadAndSave("floating-tables-anchor.docx");
+ // Make sure the table width is 4000
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tblPr/w:tblW"_ostr, "w"_ostr, "4000");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf119201, "tdf119201.docx")
+{
+ // Visibility of shapes wasn't imported/exported, for now base printable property on that, too
+ auto xShape(getShape(1));
+ CPPUNIT_ASSERT_MESSAGE("First shape should be visible.", getProperty<bool>(xShape, "Visible"));
+ CPPUNIT_ASSERT_MESSAGE("First shape should be printable.", getProperty<bool>(xShape, "Printable"));
+ xShape = getShapeByName(u"Rectangle 1");
+ CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, "Visible"));
+ CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, "Printable"));
+ xShape = getShapeByName(u"Oval 2");
+ CPPUNIT_ASSERT_MESSAGE("Third shape should be visible.", getProperty<bool>(xShape, "Visible"));
+ CPPUNIT_ASSERT_MESSAGE("Third shape should be printable.", getProperty<bool>(xShape, "Printable"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx")
+{
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ // Without the accompanying fix in place, this test would have failed, as the portion text was
+ // only "Er horte leise Schritte hinter", which means the 1st line of the 2nd paragraph was
+ // split into two by a Special portion, i.e. the top margin of the shape was too large.
+ assertXPath(pDump, "/root/page/body/txt[2]/SwParaPortion/SwLineLayout[1]/SwLinePortion[1]"_ostr, "portion"_ostr,
+ "Er horte leise Schritte hinter sich. Das bedeutete nichts Gutes. Wer wu"); // ... until the bookmark.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTextInput)
+{
+ loadAndSave("textinput.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+
+ // test the exported DOCX
+
+ // no hint, empty
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:instrText"_ostr, " FILLIN \"\"");
+ assertXPathChildren(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[5]"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[5]/w:rPr"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[6]/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+
+ // no hint, content
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:instrText"_ostr, " FILLIN \"\"");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:t"_ostr, "content without hint");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[6]/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+
+ // hint, empty
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[3]/w:instrText"_ostr, " FILLIN \"hint empty\"");
+ assertXPathChildren(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[5]"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[5]/w:rPr"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[6]/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+
+ // hint, content
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[3]/w:instrText"_ostr, " FILLIN \"hint content\"");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[5]/w:t"_ostr, "content with hint");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[6]/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+
+ // test the imported DOCX
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ int nElements = 0;
+
+ do
+ {
+ uno::Any aField = xFields->nextElement();
+ uno::Reference<lang::XServiceInfo> xServiceInfo(aField, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.Input"));
+ uno::Reference<beans::XPropertySet> xPropertySet(aField, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xText(aField, uno::UNO_QUERY);
+
+ // why is the enumeration not in the same order then the fields in the document?
+ // it seems to be stable and the navigation in the GUI is actually correct.
+ OUString sContent, sHint;
+ switch (nElements)
+ {
+ case 1:
+ sContent = "content with hint";
+ sHint = "hint content";
+ break;
+ case 2:
+ sHint = "hint empty";
+ break;
+ case 3:
+ sContent = "content without hint";
+ break;
+ }
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sContent), xPropertySet->getPropertyValue("Content"));
+ CPPUNIT_ASSERT_EQUAL(sContent, xText->getAnchor()->getString());
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sHint), xPropertySet->getPropertyValue("Hint"));
+ nElements++;
+ }
+ while (xFields->hasMoreElements());
+ CPPUNIT_ASSERT_EQUAL(4, nElements);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123460, "tdf123460.docx")
+{
+ // check paragraph mark deletion at terminating moveFrom
+ CPPUNIT_ASSERT(getParagraph( 2 )->getString().startsWith("Nunc"));
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(getParagraph( 2 ), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xRun(xRunEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( OUString( "" ), xRun->getString());
+ xRun.set(xRunEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(hasProperty(xRun, "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(xRun, "RedlineType"));
+ xRun.set(xRunEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xRun->getString().endsWith("tellus."));
+ xRun.set(xRunEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(hasProperty(xRun, "Bookmark"));
+
+ // The paragraph marker's formatting.
+ xRun.set(xRunEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),getProperty<OUString>(xRun, "TextPortionType"));
+ CPPUNIT_ASSERT(xRun->getString().isEmpty());
+
+ // deleted paragraph mark at the end of the second paragraph
+ if (isExported())
+ {
+ // there is no run after the MoveBookmark
+ CPPUNIT_ASSERT(!xRunEnum->hasMoreElements());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf146140)
+{
+ loadAndSave("tdf123460.docx");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // This was 1 (put end of paragraph of the previous moveFrom into a w:del,
+ // resulting double deletions at the same position, which is an
+ // ODT back-compatibility issue described in tdf#107292)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:del"_ostr, 0);
+ // This was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:moveFrom"_ostr, 1);
+}
+
+//tdf#125298: fix charlimit restrictions in bookmarknames and field references if they contain non-ascii characters
+CPPUNIT_TEST_FIXTURE(Test, testTdf125298)
+{
+ loadAndSave("tdf125298_crossreflink_nonascii_charlimit.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // check whether test file keeps non-ascii values or not
+ OUString bookmarkName1 = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:bookmarkStart[1]"_ostr, "name"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\u00e1rv\u00edzt\u0171r\u0151_t\u00fck\u00f6rf\u00far\u00f3g\u00e9p"), bookmarkName1);
+
+ OUString bookmarkName2 = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:bookmarkStart[1]"_ostr, "name"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\u00e91\u00e12\u01713\u01514\u00fa5\u00f66\u00fc7\u00f38\u00ed9"), bookmarkName2);
+ OUString fieldName1 = getXPathContent(pXmlDoc, "/w:document/w:body/w:p[5]/w:r[2]/w:instrText[1]"_ostr);
+ OUString expectedFieldName1 = " REF " + bookmarkName1 + " \\h ";
+ CPPUNIT_ASSERT_EQUAL(expectedFieldName1, fieldName1);
+ OUString fieldName2 = getXPathContent(pXmlDoc, "/w:document/w:body/w:p[7]/w:r[2]/w:instrText[1]"_ostr);
+ OUString expectedFieldName2 = " REF " + bookmarkName2 + " \\h ";
+ CPPUNIT_ASSERT_EQUAL(expectedFieldName2, fieldName2);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf121784, "tdf121784.docx")
+{
+ // check tracked insertion of footnotes
+ CPPUNIT_ASSERT_EQUAL( OUString( "Text1" ), getParagraph( 1 )->getString());
+ CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 1 ), 2 )->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 2), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(1), 2), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL( OUString( "1" ), getRun( getParagraph( 1 ), 3 )->getString());
+
+ // check tracked insertion of endnotes
+ CPPUNIT_ASSERT_EQUAL( OUString( "texti" ), getParagraph( 2 )->getString());
+ CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 2 )->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 2), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(2), 2), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL( OUString( "i" ), getRun( getParagraph( 2 ), 3 )->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTbrlFrameVml, "tbrl-frame-vml.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTextFrame.is());
+
+ if (isExported())
+ {
+ // DML import: creates a TextBox, eaVert read back as TB_RL in TextWritingMode
+
+ auto eMode = getProperty<text::WritingMode>(xTextFrame, "TextWritingMode");
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode::WritingMode_TB_RL, eMode);
+ }
+ else
+ {
+ // VML import: creates a TextFrame.
+
+ auto nActual = getProperty<sal_Int16>(xTextFrame, "WritingMode");
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 2; Actual:
+ // 4', i.e. writing direction was inherited from page, instead of explicit tbrl.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, nActual);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf119037)
+{
+ loadAndSave("tdf119037.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "single");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "single");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "single");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "single");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "dotted");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "dotted");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "dotted");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "dotted");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "dashed");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "dashed");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "dashed");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "dashed");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "dashSmallGap");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "dashSmallGap");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "dashSmallGap");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "dashSmallGap");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "dotDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "dotDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "dotDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "dotDash");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "dotDotDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "dotDotDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "dotDotDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "dotDotDash");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[13]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "double");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[15]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "double");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[17]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "thinThickSmallGap");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[17]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "thinThickSmallGap");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[17]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "thinThickSmallGap");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[17]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "thinThickSmallGap");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[19]/w:pPr/w:pBdr/w:top"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[19]/w:pPr/w:pBdr/w:left"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[19]/w:pPr/w:pBdr/w:right"_ostr, "val"_ostr, "double");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[19]/w:pPr/w:pBdr/w:bottom"_ostr, "val"_ostr, "double");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf125657)
+{
+ loadAndSave("tdf125657.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ auto checkAttrIsInt = [&](const OString& sAttrName) {
+ OUString sAttr = getXPath(pXmlDoc,
+ "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:srcRect"_ostr,
+ sAttrName);
+ OString sAssertMsg("Attribute " + sAttrName + " value " + sAttr.toUtf8()
+ + " is not a valid integer");
+ CPPUNIT_ASSERT_MESSAGE(sAssertMsg.getStr(), !sAttr.isEmpty());
+ // Only decimal characters allowed, optionally prepended with '-'; no '.'
+ CPPUNIT_ASSERT_MESSAGE(sAssertMsg.getStr(),
+ sAttr[0] == '-' || (sAttr[0] >= '0' && sAttr[0] <= '9'));
+ for (sal_Int32 i = 1; i < sAttr.getLength(); ++i) {
+ CPPUNIT_ASSERT_MESSAGE(sAssertMsg.getStr(), sAttr[i] >= '0');
+ CPPUNIT_ASSERT_MESSAGE(sAssertMsg.getStr(), sAttr[i] <= '9');
+ }
+ };
+ // check that we export all coordinates of srcRect as integers
+ checkAttrIsInt("l"_ostr);
+ checkAttrIsInt("t"_ostr);
+ checkAttrIsInt("r"_ostr);
+ checkAttrIsInt("b"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx")
+{
+ discardDumpedLayout();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/tab/infos/bounds"_ostr, "top"_ostr, "4193");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf78657)
+{
+ loadAndSave("tdf78657_picture_hyperlink.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/wp:docPr/a:hlinkClick"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:nvPicPr/pic:cNvPr/a:hlinkClick"_ostr, 1);
+ assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@Target='http://www.google.com']"_ostr, "TargetMode"_ostr, "External");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBtlrFrame)
+{
+ loadAndReload("btlr-frame.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with 'Expected:
+ // -270; Actual: 0', i.e. the writing direction of the frame was lost.
+ // Note: Implementation was changed to use WritingMode property instead of TextPreRotateAngle.
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR,
+ getProperty<sal_Int16>(xPropertySet, "WritingMode"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf125518)
+{
+ loadAndSave("tdf125518.odt");
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+
+ // First diagram is anchored
+ OUString anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:drawing/wp:anchor/wp:docPr"_ostr, "name"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("Object1"), anchorName);
+
+ // Second diagram has anchor
+ anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:drawing/wp:anchor/wp:docPr"_ostr, "name"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("Objekt1"), anchorName);
+
+ // Third diagram has no anchor
+ anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[12]/w:r[2]/w:drawing/wp:inline/wp:docPr"_ostr, "name"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("Object2"), anchorName);
+
+ // 4th diagram has anchor too
+ anchorName = getXPath(pXmlDoc, "/w:document/w:body/w:p[14]/w:r[3]/w:drawing/wp:anchor/wp:docPr"_ostr, "name"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("Object3"), anchorName);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.docx")
+{
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),
+ getProperty<OUString>(getRun(xPara, 1), "TextPortionType"));
+ // Without the accompanying fix in place, this test would have failed with 'Expected:
+ // Annotation; Actual: Frame', i.e. the comment start before the image was lost.
+ CPPUNIT_ASSERT_EQUAL(OUString("Annotation"),
+ getProperty<OUString>(getRun(xPara, 2), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Frame"),
+ getProperty<OUString>(getRun(xPara, 3), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("AnnotationEnd"),
+ getProperty<OUString>(getRun(xPara, 4), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),
+ getProperty<OUString>(getRun(xPara, 5), "TextPortionType"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131594)
+{
+ loadAndSave("tdf131594.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // lnNumType should not be exported if w:countBy="0"
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:lnNumType"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121663)
+{
+ loadAndSave("tdf121663.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // auto distance of line numbering is 0.5 cm
+ assertXPath(pXmlDoc, "//w:lnNumType"_ostr, "distance"_ostr, "283");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testInvalidDateFormField, "invalid_date_form_field.docx")
+{
+
+ uno::Reference<container::XEnumerationAccess> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
+
+ int nIndex = 0;
+ while (xPortions->hasMoreElements())
+ {
+ uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ if (aPortionType != "ContentControl")
+ {
+ continue;
+ }
+
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+
+ // Check date content control's parameters.
+ OUString sDateFormat;
+ xContentControlProps->getPropertyValue("DateFormat") >>= sDateFormat;
+
+ OUString sLang;
+ xContentControlProps->getPropertyValue("DateLanguage") >>= sLang;
+
+ OUString sCurrentDate;
+ xContentControlProps->getPropertyValue("CurrentDate") >>= sCurrentDate;
+
+ // The first one has invalid date format (invalid = LO can't parse it)
+ if(nIndex == 0)
+ {
+
+ CPPUNIT_ASSERT_EQUAL(OUString("YYYY.MM.DDT00:00:00Z"), sDateFormat);
+ CPPUNIT_ASSERT_EQUAL(OUString("en-US"), sLang);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), sCurrentDate);
+
+ }
+ else if (nIndex == 1) // The second has wrong date
+ {
+ CPPUNIT_ASSERT_EQUAL(OUString("MM/DD/YY"), sDateFormat);
+ CPPUNIT_ASSERT_EQUAL(OUString("en-US"), sLang);
+ CPPUNIT_ASSERT_EQUAL(OUString("2019.06.34T00:00:00Z"), sCurrentDate);
+
+ }
+ else // The third one has wrong local
+ {
+ CPPUNIT_ASSERT_EQUAL(OUString("[NatNum12 MMMM=abbreviation]YYYY\". \"MMMM D."), sDateFormat);
+ CPPUNIT_ASSERT_EQUAL(OUString("xxxx"), sLang);
+ CPPUNIT_ASSERT_EQUAL(OUString("2019.06.11T00:00:00Z"), sCurrentDate);
+
+ }
+ ++nIndex;
+ }
+ CPPUNIT_ASSERT_EQUAL(int(3), nIndex);
+}
+
+DECLARE_OOXMLEXPORT_TEST(tdf127085, "tdf127085.docx")
+{
+ // Fill transparency was lost during export
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty<sal_Int16>(xShape, "FillTransparence"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(tdf119809, "tdf119809.docx")
+{
+ // Combobox without an item list lost during import
+ if (getShapes() > 0)
+ {
+ uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.ComboBox")));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<OUString> >(xPropertySet, "StringItemList").getLength());
+ }
+ else
+ {
+ // DropDown was imported as content control
+ // First run: bookmark
+ uno::Reference<beans::XPropertySet> xTextPortion(getRun(getParagraph(1), 2), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValues> aListItems;
+ xContentControlProps->getPropertyValue("ListItems") >>= aListItems;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aListItems.getLength());
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(tdf118169, "tdf118169.docx")
+{
+ // Unicode characters were converted to question marks.
+ uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.CheckBox")));
+ CPPUNIT_ASSERT_EQUAL(u"őőőőőőőőőőőűűűű"_ustr, getProperty<OUString>(xPropertySet, "Label"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127116)
+{
+ loadAndSave("tdf127116.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:bookmarkStart"_ostr, "name"_ostr);
+ OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink"_ostr, "anchor"_ostr);
+ CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127339)
+{
+ loadAndSave("tdf127339.docx");
+ xmlDocUniquePtr pXmlRels = parseExport("word/_rels/document.xml.rels");
+
+ assertXPathNoAttribute(pXmlRels, "/rels:Relationships/rels:Relationship[@Target='#bookmark']"_ostr, "TargetMode"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127362)
+{
+ loadAndSave("tdf127362.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ xmlDocUniquePtr pXmlRels = parseExport("word/_rels/document.xml.rels");
+
+ OUString bookmarkName = "#" + getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:bookmarkStart"_ostr, "name"_ostr);
+ OUString anchor = getXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@Id='rId3']"_ostr, "Target"_ostr);
+ CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127605)
+{
+ loadAndSave("tdf127605.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart"_ostr, "name"_ostr);
+ OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink"_ostr, "anchor"_ostr);
+ CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127732)
+{
+ loadAndSave("internal_hyperlink_frame.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:bookmarkStart"_ostr, "name"_ostr);
+ OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink"_ostr, "anchor"_ostr);
+ CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127733)
+{
+ loadAndSave("internal_hyperlink_ole.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:bookmarkStart"_ostr, "name"_ostr);
+ OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink"_ostr, "anchor"_ostr);
+ CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127734)
+{
+ loadAndSave("internal_hyperlink_region.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart"_ostr, "name"_ostr);
+ OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink"_ostr, "anchor"_ostr);
+ CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127735)
+{
+ loadAndSave("internal_hyperlink_table.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:bookmarkStart"_ostr, "name"_ostr);
+ OUString anchor = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink"_ostr, "anchor"_ostr);
+ CPPUNIT_ASSERT_EQUAL(anchor, bookmarkName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123628)
+{
+ loadAndSave("tdf123628.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink/w:r/w:rPr/w:rStyle"_ostr, "val"_ostr, "Hyperlink");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Hyperlink']/w:name"_ostr, "val"_ostr, "Hyperlink");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf127741, "tdf127741.docx")
+{
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY);
+ OUString unVisitedStyleName = getProperty<OUString>(xRun, "UnvisitedCharStyleName");
+ CPPUNIT_ASSERT(unVisitedStyleName.equalsIgnoreAsciiCase("Internet Link"));
+ OUString visitedStyleName = getProperty<OUString>(xRun, "VisitedCharStyleName");
+ CPPUNIT_ASSERT(visitedStyleName.equalsIgnoreAsciiCase("Visited Internet Link"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf142693_hugePaperSizeImport)
+{
+ loadAndSave("tdf142693_hugePaperSizeImport.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgSz"_ostr, "w"_ostr, "90369");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgSz"_ostr, "h"_ostr, "104372");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127925)
+{
+ loadAndSave("tdf127925.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='FollowedHyperlink']/w:name"_ostr, "val"_ostr, "FollowedHyperlink");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127579)
+{
+ loadAndSave("tdf127579.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle"_ostr, "val"_ostr, "Hyperlink");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128304)
+{
+ loadAndReload("tdf128304.odt");
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ css::text::WritingMode eMode;
+ uno::Reference<beans::XPropertySet> xProps1(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xProps1->getPropertyValue("TextWritingMode") >>= eMode);
+ CPPUNIT_ASSERT_EQUAL(css::text::WritingMode::WritingMode_TB_RL, eMode);
+
+ uno::Reference<beans::XPropertySet> xProps2(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xProps2->getPropertyValue("TextWritingMode") >>= eMode);
+ CPPUNIT_ASSERT_EQUAL(css::text::WritingMode::WritingMode_TB_RL, eMode);
+
+ uno::Reference<beans::XPropertySet> xProps3(getShape(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xProps3->getPropertyValue("TextWritingMode") >>= eMode);
+ CPPUNIT_ASSERT_EQUAL(css::text::WritingMode::WritingMode_TB_RL, eMode);
+
+ uno::Reference<beans::XPropertySet> xProps4(getShape(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xProps4->getPropertyValue("TextWritingMode") >>= eMode);
+ CPPUNIT_ASSERT_EQUAL(css::text::WritingMode::WritingMode_TB_RL, eMode);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
new file mode 100644
index 0000000000..4b0fbdd137
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -0,0 +1,1610 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/awt/FontUnderline.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/TableColumnSeparator.hpp>
+#include <com/sun/star/text/XDependentTextField.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/text/XTextContentAppend.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+
+#include <comphelper/sequenceashashmap.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <o3tl/string_view.hxx>
+
+using namespace com::sun::star;
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+DECLARE_OOXMLEXPORT_TEST(Tdf130907, "tdf130907.docx")
+{
+ uno::Reference<text::XTextRange> xPara1 = getParagraph(2);
+ CPPUNIT_ASSERT(xPara1.is());
+ uno::Reference<beans::XPropertySet> xFormula1Props(xPara1, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFormula1Props.is());
+ sal_Int16 nHOri1;
+ xFormula1Props->getPropertyValue("ParaAdjust") >>= nHOri1;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The alignment of the equation is not left!",
+ sal_Int16(style::ParagraphAdjust::ParagraphAdjust_LEFT), nHOri1);
+
+ uno::Reference<text::XTextRange> xPara2 = getParagraph(3);
+ CPPUNIT_ASSERT(xPara2.is());
+ uno::Reference<beans::XPropertySet> xFormula2Props(xPara2, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFormula2Props.is());
+ sal_Int16 nHOri2;
+ xFormula2Props->getPropertyValue("ParaAdjust") >>= nHOri2;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The alignment of the equation is not center!",
+ sal_Int16(style::ParagraphAdjust::ParagraphAdjust_CENTER), nHOri2);
+
+ uno::Reference<text::XTextRange> xPara3 = getParagraph(5);
+ CPPUNIT_ASSERT(xPara3.is());
+ uno::Reference<beans::XPropertySet> xFormula3Props(xPara3, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFormula3Props.is());
+ sal_Int16 nHOri3;
+ xFormula3Props->getPropertyValue("ParaAdjust") >>= nHOri3;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The alignment of the equation is not right!",
+ sal_Int16(style::ParagraphAdjust::ParagraphAdjust_RIGHT), nHOri3);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128197)
+{
+ createSwDoc("128197_compat14.docx");
+ xmlDocUniquePtr pLayout14 = parseLayoutDump();
+ sal_Int32 nHeight14 = getXPath(pLayout14, "//page[1]/body/txt[1]/infos/bounds"_ostr, "height"_ostr).toInt32();
+
+ createSwDoc("128197_compat15.docx");
+ xmlDocUniquePtr pLayout15 = parseLayoutDump();
+ sal_Int32 nHeight15 = getXPath(pLayout15, "//page[1]/body/txt[1]/infos/bounds"_ostr, "height"_ostr).toInt32();
+
+ // In compat mode=14 second line has size of the shape thus entire paragraph height is smaller
+ // So nHeight14 < nHeight15
+ CPPUNIT_ASSERT_LESS(nHeight15, nHeight14);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135595_HFtableWrap)
+{
+ loadAndReload("tdf135595_HFtableWrap.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nRowHeight = getXPath(pXmlDoc, "//page[1]/header/tab/row/infos/bounds"_ostr, "height"_ostr).toInt32();
+ // tdf#77794: always force bLayoutInCell from false to true for MSO2013+
+ // The fly is supposed to be inside the cell. Before, height was 998. Now it is 2839.
+ CPPUNIT_ASSERT_MESSAGE("Image must be contained inside the table cell", nRowHeight > 2000);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135943_shapeWithText_L0c15,
+ "tdf135943_shapeWithText_LayoutInCell0_compat15.docx")
+{
+ // With compat15, layoutinCell ought to be ignored/forced to true.
+ // HOWEVER, currently only the shape is correctly placed, while its text is un-synced separately.
+ // So to prevent this ugly mess, just leave everything together in the historical (wrong) spot.
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ sal_Int32 nFrameLeft = getXPath(pDump, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nFrameRight = getXPath(pDump, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "right"_ostr).toInt32();
+ sal_Int32 nTextLeft = getXPath(pDump, "//anchored/fly/infos/bounds"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nTextRight = getXPath(pDump, "//anchored/fly/infos/bounds"_ostr, "right"_ostr).toInt32();
+ // The text must be inside of its frame boundaries
+ CPPUNIT_ASSERT(nFrameRight >= nTextRight);
+ CPPUNIT_ASSERT(nFrameLeft <= nTextLeft);
+ // LayoutInCell: The text must fit inside cell A1 //cell[1]/info/bounds/right = 4703
+ //CPPUNIT_ASSERT(nTextRight < 4704);
+
+ uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("YOU FIXED ME? LayoutInCell ought to be true", false, bValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135595_HFtableWrap_c12, "tdf135595_HFtableWrap_c12.docx")
+{
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // tdf#104596: ignore wrap exception apparently does not apply if it is not "layout in table cell".
+ // Should be only one page. Row height should be two lines at 722, not wrapped to three lines at 998.
+ sal_Int32 nRowHeight = getXPath(pXmlDoc, "//header/tab/row/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE("Text must not wrap around header image", nRowHeight < 800);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf151704_thinColumnHeight, "tdf151704_thinColumnHeight.docx")
+{
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nRowHeightT1 = getXPath(
+ pXmlDoc, "//page[1]/body/tab[1]/row/cell/tab[1]/row[1]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nRowHeightT2 = getXPath(
+ pXmlDoc, "//page[2]/body/tab/row[1]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Same row height in both tables", nRowHeightT1, nRowHeightT2);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123622, "tdf123622.docx")
+{
+ uno::Reference<beans::XPropertySet> XPropsRight(getShape(1),uno::UNO_QUERY);
+ sal_Int16 nRelativePosR = 0;
+ XPropsRight->getPropertyValue("HoriOrientRelation")>>=nRelativePosR;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape inside the margin", sal_Int16(4), nRelativePosR);
+
+ uno::Reference<beans::XPropertySet> XPropsLeft(getShape(2), uno::UNO_QUERY);
+ sal_Int16 nRelativePosL = 0;
+ XPropsLeft->getPropertyValue("HoriOrientRelation") >>= nRelativePosL;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape inside the margin", sal_Int16(3), nRelativePosL);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf78749)
+{
+ loadAndReload("tdf78749.docx");
+ //Shape lost the background image before, now check if it still has...
+ auto xShape = getShape(1);
+ uno::Reference<beans::XPropertySet> xShpProps(xShape, uno::UNO_QUERY);
+ OUString aPropertyVal;
+ xShpProps->getPropertyValue("FillBitmapName") >>= aPropertyVal;
+ CPPUNIT_ASSERT(!aPropertyVal.isEmpty());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128207)
+{
+ loadAndSave("tdf128207.docx");
+ //There was the charts on each other, because their horizontal and vertical position was 0!
+ xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(p_XmlDoc);
+ assertXPathContent(p_XmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor/wp:positionH/wp:posOffset"_ostr, "4445");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123873)
+{
+ loadAndSave("tdf123873.docx");
+ //OLE Object were overlapped due to missing wrap import
+ xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(p_XmlDoc);
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:drawing/wp:anchor/wp:wrapTopAndBottom"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Tdf133065)
+{
+ loadAndSave("tdf133065.odt");
+ CPPUNIT_ASSERT_EQUAL(7, getShapes());
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+ auto pxmldoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pxmldoc);
+ OUString aVal;
+
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[3]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "type"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("square") > -1);
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[3]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "side"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("left") > -1);
+
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[8]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "type"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("square") > -1);
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[8]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "side"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("right") > -1);
+
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[12]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "type"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("square") > -1);
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[12]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "side"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("largest") > -1);
+
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[20]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "type"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("topAndBottom") > -1);
+
+ aVal = getXPath(pxmldoc, "/w:document/w:body/w:p[24]/w:r[2]/w:object/v:shape/w10:wrap"_ostr, "type"_ostr);
+ CPPUNIT_ASSERT(aVal.indexOf("square") > -1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf130814model, "tdf130814.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(Color(0x1F497D), getProperty<Color>(getRun(getParagraph(2), 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(double(16), getProperty<double>(getRun(getParagraph(2), 1), "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::SINGLE, getProperty<sal_Int16>(getRun(getParagraph(2), 1), "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Candara"), getProperty<OUString>(getRun(getParagraph(2), 1), "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial Unicode MS"), getProperty<OUString>(getRun(getParagraph(2), 1), "CharFontNameAsian"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107020)
+{
+ loadAndSave("tdf107020.docx");
+ if (!IsDefaultDPI())
+ return;
+ xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(p_XmlDoc);
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:srcRect"_ostr, "l"_ostr, "4910");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:srcRect"_ostr, "t"_ostr, "27183");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:srcRect"_ostr, "r"_ostr, "57638");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:srcRect"_ostr, "b"_ostr, "48360");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf130814ooxml)
+{
+ loadAndSave("tdf130814.docx");
+ xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(p_XmlDoc);
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:rFonts"_ostr, "eastAsia"_ostr, "Arial Unicode MS");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:rFonts"_ostr, "ascii"_ostr, "Candara");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:rFonts"_ostr, "hAnsi"_ostr, "Candara");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:color"_ostr, "val"_ostr, "1F497D");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:sz"_ostr, "val"_ostr, "32");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:szCs"_ostr, "val"_ostr, "32");
+ assertXPath(
+ p_XmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w:u"_ostr, "val"_ostr, "single");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129888vml, "tdf129888vml.docx")
+{
+ //the line shape has anchor in the first cell however it has to
+ //be positioned to an another cell. To reach this we must handle
+ //the o:allowincell attribute of the shape, and its position has
+ //to be calculated from the page frame instead of the table:
+
+ uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf129888vml The line shape has bad place!",
+ false, bValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129888dml, "tdf129888dml.docx")
+{
+ //the shape has anchor in the first cell however it has to
+ //be positioned to the right side of the page. To reach this we must handle
+ //the layoutInCell attribute of the shape, and its position has
+ //to be calculated from the page frame instead of the table:
+
+ uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf129888dml The shape has bad place!",
+ false, bValue);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf130120)
+{
+ loadAndSave("tdf130120.docx");
+ // Text for exporting the allowincell attribute:
+ xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
+ assertXPath(p_XmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r/mc:AlternateContent/"
+ "mc:Choice/w:drawing/wp:anchor"_ostr, "layoutInCell"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Tdf133030)
+{
+ loadAndSave("tdf133030.docx");
+ auto pExport = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pExport);
+
+ assertXPath(pExport, "/w:document/w:body/w:p[3]/m:oMathPara/m:oMathParaPr/m:jc"_ostr, "val"_ostr, "center");
+ assertXPath(pExport, "/w:document/w:body/w:p[5]/m:oMathPara/m:oMathParaPr/m:jc"_ostr, "val"_ostr, "left");
+ assertXPath(pExport, "/w:document/w:body/w:p[7]/m:oMathPara/m:oMathParaPr/m:jc"_ostr, "val"_ostr, "right");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf87569v, "tdf87569_vml.docx")
+{
+ //the original tdf87569 sample has vml shapes...
+ uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf87569_vml: The Shape is not in the table!",
+ true, bValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf133000_numStyleFormatting, "tdf133000_numStyleFormatting.docx")
+{
+ // Paragraph style's LeftMargin should not override numbering's Left Margin
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ assertXPathContent(pDump, "/root/page[1]/body/txt[2]"_ostr, "First line");
+ const sal_Int32 nLevel1Margin = getXPath(pDump, "//page[1]/body/txt[2]/infos/prtBounds"_ostr, "left"_ostr).toInt32();
+ assertXPathContent(pDump, "/root/page[1]/body/txt[4]"_ostr, "One sublevel");
+ const sal_Int32 nLevel2Margin = getXPath(pDump, "//page[1]/body/txt[4]/infos/prtBounds"_ostr, "left"_ostr).toInt32();
+ CPPUNIT_ASSERT( nLevel1Margin < nLevel2Margin );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf134260, "tdf134260.docx")
+{
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1270
+
+ auto xNum1Levels
+ = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
+
+ CPPUNIT_ASSERT_EQUAL(
+ sal_Int32(0),
+ comphelper::SequenceAsHashMap(xNum1Levels->getByIndex(0))["ListtabStopPosition"]
+ .get<sal_Int32>());
+
+ auto xNum2Levels
+ = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(2), "NumberingRules");
+
+ CPPUNIT_ASSERT_EQUAL(
+ sal_Int32(0),
+ comphelper::SequenceAsHashMap(xNum2Levels->getByIndex(0))["ListtabStopPosition"]
+ .get<sal_Int32>());
+
+ auto xNum3Levels
+ = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(3), "NumberingRules");
+
+ CPPUNIT_ASSERT_EQUAL(
+ sal_Int32(0),
+ comphelper::SequenceAsHashMap(xNum3Levels->getByIndex(0))["ListtabStopPosition"]
+ .get<sal_Int32>());
+}
+
+DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.docx")
+{
+ auto xNumberingRules
+ = getProperty<uno::Reference<container::XIndexAccess>>(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(o3tl::narrowing<sal_uInt16>(style::NumberingType::ARABIC_ZERO),
+ aMap["NumberingType"].get<sal_uInt16>());
+}
+
+DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.docx")
+{
+ auto xNumberingRules
+ = getProperty<uno::Reference<container::XIndexAccess>>(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(o3tl::narrowing<sal_uInt16>(style::NumberingType::ARABIC_ZERO3),
+ aMap["NumberingType"].get<sal_uInt16>());
+}
+
+DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.docx")
+{
+ auto xNumberingRules
+ = getProperty<uno::Reference<container::XIndexAccess>>(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(o3tl::narrowing<sal_uInt16>(style::NumberingType::ARABIC_ZERO4),
+ aMap["NumberingType"].get<sal_uInt16>());
+}
+
+DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.docx")
+{
+ auto xNumberingRules
+ = getProperty<uno::Reference<container::XIndexAccess>>(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(o3tl::narrowing<sal_uInt16>(style::NumberingType::ARABIC_ZERO5),
+ aMap["NumberingType"].get<sal_uInt16>());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testArabicZeroNumberingFootnote)
+{
+ // Create a document, set footnote numbering type to ARABIC_ZERO.
+ createSwDoc();
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFootnoteSettings
+ = xFootnotesSupplier->getFootnoteSettings();
+ sal_uInt16 nNumberingType = style::NumberingType::ARABIC_ZERO;
+ xFootnoteSettings->setPropertyValue("NumberingType", uno::Any(nNumberingType));
+
+ // Insert a footnote.
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xFootnote(
+ xFactory->createInstance("com.sun.star.text.Footnote"), uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContentAppend> xTextContentAppend(xTextDocument->getText(),
+ uno::UNO_QUERY);
+ xTextContentAppend->appendTextContent(xFootnote, {});
+
+ saveAndReload("Office Open XML Text");
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // XPath '/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt' number of nodes is incorrect
+ // because the exporter had no idea what markup to use for ARABIC_ZERO.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt"_ostr, "val"_ostr, "decimalZero");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testChicagoNumberingFootnote)
+{
+ // Create a document, set footnote numbering type to SYMBOL_CHICAGO.
+ createSwDoc();
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFootnoteSettings
+ = xFootnotesSupplier->getFootnoteSettings();
+ sal_uInt16 nNumberingType = style::NumberingType::SYMBOL_CHICAGO;
+ xFootnoteSettings->setPropertyValue("NumberingType", uno::Any(nNumberingType));
+
+ // Insert a footnote.
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xFootnote(
+ xFactory->createInstance("com.sun.star.text.Footnote"), uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContentAppend> xTextContentAppend(xTextDocument->getText(),
+ uno::UNO_QUERY);
+ xTextContentAppend->appendTextContent(xFootnote, {});
+
+ saveAndReload("Office Open XML Text");
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // XPath '/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt' number of nodes is incorrect
+ // because the exporter had no idea what markup to use for SYMBOL_CHICAGO.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:footnotePr/w:numFmt"_ostr, "val"_ostr, "chicago");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testListNotCountedIndent)
+{
+ loadAndReload("list_notcounted_indent.fodt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:numPr/w:numId"_ostr, "val"_ostr, "0");
+ // wrong: 720
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind"_ostr, "hanging"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:numPr/w:numId"_ostr, "val"_ostr, "2");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:ind"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:numPr/w:numId"_ostr, "val"_ostr, "0");
+ // wrong: 180
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind"_ostr, "start"_ostr, "720");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:ind"_ostr, "hanging"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:numPr/w:numId"_ostr, "val"_ostr, "0");
+ // wrong: 720
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:ind"_ostr, "hanging"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:numPr/w:numId"_ostr, "val"_ostr, "0");
+ // wrong: 720
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind"_ostr, "start"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind"_ostr, "end"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:ind"_ostr, "hanging"_ostr, "0");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf87569d, "tdf87569_drawingml.docx")
+{
+ //if the original tdf87569 sample is upgraded it will have drawingml shapes...
+ uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf87569_drawingml: The Shape is not in the table!",
+ true, bValue);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf130610)
+{
+ loadAndReload("tdf130610_bold_in_2_styles.ott");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // check character properties
+ {
+ uno::Reference<beans::XPropertySet> xStyle(
+ getStyles("CharacterStyles")->getByName("WollMuxRoemischeZiffer"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Bold", awt::FontWeight::BOLD, getProperty<float>(xStyle, "CharWeight"));
+ }
+
+ // check paragraph properties
+ {
+ uno::Reference<beans::XPropertySet> xStyle(
+ getStyles("ParagraphStyles")->getByName("WollMuxVerfuegungspunkt"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Bold", awt::FontWeight::BOLD, getProperty<float>(xStyle, "CharWeight"));
+ }
+
+ // check inline text properties
+ {
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:rPr/w:b"_ostr);
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121045)
+{
+ loadAndSave("tdf121045.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[1]/w:fldChar"_ostr, "fldCharType"_ostr, "begin");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[2]/w:instrText"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[3]/w:fldChar"_ostr, "fldCharType"_ostr, "separate");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[5]/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+ // form control keeps its direct formatted font size
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[2]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[2]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[3]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[3]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[4]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[4]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[5]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[5]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf78352, "tdf78352.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Ensure that width of first tab is close to zero (previous value was ~1000 twips)
+ int nWidth = parseDump("/root/page/body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::TabLeft']"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_LESS(150, nWidth);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf81567)
+{
+ loadAndReload("tdf81567.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ int nFrameWidth = parseDump("/root/page/body/txt/anchored/fly/infos/bounds"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(2371, nFrameWidth);
+
+ int nFrameHeight = parseDump("/root/page/body/txt/anchored/fly/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(3520, nFrameHeight);
+
+ int nFrameTop = parseDump("/root/page/body/txt/anchored/fly/infos/bounds"_ostr, "top"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(1518, nFrameTop);
+
+ int nImageWidth = parseDump("/root/page/body/txt/anchored/fly/txt/anchored/fly/infos/bounds"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(2370, nImageWidth);
+
+ int nImageHeight = parseDump("/root/page/body/txt/anchored/fly/txt/anchored/fly/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(1605, nImageHeight);
+
+ // Check the image is at the top of the frame
+ // Without the fix in place, this test would have failed with:
+ // - Expected: 1638
+ // - Actual : 2236
+ int nImageTop = parseDump("/root/page/body/txt/anchored/fly/txt/anchored/fly/infos/bounds"_ostr, "top"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(1638, nImageTop);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf92472)
+{
+ loadAndSave("tdf92472.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:fldChar"_ostr, "fldCharType"_ostr, "begin");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:fldChar"_ostr, "fldCharType"_ostr, "separate");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+ // form control keeps its direct formatted font size
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[4]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[4]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:rPr/w:sz"_ostr, "val"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:rPr/w:szCs"_ostr, "val"_ostr, "20");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Tdf133035)
+{
+ loadAndSave("tdf133035.docx");
+ auto pxml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pxml);
+ OUString aXmlVal = getXPath(pxml, "/w:document/w:body/w:p[1]/w:r[1]/w:object/v:shape"_ostr, "style"_ostr);
+ CPPUNIT_ASSERT(aXmlVal.indexOf("margin-left:186.6pt") > -1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf131260, "tdf131260.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3
+ // - Actual : 2
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTables->getCount());
+}
+DECLARE_OOXMLEXPORT_TEST(testTdf120315, "tdf120315.docx")
+{
+ // tdf#120315 cells of the second column weren't vertically merged
+ // because their horizontal positions are different a little bit
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+ CPPUNIT_ASSERT_EQUAL(getProperty<uno::Sequence<text::TableColumnSeparator>>(
+ xTableRows->getByIndex(0), "TableColumnSeparators")[0]
+ .Position,
+ getProperty<uno::Sequence<text::TableColumnSeparator>>(
+ xTableRows->getByIndex(1), "TableColumnSeparators")[2]
+ .Position);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf108350_noFontdefaults, "tdf108350_noFontdefaults.docx")
+{
+ uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles");
+ uno::Reference< beans::XPropertySet > xStyleProps(paragraphStyles->getByName("NoParent"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Times New Roman"), getProperty<OUString>(xStyleProps, "CharFontName"));
+ //CPPUNIT_ASSERT_EQUAL_MESSAGE("Font size", 10.f, getProperty<float>(xStyleProps, "CharHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123116_oversizedRowSplit)
+{
+ loadAndReload("tdf123116_oversizedRowSplit.odt");
+ // Intentionally require a very non-backward-compatible, natural continuation of the table
+ // instead of an ugly "page break" like MS Word does (and LO used to do).
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Row splits over 4 pages", 4, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPageContentBottom, "page-content-bottom.docx")
+{
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ sal_Int16 nExpected = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 10 (PAGE_PRINT_AREA_BOTTOM)
+ // - Actual : 0 (FRAME)
+ // i.e. the bottom-of-body relation was lost.
+ CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf129522_removeShadowStyle)
+{
+ loadAndReload("tdf129522_removeShadowStyle.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles");
+ uno::Reference< beans::XPropertySet > xStyleProps(paragraphStyles->getByName("Shadow"), uno::UNO_QUERY_THROW);
+ table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xStyleProps, "ParaShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
+
+ // Shadows were inherited regardless of whether the style disabled them.
+ xStyleProps.set(paragraphStyles->getByName("Shadow-removed"), uno::UNO_QUERY_THROW);
+ aShadow = getProperty<table::ShadowFormat>(xStyleProps, "ParaShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
+
+ uno::Reference< container::XNameAccess > characterStyles = getStyles("CharacterStyles");
+ xStyleProps.set(characterStyles->getByName("CharShadow"), uno::UNO_QUERY_THROW);
+ aShadow = getProperty<table::ShadowFormat>(xStyleProps, "CharShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
+
+ xStyleProps.set(characterStyles->getByName("CharShadow-removed"), uno::UNO_QUERY_THROW);
+ aShadow = getProperty<table::ShadowFormat>(xStyleProps, "CharShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf130167_spilloverHeaderShape, "testTdf130167_spilloverHeader.docx")
+{
+ uno::Reference<text::XTextGraphicObjectsSupplier> xTextGraphicObjectsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xNameAccess(
+ xTextGraphicObjectsSupplier->getGraphicObjects(), uno::UNO_QUERY);
+ // graphics from discarded headers were being added to the text body. Reduced from 5 to 2 shapes overall.
+ // CPPUNIT_ASSERT(xNameAccess->getCount() <= 4); -> What about hidden headers?
+ CPPUNIT_ASSERT_LESS(sal_Int32(9), xNameAccess->getCount());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf124986, "tdf124986.docx")
+{
+ // Load a document with SET fields, where the SET fields contain leading/trailing quotation marks and spaces.
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ while (xFields->hasMoreElements())
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xFields->nextElement(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xServiceInfo, uno::UNO_QUERY);
+ if (xServiceInfo->supportsService("com.sun.star.text.TextField.SetExpression"))
+ {
+ OUString aValue;
+ xPropertySet->getPropertyValue("Content") >>= aValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("demo"), aValue);
+ }
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf83309, "tdf83309.docx")
+{
+ // Important: bug case had 4 pages
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ // First paragraph does not have tab before
+ // (same applies to all paragraphs in doc, but lets assume they are
+ // behave same way)
+ OUString sNodeType = parseDump("(/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/child::*)[1]"_ostr, "type"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("PortionType::Text"), sNodeType);
+
+ // tdf148380: creation-date field in header.xml was unsupported on export
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("8/31/14 10:26 AM"), xField->getPresentation(false));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121661)
+{
+ loadAndSave("tdf121661.docx");
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:hyphenationZone"_ostr, "val"_ostr, "851");
+
+ // tdf#149421
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Standard"), uno::UNO_QUERY);
+ // This was false
+ CPPUNIT_ASSERT_GREATER( static_cast<sal_Int16>(0), getProperty<sal_Int16>(xStyle, "ParaHyphenationZone"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf149421, "tdf121661.docx")
+{
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Standard"), uno::UNO_QUERY);
+ // This was false
+ CPPUNIT_ASSERT_GREATER( static_cast<sal_Int16>(0), getProperty<sal_Int16>(xStyle, "ParaHyphenationZone"));
+
+ if (!isExported())
+ {
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int16>(851), getProperty<sal_Int16>(xStyle, "ParaHyphenationZone"));
+ // modify hyphenation zone (note: only hyphenation zone set in Standard paragraph style
+ // is exported, according to the document-level hyphenation settings of OOXML)
+ xStyle->setPropertyValue("ParaHyphenationZone", uno::Any(static_cast<sal_Int16>(2000)));
+ }
+ else
+ {
+ // check the export of the modified hyphenation zone
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int16>(2000), getProperty<sal_Int16>(xStyle, "ParaHyphenationZone"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121658)
+{
+ loadAndSave("tdf121658.docx");
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:doNotHyphenateCaps"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableStyleConfNested)
+{
+ loadAndSave("table-style-conf-nested.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Without the accompanying fix in place, this test would have failed, as the custom table cell
+ // border properties were lost, so the outer A2 cell started to have borders, not present in the
+ // doc model.
+ assertXPath(pXmlDoc, "//w:body/w:tbl/w:tr/w:tc[2]/w:tcPr/w:tcBorders/w:top"_ostr, "val"_ostr, "nil");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133771)
+{
+ // Create the doc model.
+ createSwDoc("tdf133771.odt", /*pPassword*/ "test");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Password Protected"), getParagraph(1)->getString());
+
+ // Without the fix in place, this test would have failed with
+ // "An uncaught exception of type com.sun.star.io.IOException"
+ // exporting to docx
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPathContent(pXmlDoc, "//w:body/w:p/w:r/w:t"_ostr, "Password Protected");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testZeroLineSpacing)
+{
+ // Create the doc model.
+ createSwDoc();
+ uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ style::LineSpacing aSpacing;
+ aSpacing.Mode = style::LineSpacingMode::MINIMUM;
+ aSpacing.Height = 0;
+ xParagraph->setPropertyValue("ParaLineSpacing", uno::Any(aSpacing));
+
+ // Export to docx.
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: atLeast
+ // - Actual : auto
+ // i.e. the minimal linespacing was lost on export.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr, "atLeast");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:spacing"_ostr, "line"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSemiTransparentText)
+{
+ // Create an in-memory empty document.
+ createSwDoc();
+
+ // Set text to half-transparent and type a character.
+ uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xParagraph.is());
+ sal_Int16 nTransparence = 75;
+ xParagraph->setPropertyValue("CharTransparence", uno::Any(nTransparence));
+ uno::Reference<text::XTextRange> xTextRange(xParagraph, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTextRange.is());
+ xTextRange->setString("x");
+
+ // Export to docx.
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ double fValue = getXPath(
+ pXmlDoc,
+ "/w:document/w:body/w:p/w:r/w:rPr/w14:textFill/w14:solidFill/w14:srgbClr/w14:alpha"_ostr,
+ "val"_ostr)
+ .toDouble();
+ sal_Int16 nActual = basegfx::fround(fValue / oox::drawingml::PER_PERCENT);
+
+ // Without the accompanying fix in place, this test would have failed, as the w14:textFill
+ // element was missing.
+ CPPUNIT_ASSERT_EQUAL(nTransparence, nActual);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf147485, "Tdf147485.docx")
+{
+ // Before the fix this was impossible.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf149546, "tdf149546.docx")
+{
+ // Before the fix this was impossible.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testUserField)
+{
+ // Create an in-memory empty document with a user field.
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XDependentTextField> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.User"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xMaster(
+ xFactory->createInstance("com.sun.star.text.FieldMaster.User"), uno::UNO_QUERY);
+ xMaster->setPropertyValue("Name", uno::Any(OUString("foo")));
+ xField->attachTextFieldMaster(xMaster);
+ xField->getTextFieldMaster()->setPropertyValue("Content", uno::Any(OUString("bar")));
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ xText->insertTextContent(xText->createTextCursor(), xField, /*bAbsorb=*/false);
+
+ // Export to docx.
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Without the accompanying fix in place, this test would have failed, the user field was
+ // exported as <w:t>User Field foo = bar</w:t>.
+ assertXPathContent(pXmlDoc, "//w:p/w:r[2]/w:instrText"_ostr, " DOCVARIABLE foo ");
+ assertXPathContent(pXmlDoc, "//w:p/w:r[4]/w:t"_ostr, "bar");
+
+ // Make sure that not only the variables, but also their values are written.
+ pXmlDoc = parseExport("word/settings.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "//w:docVars/w:docVar"_ostr, "name"_ostr, "foo");
+ assertXPath(pXmlDoc, "//w:docVars/w:docVar"_ostr, "val"_ostr, "bar");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testHighlightEdit_numbering)
+{
+ // Create the doc model.
+ createSwDoc("tdf135774_numberingCRProps.docx");
+
+ // This only affects when saving as w:highlight - which is not the default since 7.0.
+ SvtFilterOptions& rOpt = SvtFilterOptions::Get();
+ bool bWasExportToShade = rOpt.IsCharBackground2Shading();
+ rOpt.SetCharBackground2Highlighting();
+
+ //Simulate a user editing the char background color of the paragraph 2 marker (CR)
+ uno::Reference<beans::XPropertySet> properties(getParagraph(2), uno::UNO_QUERY);
+ uno::Sequence<beans::NamedValue> aListAutoFormat;
+ CPPUNIT_ASSERT(properties->getPropertyValue("ListAutoFormat") >>= aListAutoFormat);
+ comphelper::SequenceAsHashMap aMap(properties->getPropertyValue("ListAutoFormat"));
+ // change the background color to RES_CHRATR_BACKGROUND.
+ aMap["CharBackColor"] <<= static_cast<sal_Int32>(0xff00ff);
+ // Two attributes can affect character background. Highlight has priority, and is only there for MS compatibility,
+ // so clear any potential highlight set earlier, or override any coming via a style.
+ aMap["CharHighlight"] <<= static_cast<sal_Int32>(COL_TRANSPARENT);
+
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ aMap["CharInteropGrabBag"] >>= aGrabBag;
+ for (beans::PropertyValue& rProp : asNonConstRange(aGrabBag))
+ {
+ // The shading is no longer defined from import, so clear that flag.
+ // BackColor 0xff00ff will now attempt to export as highlight, since we set that in SvtFilterOptions.
+ if (rProp.Name == "CharShadingMarker")
+ rProp.Value <<= false;
+ }
+ aMap["CharInteropGrabBag"] <<= aGrabBag;
+
+ aMap >> aListAutoFormat;
+ properties->setPropertyValue("ListAutoFormat", uno::Any(aListAutoFormat));
+
+ // Export to docx.
+ save("Office Open XML Text");
+
+ // Paragraph 2 should have only one w:highlight written per w:rPr. Without the fix, there were two.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:body/w:p[2]/w:pPr/w:rPr/w:highlight"_ostr, "val"_ostr, "none");
+ // Visually, the "none" highlight means the bullet point should not have a character background.
+
+ if (bWasExportToShade)
+ rOpt.SetCharBackground2Shading();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132766)
+{
+ loadAndSave("tdf132766.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Ensure that for list=1 and level=0 we wrote correct bullet char and correct font
+ assertXPath(pXmlDoc, "//w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:lvlText"_ostr,
+ "val"_ostr, u"\uF0B7"_ustr);
+ assertXPath(pXmlDoc, "//w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:rPr/w:rFonts"_ostr,
+ "ascii"_ostr, "Symbol");
+ assertXPath(pXmlDoc, "//w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:rPr/w:rFonts"_ostr,
+ "hAnsi"_ostr, "Symbol");
+ assertXPath(pXmlDoc, "//w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:rPr/w:rFonts"_ostr,
+ "cs"_ostr, "Symbol");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128245)
+{
+ loadAndSave("tdf128245.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "//w:num[@w:numId='1']/w:abstractNumId"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "//w:num[@w:numId='2']/w:abstractNumId"_ostr, "val"_ostr, "2");
+ assertXPath(pXmlDoc, "//w:num[@w:numId='3']/w:abstractNumId"_ostr, "val"_ostr, "3");
+ assertXPath(pXmlDoc, "//w:num[@w:numId='4']/w:abstractNumId"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "//w:num[@w:numId='4']/w:lvlOverride[@w:ilvl='0']"_ostr, "ilvl"_ostr, "0");
+ assertXPath(pXmlDoc, "//w:num[@w:numId='4']/w:lvlOverride/w:startOverride"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "//w:num[@w:numId='4']/w:lvlOverride[@w:ilvl='1']"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf124367, "tdf124367.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+ // it was 2761 at the first import, and 2760 at the second import, due to incorrect rounding
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2762),
+ getProperty<uno::Sequence<text::TableColumnSeparator>>(
+ xTableRows->getByIndex(2), "TableColumnSeparators")[0]
+ .Position);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf95189)
+{
+ loadAndReload("tdf95189.docx");
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(7), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128820)
+{
+ loadAndSave("tdf128820.fodt");
+ // Import of exported DOCX failed because of wrong namespace used for wsp element
+ // Now test the exported XML, in case we stop failing opening invalid files
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXml);
+ // The parent wpg:wgp element has three children: wpg:cNvGrpSpPr, wpg:grpSpPr, and wpg:wsp
+ // (if we start legitimately exporting additional children, this needs to be adjusted to check
+ // all those, to make sure we don't export wrong elements).
+ assertXPathChildren(pXml,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/wpg:wgp"_ostr,
+ 3);
+ assertXPath(pXml,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/"
+ "a:graphic/a:graphicData/wpg:wgp/wpg:cNvGrpSpPr"_ostr);
+ assertXPath(pXml,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/"
+ "a:graphic/a:graphicData/wpg:wgp/wpg:grpSpPr"_ostr);
+ // This one was pic:wsp instead of wps:wsp
+ assertXPath(pXml,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/"
+ "a:graphic/a:graphicData/wpg:wgp/wps:wsp"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128889)
+{
+ loadAndSave("tdf128889.fodt");
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXml);
+ // There was an w:r (with w:br) as an invalid child of first paragraph's w:pPr
+ assertXPath(pXml, "/w:document/w:body/w:p[1]/w:pPr/w:r"_ostr, 0);
+ assertXPath(pXml, "/w:document/w:body/w:p[1]/w:r"_ostr, 2);
+ // Check that the break is in proper - last - position
+ assertXPath(pXml, "/w:document/w:body/w:p[1]/w:r[2]/w:br"_ostr, "type"_ostr, "page");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132754)
+{
+ loadAndReload("tdf132754.docx");
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("0.0.0."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("0.0.1."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("0.0.2."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(8, getParagraphs());
+ getParagraph(1, "(Verne, 1870)");
+ getParagraph(2, "Bibliography");
+ getParagraph(4, "Christie, A. (1922). The Secret Adversary. ");
+ CPPUNIT_ASSERT_EQUAL(OUString(), getParagraph(8)->getString());
+
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+ uno::Reference<text::XDocumentIndex> xIndex(xIndexes->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange = xIndex->getAnchor();
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ uno::Reference<text::XTextCursor> xTextCursor = xText->createTextCursor();
+ xTextCursor->gotoRange(xTextRange->getStart(), false);
+ xTextCursor->gotoRange(xTextRange->getEnd(), true);
+ OUString aIndexString(convertLineEnd(xTextCursor->getString(), LineEnd::LINEEND_LF));
+
+ // Check that all the pre-rendered entries are correct, including trailing spaces
+ CPPUNIT_ASSERT_EQUAL(OUString("\n" // starting with an empty paragraph
+ "Christie, A. (1922). The Secret Adversary. \n"
+ "\n"
+ "Verne, J. G. (1870). Twenty Thousand Leagues Under the Sea. \n"
+ ""), // ending with an empty paragraph
+ aIndexString);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf77796)
+{
+ loadAndSave("tdf77796.docx");
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXml);
+ // cell paddings from table style
+ assertXPath(pXml, "/w:document/w:body/w:tbl/w:tblPr/w:tblCellMar/w:start"_ostr, "w"_ostr, "5");
+ assertXPath(pXml, "/w:document/w:body/w:tbl/w:tblPr/w:tblCellMar/w:top"_ostr, "w"_ostr, "240");
+ assertXPath(pXml, "/w:document/w:body/w:tbl/w:tblPr/w:tblCellMar/w:bottom"_ostr, "w"_ostr, "480");
+ // not modified
+ assertXPath(pXml, "/w:document/w:body/w:tbl/w:tblPr/w:tblCellMar/w:end"_ostr, "w"_ostr, "108");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128290)
+{
+ loadAndSave("tdf128290.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXml);
+ assertXPath(pXml, "/w:document/w:body/w:tbl/w:tblPr/w:tblLayout"_ostr, "type"_ostr, "fixed");
+
+ // ensure unnecessary suppressLineNumbers entry is not created.
+ xmlDocUniquePtr pStylesXml = parseExport("word/styles.xml");
+ assertXPath(pStylesXml, "//w:style[@w:styleId='Normal']/w:pPr/w:suppressLineNumbers"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf120394, "tdf120394.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1.2.1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf133605, "tdf133605.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(3), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("(a)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf133605_2, "tdf133605_2.docx")
+{
+ // About the same document as tdf133605.docx, but number definition has level definitions in random order
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(0), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(3), getProperty<sal_Int16>(xPara, "NumberingLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("(a)"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123757)
+{
+ loadAndSave("tdf123757.docx");
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXml);
+ assertXPath(pXml, "/w:document/w:body/w:tbl"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf141172)
+{
+ loadAndSave("tdf141172.docx");
+ xmlDocUniquePtr pXml = parseExport("word/endnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+ // This was 1 (lost table during copying endnote content)
+ assertXPath(pXml, "/w:endnotes/w:endnote/w:tbl"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf141548)
+{
+ loadAndSave("tdf141548.docx");
+ xmlDocUniquePtr pXml = parseExport("word/endnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+ // This was 0 (lost text content of the run with endnoteRef)
+ assertXPath(pXml, "/w:endnotes/w:endnote[4]/w:p/w:r[2]/w:t"_ostr, 2);
+ assertXPathContent(pXml, "/w:endnotes/w:endnote[4]/w:p/w:r[2]/w:t[1]"_ostr, "another endnote");
+ assertXPathContent(pXml, "/w:endnotes/w:endnote[4]/w:p/w:r[2]/w:t[2]"_ostr, "new line");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf143399)
+{
+ loadAndSave("tdf143399.docx");
+ xmlDocUniquePtr pXml = parseExport("word/footnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+ // These were 0 (lost text content of documents both with footnotes and endnotes)
+ assertXPath(pXml, "/w:footnotes/w:footnote[3]/w:p/w:r[3]/w:t"_ostr, 1);
+ assertXPathContent(pXml, "/w:footnotes/w:footnote[3]/w:p/w:r[3]/w:t"_ostr, "Footnotes_graphic2");
+ assertXPath(pXml, "/w:footnotes/w:footnote[4]/w:p/w:r[3]/w:t"_ostr, 1);
+ assertXPathContent(pXml, "/w:footnotes/w:footnote[4]/w:p/w:r[3]/w:t"_ostr, "Footnotes_graphic");
+
+ xmlDocUniquePtr pXml2 = parseExport("word/endnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+ // This was 0 (lost text content of the run with endnoteRef)
+ assertXPath(pXml2, "/w:endnotes/w:endnote[3]/w:p/w:r[3]/w:t"_ostr, 1);
+ assertXPathContent(pXml2, "/w:endnotes/w:endnote[3]/w:p/w:r[3]/w:t[1]"_ostr, "Endnotes");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf143583)
+{
+ loadAndSave("tdf143583_emptyParaAtEndOfFootnote.docx");
+ xmlDocUniquePtr pXml = parseExport("word/footnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+ assertXPath(pXml, "/w:footnotes/w:footnote[3]/w:p"_ostr, 2);
+ // This was 1
+ assertXPath(pXml, "/w:footnotes/w:footnote[4]/w:p"_ostr, 2);
+ // This was 2
+ assertXPath(pXml, "/w:footnotes/w:footnote[5]/w:p"_ostr, 3);
+ // This was 2
+ assertXPath(pXml, "/w:footnotes/w:footnote[6]/w:p"_ostr, 3);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152203)
+{
+ loadAndSave("tdf152203.docx");
+ xmlDocUniquePtr pXml = parseExport("word/footnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XTextRange> xLastFootnote(xFootnotes->getByIndex(5), uno::UNO_QUERY);
+ // This was "Footnote for pg5" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg 6"), xLastFootnote->getString().trim() );
+
+ uno::Reference<text::XTextRange> xLastButOne(xFootnotes->getByIndex(4), uno::UNO_QUERY);
+ // This was "Footnote for pg 6" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg5"), xLastButOne->getString().trim() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152506)
+{
+ loadAndSave("tdf152506.docx");
+ xmlDocUniquePtr pXml = parseExport("word/footnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XTextRange> xLastFootnote(xFootnotes->getByIndex(1), uno::UNO_QUERY);
+ // This was "Footnote for pg5" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg 6"), xLastFootnote->getString().trim() );
+
+ uno::Reference<text::XTextRange> xLastButOne(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ // This was "Footnote for pg 6" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg5"), xLastButOne->getString().trim() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf153255)
+{
+ loadAndSave("tdf153255.docx");
+ xmlDocUniquePtr pXml = parseExport("word/footnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XTextRange> xLastFootnote(xFootnotes->getByIndex(5), uno::UNO_QUERY);
+ // This was "Footnote for pg2" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg 6"), xLastFootnote->getString().trim() );
+
+ uno::Reference<text::XTextRange> xLastButOne(xFootnotes->getByIndex(4), uno::UNO_QUERY);
+ // This was "Footnote for pg 6" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg5"), xLastButOne->getString().trim() );
+
+ // check all the remaining footnotes
+
+ uno::Reference<text::XTextRange> xFootnote1(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ // This was "Footnote for pg3" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg1"), xFootnote1->getString().trim() );
+
+ uno::Reference<text::XTextRange> xFootnote2(xFootnotes->getByIndex(1), uno::UNO_QUERY);
+ // This was "Footnote for pg5" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg2"), xFootnote2->getString().trim() );
+
+ uno::Reference<text::XTextRange> xFootnote3(xFootnotes->getByIndex(2), uno::UNO_QUERY);
+ // This was "Footnote for pg4." (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg3"), xFootnote3->getString().trim() );
+
+ uno::Reference<text::XTextRange> xFootnote4(xFootnotes->getByIndex(3), uno::UNO_QUERY);
+ // This was "Footnote for pg1" (replaced footnotes)
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg4."), xFootnote4->getString().trim() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf153804)
+{
+ loadAndSave("tdf153804.docx");
+ xmlDocUniquePtr pXml = parseExport("word/footnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XTextRange> xLastFootnote(xFootnotes->getByIndex(1), uno::UNO_QUERY);
+ // This was empty
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg 6"), xLastFootnote->getString().trim() );
+
+ uno::Reference<text::XTextRange> xLastButOne(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ // This was empty
+ CPPUNIT_ASSERT_EQUAL( OUString("Footnote for pg5"), xLastButOne->getString().trim() );
+}
+
+// skip test for macOS (missing fonts?)
+#if !defined(MACOSX)
+DECLARE_OOXMLEXPORT_TEST(testTdf146346, "tdf146346.docx")
+{
+ // This was 2 (by bad docDefault vertical margins around tables in footnotes)
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // only first page has table
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // check first page: all tables on the first page
+ assertXPath(pXmlDoc, "/root/page[1]//anchored/fly"_ostr, 8);
+ assertXPath(pXmlDoc, "/root/page[1]//anchored/fly/tab"_ostr, 8);
+
+ // No second page.
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1
+ // i.e. unwanted lower margin in the floating table's anchor paragraph in the footnote created a
+ // second page.
+ assertXPath(pXmlDoc, "/root/page[2]"_ostr, 0);
+}
+#endif
+
+DECLARE_OOXMLEXPORT_TEST(testTdf130088, "tdf130088.docx")
+{
+ // This was 2 (justification without shrinking resulted more lines)
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // check compatibility option in ODT export/import, too
+ saveAndReload("writer8");
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf158436, "tdf158436.docx")
+{
+ // This resulted freezing
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf159032, "tdf124795-5.docx")
+{
+ // This resulted crashing
+ CPPUNIT_ASSERT_EQUAL(57, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testHyphenationAuto)
+{
+ loadAndReload("hyphenation.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Explicitly set hyphenation=auto on document level
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ CPPUNIT_ASSERT(pXmlSettings);
+ assertXPath(pXmlSettings, "/w:settings/w:autoHyphenation"_ostr, "val"_ostr, "true");
+
+ // Second paragraph has explicitly enabled hyphenation
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXml);
+ assertXPath(pXml, "/w:document/w:body/w:p[2]/w:pPr/w:suppressAutoHyphens"_ostr, "val"_ostr, "false");
+
+ // Default paragraph style explicitly disables hyphens
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ CPPUNIT_ASSERT(pXmlStyles);
+ assertXPath(pXmlStyles, "/w:styles/w:docDefaults/w:pPrDefault/w:pPr/w:suppressAutoHyphens"_ostr, "val"_ostr, "true");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testStrikeoutGroupShapeText)
+{
+ loadAndSave("tdf131776_StrikeoutGroupShapeText.docx");
+ // tdf#131776: Check if strikeout is used in shape group texts
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+
+ // double strike (dstrike)
+ // no "val" attribute
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:dstrike"_ostr);
+ assertXPathNoAttribute(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:dstrike"_ostr, "val"_ostr);
+ // "val" attribute is true, this is used in this test file. However, LO is going to export this element without the "val" attribute
+ // because if the element appears, but without an attribute its "val" true by default.
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:dstrike"_ostr);
+ assertXPathNoAttribute(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:dstrike"_ostr, "val"_ostr);
+ // "val" attribute is false (this was missing, resulting the regression)
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[3]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:dstrike"_ostr, "val"_ostr, "false");
+
+ // simple strike (strike)
+ // no "val" attribute
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[4]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:strike"_ostr);
+ assertXPathNoAttribute(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[4]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:strike"_ostr, "val"_ostr);
+ // "val" attribute is true, this is used in this test file. However, LO is going to export this element without the "val" attribute
+ // because if the element appears, but without an attribute its "val" true by default.
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[5]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:strike"_ostr);
+ assertXPathNoAttribute(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[5]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:strike"_ostr, "val"_ostr);
+ // "val" attribute is false
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/"
+ "wps:wsp[6]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:strike"_ostr, "val"_ostr, "false");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131539)
+{
+ loadAndSave("tdf131539.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ //The positions of OLE objects were not exported, check if now it is exported correctly
+ xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(p_XmlDoc);
+ OUString aXmlVal = getXPath(p_XmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:object/v:shape"_ostr, "style"_ostr);
+ // This data was missing
+ CPPUNIT_ASSERT(aXmlVal.indexOf("margin-left:139.95")>-1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLineWidthRounding)
+{
+ loadAndSave("tdf126363_LineWidthRounding.docx");
+ // tdf#126363: check if line with stays the same after export
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ // this was 57240 (it differs from the original 57150, losing the preset line width)
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln"_ostr, "w"_ostr, "57150");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf108505)
+{
+ loadAndReload("tdf108505.docx");
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(3);
+ uno::Reference<text::XTextRange> xText
+ = getRun(xParagraph, 1, "Wrong font when alone on the line");
+
+ // Without the fix in place this would have become Times New Roman
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Trebuchet MS"),
+ getProperty<OUString>(xText, "CharFontName"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromTopMarginHasHeader)
+{
+ loadAndReload("tdf123324_testRelativeAnchorHeightFromTopMarginHasHeader.docx");
+ // tdf#123324 The height was set relative to page print area top,
+ // but this was handled relative to page height.
+ // Note: page print area top = margin + header height.
+ // In this case the header exists.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "height"_ostr, "2551");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromTopMarginNoHeader)
+{
+ loadAndReload("tdf123324_testRelativeAnchorHeightFromTopMarginNoHeader.docx");
+ // tdf#123324 The height was set relative from top margin, but this was handled relative from page height.
+ // Note: the MSO Word margin = LO margin + LO header height.
+ // In this case the header does not exist, so MSO Word margin and LO Writer margin are the same.
+
+ // tdf#123324 The height was set relative to page print area top,
+ // but this was handled relative to page height.
+ // Note: page print area top = margin + header height.
+ // In this case the header does not exist, so OpenDocument and OOXML margins are the same.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "height"_ostr, "2551");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf64531)
+{
+ loadAndReload("tdf64531.docx");
+ xmlDocUniquePtr pXmlDoc= parseExport("word/document.xml");
+ OString sPathToTabs= "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:pPr/w:tabs/"_ostr;
+ assertXPath(pXmlDoc, sPathToTabs+"w:tab[1]", "pos"_ostr,"720");
+ assertXPath(pXmlDoc, sPathToTabs+"w:tab[2]", "pos"_ostr,"12950");
+}
+/* temporarily disabled to get further test results
+ The import now uses the dml shape, not the VML fallback.
+DECLARE_OOXMLEXPORT_TEST(testVmlShapeTextWordWrap, "tdf97618_testVmlShapeTextWordWrap.docx")
+{
+ // tdf#97618 The text wrapping of a shape was not handled in a canvas.
+ // TODO: fix export too
+ if (isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ if (!pXmlDoc)
+ return;
+ // The bound rect of shape will be wider if wrap does not work (the wrong value is 3167).
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds", "width", "2500");
+}
+*/
+
+DECLARE_OOXMLEXPORT_TEST(testVmlLineShapeMirroredX, "tdf97517_testVmlLineShapeMirroredX.docx")
+{
+ // tdf#97517 The "flip:x" was not handled for VML line shapes.
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ OUString sStyle = getXPath(pXmlDoc,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:line"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(sStyle.indexOf("flip:x") > 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testVmlLineShapeMirroredY, "tdf137678_testVmlLineShapeMirroredY.docx")
+{
+ // tdf#137678 The "flip:y" was not handled for VML line shapes.
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ OUString sStyle = getXPath(pXmlDoc,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:line"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(sStyle.indexOf("flip:y") > 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVmlLineShapeRotated)
+{
+ loadAndSave("tdf137765_testVmlLineShapeRotated.docx");
+ // tdf#137765 The "rotation" (in style attribute) was not handled correctly for VML line shapes.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // it was 1.55pt,279.5pt
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:line"_ostr,
+ "from"_ostr,
+ "-9pt,296.75pt");
+ // it was 25.5pt,317.8pt
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:line"_ostr,
+ "to"_ostr,
+ "36.05pt,300.55pt");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
new file mode 100644
index 0000000000..96e7e6bae0
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -0,0 +1,1065 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <o3tl/string_view.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123621)
+{
+ loadAndSave("tdf123621.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/wp:positionV/wp:posOffset"_ostr, "1080135");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131540)
+{
+ loadAndReload("tdf131540.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // There are 2 OLEs test if one of them moved on save:
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The shape1 moved on saving!", text::RelOrientation::PAGE_FRAME,
+ getProperty<sal_Int16>(getShape(1), "HoriOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The shape2 moved on saving!", text::RelOrientation::PAGE_FRAME,
+ getProperty<sal_Int16>(getShape(2), "HoriOrientRelation"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf131801, "tdf131801.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ // "1." is red
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getXPath(pDump, "//page[1]/body/txt[1]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("00ff0000"), getXPath(pDump, "//page[1]/body/txt[1]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+ // "2." is red
+ CPPUNIT_ASSERT_EQUAL(OUString("2."), getXPath(pDump, "//page[1]/body/txt[2]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("00ff0000"), getXPath(pDump, "//page[1]/body/txt[2]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+ // "3." is black
+ CPPUNIT_ASSERT_EQUAL(OUString("3."), getXPath(pDump, "//page[1]/body/txt[3]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), getXPath(pDump, "//page[1]/body/txt[3]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+ // "4." is black
+ CPPUNIT_ASSERT_EQUAL(OUString("4."), getXPath(pDump, "//page[1]/body/txt[4]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), getXPath(pDump, "//page[1]/body/txt[4]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+ // "5." is red
+ CPPUNIT_ASSERT_EQUAL(OUString("5."), getXPath(pDump, "//page[1]/body/txt[5]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("00ff0000"), getXPath(pDump, "//page[1]/body/txt[5]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+ // "6." is red
+ CPPUNIT_ASSERT_EQUAL(OUString("6."), getXPath(pDump, "//page[1]/body/txt[6]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("00ff0000"), getXPath(pDump, "//page[1]/body/txt[6]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+ // "7." is black
+ CPPUNIT_ASSERT_EQUAL(OUString("7."), getXPath(pDump, "//page[1]/body/txt[7]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), getXPath(pDump, "//page[1]/body/txt[7]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+ // "8." is black
+ CPPUNIT_ASSERT_EQUAL(OUString("8."), getXPath(pDump, "//page[1]/body/txt[8]/SwParaPortion/SwLineLayout/SwFieldPortion[1]"_ostr, "expand"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("ffffffff"), getXPath(pDump, "//page[1]/body/txt[8]/SwParaPortion/SwLineLayout/SwFieldPortion[1]/SwFont"_ostr, "color"_ostr));
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:rStyle"_ostr,
+ "val"_ostr, "Emphasis");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:rStyle"_ostr,
+ "val"_ostr, "Emphasis");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[3]/w:pPr/w:rPr/w:rStyle"_ostr, 0);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:pPr/w:rPr/w:rStyle"_ostr, 0);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[5]/w:pPr/w:rPr/w:rStyle"_ostr,
+ "val"_ostr, "Emphasis");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[5]/w:pPr/w:rPr/w:sz"_ostr,
+ "val"_ostr, "32");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[6]/w:pPr/w:rPr/w:rStyle"_ostr,
+ "val"_ostr, "Emphasis");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[6]/w:pPr/w:rPr/w:sz"_ostr,
+ "val"_ostr, "32");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[7]/w:pPr/w:rPr/w:rStyle"_ostr, 0);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[8]/w:pPr/w:rPr/w:rStyle"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133334_followPgStyle)
+{
+ loadAndReload("tdf133334_followPgStyle.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf137850_compat14ZOrder, "tdf137850_compat14ZOrder.docx")
+{
+ // The file contains 2 shapes which have a different value of behindDoc.
+ // Test that the textbox is hidden behind the arrow (for Word <= 2010/compatibilityMode==14)
+ uno::Reference<text::XText> xShape(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2015"), xShape->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in the background", false, getProperty<bool>(xShape, "Opaque"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf137850_compat15ZOrder, "tdf137850_compat15ZOrder.docx")
+{
+ // The file contains 2 shapes which have a different value of behindDoc.
+ // Test that the textbox is not hidden behind the arrow (for Word >= 2013/compatibilityMode==15)
+ uno::Reference<text::XText> xShape(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2015"), xShape->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in the foreground", true, getProperty<bool>(xShape, "Opaque"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf118701)
+{
+ loadAndSave("tdf118701.docx");
+ // This was 6, related to moving inline images after the page breaks
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr[1]/w:numPr"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr[1]/w:numPr"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr[1]/w:numPr"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr[1]/w:numPr"_ostr, 1);
+
+ // Keep numbering of the paragraph of the inline image
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr[1]/w:numPr"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr[1]/w:numPr"_ostr, 1);
+ // This was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr[1]/w:numPr"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123388, "tdf123388.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Tests new cell formula PRODUCT
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("PRODUCT(<B2:B3>)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("640"), xEnumerationAccess1->getPresentation(false).trim());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123381, "tdf123381.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("INT(5.65)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("5"), xEnumerationAccess1->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("INT(<A1>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("6"), xEnumerationAccess2->getPresentation(false).trim());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123401)
+{
+ loadAndReload("tdf123401.fodt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Tests new cell formula AVERAGE
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<A1:A2>)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), xEnumerationAccess1->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<A1:A3>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), xEnumerationAccess2->getPresentation(false).trim());
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // MEAN converted to AVERAGE
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[2]/w:instrText"_ostr, " =AVERAGE(A1:A2)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[2]/w:instrText"_ostr, " =AVERAGE(A1:A3)");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf116394, "tdf116394.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ uno::Reference<text::XTextField> xEnumerationAccess(xFields->nextElement(), uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: ab=cd..
+ // - Actual : abcd..
+ CPPUNIT_ASSERT_EQUAL(OUString("ab=cd.."), xEnumerationAccess->getPresentation(true).trim());
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText"_ostr, " MERGEFIELD ab=cd ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123356)
+{
+ loadAndReload("tdf123356.fodt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Tests new cell formula COUNT
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("COUNT(<A1>)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xEnumerationAccess1->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("COUNT(<A1:B2>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("4"), xEnumerationAccess2->getPresentation(false).trim());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136404)
+{
+ loadAndReload("tdf136404.fodt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Ignore empty cells or cells with text content with new interoperability functions COUNT, AVERAGE and PRODUCT
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("COUNT(<A1:F1>)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), xEnumerationAccess1->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<B1:C1>)"), xEnumerationAccess2->getPresentation(true).trim());
+ // This was 0
+ CPPUNIT_ASSERT_EQUAL(OUString("** Expression is faulty **"), xEnumerationAccess2->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<B1>)"), xEnumerationAccess3->getPresentation(true).trim());
+ // This was 0
+ CPPUNIT_ASSERT_EQUAL(OUString("** Expression is faulty **"), xEnumerationAccess3->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("COUNT(<B1:C1>)"), xEnumerationAccess4->getPresentation(true).trim());
+ // This was 2
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), xEnumerationAccess4->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess5(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("COUNT(<B1>)"), xEnumerationAccess5->getPresentation(true).trim());
+ // This was 1
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), xEnumerationAccess5->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess6(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("PRODUCT(<A1:F1>)"), xEnumerationAccess6->getPresentation(true).trim());
+ // This was 0
+ CPPUNIT_ASSERT_EQUAL(OUString("60"), xEnumerationAccess6->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess7(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<A1:F1>)"), xEnumerationAccess7->getPresentation(true).trim());
+ // This was 2
+ CPPUNIT_ASSERT_EQUAL(OUString("8"), xEnumerationAccess7->getPresentation(false).trim());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf138739, "tdf138739.docx")
+{
+ uno::Reference<beans::XPropertySet> xParaProps(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Font type name does not match!", OUString("Comic Sans MS"),
+ xParaProps->getPropertyValue("CharFontName").get<OUString>());
+
+ // tdf#148565: text at anchor point should be bold, Comic Sans MS font
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(getParagraph(5), 3), "CharWeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123390)
+{
+ loadAndReload("tdf123390.fodt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Tests new cell formula SIGN
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("SIGN(<A1>)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("-1"), xEnumerationAccess1->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("SIGN(<C1>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xEnumerationAccess2->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("SIGN(<B1>)"), xEnumerationAccess3->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), xEnumerationAccess3->getPresentation(false).trim());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123354)
+{
+ loadAndReload("tdf123354.fodt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Tests new cell formula SIGN
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("ABS(<A1>)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("10"), xEnumerationAccess1->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("ABS(<C1>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("10"), xEnumerationAccess2->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("ABS(<B1>)"), xEnumerationAccess3->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), xEnumerationAccess3->getPresentation(false).trim());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123355, "tdf123355.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Tests conversion of range IDs ABOVE, BELOW, LEFT and RIGHT
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ // Note: range ends at B4 here, which is a cell with text content
+ CPPUNIT_ASSERT_EQUAL(OUString("average( <B2:B3> )"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("5,5"), xEnumerationAccess1->getPresentation(false).trim());
+
+ // range ends at the end of the empty cells
+ uno::Reference<text::XTextField> xEnumerationAccess6(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("SUM(<C6:A6>)"), xEnumerationAccess6->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), xEnumerationAccess6->getPresentation(false).trim());
+
+ // range starts at the first cell above D5
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<D4:D1>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("5,33"), xEnumerationAccess2->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<C2:C1>)"), xEnumerationAccess3->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("3,5"), xEnumerationAccess3->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<D2:D2>)"), xEnumerationAccess4->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("5"), xEnumerationAccess4->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess5(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AVERAGE(<A2:A2>)"), xEnumerationAccess5->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("4"), xEnumerationAccess5->getPresentation(false).trim());
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // keep original formula IDs
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =average( below )");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =AVERAGE(LEFT)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:p/w:r[2]/w:instrText"_ostr, " =AVERAGE(RIGHT)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[3]/w:p/w:r[2]/w:instrText"_ostr, " =AVERAGE(ABOVE)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =AVERAGE(ABOVE)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =SUM(LEFT)");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123382, "tdf123382.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Tests conversion of range IDs ABOVE, BELOW, LEFT and RIGHT
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ // Note: range ends at B4 here, which is a cell with text content
+ CPPUNIT_ASSERT_EQUAL(OUString("MAX(<B1:D1>)"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("12"), xEnumerationAccess1->getPresentation(false).trim());
+
+ // range ends at the end of the empty cells
+ uno::Reference<text::XTextField> xEnumerationAccess6(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("MAX(<C4:D4>)"), xEnumerationAccess6->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("9"), xEnumerationAccess6->getPresentation(false).trim());
+
+ // range starts at the first cell above D5
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("SUM(<B3:D3>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("30"), xEnumerationAccess2->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("MAX(<C2:A2>)"), xEnumerationAccess3->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("7"), xEnumerationAccess3->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("MAX(<B2:D2>)"), xEnumerationAccess4->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("7"), xEnumerationAccess4->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess5(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("MAX(<D2:D4>)"), xEnumerationAccess5->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("12"), xEnumerationAccess5->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess7(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("MAX(<B2:B4>)"), xEnumerationAccess7->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("10"), xEnumerationAccess7->getPresentation(false).trim());
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // keep original formula IDs
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:r[2]/w:instrText"_ostr, " =MAX(RIGHT)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:r[2]/w:instrText"_ostr, " =MAX(RIGHT)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:r[2]/w:instrText"_ostr, " =SUM(RIGHT)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =MAX(BELOW)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =MAX(RIGHT)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =MAX(BELOW)");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[4]/w:p/w:r[2]/w:instrText"_ostr, " =MAX(LEFT)");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf122648, "tdf122648.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // table formula conversion worked only in the first table
+ uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("<A1>"), xEnumerationAccess1->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xEnumerationAccess1->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("SUM(<A1:B1>)"), xEnumerationAccess2->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), xEnumerationAccess2->getPresentation(false).trim());
+
+ // These were <?> and SUM(<?:?>) with zero values
+ uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("<A1>"), xEnumerationAccess3->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), xEnumerationAccess3->getPresentation(false).trim());
+
+ uno::Reference<text::XTextField> xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("SUM(<A1:B1>)"), xEnumerationAccess4->getPresentation(true).trim());
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), xEnumerationAccess4->getPresentation(false).trim());
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =A1");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[2]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =SUM(A1:B1)");
+ // These were =<?> and =SUM(<?:?>)
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr[1]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =A1");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr[2]/w:tc[2]/w:p/w:r[2]/w:instrText"_ostr, " =SUM(A1:B1)");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf98000_changePageStyle)
+{
+ loadAndReload("tdf98000_changePageStyle.odt");
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY_THROW);
+ OUString sPageOneStyle = getProperty<OUString>( xCursor, "PageStyleName" );
+
+ xCursor->jumpToNextPage();
+ OUString sPageTwoStyle = getProperty<OUString>( xCursor, "PageStyleName" );
+ CPPUNIT_ASSERT_MESSAGE("Different page1/page2 styles", sPageOneStyle != sPageTwoStyle);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf145998_unnecessaryPageStyles)
+{
+ loadAndReload("tdf145998_unnecessaryPageStyles.odt");
+
+ // Sanity check - always good to test when dealing with page styles and breaks.
+ CPPUNIT_ASSERT_EQUAL(5, getPages());
+
+ // Page Style should be explicitly mentioned - otherwise it would be a "follow" style
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2, "2"), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(uno::Any() != xPara->getPropertyValue("PageDescName"));
+ // CPPUNIT_ASSERT_EQUAL(OUString("First Page header"),
+ // parseDump("/root/page[2]/header/txt"));
+
+ // Page Style is converted into a page break instead. Still shows "first" header.
+ xPara.set(getParagraph(3, "3"), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(), xPara->getPropertyValue("PageDescName"));
+ // CPPUNIT_ASSERT_EQUAL(OUString("Default page style - first page style"),
+ // parseDump("/root/page[3]/header/txt"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), parseDump("/root/page[3]/footer/txt"_ostr));
+
+ // Page Style is converted into a page break instead. Shows the "normal" header.
+ xPara.set(getParagraph(5, "4"), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(), xPara->getPropertyValue("PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Default page style"),
+ parseDump("/root/page[4]/header/txt"_ostr));
+
+ // Page Style is retained (with wrong header) in order to preserve page re-numbering.
+ xPara.set(getParagraph(7, "1"), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(uno::Any() != xPara->getPropertyValue("PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), parseDump("/root/page[5]/footer/txt"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136929_framesOfParagraph)
+{
+ loadAndReload("tdf136929_framesOfParagraph.odt");
+ // Before this fix, the image was placed in the footer instead of in the text body - messing everything up.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 5, getPages() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Header2 text", OUString("* | *"), parseDump("/root/page[4]/footer/txt"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf136589_paraHadField, "tdf136589_paraHadField.docx")
+{
+ // The section break should not add an additional CR - which equals an empty page two.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ //tdf#118711 - don't explicitly specify the default page style at the beginning of the document
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(), xPara->getPropertyValue("PageDescName"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133370_columnBreak)
+{
+ loadAndReload("tdf133370_columnBreak.odt");
+ // Since non-DOCX formats ignores column breaks in non-column situations, don't export to docx.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134649_pageBreak)
+{
+ loadAndReload("tdf134649_pageBreak.fodt");
+ // This was 1 (missing page break between tables).
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c14, "tdf135343_columnSectionBreak_c14.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(1), "TextSection");
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section one's columns", sal_Int16(2), xTextColumns->getColumnCount());
+
+ // Old Word 2010 version - nextColumn breaks inside column sections are just treated as regular column breaks.
+ //xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(12, "RTL 2"), "TextSection");
+ //xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ //CPPUNIT_ASSERT_EQUAL_MESSAGE("Section four's columns", sal_Int16(3), xTextColumns->getColumnCount());
+ //CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135973)
+{
+ loadAndReload("tdf135973.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2."), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c14v2, "tdf135343_columnSectionBreak_c14v2.docx")
+{
+ // In this Word 2010 v2, section three was changed to start with a nextColumn break instead of a continuous break.
+ // The previous section has no columns, so this time start the columns on a new page.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(10, ""), "TextSection");
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section three's columns", sal_Int16(3), xTextColumns->getColumnCount());
+ //CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c12v3, "tdf135343_columnSectionBreak_c12v3.docx")
+{
+ // In this Word 20-3 v3, section one and two have different number of columns. It acts like a page break.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(1, "Four columns,"), "TextSection");
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section one's columns", sal_Int16(4), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(6, "RTL 2"), "TextSection");
+ xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section two's columns", sal_Int16(2), xTextColumns->getColumnCount());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135343_columnSectionBreak_c15, "tdf135343_columnSectionBreak_c15.docx")
+{
+ // Word 2013+ version - nextColumn breaks inside column sections are always handled like nextPage breaks.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(12, "RTL 2"), "TextSection");
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section four's columns", sal_Int16(3), xTextColumns->getColumnCount());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Fits on two pages", 2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf121669_equalColumns, "tdf121669_equalColumns.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ // The property was ignored when deciding at export whether the columns were equal or not. Layout isn't reliable.
+ CPPUNIT_ASSERT(getProperty<bool>(xTextColumns, "IsAutomatic"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreak)
+{
+ loadAndReload("tdf132149_pgBreak.odt");
+ // This 5 page document is designed to visually exaggerate the problems
+ // of emulating LO's followed-by-page-style into MSWord's sections.
+ // While much has been improved, there are extra pages present, which still need fixing.
+ xmlDocUniquePtr pDump = parseLayoutDump();
+
+ // No header on pages 1,2,3.
+ assertXPath(pDump, "//page[2]/header"_ostr, 0);
+
+ // Margins/page orientation between Right and Left page styles are different
+ assertXPath(pDump, "//page[1]/infos/prtBounds"_ostr, "left"_ostr, "1134"); //Right page style
+ assertXPath(pDump, "//page[2]/infos/prtBounds"_ostr, "left"_ostr, "2268"); //Left page style
+
+ assertXPath(pDump, "//page[1]/infos/bounds"_ostr, "width"_ostr, "8391"); //landscape
+ assertXPath(pDump, "//page[2]/infos/bounds"_ostr, "width"_ostr, "5940"); //portrait
+ // This two-line 3rd page ought not to exist. DID YOU FIX ME? The real page 3 should be "8391" landscape.
+ assertXPath(pDump, "//page[3]/infos/bounds"_ostr, "width"_ostr, "5940");
+ // This really ought to be on odd page 3, but now it is on odd page 5.
+ assertXPath(pDump, "//page[5]/infos/bounds"_ostr, "width"_ostr, "8391");
+ assertXPath(pDump, "//page[5]/infos/prtBounds"_ostr, "right"_ostr, "6122"); //Left page style
+
+
+ //Page style change here must not be lost. This SHOULD be on page 4, but sadly it is not.
+ assertXPathContent(pDump, "//page[6]/header/txt"_ostr, "First Page Style");
+ CPPUNIT_ASSERT(getXPathContent(pDump, "//page[6]/body/txt[1]"_ostr).startsWith("Lorem ipsum"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreakB)
+{
+ loadAndReload("tdf132149_pgBreakB.odt");
+ // This 5 page document is designed to visually exaggerate the problems
+ // of emulating LO's followed-by-page-style into MSWord's sections.
+ xmlDocUniquePtr pDump = parseLayoutDump();
+
+ //Sanity check to ensure the correct page is being tested. This SHOULD be on page 3, but sadly it is not.
+ CPPUNIT_ASSERT(getXPathContent(pDump, "//page[5]/body/txt[1]"_ostr).startsWith("Lorem ipsum"));
+ //Prior to this fix, the original alternation between portrait and landscape was completely lost.
+ assertXPath(pDump, "//page[5]/infos/bounds"_ostr, "width"_ostr, "8391"); //landscape
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreak2)
+{
+ loadAndReload("tdf132149_pgBreak2.odt");
+ // This 3 page document is designed to visually exaggerate the problems
+ // of emulating LO's followed-by-page-style into MSWord's sections.
+
+ // The only specified page style change should be between page 1 and 2.
+ // When the first paragraph was split into 3, each paragraph specified a page break. The last was unnecessary.
+ uno::Reference<beans::XPropertySet> xParaThree(getParagraph(3), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(), xParaThree->getPropertyValue("PageDescName"));
+ // The ODT is only 2 paragraphs, but a hack to get the right page style breaks para1 into pieces.
+ // This was 4 paragraphs - the unnecessary page break had hacked in another paragraph split.
+ CPPUNIT_ASSERT_LESSEQUAL( 3, getParagraphs() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136952_pgBreak3B)
+{
+ loadAndReload("tdf136952_pgBreak3B.odt");
+ // This 4 page document is designed to visually exaggerate the problems
+ // of emulating LO's followed-by-page-style into MSWord's sections.
+ xmlDocUniquePtr pDump = parseLayoutDump();
+
+ //page::breakAfter must not be lost.
+ //Prior to this bug fix, the Lorem ipsum paragraph was in the middle of a portrait page, with no switch to landscape occurring.
+ CPPUNIT_ASSERT(getXPathContent(pDump, "//page[3]/body/txt[1]"_ostr).startsWith("Lorem ipsum"));
+ assertXPath(pDump, "//page[3]/infos/bounds"_ostr, "width"_ostr, "8391"); //landscape
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135949_anchoredBeforeBreak, "tdf135949_anchoredBeforeBreak.docx")
+{
+ xmlDocUniquePtr pDump = parseLayoutDump();
+ //The picture was shown on page 2, because the empty paragraph before the page break was removed
+ assertXPath(pDump, "//page[1]/body/txt/anchored/fly"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129452_excessBorder, "tdf129452_excessBorder.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY_THROW);
+
+ // The outside border should not be applied on inside cells. The merge doesn't extend to the table bottom.
+ // [Note: as humans, we would call this cell D3, but since row 4 hasn't been analyzed yet, it is considered column C.]
+ table::BorderLine2 aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("C3"), "BottomBorder");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("No bottom border on merged cell", sal_uInt32(0), aBorder.LineWidth);
+
+ // [Note: as humans, we would call this cell C3, but since row 4 hasn't been analyzed yet, it is considered column B.]
+ aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("B3"), "BottomBorder");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("No bottom border on merged cell", sal_uInt32(0), aBorder.LineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf132898_missingBorder, "tdf132898_missingBorder.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // The bottom border from the last merged cell was not showing
+ table::BorderLine2 aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("A1"), "BottomBorder");
+ CPPUNIT_ASSERT_MESSAGE("Bottom border on merged cell", aBorder.LineWidth > 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf132898_extraBorder, "tdf132898_extraBorder.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // A border defined on an earlier merged cell was showing
+ table::BorderLine2 aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("C1"), "BottomBorder");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("No bottom border on merged cell", sal_uInt32(0), aBorder.LineWidth);
+ // MS Word is interesting here. 2/3 of the merged cell has the right border, so what to do?
+ aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("C1"), "RightBorder");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("No right border on merged cell", sal_uInt32(0), aBorder.LineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf131561_necessaryBorder, "tdf131561_necessaryBorder.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // Hand-crafted pre-emptive test to make sure borders aren't lost.
+ // MS Word is interesting here. 2/3 of the merged cell has the right border, so what to do?
+ table::BorderLine2 aBorderR = getProperty<table::BorderLine2>(xTable->getCellByName("A1"), "RightBorder");
+ table::BorderLine2 aBorderL = getProperty<table::BorderLine2>(xTable->getCellByName("B1"), "LeftBorder");
+ CPPUNIT_ASSERT_MESSAGE("Border between A1 and B1", (aBorderR.LineWidth + aBorderL.LineWidth) > 0);
+ aBorderR = getProperty<table::BorderLine2>(xTable->getCellByName("A3"), "RightBorder");
+ aBorderL = getProperty<table::BorderLine2>(xTable->getCellByName("B3"), "LeftBorder");
+ CPPUNIT_ASSERT_MESSAGE("Border between A3 and B3", (aBorderR.LineWidth + aBorderL.LineWidth) > 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135655)
+{
+ loadAndSave("tdf135655.odt");
+ const xmlDocUniquePtr pExpDoc = parseExport("word/document.xml");
+ const OUString sXFillColVal = getXPath(pExpDoc, "/w:document/w:body/w:p/w:r/w:object/v:shape"_ostr, "fillcolor"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("#00A933"), sXFillColVal);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf138374)
+{
+ loadAndSave("tdf138374.odt");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape"_ostr, "fillcolor"_ostr, "#ffd320");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape"_ostr, "coordsize"_ostr, "1315,6116");
+ if (IsDefaultDPI())
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape"_ostr, "path"_ostr,
+ "m0,0l1314,0l1314,5914l416,5914l416,6115l106,5715l416,5415l416,5715l1014,5715l1014,224l0,224l0,16l0,0e");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape"_ostr, "style"_ostr,
+ "position:absolute;margin-left:394.3pt;margin-top:204pt;width:37.2pt;height:173.3pt;mso-wrap-style:none;v-text-anchor:middle");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf134609_gridAfter, "tdf134609_gridAfter.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // Table borders (width 159) apply to edge cells, even in uneven cases caused by gridBefore/gridAfter,
+ table::BorderLine2 aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("A1"), "RightBorder");
+ CPPUNIT_ASSERT_MESSAGE("Right border before gridAfter cells", aBorder.LineWidth > 0);
+ aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("E2"), "LeftBorder");
+ CPPUNIT_ASSERT_MESSAGE("Left edge border after gridBefore cells", aBorder.LineWidth > 100);
+ aBorder = getProperty<table::BorderLine2>(xTable->getCellByName("E2"), "TopBorder");
+ // but only for left/right borders, not top and bottom.
+ // So somewhat inconsistently, gridBefore/After affects outside edges of columns, but not of rows.
+ // insideH borders are width 53. (no insideV borders defined to emphasize missing edge borders)
+ CPPUNIT_ASSERT_MESSAGE("Top border on 'inside' cell", aBorder.LineWidth > 0);
+ CPPUNIT_ASSERT_MESSAGE("Top border is not an edge border", aBorder.LineWidth < 100);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135329_lostImage)
+{
+ loadAndReload("tdf135329_lostImage.odt");
+ // the character-anchored image was being skipped, since searchNext didn't notice it.
+ uno::Reference<beans::XPropertySet> xImageProps(getShape(2), uno::UNO_QUERY_THROW);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136441_commentInFootnote)
+{
+ loadAndReload("tdf136441_commentInFootnote.odt");
+ // failed to load without error if footnote contained a comment.
+ // (MS Word's UI doesn't allow adding comments to a footnote.)
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf137683_charHighlightTests, "tdf137683_charHighlightTests.docx")
+{
+ // Don't export unnecessary w:highlight="none" (Unnecessary one intentionally hand-added to original .docx)
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']/w:rPr/w:highlight"_ostr, 0);
+ }
+
+ uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(10), 2, "no highlight"), uno::UNO_QUERY_THROW);
+ // This test was failing with a cyan charHighlight of 65535 (0x00FFFF), instead of COL_TRANSPARENT (0xFFFFFFFF)
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_AUTO), getProperty<sal_Int32>(xRun, "CharHighlight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf138345_charStyleHighlight, "tdf138345_charStyleHighlight.docx")
+{
+ // MS Word ignores the w:highlight setting in character styles. So shall we.
+ // Without the fix, there would be an orange or yellow background on some words.
+ const uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 2, "orange background"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xRun,"CharHighlight"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xRun,"CharBackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf125268)
+{
+ loadAndReload("tdf125268.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ const uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 1, "Hello"), uno::UNO_QUERY);
+ // Without the fix in place, this test would have failed with
+ // - Expected: -1
+ // - Actual : 0
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xRun,"CharHighlight"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_BLACK), getProperty<sal_Int32>(xRun,"CharBackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf138345_numberingHighlight)
+{
+ loadAndSave("tdf138345_numberingHighlight.docx");
+ // Before the fix, the highlight was completely lost.
+ xmlDocUniquePtr pXmlStyles = parseExport("word/numbering.xml");
+ if (pXmlStyles)
+ assertXPath(pXmlStyles, "/w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:rPr/w:highlight"_ostr, "val"_ostr, "red");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ xmlDocUniquePtr pDump = parseLayoutDump();
+
+ // There are three tabs with default width
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(720), getXPath(pDump, "//page[1]/body/txt[1]/SwParaPortion/SwLineLayout/SwFixPortion[1]"_ostr, "width"_ostr).toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(720), getXPath(pDump, "//page[1]/body/txt[1]/SwParaPortion/SwLineLayout/SwFixPortion[2]"_ostr, "width"_ostr).toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(720), getXPath(pDump, "//page[1]/body/txt[1]/SwParaPortion/SwLineLayout/SwFixPortion[3]"_ostr, "width"_ostr).toInt32());
+}
+
+DECLARE_OOXMLEXPORT_TEST(TestTdf135653, "tdf135653.docx")
+{
+ uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW);
+ drawing::FillStyle nFillStyle = static_cast<drawing::FillStyle>(-1);
+ xOLEProps->getPropertyValue("FillStyle") >>= nFillStyle;
+ Color aFillColor(COL_AUTO);
+ xOLEProps->getPropertyValue("FillColor") >>= aFillColor;
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Fill style setting does not match!",
+ drawing::FillStyle::FillStyle_SOLID, nFillStyle);
+ Color aExpectedColor;
+ aExpectedColor.SetRed(255);
+ aExpectedColor.SetGreen(0);
+ aExpectedColor.SetBlue(0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE bg color does not match!", aExpectedColor, aFillColor);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135665, "tdf135665.docx")
+{
+ uno::Reference<beans::XPropertySet> xOLEProps1(getShape(1), uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xOLEProps2(getShape(2), uno::UNO_QUERY_THROW);
+ bool bSurroundContour1 = false;
+ bool bSurroundContour2 = false;
+ xOLEProps1->getPropertyValue("SurroundContour") >>= bSurroundContour1;
+ xOLEProps2->getPropertyValue("SurroundContour") >>= bSurroundContour2;
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE tight wrap setting not imported correctly", true, bSurroundContour1);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE tight wrap setting not imported correctly", false, bSurroundContour2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAtPageShapeRelOrientation)
+{
+ loadAndSave("rotated_shape.fodt");
+ // invalid combination of at-page anchor and horizontal-rel="paragraph"
+ // caused relativeFrom="column" instead of relativeFrom="page"
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/wp:positionH/wp:posOffset"_ostr, "-480060");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/wp:positionH"_ostr, "relativeFrom"_ostr, "page");
+ assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/wp:positionV/wp:posOffset"_ostr, "8147685");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/wp:positionV"_ostr, "relativeFrom"_ostr, "page");
+
+ // same for sw
+ assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor"
+ "/wp:positionH/wp:posOffset"_ostr, "720090");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor"
+ "/wp:positionH"_ostr, "relativeFrom"_ostr, "page");
+ assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor"
+ "/wp:positionV/wp:posOffset"_ostr, "1080135");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor"
+ "/wp:positionV"_ostr, "relativeFrom"_ostr, "page");
+
+ // now test text rotation -> VML writing direction
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Fallback/w:pict/v:shape/v:textbox"_ostr, "style"_ostr, "mso-layout-flow-alt:bottom-to-top");
+ // text wrap -> VML
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Fallback/w:pict/v:shape/w10:wrap"_ostr, "type"_ostr, "none");
+ // vertical alignment -> VML
+ OUString const style = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Fallback/w:pict/v:shape"_ostr, "style"_ostr);
+ CPPUNIT_ASSERT(style.indexOf("v-text-anchor:middle") != -1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVMLallowincell)
+{
+ loadAndSave("shape-atpage-in-table.fodt");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // VML o:allowincell, apparently the default is "t"
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:r/mc:AlternateContent[1]/mc:Fallback/w:pict/v:shape"_ostr, "allowincell"_ostr, "f");
+
+ // DML layoutInCell
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"_ostr, "layoutInCell"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromBottomMarginHasFooter)
+{
+ loadAndSave("tdf133070_testRelativeAnchorHeightFromBottomMarginHasFooter.docx");
+ // tdf#133070 The height was set relative to page print area bottom,
+ // but this was handled relative to page height.
+ // Note: page print area bottom = margin + footer height.
+ // In this case the footer exists.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "height"_ostr, "1147");
+}
+
+DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx")
+{
+ uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW);
+ sal_Int16 nVRelPos = -1;
+ sal_Int16 nHRelPos = -1;
+ xOLEProps->getPropertyValue("VertOrientRelation") >>= nVRelPos;
+ xOLEProps->getPropertyValue("HoriOrientRelation") >>= nHRelPos;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted vertically",
+ text::RelOrientation::PAGE_FRAME , nVRelPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted horizontally",
+ text::RelOrientation::PAGE_FRAME , nHRelPos);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, TestTdf143028)
+{
+ loadAndSave("fail_bracePair.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ auto pExportXml = parseExport("word/document.xml");
+
+ assertXPath(pExportXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/"
+ "a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm"_ostr);
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorHeightFromBottomMarginNoFooter)
+{
+ loadAndSave("tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx");
+ // tdf#133070 The height was set relative to page print area bottom,
+ // but this was handled relative to page height.
+ // Note: page print area bottom = margin + footer height.
+ // In this case the footer does not exist, so OpenDocument and OOXML margins are the same.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "height"_ostr, "1147");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133702)
+{
+ loadAndSave("tdf133702.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135667)
+{
+ loadAndSave("tdf135667.odt");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // This was missing.
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:object/v:shapetype"_ostr);
+
+ // line settings
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape"_ostr, "stroked"_ostr, "t");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape"_ostr, "strokecolor"_ostr, "#FF0000");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape"_ostr, "strokeweight"_ostr, "4pt");
+
+ // line type
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape/v:stroke"_ostr, "linestyle"_ostr, "Single");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape/v:stroke"_ostr, "dashstyle"_ostr, "Dash");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testImageSpaceSettings)
+{
+ loadAndSave("tdf135047_ImageSpaceSettings.fodt");
+ // tdf#135047 The spaces of image were not saved.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor"_ostr, "distT"_ostr, "90170");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor"_ostr, "distB"_ostr, "90170");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor"_ostr, "distL"_ostr, "90170");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:drawing/wp:anchor"_ostr, "distR"_ostr, "90170");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf137295)
+{
+ loadAndReload("tdf137295.doc");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, the test would have failed with
+ // - Expected: 2
+ // - Actual : 1
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135660, "tdf135660.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ const uno::Reference<drawing::XShape> xShape = getShape(1);
+ const uno::Reference<beans::XPropertySet> xOLEProps(xShape, uno::UNO_QUERY_THROW);
+ sal_Int32 nWrapDistanceLeft = -1;
+ sal_Int32 nWrapDistanceRight = -1;
+ sal_Int32 nWrapDistanceTop = -1;
+ sal_Int32 nWrapDistanceBottom = -1;
+ xOLEProps->getPropertyValue("LeftMargin") >>= nWrapDistanceLeft;
+ xOLEProps->getPropertyValue("RightMargin") >>= nWrapDistanceRight;
+ xOLEProps->getPropertyValue("TopMargin") >>= nWrapDistanceTop;
+ xOLEProps->getPropertyValue("BottomMargin") >>= nWrapDistanceBottom;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Left wrap distance is wrong", static_cast<sal_Int32>(0), nWrapDistanceLeft);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Right wrap distance is wrong", static_cast<sal_Int32>(400), nWrapDistanceRight);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Top wrap distance is wrong", static_cast<sal_Int32>(300), nWrapDistanceTop);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Bottom wrap distance is wrong", static_cast<sal_Int32>(199), nWrapDistanceBottom);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136814)
+{
+ loadAndSave("tdf136814.odt");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // Padding in this document is 0.10 cm which should translate to 3 pt (approx. 1.0583mm)
+ assertXPath(pXmlDocument, "/w:document/w:body/w:sectPr/w:pgBorders/w:top"_ostr, "space"_ostr, "3");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:sectPr/w:pgBorders/w:left"_ostr, "space"_ostr, "3");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:sectPr/w:pgBorders/w:bottom"_ostr, "space"_ostr, "3");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:sectPr/w:pgBorders/w:right"_ostr, "space"_ostr, "3");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
new file mode 100644
index 0000000000..dd1b87f147
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -0,0 +1,1098 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <comphelper/processfactory.hxx>
+#include <svx/svddef.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/svdobj.hxx>
+
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
+#include <com/sun/star/text/XEndnotesSupplier.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/view/XViewCursor.hpp>
+#include <comphelper/sequenceashashmap.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <unoprnms.hxx>
+#include <o3tl/string_view.hxx>
+#include <comphelper/scopeguard.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf143860NonPrimitiveCustomShape)
+{
+ loadAndReload("tdf143860_NonPrimitiveCustomShape.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The document has a custom shape of type non-primitive without handles. Make sure that the shape
+ // is not exported with preset but with custom geometry.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDocument);
+ assertXPath(pXmlDocument, "//a:prstGeom"_ostr, 0);
+ assertXPath(pXmlDocument, "//a:custGeom"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonCurve)
+{
+ loadAndSave("tdf136386_WrapPolygonCurve.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Document has a curve with contour wrap and 'outside only'. Error was, that type 'square' was
+ // written and no wrap polygon. Make sure we write wrapTight and a wrapPolygon.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDocument);
+ assertXPath(pXmlDocument, "//wp:wrapTight"_ostr, 1);
+ assertXPath(pXmlDocument, "//wp:wrapPolygon"_ostr, 1);
+ assertXPath(pXmlDocument, "//wp:start"_ostr, 1);
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDocument, "//wp:lineTo"_ostr);
+ CPPUNIT_ASSERT_GREATER(sal_Int32(2),
+ static_cast<sal_Int32>(xmlXPathNodeSetGetLength(pXmlObj->nodesetval)));
+ xmlXPathFreeObject(pXmlObj);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonLineShape)
+{
+ loadAndSave("tdf136386_WrapPolygonLineShape.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Document has a sloping line with contour wrap. Error was, that type 'square' was written and
+ // no wrap polygon. Now we write 'through' and use wrap polygon 0|0, 21600|21600, 0|0.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDocument);
+ assertXPath(pXmlDocument, "//wp:wrapThrough"_ostr, 1);
+ assertXPath(pXmlDocument, "//wp:lineTo"_ostr, 2);
+ sal_Int32 nYCoord = getXPath(pXmlDocument, "(//wp:lineTo)[1]"_ostr, "y"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), nYCoord);
+ sal_Int32 nXCoord = getXPath(pXmlDocument, "(//wp:lineTo)[2]"_ostr, "x"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nXCoord);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWrapPolygonCustomShape)
+{
+ loadAndReload("tdf142433_WrapPolygonCustomShape.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Document has 4-point star with contour wrap. Error was, that the enhanced path was written
+ // literally as wrap polygon. But that does not work, because path might have links to equations
+ // and handles and not only numbers.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDocument);
+ // Expected coordinates are 0|10800, 8936|8936, 10800|0, 12664|8936, 21600|10800, 12664|12664,
+ // 10800|21600, 8936|12664, 0|10800. Assert forth point, which comes from equations. Allow some
+ // tolerance.
+ sal_Int32 nXCoord = getXPath(pXmlDocument, "(//wp:lineTo)[3]"_ostr, "x"_ostr).toInt32();
+ // Without fix it would fail with expected 12664, actual 3
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12664, nXCoord, 10);
+ // Without fix it would fail with expected 8936, actual 4
+ sal_Int32 nYCoord = getXPath(pXmlDocument, "(//wp:lineTo)[3]"_ostr, "y"_ostr).toInt32();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(8936, nYCoord, 10);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFrameWrapTextMode)
+{
+ loadAndSave("tdf143432_Frame_WrapTextMode.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDocument);
+ // Without the fix the value "largest" was written to file in both cases.
+ assertXPath(pXmlDocument, "(//wp:wrapSquare)[1]"_ostr, "wrapText"_ostr, "right");
+ assertXPath(pXmlDocument, "(//wp:wrapSquare)[2]"_ostr, "wrapText"_ostr, "left");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134219ContourWrap_glow_rotate)
+{
+ auto verify = [this]() {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1461),
+ getProperty<sal_Int32>(getShape(1), "LeftMargin"), 2);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1302),
+ getProperty<sal_Int32>(getShape(1), "RightMargin"), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1522),
+ getProperty<sal_Int32>(getShape(1), "TopMargin"), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1296),
+ getProperty<sal_Int32>(getShape(1), "BottomMargin"), 1);
+ };
+ // Given a document with a shape with contour wrap, that has glow effect and rotation.
+ createSwDoc("tdf143219ContourWrap_glow_rotate.docx");
+
+ // Error was, that the margins, which were added on import to approximate Word's rendering of
+ // contour wrap, contained the effect extent for rotation. But LibreOffice extents the wrap
+ // distance automatically. The distance was too large on first load and because the extent was
+ // not removed on export, much larger on reload.
+ // Test fails on reload without fix with left: expected 1461 actual 2455; right: expected 1302
+ // actual 4177; top: expected 1522 actual 2457; bottom: expected 1296, actual 4179
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134219ContourWrap_stroke_shadow)
+{
+ auto verify = [this]() {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(318),
+ getProperty<sal_Int32>(getShape(1), "LeftMargin"), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1164),
+ getProperty<sal_Int32>(getShape(1), "RightMargin"), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(318),
+ getProperty<sal_Int32>(getShape(1), "TopMargin"), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1164),
+ getProperty<sal_Int32>(getShape(1), "BottomMargin"), 1);
+ };
+ // Given a document with a shape with contour wrap, that has a fat stroke and large shadow.
+ createSwDoc("tdf143219ContourWrap_stroke_shadow.docx");
+
+ // Error was, that the margins, which were added on import to approximate Word's rendering of
+ // contour wrap, were not removed on export and so used twice on reload.
+ // Test after reload would fail without fix with
+ // left, top: expected 318 actual 635; right, bottom: expected 1164 actual 2434
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf123569_rotWriterImage)
+{
+ loadAndReload("tdf123569_rotWriterImage_46deg.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ // Error was, that position of logical rectangle was treated as position of snap rectangle.
+ // Thus a wrong position was calculated.
+ // Without fix this would have failed with expected 4798, actual 4860
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(4798),
+ getProperty<sal_Int32>(xFrame, "HoriOrientPosition"), 1);
+ // Without fix this would have failed with expected 1438, actual 4062
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(1438),
+ getProperty<sal_Int32>(xFrame, "VertOrientPosition"), 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf142486_LeftMarginShadowLeft, "tdf142486_LeftMarginShadowLeft.docx")
+{
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ // Error was, that the shadow distance appeared as additional margin.
+ // Without fix this would have failed with expected 953, actual 2822
+ // Margin is 36px (= 952.5Hmm) in Word.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(953), getProperty<sal_Int32>(xFrame, "LeftMargin"), 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf151384Hyperlink, "151384Hyperlink.odt")
+{
+ loadAndSave("151384Hyperlink.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle"_ostr, "val"_ostr, "Hyperlink");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Hyperlink']/w:name"_ostr, "val"_ostr, "Hyperlink");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf66039, "tdf66039.docx")
+{
+ // This bugdoc has a groupshape (WPG) with a table inside its each member shape.
+ // Before there was no table after import at all. From now, there must be 2 tables.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // This was 0 before:
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Where are the tables?!", static_cast<sal_Int32>(2),
+ xTables->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf142486_FrameShadow)
+{
+ loadAndReload("tdf142486_FrameShadow.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextViewCursor> xViewCursor(xTextViewCursorSupplier->getViewCursor());
+ xViewCursor->gotoStart(/*bExpand=*/false);
+ uno::Reference<view::XViewCursor> xCursor(xViewCursor, uno::UNO_QUERY);
+ xCursor->goDown(/*nCount=*/3, /*bExpand=*/false);
+ xViewCursor->goRight(/*nCount=*/1, /*bExpand=*/true);
+ OUString sText = xViewCursor->getString();
+ // Without fix in place, the frame size including shadow width was exported as object size. On
+ // import the shadow width was added as wrap "distance from text". That results in totally
+ // different wrapping of the surrounding text.
+ // Here line started with "x" instead of expected "e".
+ CPPUNIT_ASSERT(sText.startsWith("e"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf136059)
+{
+ loadAndReload("tdf136059.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Contour has not been exported!", true,
+ getProperty<bool>(getShape(1), "SurroundContour"));
+ // With the fix this shall pass, see tdf136059.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf138892_noNumbering, "tdf138892_noNumbering.docx")
+{
+ CPPUNIT_ASSERT_MESSAGE("Para1: Bullet point", !getProperty<OUString>(getParagraph(1), "NumberingStyleName").isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Para2: <blank line>", getProperty<OUString>(getParagraph(2), "NumberingStyleName").isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Para3: <blank line>", getProperty<OUString>(getParagraph(3), "NumberingStyleName").isEmpty());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf44278, "tdf44278.docx")
+{
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1
+ // - Actual : 2
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf137742, "tdf137742.docx")
+{
+ lang::Locale locale(
+ getProperty<lang::Locale>(getParagraph(1), "CharLocale"));
+ CPPUNIT_ASSERT_EQUAL(OUString("en"), locale.Language);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: US
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("US"), locale.Country);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf141231_arabicHebrewNumbering, "tdf141231_arabicHebrewNumbering.docx")
+{
+ // The page's numbering type: instead of Hebrew, this was default style::NumberingType::ARABIC (4).
+ auto nActual = getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Standard"), "NumberingType");
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_HEBREW, nActual);
+
+ // The footnote numbering type: instead of arabicAbjad, this was the default style::NumberingType::ARABIC.
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFootnoteSettings = xFootnotesSupplier->getFootnoteSettings();
+ nActual = getProperty<sal_Int16>(xFootnotesSupplier->getFootnoteSettings(), "NumberingType");
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::CHARS_ARABIC_ABJAD, nActual);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf141966_chapterNumbering, "tdf141966_chapterNumbering.docx")
+{
+ uno::Reference<text::XChapterNumberingSupplier> xNumberingSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xNumberingRules = xNumberingSupplier->getChapterNumberingRules();
+ comphelper::SequenceAsHashMap hashMap(xNumberingRules->getByIndex(0));
+
+ CPPUNIT_ASSERT(hashMap["HeadingStyleName"].get<OUString>().match("CN1"));
+
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(7, "Direct formatting with \"Outline\" numbering."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2nd"), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf141966_chapterNumberTortureTest, "tdf141966_chapterNumberTortureTest.docx")
+{
+ // There is no point in identifying what the wrong values where in this test,
+ //because EVERYTHING was wrong, and MANY different fixes are required to solve the problems.
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1, "No numId in style or paragraph"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(2, "Paragraph cancels numbering(0)"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(3, "First numbered line"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1st.i.a.1.I"), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(5, "Outline with listLvl 5"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(7, "inheritOnly: inherit outlineLvl and listLvl."), uno::UNO_QUERY);
+ // 2nd.iii in MS Word 2003. 2nd.ii in MS Word 2010/2016 where para5 is not numbered.
+ CPPUNIT_ASSERT_EQUAL(OUString("2nd.ii"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(xPara, "NumberingLevel")); // Level 2
+
+ xPara.set(getParagraph(9, "outline with Body listLvl(9)."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(10, "outline with Body listLvl(9) #2."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(11, "direct formatting - Body listLvl(9)."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(12, "direct numId, inherit listLvl."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2nd.ii.a.1.I"), getProperty<OUString>(xPara, "ListLabelString"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(4), getProperty<sal_Int16>(xPara, "NumberingLevel")); // Level 5
+
+ xPara.set(getParagraph(13, "Style numId0 cancels inherited numbering."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf143692_outlineLevelTortureTest, "tdf143692_outlineLevelTortureTest.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1, "Head non Toc style"), uno::UNO_QUERY);
+ // fixed missing inherit from Heading 1
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+
+ xPara.set(getParagraph(2, "noInheritHeading1"), uno::UNO_QUERY);
+ // fixed body level not cancelling inherited level
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+
+ xPara.set(getParagraph(4, "illegal -3"), uno::UNO_QUERY);
+ // illegal value is ignored, so inherit from Heading 1
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+
+ xPara.set(getParagraph(5, "Heading 1 with invalid direct -2"), uno::UNO_QUERY);
+ // fixed illegal does not mean body level, it means inherit from style.
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+
+ xPara.set(getParagraph(7, "InheritCN3"), uno::UNO_QUERY);
+ // fixed Chapter Numbering cancelling inheritance
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(3), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+
+ xPara.set(getParagraph(8, "noInheritCN3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+
+ xPara.set(getParagraph(9, "override6CN3"), uno::UNO_QUERY);
+ // fixed body level not cancelling inherited level
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(6), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+
+ xPara.set(getParagraph(10, "illegal 25"), uno::UNO_QUERY);
+ // fixed illegal value is ignored, so inherit from List Level (Chapter Numbering)
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(3), getProperty<sal_Int16>(xPara, "OutlineLevel"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf132752, "tdf132752.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara1(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara1, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xPara1, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara1, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara2(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara2, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xPara2, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-630), getProperty<sal_Int32>(xPara2, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara3(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara3, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5891), getProperty<sal_Int32>(xPara3, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara3, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara4(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara4, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xPara4, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4157), getProperty<sal_Int32>(xPara4, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara5(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara5, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xPara5, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-630), getProperty<sal_Int32>(xPara5, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara6(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3565), getProperty<sal_Int32>(xPara6, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2764), getProperty<sal_Int32>(xPara6, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-2394), getProperty<sal_Int32>(xPara6, "ParaFirstLineIndent"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGutterLeft, "gutter-left.docx")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle;
+ getStyles("PageStyles")->getByName("Standard") >>= xPageStyle;
+ sal_Int32 nGutterMargin{};
+ xPageStyle->getPropertyValue("GutterMargin") >>= nGutterMargin;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1270
+ // - Actual : 0
+ // i.e. gutter margin was lost.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), nGutterMargin);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testGutterTop)
+{
+ loadAndSave("gutter-top.docx");
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ CPPUNIT_ASSERT(pXmlSettings);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. <w:gutterAtTop> was lost.
+ assertXPath(pXmlSettings, "/w:settings/w:gutterAtTop"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCustomShapePresetExport)
+{
+ loadAndReload("testCustomShapePresetExport.odt");
+ // Check if the load failed.
+ CPPUNIT_ASSERT(getPages());
+
+ // Check all shapes of the file
+ int nCount = 0;
+ for (int i = 1; i <= getShapes(); i++)
+ {
+ uno::Reference<beans::XPropertySet> xProperties(getShape(i), uno::UNO_QUERY);
+ if (!xProperties->getPropertySetInfo()->hasPropertyByName("CustomShapeGeometry"))
+ continue;
+ // Get the custom shape property
+ auto aCustomShapeGeometry = xProperties->getPropertyValue("CustomShapeGeometry")
+ .get<uno::Sequence<beans::PropertyValue>>();
+ // Find for shape type
+ for (const auto& aCustomGeometryIterator : std::as_const(aCustomShapeGeometry))
+ {
+ if (aCustomGeometryIterator.Name == "Type")
+ CPPUNIT_ASSERT_MESSAGE(
+ "This is an ooxml preset shape with custom geometry! Shape type lost!",
+ aCustomGeometryIterator.Value.get<OUString>() != "ooxml-non-primitive");
+ // Without the fix, all shapes have ooxml-non-primitive type, and lost their
+ // real type (like triangle) with the textbox padding.
+ }
+ nCount++;
+ }
+ // Without the fix the count does not match.
+ CPPUNIT_ASSERT_EQUAL(17, nCount);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148671, "tdf148671.docx")
+{
+ // Don't assert with 'pFieldMark' failed when document is opened
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ if (!isExported())
+ return;
+ // Preserve tag on SDT blocks. (Before the fix, these were all lost)
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:tag"_ostr, 3);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf140668, "tdf140668.docx")
+{
+ // Don't crash when document is opened
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf149649, "tdf149649.docx")
+{
+ // Don't crash when document is opened
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf138771, "tdf138771.docx")
+{
+ // Don't crash when document is imported
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf125936_numberingSuperscript, "tdf125936_numberingSuperscript.docx")
+{
+ // Without the fix, the first character run was superscripted.
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(0), getProperty<sal_Int16>(getRun(getParagraph(1), 1, "A-570-108"), "CharEscapement") );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134619_numberingProps)
+{
+ loadAndReload("tdf134619_numberingProps.doc");
+ // Get the third paragraph's numbering style's 1st level's bullet size
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(3);
+ auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, "NumberingRules");
+ uno::Sequence<beans::PropertyValue> aLevel;
+ xLevels->getByIndex(0) >>= aLevel; // 1st level
+ OUString aCharStyleName = std::find_if(std::cbegin(aLevel), std::cend(aLevel), [](const beans::PropertyValue& rValue) { return rValue.Name == "CharStyleName"; })->Value.get<OUString>();
+
+ // Make sure that the blue bullet's font size is 72 points, not 12 points.
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName(aCharStyleName), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(72.f, getProperty<float>(xStyle, "CharHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134951_duplicates)
+{
+ loadAndReload("tdf134951_duplicates.odt");
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xEndnotesSupplier->getEndnotes()->getCount());
+
+ getParagraph(5, "Duplicate fields: 1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135773_numberingShading)
+{
+ bool bIsExportAsShading = SvtFilterOptions::Get().IsCharBackground2Shading();
+ // This function is run at the end of the test - returning the filter options to normal.
+ comphelper::ScopeGuard g(
+ [bIsExportAsShading]
+ {
+ if (bIsExportAsShading)
+ SvtFilterOptions::Get().SetCharBackground2Shading();
+ });
+ // For these test, ensure exporting CharBackground as w:highlight.
+ SvtFilterOptions::Get().SetCharBackground2Highlighting();
+
+ loadAndSave("tdf135774_numberingShading.docx");
+ // This test uses a custom setting to export CharBackground as Highlight instead of the 7.0 default of Shading.
+
+ // Before the fix, the imported shading was converted into a red highlight.
+ xmlDocUniquePtr pXmlStyles = parseExport("word/numbering.xml");
+ assertXPath(pXmlStyles, "/w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:rPr/w:shd"_ostr, "fill"_ostr, "ED4C05");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf140336_paraNoneShading)
+{
+ loadAndReload("tdf140336_paraNoneShading.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Before the fix, the background from a style was exported to dis-inheriting paragraphs/styles.
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(COL_AUTO), getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor"));
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("CanclledBackground"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
+
+ // sanity check: backgroundColor paragraph style has a golden color(FF7F50), which para2 inherits
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(16744272), getProperty<sal_uInt32>(getParagraph(2), "ParaBackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf141173_missingFrames)
+{
+ loadAndReload("tdf141173_missingFrames.rtf");
+ // Without the fix in place, almost all of the text and textboxes were missing.
+ // Without the fix, there were only 2 shapes (mostly unseen).
+ CPPUNIT_ASSERT_EQUAL(13, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabSpacing, "tdf142404_tabSpacing.docx")
+{
+ // The tabstops should be laid out as triple-spaced when the paragraph takes multiple lines.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("too big for one page", 2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabOverMarginC15, "tdf142404_tabOverMarginC15.docx")
+{
+ // TabOverMargin no longer applies to compatibilityMode 15 DOCX files. In Word 2016 this is 3pg.
+ // One page long if tabOverMargin is true. Two pages long if tabOverflow is true.
+ // Really should be 3 pages long, when tabOverflow is also false, but inadequate implementation.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("too big for one page", 2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf142404_tabOverSpacingC15)
+{
+ loadAndReload("tdf142404_tabOverSpacingC15.odt");
+ // Although TabOverMargin no longer applies to compatibilityMode 15 DOCX files,
+ // it still applies to a tab over the paragraph end (inside text boundaries).
+ // The original 3-page ODT saved as DOCX would fit on one page in MS Word 2010, but 3 in Word 2013.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("too big for two pages", 3, getPages());
+ // The tab goes over the paragraph margin
+ CPPUNIT_ASSERT_EQUAL(OUString("A left tab positioned at"), parseDump("//page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]/SwLinePortion[1]"_ostr, "portion"_ostr));
+ sal_Int32 nTextLen = parseDump("//page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]/SwLinePortion[1]"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(OUString("*"), parseDump("//page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]/SwFixPortion[1]"_ostr, "portion"_ostr));
+ sal_Int32 nTabLen = parseDump("//page[1]/body/txt[2]/SwParaPortion/SwLineLayout[1]/SwFixPortion[1]"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE("Large left tab", nTextLen < nTabLen);
+ // Not 1 line high (Word 2010 DOCX), or 3 lines high (LO DOCX) or 5 lines high (ODT), but 4 lines high
+ sal_Int32 nHeight = parseDump("//page[1]/body/txt[2]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE("4 lines high", 1100 < nHeight);
+ CPPUNIT_ASSERT_MESSAGE("4 lines high", nHeight < 1300);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("TabOverflow does what?"), parseDump("//page[1]/body/txt[7]/SwParaPortion/SwLineLayout[1]/SwLinePortion[1]"_ostr, "portion"_ostr));
+ // Not 1 line high (Word 2010 DOCX), or 4 lines high (prev LO DOCX) or 8 lines high (ODT).
+ // but two lines high. (3 in Word 2016 because it pulls down "what?" to the second line - weird)
+ nHeight = parseDump("//page[1]/body/txt[7]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("2 lines high (but 3 in Word)", 242*2.5, nHeight, 242);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("A centered tab positioned at"), parseDump("//page[1]/body/txt[3]/SwParaPortion/SwLineLayout[1]/SwLinePortion[1]"_ostr, "portion"_ostr));
+ sal_Int32 nLineWidth = parseDump("//page[1]/body/txt[3]/SwParaPortion/SwLineLayout[1]/SwFixPortion[1]"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Big tab: full paragraph area used", 737, nLineWidth, 100);
+
+ // Pages 2/3 are TabOverMargin - in this particular case tabs should not go over margin.
+ CPPUNIT_ASSERT_EQUAL(OUString("A right tab positioned at"), parseDump("//page[2]/body/txt[6]/SwParaPortion/SwLineLayout[1]/SwLinePortion[1]"_ostr, "portion"_ostr));
+ sal_Int32 nParaWidth = parseDump("//page[2]/body/txt[6]/infos/prtBounds"_ostr, "width"_ostr).toInt32();
+ // the clearest non-first-line visual example is this second tab in the right-tab paragraph.
+ nLineWidth = parseDump("//page[2]/body/txt[6]/SwParaPortion/SwLineLayout[4]"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Full paragraph area used", nLineWidth, nParaWidth);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("TabOverflow does what?"), parseDump("//page[3]/body/txt[2]/SwParaPortion/SwLineLayout[1]/SwLinePortion[1]"_ostr, "portion"_ostr));
+ // Not 1 line high (Word 2010 DOCX and ODT), or 4 lines high (prev LO DOCX),
+ // but 8 lines high.
+ nHeight = parseDump("//page[3]/body/txt[2]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("8 lines high", 242*8, nHeight, 121);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testShapeHyperlink, "hyperlinkshape.docx")
+{
+ // Test import/export of hyperlink property on shapes
+ auto xShape(getShape(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("https://libreoffice.org/"), getProperty<OUString>(xShape, "Hyperlink"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTextframeHyperlink)
+{
+ // Make sure hyperlink is imported correctly
+ createSwDoc("docxopenhyperlinkbox.docx");
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("https://libreoffice.org/"), getProperty<OUString>(xFrame, "HyperLinkURL"));
+
+ // FIXME: After save&reload, the text frame should still be a text frame, and the above test should still work.
+ // (Currently the Writer text frame becomes a text box (shape based)). See tdf#140961
+ saveAndReload("Office Open XML Text");
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // DML
+ assertXPath(pXmlDoc, "//w:drawing/wp:anchor/wp:docPr/a:hlinkClick"_ostr, 1);
+ // VML
+ assertXPath(pXmlDoc, "//w:pict/v:rect"_ostr, "href"_ostr, "https://libreoffice.org/");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf146171_invalid_change_date)
+{
+ createSwDoc("tdf146171.docx");
+ // false alarm? during ODF roundtrip:
+ // 'Error: "1970-01-01" does not satisfy the "dateTime" type'
+ // disable and check only the conversion of the invalid (zeroed) change date
+ // 0000-00-00T00:00:00Z, resulting loss of change tracking during ODF roundtrip
+ // reload("writer8", "tdf146171.odt");
+ saveAndReload("Office Open XML Text");
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 0
+ assertXPath(pXmlDoc, "//w:ins"_ostr, 5);
+ // This was 0
+ assertXPath(pXmlDoc, "//w:del"_ostr, 2);
+ // no date (anonymized change)
+ // This failed, date was exported as w:date="1970-01-01T00:00:00Z" before fixing tdf#147760
+ assertXPathNoAttribute(pXmlDoc, "//w:del[1]"_ostr, "date"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "//w:del[2]"_ostr, "date"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf139580)
+{
+ loadAndReload("tdf139580.odt");
+ // Without the fix in place, this test would have crashed at export time
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf149198, "tdf149198.docx")
+{
+ // Without the fix in place, this test would have crashed at export time
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(OUString("Documentation"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFooterMarginLost)
+{
+ loadAndSave("footer-margin-lost.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 709
+ // - Actual : 0
+ // i.e. import + export lost the footer margin value.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgMar"_ostr, "footer"_ostr, "709");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testEffectExtentLineWidth)
+{
+ auto verify = [this]() {
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(506),
+ getProperty<sal_Int32>(getShape(1), "TopMargin"));
+ };
+
+ // Given a document with a shape that has a non-zero line width and effect extent:
+ // When loading the document:
+ createSwDoc("effect-extent-line-width.docx");
+ // Then make sure that the line width is not taken twice (once as part of the margin, and then
+ // also as the line width):
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 508
+ // - Actual : 561
+ // i.e. the upper spacing was too large, the last line of the text moved below the shape.
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
+{
+ // Given a document with RTL gutter:
+ createSwDoc("rtl-gutter.docx");
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(getProperty<bool>(xStandard, "RtlGutter"));
+
+ // When saving back to DOCX:
+ saveAndReload("Office Open XML Text");
+
+ // Then make sure the section's gutter is still RTL:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed as the XML element was
+ // missing.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:rtlGutter"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf140572_docDefault_superscript)
+{
+ loadAndReload("tdf140572_docDefault_superscript.docx");
+ // A round-trip was crashing.
+
+ // Without the fix, everything was DFLT_ESC_AUTO_SUPER (default superscript)
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(0), getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharEscapement") );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf136841, "tdf136841.docx")
+{
+ if (!IsDefaultDPI())
+ return;
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> graphic;
+ imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
+ Graphic vclGraphic(graphic);
+ BitmapEx bitmap(vclGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL( tools::Long(76), bitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL( tools::Long(76), bitmap.GetSizePixel().Height());
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Color: R:228 G:71 B:69 A:0
+ // - Actual : Color: R:0 G:0 B:0 A:0
+ CPPUNIT_ASSERT_EQUAL( Color(228,71,69), bitmap.GetPixelColor(38,38));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf138953)
+{
+ loadAndReload("croppedAndRotated.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Make sure the rotation is exported correctly, and size not distorted
+ auto xShape(getShape(1));
+ CPPUNIT_ASSERT_EQUAL(27000.0, getProperty<double>(xShape, "RotateAngle"));
+ auto frameRect = getProperty<css::awt::Rectangle>(xShape, "FrameRect");
+ // Before the fix, original object size (i.e., before cropping) was written to spPr in OOXML,
+ // and the resulting object size was much larger than should be.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12961), frameRect.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8664), frameRect.Width);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf118535)
+{
+ loadAndReload("tdf118535.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("word/media/image1.jpeg")));
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: false
+ // - Actual : true
+ // i.e. the embedded picture would have been saved twice.
+ CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess->hasByName("word/media/image2.jpeg")));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf133473_shadowSize, "tdf133473.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+
+ SdrObject* pObj(SdrObject::getSdrObjectFromXShape(xShape));
+ const SfxItemSet& rSet = pObj->GetMergedItemSet();
+ sal_Int32 nSize1 = rSet.Get(SDRATTR_SHADOWSIZEX).GetValue();
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 200000
+ // - Actual : 113386
+ // I.e. Shadow size will be smaller than actual.
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(200000), nSize1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153874, "image_through_shape.docx")
+{
+ uno::Reference<beans::XPropertySet> const xShape1(getShapeByName(u"Test1"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> const xShape2(getShapeByName(u"Rectangle 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, xShape1->getPropertyValue("AnchorType").get<text::TextContentAnchorType>());
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, xShape2->getPropertyValue("AnchorType").get<text::TextContentAnchorType>());
+ CPPUNIT_ASSERT_LESS(xShape2->getPropertyValue("ZOrder").get<sal_uInt64>(), xShape1->getPropertyValue("ZOrder").get<sal_uInt64>());
+ CPPUNIT_ASSERT(xShape1->getPropertyValue("Decorative").get<bool>());
+ // not implemented on shape yet
+ //CPPUNIT_ASSERT(xShape2->getPropertyValue("Decorative").get<bool>());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextBoxZOrder, "testTextBoxZOrder.docx")
+{
+ // Is load successful?
+ CPPUNIT_ASSERT(mxComponent);
+ // Collect the z-order values of the textboxes
+ std::vector<sal_uInt64> ShapeZorders;
+ std::vector<sal_uInt64> FrameZorders;
+ for (int i = 1; i < 4; i++)
+ {
+ uno::Reference<drawing::XShape> xShape(getShape(i));
+ CPPUNIT_ASSERT(xShape);
+ uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapeProperties);
+ uno::Reference<text::XTextFrame> xFrame = SwTextBoxHelper::getUnoTextFrame(xShape);
+ CPPUNIT_ASSERT(xFrame.is());
+ uno::Reference<beans::XPropertySet> const xFrameProperties(xFrame, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFrameProperties);
+ ShapeZorders.push_back(xShapeProperties->getPropertyValue("ZOrder").get<sal_uInt64>());
+ FrameZorders.push_back(xFrameProperties->getPropertyValue("ZOrder").get<sal_uInt64>());
+ }
+ // Check the z-order values.
+ for (int i = 1; i < 3; i++)
+ {
+ CPPUNIT_ASSERT_GREATER(ShapeZorders[i - 1], ShapeZorders[i]);
+ CPPUNIT_ASSERT_GREATER(FrameZorders[i - 1], FrameZorders[i]);
+ CPPUNIT_ASSERT_GREATER(ShapeZorders[i - 1], FrameZorders[i - 1]);
+ }
+ // Without the fix it failed, because the z-order was wrong.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf141550, "tdf141550.docx")
+{
+ uno::Reference<drawing::XShape> xShape(getShape(1));
+ uno::Reference<text::XTextFrame> xFrame = SwTextBoxHelper::getUnoTextFrame(xShape);
+
+ CPPUNIT_ASSERT(xShape);
+ CPPUNIT_ASSERT(xFrame);
+
+ const sal_uInt16 nShapeRelOri = getProperty<sal_uInt16>(xShape, UNO_NAME_HORI_ORIENT_RELATION);
+ const sal_uInt16 nFrameRelOri = getProperty<sal_uInt16>(xFrame, UNO_NAME_HORI_ORIENT_RELATION);
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox fallen apart!", nShapeRelOri, nFrameRelOri);
+ // Without the fix in place it fails with difference.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf140137, "tdf140137.docx")
+{
+ // Don't throw exception during load
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf105688, "tdf105688.docx")
+{
+ // Don't throw exception during load
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCommentReply)
+{
+ loadAndSave("CommentReply.docx");
+ xmlDocUniquePtr pXmlComm = parseExport("word/comments.xml");
+ xmlDocUniquePtr pXmlCommExt = parseExport("word/commentsExtended.xml");
+ CPPUNIT_ASSERT(pXmlComm);
+ CPPUNIT_ASSERT(pXmlCommExt);
+ OUString sParentId = getXPath(pXmlComm, "/w:comments/w:comment[1]/w:p[1]"_ostr, "paraId"_ostr);
+ OUString sChildId = getXPath(pXmlComm, "/w:comments/w:comment[2]/w:p[1]"_ostr, "paraId"_ostr);
+ OUString sChildIdEx = getXPath(pXmlCommExt, "/w15:commentsEx/w15:commentEx"_ostr, "paraId"_ostr);
+ OUString sChildParentId = getXPath(pXmlCommExt,
+ "/w15:commentsEx/w15:commentEx"_ostr, "paraIdParent"_ostr);
+ // Make sure exported extended paraId matches the one in comments.xml
+ CPPUNIT_ASSERT_EQUAL(sChildId, sChildIdEx);
+ // Make sure the paraIdParent matches the id of its parent
+ CPPUNIT_ASSERT_EQUAL(sParentId, sChildParentId);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCommentDone)
+{
+ loadAndSave("CommentDone.docx");
+ xmlDocUniquePtr pXmlComm = parseExport("word/comments.xml");
+ assertXPath(pXmlComm, "/w:comments/w:comment[1]/w:p"_ostr, 2);
+ OUString idLastPara = getXPath(pXmlComm, "/w:comments/w:comment[1]/w:p[2]"_ostr, "paraId"_ostr);
+ xmlDocUniquePtr pXmlCommExt = parseExport("word/commentsExtended.xml");
+ assertXPath(pXmlCommExt, "/w15:commentsEx"_ostr, "Ignorable"_ostr, "w15");
+ assertXPath(pXmlCommExt, "/w15:commentsEx/w15:commentEx"_ostr, 1);
+ OUString idLastParaEx = getXPath(pXmlCommExt, "/w15:commentsEx/w15:commentEx"_ostr, "paraId"_ostr);
+ CPPUNIT_ASSERT_EQUAL(idLastPara, idLastParaEx);
+ assertXPath(pXmlCommExt, "/w15:commentsEx/w15:commentEx"_ostr, "done"_ostr, "1");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableWidth, "frame_size_export.docx")
+{
+ // after exporting: table width was overwritten in the doc model
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100),
+ getProperty<sal_Int16>(xTables->getByIndex(0), "RelativeWidth"));
+}
+
+
+DECLARE_OOXMLEXPORT_TEST(testCommentDoneModel, "CommentDone.docx")
+{
+ css::uno::Reference<css::text::XTextFieldsSupplier> xTextFieldsSupplier(
+ mxComponent, css::uno::UNO_QUERY_THROW);
+ auto xFields(xTextFieldsSupplier->getTextFields()->createEnumeration());
+
+ // First comment: initially resolved, toggled to unresolved on import, unresolved on roundtrip
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ css::uno::Any aComment = xFields->nextElement();
+ css::uno::Reference<css::beans::XPropertySet> xComment(aComment, css::uno::UNO_QUERY_THROW);
+
+ if (!isExported())
+ {
+ // Check that it's resolved when initially read
+ CPPUNIT_ASSERT_EQUAL(true, xComment->getPropertyValue("Resolved").get<bool>());
+ // Set to unresolved
+ xComment->setPropertyValue("Resolved", css::uno::Any(false));
+ }
+ else
+ {
+ // After the roundtrip, it keeps the "unresolved" state set above
+ CPPUNIT_ASSERT_EQUAL(false, xComment->getPropertyValue("Resolved").get<bool>());
+ }
+
+ // Second comment: initially unresolved, toggled to resolved on import, resolved on roundtrip
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ aComment = xFields->nextElement();
+ xComment.set(aComment, css::uno::UNO_QUERY_THROW);
+
+ if (!isExported())
+ {
+ // Check that it's unresolved when initially read
+ CPPUNIT_ASSERT_EQUAL(false, xComment->getPropertyValue("Resolved").get<bool>());
+ // Set to resolved
+ xComment->setPropertyValue("Resolved", css::uno::Any(true));
+ }
+ else
+ {
+ // After the roundtrip, it keeps the "resolved" state set above
+ CPPUNIT_ASSERT_EQUAL(true, xComment->getPropertyValue("Resolved").get<bool>());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_ShadowDirection)
+{
+ loadAndSave("tdf142361ShadowDirection.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The attribute 'rotWithShape' has the default value 'true' in OOXML, so Words interprets a
+ // missing attribute as 'true'. That means that Word rotates the shadow if the shape is
+ // rotated. Because in LibreOffice a shadow is never rotated, we must not omit this
+ // attribute.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "rotWithShape"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf150542)
+{
+ loadAndSave("tdf150542.docx");
+
+ xmlDocUniquePtr pSettingsDoc = parseExport("word/settings.xml");
+ // Ensure that all docvars from input are written back and with correct values.
+ // Order of document variables is not checked. So this can fail at some time if order is changed.
+ assertXPath(pSettingsDoc,
+ "/w:settings/w:docVars/w:docVar[1]"_ostr, "name"_ostr, u"LocalChars\u00C1\u0072\u0076\u00ED\u007A\u0074\u0075\u0072\u006F\u0054\u00FC\u006B\u00F6\u0072\u0066\u00FA\u0072\u00F3\u0067\u00E9\u0070"_ustr);
+ assertXPath(pSettingsDoc,
+ "/w:settings/w:docVars/w:docVar[1]"_ostr, "val"_ostr, u"Correct value (\u00E1\u0072\u0076\u00ED\u007A\u0074\u0075\u0072\u006F\u0020\u0074\u00FC\u006B\u00F6\u0072\u0066\u00FA\u0072\u00F3\u0067\u00E9\u0070)"_ustr);
+ assertXPath(pSettingsDoc,
+ "/w:settings/w:docVars/w:docVar[2]"_ostr, "name"_ostr, "DocVar1");
+ assertXPath(pSettingsDoc,
+ "/w:settings/w:docVars/w:docVar[2]"_ostr, "val"_ostr, "DocVar1 Value");
+ assertXPath(pSettingsDoc,
+ "/w:settings/w:docVars/w:docVar[3]"_ostr, "name"_ostr, "DocVar3");
+ assertXPath(pSettingsDoc,
+ "/w:settings/w:docVars/w:docVar[3]"_ostr, "val"_ostr, "DocVar3 Value");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf139549)
+{
+ loadAndSave("tdf139549.docx");
+ // Document contains a VML textbox, the position of the textbox was incorrect.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ OUString aStyle = getXPath(pXmlDoc, "//w:pict/v:shape"_ostr, "style"_ostr);
+ /* original is: "position:absolute;margin-left:138.5pt;margin-top:40.1pt;width:183pt;
+ height:68pt;z-index:251675648;mso-position-horizontal:absolute;
+ mso-position-horizontal-relative:page;mso-position-vertical:absolute;
+ mso-position-vertical-relative:page" */
+ CPPUNIT_ASSERT(!aStyle.isEmpty());
+
+ sal_Int32 nextTokenPos = 0;
+ OUString aStyleCommand = aStyle.getToken(0, ';', nextTokenPos);
+ CPPUNIT_ASSERT(!aStyleCommand.isEmpty());
+
+ OUString aStyleCommandName = aStyleCommand.getToken(0, ':');
+ OUString aStyleCommandValue = aStyleCommand.getToken(1, ':');
+ CPPUNIT_ASSERT_EQUAL(OUString("position"), aStyleCommandName);
+ CPPUNIT_ASSERT_EQUAL(OUString("absolute"), aStyleCommandValue);
+
+ aStyleCommand = aStyle.getToken(0, ';', nextTokenPos);
+ CPPUNIT_ASSERT(!aStyleCommand.isEmpty());
+
+ aStyleCommandName = aStyleCommand.getToken(0, ':');
+ aStyleCommandValue = aStyleCommand.getToken(1, ':');
+ CPPUNIT_ASSERT_EQUAL(OUString("margin-left"), aStyleCommandName);
+ // Without the fix it failed, because the margin-left was 171.85pt.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(138.5, aStyleCommandValue.toFloat(), 0.1);
+
+ aStyleCommand = aStyle.getToken(0, ';', nextTokenPos);
+ CPPUNIT_ASSERT(!aStyleCommand.isEmpty());
+
+ aStyleCommandName = aStyleCommand.getToken(0, ':');
+ aStyleCommandValue = aStyleCommand.getToken(1, ':');
+ CPPUNIT_ASSERT_EQUAL(OUString("margin-top"), aStyleCommandName);
+ // Without the fix it failed, because the margin-top was 55.45pt.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(40.1, aStyleCommandValue.toFloat(), 0.1);
+}
+
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf143726)
+{
+ loadAndReload("Simple-TOC.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ CPPUNIT_ASSERT(pXmlStyles);
+ // Without the fix this was "TOA Heading" which belongs to the "Table of Authorities" index in Word
+ // TOC's heading style should be exported as "TOC Heading" as that's the default Word style name
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TOCHeading']/w:name"_ostr, "val"_ostr, "TOC Heading");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152153)
+{
+ loadAndReload("embedded_images.odt");
+
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
+ = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
+ maTempFile.GetURL());
+ const uno::Sequence<OUString> aNames(xNameAccess->getElementNames());
+ int nImageFiles = 0;
+ for (const auto& rElementName : aNames)
+ if (rElementName.startsWith("word/media/image"))
+ nImageFiles++;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4
+ // - Actual : 3
+ // i.e. the once embedded picture wouldn't have been saved.
+ CPPUNIT_ASSERT_EQUAL(4, nImageFiles);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152152)
+{
+ loadAndReload("artistic_effects.docx");
+
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
+ = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
+ maTempFile.GetURL());
+ const uno::Sequence<OUString> aNames(xNameAccess->getElementNames());
+ int nImageFiles = 0;
+ for (const auto& rElementName : aNames)
+ if (rElementName.startsWith("word/media/hdphoto"))
+ nImageFiles++;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 1
+ // i.e. the once WDP picture wouldn't have been saved.
+ CPPUNIT_ASSERT_EQUAL(2, nImageFiles);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
new file mode 100644
index 0000000000..49d974b011
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -0,0 +1,1157 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <queue>
+
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/TextGridMode.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/FontWeight.hpp>
+
+#include <comphelper/scopeguard.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <officecfg/Office/Common.hxx>
+#include <o3tl/string_view.hxx>
+#include <comphelper/propertyvalue.hxx>
+
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135164_cancelledNumbering, "tdf135164_cancelledNumbering.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1, u"TBMM DÖNEMİ"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(2, "Numbering explicitly cancelled"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(6, "Default style has roman numbering"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("i"), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf147861_customField, "tdf147861_customField.docx")
+{
+ // These should each be specific values, not a shared DocProperty
+ getParagraph(1, "CustomEditedTitle"); // edited
+ // A couple of nulls at the end of the string thwarted all attempts at an "equals" comparison.
+ CPPUNIT_ASSERT(getParagraph(2)->getString().startsWith(" INSERT Custom Title here"));
+ getParagraph(3, "My Title"); // edited
+
+ // Verify that these are fields, and not just plain text
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("CustomEditedTitle"), xField->getPresentation(false));
+ // The " (fixed)" part is unnecessary, but it must be consistent across a round-trip
+ CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Title (fixed)"), xField->getPresentation(true));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148380_createField, "tdf148380_createField.docx")
+{
+ // Verify that these are fields, and not just plain text
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ // This should NOT be "Lorenzo Chavez", or a real date since the user hand-modified the result.
+ CPPUNIT_ASSERT_EQUAL(OUString("Myself - that's who"), xField->getPresentation(false));
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("yesterday at noon"), xField->getPresentation(false));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148380_fldLocked, "tdf148380_fldLocked.docx")
+{
+ getParagraph(2, "4/5/2022 4:29:00 PM");
+ getParagraph(4, "1/23/4567 8:9:10 PM");
+
+ // Verify that these are fields, and not just plain text
+ // (import only, since export thankfully just dumps these fixed fields as plain text
+ if (isExported())
+ return;
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ // This should NOT be updated at FILEOPEN to match the last modified time - it is locked.
+ CPPUNIT_ASSERT_EQUAL(OUString("4/5/2022 4:29:00 PM"), xField->getPresentation(false));
+ CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Modified (fixed)"), xField->getPresentation(true));
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1/23/4567 8:9:10 PM"), xField->getPresentation(false));
+ CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Last printed (fixed)"), xField->getPresentation(true));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148380_usernameField, "tdf148380_usernameField.docx")
+{
+ // Verify that these are fields, and not just plain text
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ // These should match the as-last-seen-in-the-text name, and not the application's user name
+ CPPUNIT_ASSERT_EQUAL(OUString("Charlie Brown"), xField->getPresentation(false));
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("CB"), xField->getPresentation(false));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148380_modifiedField, "tdf148380_modifiedField.docx")
+{
+ getParagraph(2, "4/5/2022 3:29:00 PM"); // default (unspecified) date format
+
+ // Verify that these are fields, and not just plain text
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ // unspecified SAVEDATE gets default US formatting because style.xml has w:lang w:val="en-US"
+ CPPUNIT_ASSERT_EQUAL(OUString("4/5/2022 3:29:00 PM"), xField->getPresentation(false));
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ // This was hand-modified and really should be Charlie Brown, not Charles ...
+ CPPUNIT_ASSERT_EQUAL(OUString("Charlie Brown"), xField->getPresentation(false));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148380_printField, "tdf148380_printField.docx")
+{
+ // Verify that these are fields, and not just plain text
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ // unspecified SAVEDATE gets default GB formatting because style.xml has w:lang w:val="en-GB"
+ CPPUNIT_ASSERT_EQUAL(OUString("08/04/2022 07:10:00 AM"), xField->getPresentation(false));
+ CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Modified"), xField->getPresentation(true));
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ // MS Word actually shows "8 o'clock-ish" until the document is reprinted,
+ // but it seems best to actually show the real last-printed date since it can't be FIXEDFLD
+ CPPUNIT_ASSERT_EQUAL(OUString("08/04/2022 06:47:00 AM"), xField->getPresentation(false));
+ CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Last printed"), xField->getPresentation(true));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf132475_printField, "tdf132475_printField.docx")
+{
+ // The last printed date field: formatted two different ways
+ getParagraph(2, "Thursday, March 17, 2022");
+ getParagraph(3, "17-Mar-22");
+ // Time zone affects the displayed time in MS Word. LO shows GMT time. Word only updated by F9
+ getParagraph(5, "12:49");
+ getParagraph(6, "12:49:00 PM");
+
+ // Verify that these are fields, and not just plain text
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Thursday, March 17, 2022"), xField->getPresentation(false));
+ CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Last printed"), xField->getPresentation(true));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf114734_commentFormating, "tdf114734_commentFormating.docx")
+{
+ // Get the PostIt/Comment/Annotation
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+
+ uno::Reference<text::XText> xText = getProperty<uno::Reference<text::XText>>(xField, "TextRange");
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText);
+ // Paragraph formatting was lost: should be right to left, and thus right-justified
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Right to Left comment",
+ text::WritingMode2::RL_TB,
+ getProperty<sal_Int16>(xParagraph, "WritingMode"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("literal right justified",
+ sal_Int16(style::ParagraphAdjust_RIGHT),
+ getProperty<sal_Int16>(xParagraph, "ParaAdjust"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf139759_commentHighlightBackground, "tdf139759_commentHighlightBackground.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+
+ uno::Reference<text::XText> xText = getProperty<uno::Reference<text::XText>>(xField, "TextRange");
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText);
+ CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getProperty<Color>(getRun(xParagraph, 2), "CharBackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf135906)
+{
+ loadAndReload("tdf135906.docx");
+ // just test round-tripping. The document was exported as corrupt and didn't re-load.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf146802, "tdf146802.docx")
+{
+ // First check if the load failed, as before the fix.
+ CPPUNIT_ASSERT(mxComponent);
+
+ // There is a group shape with text box inside having an embedded VML formula,
+ // check if something missing.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Where is the formula?", 2, getShapes());
+ // Before the fix the bugdoc failed to load or the formula was missing.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParaStyleNumLevel)
+{
+ loadAndSave("para-style-num-level.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. a custom list level in a para style was lost on import+export.
+ assertXPath(pXmlDoc, "/w:styles/w:style[@w:styleId='Mystyle']/w:pPr/w:numPr/w:ilvl"_ostr, "val"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testClearingBreak)
+{
+ // Given a document with a clearing break, when saving to DOCX:
+ loadAndSave("clearing-break.docx");
+
+ // Then make sure that the clearing break is not lost:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - XPath '/w:document/w:body/w:p/w:r/w:br' number of nodes is incorrect
+ // i.e. first the clearing break was turned into a plain break, then it was completely lost.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br"_ostr, "clear"_ostr, "all");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentControlExport)
+{
+ // Given a document with a content control around one or more text portions:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::Any(true));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure the expected markup is used:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // XPath '//w:sdt/w:sdtPr/w:showingPlcHdr' number of nodes is incorrect
+ // i.e. the SDT elements were missing on export.
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:showingPlcHdr"_ostr, 1);
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtContent"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCheckboxContentControlExport)
+{
+ // Given a document with a checkbox content control around a text portion:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, u"☐"_ustr, /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("Checkbox", uno::Any(true));
+ xContentControlProps->setPropertyValue("Checked", uno::Any(true));
+ xContentControlProps->setPropertyValue("CheckedState", uno::Any(u"☒"_ustr));
+ xContentControlProps->setPropertyValue("UncheckedState", uno::Any(u"☐"_ustr));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure the expected markup is used:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '//w:sdt/w:sdtPr/w14:checkbox/w14:checked' number of nodes is incorrect
+ // i.e. <w14:checkbox> and its child elements were lost.
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w14:checkbox/w14:checked"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w14:checkbox/w14:checkedState"_ostr, "val"_ostr, "2612");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w14:checkbox/w14:uncheckedState"_ostr, "val"_ostr, "2610");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDropdownContentControlExport)
+{
+ // Given a document with a dropdown content control around a text portion:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "choose an item", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ {
+ xContentControlProps->setPropertyValue("DropDown", uno::Any(true));
+ uno::Sequence<beans::PropertyValues> aListItems = {
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("red"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("R"))),
+ },
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("green"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("G"))),
+ },
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("blue"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("B"))),
+ },
+ };
+ xContentControlProps->setPropertyValue("ListItems", uno::Any(aListItems));
+ }
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure the expected markup is used:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '//w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]' number of nodes is incorrect
+ // i.e. the list items were lost on export.
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]"_ostr, "displayText"_ostr, "red");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]"_ostr, "value"_ostr, "R");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dropDownList/w:listItem[2]"_ostr, "displayText"_ostr, "green");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dropDownList/w:listItem[2]"_ostr, "value"_ostr, "G");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dropDownList/w:listItem[3]"_ostr, "displayText"_ostr, "blue");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dropDownList/w:listItem[3]"_ostr, "value"_ostr, "B");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPictureContentControlExport)
+{
+ // Given a document with a picture content control around a text portion:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<beans::XPropertySet> xTextGraphic(
+ xMSF->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ xTextGraphic->setPropertyValue("AnchorType",
+ uno::Any(text::TextContentAnchorType_AS_CHARACTER));
+ uno::Reference<text::XTextContent> xTextContent(xTextGraphic, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xTextContent, false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("Picture", uno::Any(true));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure the expected markup is used:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. <w:picture> was lost on export.
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:picture"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDateContentControlExport)
+{
+ // Given a document with a date content control around a text portion:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("Date", uno::Any(true));
+ xContentControlProps->setPropertyValue("DateFormat", uno::Any(OUString("M/d/yyyy")));
+ xContentControlProps->setPropertyValue("DateLanguage", uno::Any(OUString("en-US")));
+ xContentControlProps->setPropertyValue("CurrentDate", uno::Any(OUString("2022-05-26T00:00:00Z")));
+ xContentControlProps->setPropertyValue("PlaceholderDocPart", uno::Any(OUString("DefaultPlaceholder_-1854013437")));
+ xContentControlProps->setPropertyValue("DataBindingPrefixMappings", uno::Any(OUString("xmlns:ns0='http://schemas.microsoft.com/vsto/samples' ")));
+ xContentControlProps->setPropertyValue("DataBindingXpath", uno::Any(OUString("/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]")));
+ xContentControlProps->setPropertyValue("DataBindingStoreItemID", uno::Any(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}")));
+ xContentControlProps->setPropertyValue("Color", uno::Any(OUString("008000")));
+ xContentControlProps->setPropertyValue("Appearance", uno::Any(OUString("hidden")));
+ xContentControlProps->setPropertyValue("Alias", uno::Any(OUString("myalias")));
+ xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("mytag")));
+ xContentControlProps->setPropertyValue("Id", uno::Any(static_cast<sal_Int32>(123)));
+ xContentControlProps->setPropertyValue("TabIndex", uno::Any(sal_uInt32(4294967295))); // -1
+ xContentControlProps->setPropertyValue("Lock", uno::Any(OUString("sdtLocked")));
+
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure the expected markup is used:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '//w:sdt/w:sdtPr/w:date/w:dateFormat' number of nodes is incorrect
+ // i.e. the <w:date> was lost on export.
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:date/w:dateFormat"_ostr, "val"_ostr, "M/d/yyyy");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:date/w:lid"_ostr, "val"_ostr, "en-US");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:date"_ostr, "fullDate"_ostr, "2022-05-26T00:00:00Z");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:placeholder/w:docPart"_ostr, "val"_ostr, "DefaultPlaceholder_-1854013437");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dataBinding"_ostr, "prefixMappings"_ostr, "xmlns:ns0='http://schemas.microsoft.com/vsto/samples' ");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dataBinding"_ostr, "xpath"_ostr, "/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:dataBinding"_ostr, "storeItemID"_ostr, "{241A8A02-7FFD-488D-8827-63FBE74E8BC9}");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w15:color"_ostr, "val"_ostr, "008000");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w15:appearance"_ostr, "val"_ostr, "hidden");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:alias"_ostr, "val"_ostr, "myalias");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:tag"_ostr, "val"_ostr, "mytag");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:id"_ostr, "val"_ostr, "123");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:tabIndex"_ostr, "val"_ostr, "-1");
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:lock"_ostr, "val"_ostr, "sdtLocked");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorder)
+{
+ // Given a document with a negative border distance:
+ createSwDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pDocShell = pTextDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("test");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ xPageStyle->setPropertyValue("TopMargin", uno::Any(static_cast<sal_Int32>(501)));
+ table::BorderLine2 aBorder;
+ aBorder.LineWidth = 159;
+ aBorder.OuterLineWidth = 159;
+ xPageStyle->setPropertyValue("TopBorder", uno::Any(aBorder));
+ sal_Int32 nTopBorderDistance = -646;
+ xPageStyle->setPropertyValue("TopBorderDistance", uno::Any(nTopBorderDistance));
+
+ // When exporting to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure that the page edge -> border space is correct:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:pgMar"_ostr, "top"_ostr, "284");
+ assertXPath(pXmlDoc, "//w:pgBorders/w:top"_ostr, "sz"_ostr, "36");
+ // Without the fix in place, this test would have failed with:
+ // - Expected: 28
+ // - Actual : 0
+ // i.e. editeng::BorderDistancesToWord() mis-handled negative border distances.
+ assertXPath(pXmlDoc, "//w:pgBorders/w:top"_ostr, "space"_ostr, "28");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148494)
+{
+ loadAndSave("tdf148494.docx");
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: MACROBUTTON AllCaps Hello World
+ // - Actual : MACROBUTTONAllCaps Hello World
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText"_ostr, " MACROBUTTON AllCaps Hello World ");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf137466, "tdf137466.docx")
+{
+ if (!isExported())
+ return; // initial import, no further checks
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Ensure that we have <w:placeholder><w:docPart v:val="xxxx"/></w:placeholder>
+ OUString sDocPart = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:placeholder/w:docPart"_ostr, "val"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("DefaultPlaceholder_-1854013440"), sDocPart);
+
+ // Ensure that we have <w15:color v:val="xxxx"/>
+ OUString sColor = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w15:color"_ostr, "val"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("FF0000"), sColor);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testParaListRightIndent, "testParaListRightIndent.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(getParagraph(1), "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5001), getProperty<sal_Int32>(getParagraph(2), "ParaRightMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDontAddNewStyles)
+{
+ // Given a document that lacks builtin styles, and addition of them is disabled:
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Load::DisableBuiltinStyles::set(true, pBatch);
+ pBatch->commit();
+ }
+ comphelper::ScopeGuard g([] {
+ std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Load::DisableBuiltinStyles::set(false, pBatch);
+ pBatch->commit();
+ });
+
+ // When saving that document:
+ loadAndSave("dont-add-new-styles.docx");
+
+ // Then make sure that export doesn't have additional styles, Caption was one of them:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1
+ // i.e. builtin styles were added to the export result, even if we opted out.
+ assertXPath(pXmlDoc, "/w:styles/w:style[@w:styleId='Caption']"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(TestWPGZOrder, "testWPGZOrder.docx")
+{
+ // Check if the load failed.
+ CPPUNIT_ASSERT(mxComponent);
+
+ // Get the WPG
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xGroupProperties(xGroup, uno::UNO_QUERY_THROW);
+
+ // Initialize a queue for subgroups
+ std::queue<uno::Reference<drawing::XShapes>> xGroupList;
+ xGroupList.push(xGroup);
+
+ // Every textbox shall be visible.
+ while (xGroupList.size())
+ {
+ // Get the first group
+ xGroup = xGroupList.front();
+ xGroupList.pop();
+ for (sal_Int32 i = 0; i < xGroup->getCount(); ++i)
+ {
+ // Get the child shape
+ uno::Reference<beans::XPropertySet> xChildShapeProperties(xGroup->getByIndex(i),
+ uno::UNO_QUERY_THROW);
+ // Check for textbox
+ if (!xChildShapeProperties->getPropertyValue("TextBox").get<bool>())
+ {
+ // Is this a Group Shape? Put it into the queue.
+ uno::Reference<drawing::XShapes> xInnerGroup(xGroup->getByIndex(i), uno::UNO_QUERY);
+ if (xInnerGroup)
+ xGroupList.push(xInnerGroup);
+ continue;
+ }
+
+ // Get the textbox properties
+ uno::Reference<beans::XPropertySet> xTextBoxFrameProperties(
+ xChildShapeProperties->getPropertyValue("TextBoxContent"), uno::UNO_QUERY_THROW);
+
+ // Assert that the textbox ZOrder greater than the groupshape
+ CPPUNIT_ASSERT_GREATER(xGroupProperties->getPropertyValue("ZOrder").get<long>(),
+ xTextBoxFrameProperties->getPropertyValue("ZOrder").get<long>());
+ // Before the fix, this failed because that was less, and the textboxes were covered.
+ }
+
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148720)
+{
+ loadAndReload("tdf148720.odt");
+ const auto& pLayout = parseLayoutDump();
+
+ const OString sShapeXPaths[] =
+ {
+ "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObjGroup/SdrObjList/SdrObject[1]"_ostr,
+ "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObjGroup/SdrObjList/SdrObjGroup/SdrObjList/SdrObjGroup/SdrObjList/SdrObject[1]"_ostr,
+ "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObjGroup/SdrObjList/SdrObjGroup/SdrObjList/SdrObjGroup/SdrObjList/SdrObject[2]"_ostr,
+ "/root/page/body/txt/anchored/SwAnchoredDrawObject/SdrObjGroup/SdrObjList/SdrObject[2]"_ostr
+ };
+
+ const OString sTextXPaths[] =
+ {
+ "/root/page/body/txt/anchored/fly[1]/infos/bounds"_ostr,
+ "/root/page/body/txt/anchored/fly[2]/infos/bounds"_ostr,
+ "/root/page/body/txt/anchored/fly[3]/infos/bounds"_ostr,
+ "/root/page/body/txt/anchored/fly[4]/infos/bounds"_ostr
+ };
+
+ const OString sAttribs[] =
+ {
+ "left"_ostr,
+ "top"_ostr,
+ "width"_ostr,
+ "height"_ostr
+ };
+
+ for (sal_Int32 i = 0; i < 4; ++i)
+ {
+ OUString aShapeVals[4];
+ int aTextVals[4] = {0, 0, 0, 0};
+
+ const auto aOutRect = getXPath(pLayout, sShapeXPaths[i], "aOutRect"_ostr);
+
+ sal_uInt16 nCommaPos[4] = {0, 0, 0, 0};
+ nCommaPos[1] = aOutRect.indexOf(",");
+ nCommaPos[2] = aOutRect.indexOf(",", nCommaPos[1] + 1);
+ nCommaPos[3] = aOutRect.indexOf(",", nCommaPos[2] + 1);
+
+
+ aShapeVals[0] = aOutRect.copy(nCommaPos[0], nCommaPos[1] - nCommaPos[0]);
+ aShapeVals[1] = aOutRect.copy(nCommaPos[1] + 2, nCommaPos[2] - nCommaPos[1] - 2);
+ aShapeVals[2] = aOutRect.copy(nCommaPos[2] + 2, nCommaPos[3] - nCommaPos[2] - 2);
+ aShapeVals[3] = aOutRect.copy(nCommaPos[3] + 2, aOutRect.getLength() - nCommaPos[3] - 2);
+
+ for (int ii = 0; ii < 4; ++ii)
+ {
+ aTextVals[ii] = getXPath(pLayout, sTextXPaths[i], sAttribs[ii]).toInt32();
+ }
+
+ tools::Rectangle ShapeArea(Point(aShapeVals[0].toInt32(), aShapeVals[1].toInt32()), Size(aShapeVals[2].toInt32() + 5, aShapeVals[3].toInt32() + 5));
+
+ tools::Rectangle TextArea(Point(aTextVals[0], aTextVals[1]), Size(aTextVals[2], aTextVals[3]));
+
+ CPPUNIT_ASSERT(ShapeArea.Contains(TextArea));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf126287, "tdf126287.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123642_BookmarkAtDocEnd, "tdf123642.docx")
+{
+ // get bookmark interface
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+
+ // check: we have 1 bookmark (previously there were 0)
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xBookmarksByIdx->getCount());
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Bookmark1"));
+
+ // and it is really in exported DOCX (let's ensure)
+ if (!isExported())
+ return; // initial import, no further checks
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Bookmark1"), getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart[1]"_ostr, "name"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148361, "tdf148361.docx")
+{
+ // Plain text Block SDT is imported as content control
+ OUString aActual = getParagraph(1)->getString();
+ // This was "itadmin".
+ CPPUNIT_ASSERT_EQUAL(OUString("itadmin"), aActual);
+
+ aActual = getParagraph(2)->getString();
+ // This was "itadmin".
+ CPPUNIT_ASSERT_EQUAL(OUString("[Type text]"), aActual);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153082_semicolon, "custom-styles-TOC-semicolon.docx")
+{
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+ uno::Reference<text::XDocumentIndex> xTOC(xIndexes->getByIndex(0), uno::UNO_QUERY);
+ // check styles
+ uno::Reference<container::XIndexAccess> xParaStyles =
+ getProperty<uno::Reference<container::XIndexAccess>>(xTOC, "LevelParagraphStyles");
+ uno::Sequence<OUString> styles;
+ xParaStyles->getByIndex(0) >>= styles;
+ CPPUNIT_ASSERT_EQUAL(uno::Sequence<OUString>{}, styles);
+ xParaStyles->getByIndex(1) >>= styles;
+ CPPUNIT_ASSERT_EQUAL(uno::Sequence<OUString>{}, styles);
+ xParaStyles->getByIndex(2) >>= styles;
+ // the first one is built-in Word style "Intense Quote" that was localised DE "Intensives Zitat" in the file
+ CPPUNIT_ASSERT_EQUAL((uno::Sequence<OUString>{"Intensives Zitat", "Custom1", "_MyStyle0"}), styles);
+ xTOC->update();
+ OUString const tocContent(xTOC->getAnchor()->getString());
+ CPPUNIT_ASSERT(tocContent.startsWith("Table of Contents"));
+ CPPUNIT_ASSERT(tocContent.indexOf("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.") != -1);
+ CPPUNIT_ASSERT(tocContent.indexOf("Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.") != -1);
+ CPPUNIT_ASSERT(tocContent.indexOf("Proin pharetra nonummy pede. Mauris et orci.") != -1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153082_comma, "custom-styles-TOC-comma.docx")
+{
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+ uno::Reference<text::XDocumentIndex> xTOC(xIndexes->getByIndex(0), uno::UNO_QUERY);
+ // check styles
+ uno::Reference<container::XIndexAccess> xParaStyles =
+ getProperty<uno::Reference<container::XIndexAccess>>(xTOC, "LevelParagraphStyles");
+ uno::Sequence<OUString> styles;
+ xParaStyles->getByIndex(0) >>= styles;
+ CPPUNIT_ASSERT_EQUAL(uno::Sequence<OUString>{"_MyStyle0"}, styles);
+ xParaStyles->getByIndex(1) >>= styles;
+ CPPUNIT_ASSERT_EQUAL(uno::Sequence<OUString>{"Custom1"}, styles);
+ xParaStyles->getByIndex(2) >>= styles;
+ // the first one is built-in Word style "Intense Quote" that was localised DE "Intensives Zitat" in the file
+ CPPUNIT_ASSERT_EQUAL(uno::Sequence<OUString>{"Intensives Zitat"}, styles);
+ xTOC->update();
+ OUString const tocContent(xTOC->getAnchor()->getString());
+ CPPUNIT_ASSERT(tocContent.startsWith("Table of Contents"));
+ CPPUNIT_ASSERT(tocContent.indexOf("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.") != -1);
+ CPPUNIT_ASSERT(tocContent.indexOf("Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.") != -1);
+ CPPUNIT_ASSERT(tocContent.indexOf("Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.") != -1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf142407, "tdf142407.docx")
+{
+ uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
+ uno::Reference<beans::XPropertySet> xPageStyle(xPageStyles->getByName("Standard"), uno::UNO_QUERY);
+ sal_Int16 nGridLines;
+ xPageStyle->getPropertyValue("GridLines") >>= nGridLines;
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(36), nGridLines); // was 23, left large space before text.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWPGBodyPr, "WPGbodyPr.docx")
+{
+ // Is load successful?
+ CPPUNIT_ASSERT(mxComponent);
+
+ // There are a WPG shape and a picture
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ // Get the WPG shape
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ // And the embed WPG
+ uno::Reference<drawing::XShapes> xEmbedGroup(xGroup->getByIndex(1), uno::UNO_QUERY);
+
+ // Get the properties of the shapes
+ uno::Reference<beans::XPropertySet> xOuterShape(xGroup->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xMiddleShape(xEmbedGroup->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xInnerShape(xEmbedGroup->getByIndex(1), uno::UNO_QUERY);
+
+ // Get the properties of the textboxes too
+ uno::Reference<beans::XPropertySet> xOuterTextBox(
+ xOuterShape->getPropertyValue("TextBoxContent"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xMiddleTextBox(
+ xMiddleShape->getPropertyValue("TextBoxContent"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xInnerTextBox(
+ xInnerShape->getPropertyValue("TextBoxContent"), uno::UNO_QUERY);
+
+ // Check the alignments
+ CPPUNIT_ASSERT_EQUAL(css::drawing::TextVerticalAdjust::TextVerticalAdjust_TOP,
+ xOuterTextBox->getPropertyValue("TextVerticalAdjust")
+ .get<css::drawing::TextVerticalAdjust>());
+ CPPUNIT_ASSERT_EQUAL(css::drawing::TextVerticalAdjust::TextVerticalAdjust_TOP,
+ xMiddleTextBox->getPropertyValue("TextVerticalAdjust")
+ .get<css::drawing::TextVerticalAdjust>());
+ CPPUNIT_ASSERT_EQUAL(css::drawing::TextVerticalAdjust::TextVerticalAdjust_CENTER,
+ xInnerTextBox->getPropertyValue("TextVerticalAdjust")
+ .get<css::drawing::TextVerticalAdjust>());
+
+ // Check the inset margins, all were 0 before the fix
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(499),
+ xInnerShape->getPropertyValue("TextLowerDistance").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(499),
+ xInnerShape->getPropertyValue("TextUpperDistance").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000),
+ xInnerShape->getPropertyValue("TextLeftDistance").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(254),
+ xInnerShape->getPropertyValue("TextRightDistance").get<sal_Int32>());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf146851_1, "tdf146851_1.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara;
+
+ xPara.set(getParagraph(1, "qwerty"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xPara.set(getParagraph(2, "asdfg"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1/"), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf146851_2, "tdf146851_2.docx")
+{
+ // Ensure numbering on second para
+ uno::Reference<beans::XPropertySet> xPara;
+ xPara.set(getParagraph(2, "."), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Schedule"), getProperty<OUString>(xPara, "ListLabelString"));
+
+ // Refresh fields and ensure cross-reference to numbered para is okay
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+
+ uno::Reference<util::XRefreshable>(xFieldsAccess, uno::UNO_QUERY_THROW)->refresh();
+
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Reference<text::XTextField> xTextField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Schedule"), xTextField->getPresentation(false));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148052, "tdf148052.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+
+ uno::Reference<text::XTextField> xTextField(xFields->nextElement(), uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 14. Aug 18
+ // - Actual : 11. Apr 22
+ CPPUNIT_ASSERT_EQUAL(OUString("14. Aug 18"), xTextField->getPresentation(false));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148111, "tdf148111.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ std::vector<OUString> aExpectedValues = {
+ // These field values are NOT in order in document: getTextFields did provide
+ // fields in a strange but fixed order
+ "Title", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Title", "Title", "Title",
+ "Title", "Title", "Title", "Title"
+ };
+
+ sal_uInt16 nIndex = 0;
+ while (xFields->hasMoreElements())
+ {
+ uno::Reference<text::XTextField> xTextField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(aExpectedValues[nIndex++], xTextField->getPresentation(false));
+ }
+
+ // No more fields
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // ShowingPlaceholder should be off for 0, false and "on". (This was 21 before the fix)
+ assertXPath(pXmlDoc,"//w:p/w:sdt/w:sdtPr/w:showingPlcHdr"_ostr, 12);
+}
+
+DECLARE_OOXMLEXPORT_TEST(TestTdf73499, "tdf73499.docx")
+{
+ // Ensure, the bugdoc is opened
+ CPPUNIT_ASSERT(mxComponent);
+ // Get the groupshape
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY_THROW);
+
+ // Get the textboxes of the groupshape
+ uno::Reference<text::XText> xTextBox1(xGroup->getByIndex(0), uno::UNO_QUERY_THROW);
+ uno::Reference<text::XText> xTextBox2(xGroup->getByIndex(1), uno::UNO_QUERY_THROW);
+
+ // Get the properties of the textboxes
+ uno::Reference<beans::XPropertySet> xTextBox1Properties(xTextBox1, uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xTextBox2Properties(xTextBox2, uno::UNO_QUERY_THROW);
+
+ // Get the name of the textboxes
+ uno::Reference<container::XNamed> xTextBox1Name(xTextBox1, uno::UNO_QUERY_THROW);
+ uno::Reference<container::XNamed> xTextBox2Name(xTextBox2, uno::UNO_QUERY_THROW);
+
+ // Check for the links, before the fix that were missing
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ "Link name missing!", xTextBox2Name->getName(),
+ xTextBox1Properties->getPropertyValue("ChainNextName").get<OUString>());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ "Link name missing!", xTextBox1Name->getName(),
+ xTextBox2Properties->getPropertyValue("ChainPrevName").get<OUString>());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf81507, "tdf81507.docx")
+{
+ if (!isExported())
+ return; // initial import, no further checks
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Ensure that we have <w:text w:multiLine="1"/>
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtPr/w:text"_ostr, "multiLine"_ostr));
+
+ // Ensure that we have <w:text w:multiLine="0"/>
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:sdt/w:sdtPr/w:text"_ostr, "multiLine"_ostr));
+
+ // Ensure that we have <w:text/>
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:sdt/w:sdtPr/w:text"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:sdt/w:sdtPr/w:text"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf139948, "tdf139948.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(1, "No border"), "TopBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(2, "Border below"), "TopBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(88),
+ getProperty<table::BorderLine2>(getParagraph(3, "Borders below and above"), "TopBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(88),
+ getProperty<table::BorderLine2>(getParagraph(4, "Border above"), "TopBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(5, "No border"), "TopBorder").LineWidth);
+
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(1), "BottomBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(2), "BottomBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(3), "BottomBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(4), "BottomBorder").LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
+ getProperty<table::BorderLine2>(getParagraph(5), "BottomBorder").LineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf144563, "tdf144563.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+
+ // Refresh all cross-reference fields
+ uno::Reference<util::XRefreshable>(xFieldsAccess, uno::UNO_QUERY_THROW)->refresh();
+
+ // Verify values
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ std::vector<OUString> aExpectedValues = {
+ // These field values are NOT in order in document: getTextFields did provide
+ // fields in a strange but fixed order
+ "1", "1", "1", "1", "1/", "1/", "1/", "1)", "1)", "1)", "1.)",
+ "1.)", "1.)", "1..", "1..", "1..", "1.", "1.", "1.", "1", "1"
+ };
+
+ sal_uInt16 nIndex = 0;
+ while (xFields->hasMoreElements())
+ {
+ uno::Reference<text::XTextField> xTextField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(aExpectedValues[nIndex++], xTextField->getPresentation(false));
+ }
+}
+
+// broken test document?
+#if !defined(_WIN32)
+CPPUNIT_TEST_FIXTURE(Test, testTdf146955)
+{
+ loadAndReload("tdf146955.odt");
+ // import of a (broken?) DOCX export with dozens of frames raised a SAX exception,
+ // when the code tried to access to a non-existent footnote
+ uno::Reference<text::XFootnotesSupplier> xNotes(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xNotes->getFootnotes()->getCount());
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf144668)
+{
+ loadAndReload("tdf144668.odt");
+ uno::Reference<beans::XPropertySet> xPara1(getParagraph(1, u"level1"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("[0001]"), getProperty<OUString>(xPara1, "ListLabelString"));
+
+ uno::Reference<beans::XPropertySet> xPara2(getParagraph(2, u"level2"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("[001]"), getProperty<OUString>(xPara2, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148455_1, "tdf148455_1.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara2(getParagraph(3, u"1.1.1"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1.1."), getProperty<OUString>(xPara2, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148455_2, "tdf148455_2.docx")
+{
+ if (!isExported())
+ return; // initial import, no further checks
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Find list id for restarted list
+ sal_Int32 nListId = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:numPr/w:numId"_ostr, "val"_ostr).toInt32();
+
+ xmlDocUniquePtr pNumberingDoc = parseExport("word/numbering.xml");
+
+ // Ensure we have empty lvlOverride for levels 0 - 1
+ assertXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='0']");
+ assertXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='1']");
+ // And normal override for level 2
+ getXPath(pNumberingDoc, "/w:numbering/w:num[@w:numId='" + OString::number(nListId) +"']/w:lvlOverride[@w:ilvl='2']/w:startOverride", "val"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf147978enhancedPathABVW)
+{
+ createSwDoc("tdf147978_enhancedPath_commandABVW.odt");
+ saveAndReload("Office Open XML Text");
+ // Make sure the new implemented export for commands A,B,V and W use the correct arc between
+ // the given two points, here the short one.
+ for (sal_Int16 i = 1 ; i <= 4; ++i)
+ {
+ uno::Reference<drawing::XShape> xShape = getShape(i);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(506), getProperty<awt::Rectangle>(xShape, "BoundRect").Height);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148132, "tdf148132.docx")
+{
+ {
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, "NumberingRules");
+ // Get level 2 char style
+ comphelper::SequenceAsHashMap levelProps(xLevels->getByIndex(1));
+ OUString aCharStyleName = levelProps["CharStyleName"].get<OUString>();
+ // Ensure that numbering in this paragraph is 24pt bold italic
+ // Previously it got overridden by paragraph properties and became 6pt, no bold, no italic
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName(aCharStyleName), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(24.f, getProperty<float>(xStyle, "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xStyle, "CharWeight"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, getProperty<awt::FontSlant>(xStyle, "CharPosture"));
+ }
+ // And do the same for second paragraph. Numbering should be identical
+ {
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(2);
+ auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, "NumberingRules");
+ comphelper::SequenceAsHashMap levelProps(xLevels->getByIndex(1));
+ OUString aCharStyleName = levelProps["CharStyleName"].get<OUString>();
+
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName(aCharStyleName), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(24.f, getProperty<float>(xStyle, "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xStyle, "CharWeight"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, getProperty<awt::FontSlant>(xStyle, "CharPosture"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf154481, "tdf154481.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Missing pages!", 7, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf149200)
+{
+ loadAndSave("tdf149200.docx");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Ensure there is no unexpected invalid structure <w14:textFill>
+ // There is just one run property
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "count(/w:document/w:body/w:p[1]/w:r[1]/w:rPr/*)"_ostr);
+ CPPUNIT_ASSERT(pXmlObj);
+ CPPUNIT_ASSERT_EQUAL(double(1), pXmlObj->floatval);
+ // And it is a color definition with themeColor
+ CPPUNIT_ASSERT_EQUAL(OUString("dark1"), getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w:color"_ostr, "themeColor"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf149313, "tdf149313.docx")
+{
+ // only 2, but not 3 pages in document
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // And ensure that pages are with correct sections (have correct dimensions)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4989), getXPath(pXmlDoc, "/root/page[1]/infos/bounds"_ostr, "height"_ostr).toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4989), getXPath(pXmlDoc, "/root/page[1]/infos/bounds"_ostr, "width"_ostr).toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4989), getXPath(pXmlDoc, "/root/page[2]/infos/bounds"_ostr, "height"_ostr).toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8000), getXPath(pXmlDoc, "/root/page[2]/infos/bounds"_ostr, "width"_ostr).toInt32());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148360, "tdf148360.docx")
+{
+ const auto& pLayout = parseLayoutDump();
+
+ // Ensure first element is a tab
+ assertXPath(pLayout, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/child::*[1]"_ostr, "type"_ostr, "PortionType::TabLeft");
+ // and only then goes content
+ assertXPath(pLayout, "/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/child::*[2]"_ostr, "type"_ostr, "PortionType::Text");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135923, "tdf135923-min.docx")
+{
+ uno::Reference<text::XText> xShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xShape);
+
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(getRun(xParagraph, 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, getProperty<Color>(getRun(xParagraph, 2), "CharColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148273_sectionBulletFormatLeak, "tdf148273_sectionBulletFormatLeak.docx")
+{
+ // get a paragraph with bullet point after section break
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(4);
+ uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY);
+
+ // Make sure that the bullet has no ListAutoFormat inherited from
+ // the empty paragraph before the section break
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1
+ // i.e. empty paragraph formats from the first section leaked to the bullet's formatting
+ uno::Any aValue = xProps->getPropertyValue("ListAutoFormat");
+ CPPUNIT_ASSERT_EQUAL(false, aValue.hasValue());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf149089, "tdf149089.docx")
+{
+ uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
+ uno::Reference<beans::XPropertySet> xPageStyle(xPageStyles->getByName("Standard"), uno::UNO_QUERY);
+ sal_Int16 nGridMode;
+ xPageStyle->getPropertyValue("GridMode") >>= nGridMode;
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(text::TextGridMode::LINES), nGridMode); // was LINES_AND_CHARS
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf139128)
+{
+ loadAndReload("tdf139128.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 0
+ // i.e. the line break was lost on export.
+ assertXPath(pXmlDoc, "//w:br"_ostr, 2);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
new file mode 100644
index 0000000000..967a4f2418
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -0,0 +1,879 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <queue>
+
+#include <com/sun/star/awt/FontStrikeout.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+
+
+#include <comphelper/propertysequence.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <o3tl/string_view.hxx>
+#include <comphelper/propertyvalue.hxx>
+
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+#include <ndtxt.hxx>
+#include <wrtsh.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf150197_predefinedNumbering)
+{
+ createSwDoc();
+
+ // The exact numbering style doesn't matter - just any non-bullet pre-defined numbering style.
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Numbering 123")) },
+ { "FamilyName", uno::Any(OUString("NumberingStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(getParagraph(1), "ListLabelString"));
+
+ saveAndReload("Office Open XML Text");
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(getParagraph(1), "ListLabelString"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testInlineSdtHeader)
+{
+ // Without the accompanying fix in place, this test would have failed with an assertion failure,
+ // we produced not-well-formed XML on save.
+ loadAndSave("inline-sdt-header.docx");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCellSdtRedline)
+{
+ // Without the accompanying fix in place, this test would have failed with an assertion failure,
+ // we produced not-well-formed XML on save.
+ loadAndSave("cell-sdt-redline.docx");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148956_directEndFormatting, "tdf148956_directEndFormatting.docx")
+{
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // pWrtShell->EndPara(/*bSelect=*/true);
+ dispatchCommand(mxComponent, ".uno:GotoEndOfPara", {});
+ if (!isExported())
+ {
+ CPPUNIT_ASSERT_MESSAGE(
+ "Has direct formatting",
+ pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->GetpSwpHints());
+ }
+ else
+ {
+ CPPUNIT_ASSERT_MESSAGE(
+ "Direct formatting cleared",
+ !pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->GetpSwpHints());
+ }
+
+ pWrtShell->SttPara(/*bSelect=*/true);
+ dispatchCommand(mxComponent, ".uno:ResetAttributes", {});
+
+ dispatchCommand(mxComponent, ".uno:GotoEndOfPara", {});
+
+ CPPUNIT_ASSERT_MESSAGE(
+ "Direct formatting cleared",
+ !pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->GetpSwpHints());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf147646, "tdf147646_mergedCellNumbering.docx")
+{
+ parseLayoutDump();
+ //Without the fix in place, it would have failed with
+ //- Expected: 2.
+ //- Actual : 4.
+ CPPUNIT_ASSERT_EQUAL(OUString("2."),parseDump("/root/page/body/tab/row[4]/cell/txt/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr,"expand"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153526_commentInNumbering, "tdf153526_commentInNumbering.docx")
+{
+ // an exception was prematurely ending finishParagraph, losing numbering and CRs
+ // so before the patch, this was 6.
+ CPPUNIT_ASSERT_EQUAL(13, getParagraphs());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153042_largeTab, "tdf153042_largeTab.docx")
+{
+ // This is not the greatest test because it is slightly weird, and has a different layout
+ // in MS Word 2010/2003 than it does in Word 2019. This tests for the 2019 layout.
+ // Additionally (in Word 2019), going to paragraph properties and hitting OK changes the layout.
+ // It changes back by going to outline numbering properties and hitting OK.
+
+ // export does not keep the tabstop when exporting non-numbering. (Probably a good thing...)
+ if (isExported())
+ return;
+
+ const auto& pLayout = parseLayoutDump();
+ // Ensure a large tabstop is used in the pseudo-numbering (numbering::NONE followed by tabstop)
+ assertXPath(pLayout, "//SwFixPortion"_ostr, "width"_ostr, "1701");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153042_noTab, "tdf153042_noTab.docx")
+{
+ // This is not the greatest test because it is slightly weird.
+ // It is the same as the "largeTab" file, except the paragraph properties were viewed
+ // and OK'ed, and now it looks like how Word 2010 and 2003 were laying it out.
+ // Amazingly, LO is handling both documents correctly at the moment, so let's unit test that...
+
+ // export does not keep the tabstop when exporting non-numbering. (Probably a good thing...)
+ if (isExported())
+ return;
+
+ const auto& pLayout = parseLayoutDump();
+ // Ensure a miniscule tab is used in the pseudo-numbering (numbering::NONE followed by tabstop)
+ assertXPath(pLayout, "//SwFixPortion"_ostr, "width"_ostr, "10");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf154751_dualStrikethrough, "tdf154751_dualStrikethrough.docx")
+{
+ auto nStrike = getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharStrikeout");
+ CPPUNIT_ASSERT_EQUAL(awt::FontStrikeout::SINGLE, nStrike);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf154478)
+{
+ loadAndSave("tdf154478.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/comments.xml");
+
+ OUString aValues[5] = { "Comment1 seen.", "Comment2 seen.", "Comment3 NOTseen.", "Comment4 NOTseen.", "Comment5 NOTseen." };
+ for (size_t i = 1; i < 6; ++i)
+ {
+ OString sPath = "/w:comments/w:comment[" + OString::number(i) + "]/w:p/w:r/w:t";
+
+ // Without the fix in place, this test would have failed with
+ // - In <>, XPath '/w:comments/w:comment[3]/w:p/w:r/w:t' not found
+ assertXPathContent(pXmlDoc, sPath, aValues[i - 1]);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf153592_columnBreaks)
+{
+ loadAndSave("tdf153592_columnBreaks.docx");
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // The two column breaks were lost on import. (I wouldn't complain if they were at 3,5)
+ assertXPath(pXmlDoc, "//w:br"_ostr, 2);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104394_lostTextbox, "tdf104394_lostTextbox.docx")
+{
+ // This was only one page b/c the textbox was missing.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf146984_anchorInShape, "tdf146984_anchorInShape.docx")
+{
+ // This was only one page b/c the page break was missing.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf127622_framePr, "tdf127622_framePr.docx")
+{
+ // All the paragraphs end up with the same frame definition, so put them all in one frame
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf105035_framePrB, "tdf105035_framePrB.docx")
+{
+ // The paragraphs have different frame definitions, so they must be in separate frames,
+ // and the frames must not overlap - even though their vertical positions are identical.
+ const auto& pLayout = parseLayoutDump();
+ sal_Int32 n1stFlyBottom
+ = getXPath(pLayout, "//page[1]//anchored/fly[1]/infos/bounds"_ostr, "bottom"_ostr).toInt32();
+ sal_Int32 n2ndFlyTop
+ = getXPath(pLayout, "//page[1]//anchored/fly[2]/infos/bounds"_ostr, "top"_ostr).toInt32();
+ CPPUNIT_ASSERT_GREATER(n1stFlyBottom, n2ndFlyTop); //Top is greater than bottom
+
+ // Impossible layout TODO: the textboxes are in the wrong order.
+ OUString sTextBox1("Preparation of Papers for IEEE TRANSACTIONS and JOURNALS (November 2012)");
+ CPPUNIT_ASSERT_MESSAGE("DID YOU FIX ME? Wow - I didn't think this would be possible!",
+ !getXPathContent(pLayout, "//page[1]//anchored/fly[1]/txt"_ostr).startsWith(sTextBox1));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf105035_framePrC, "tdf105035_framePrC.docx")
+{
+ // The paragraphs have different frame definitions, so they must be in separate frames,
+ // and the frames DO overlap this time.
+ const auto& pLayout = parseLayoutDump();
+ sal_Int32 n1stFlyTop
+ = getXPath(pLayout, "//page[1]//anchored/fly[1]/infos/bounds"_ostr, "top"_ostr).toInt32();
+ sal_Int32 n2ndFlyTop
+ = getXPath(pLayout, "//page[1]//anchored/fly[2]/infos/bounds"_ostr, "top"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(n1stFlyTop, n2ndFlyTop); //both frames start at the same position
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf154129_framePr1, "tdf154129_framePr1.docx")
+{
+ for (size_t i = 1; i < 4; ++i)
+ {
+ uno::Reference<drawing::XShape> xTextFrame = getShape(i);
+ // The anchor is defined in the style, and only the first style was checked, not the parents
+ auto nAnchor = getProperty<sal_Int16>(xTextFrame, "HoriOrientRelation");
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, nAnchor);
+ nAnchor = getProperty<sal_Int16>(xTextFrame, "VertOrientRelation");
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, nAnchor);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf154703_framePr, "tdf154703_framePr.docx")
+{
+ // the frame conversion had been failing, so it imported as plain text only.
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf154703_framePr2, "tdf154703_framePr2.rtf")
+{
+ // framePr frames are always imported as fully transparent
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(getShape(1), "FillTransparence"));
+
+ // as opposed to testLibreOfficeHang (RTF != INVERT_BORDER_SPACING) do not duplicate left/right
+ uno::Reference<text::XTextRange> xTextRange(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("framePr"), getParagraphOfText(1, xText)->getString());
+ sal_Int32 nFrame = getProperty<sal_Int32>(getShape(1), "LeftBorderDistance");
+ sal_Int32 nPara = getProperty<sal_Int32>(getParagraphOfText(1, xText), "LeftBorderDistance");
+ if (!isExported()) // RTF
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(529), nFrame + nPara);
+ else // DOCX
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(529*2), nFrame + nPara);
+
+ if (!isExported())
+ {
+ // Fill the frame with a red background. It should be transferred on export to the paragraph
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ xFrame->setPropertyValue("FillColor", uno::Any(COL_RED));
+ xFrame->setPropertyValue("FillTransparence", uno::Any(static_cast<sal_Int32>(0)));
+
+ return;
+ }
+
+ // exported: framed paragraphs without a background should now have a red background
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:body/w:p[1]/w:pPr/w:shd"_ostr, "fill"_ostr, "800000");
+ assertXPath(pXmlDoc, "//w:body/w:p[2]/w:pPr/w:shd"_ostr, "fill"_ostr, "548DD4"); // was blue already, no change
+ assertXPath(pXmlDoc, "//w:body/w:p[3]/w:pPr/w:shd"_ostr, "fill"_ostr, "800000");
+ assertXPath(pXmlDoc, "//w:body/w:p[3]/w:pPr/w:framePr"_ostr, "yAlign"_ostr, "center");
+ assertXPathNoAttribute(pXmlDoc, "//w:body/w:p[3]/w:pPr/w:framePr"_ostr, "y"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf154703_framePrWrapSpacing, "tdf154703_framePrWrapSpacing.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ if (!isExported())
+ return;
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // before the fix, this was half of the correct value.
+ assertXPath(pXmlDoc, "//w:body/w:p/w:pPr/w:framePr"_ostr, "hSpace"_ostr, "2552");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf154703_framePrTextDirection, "tdf154703_framePrTextDirection.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::WritingMode2::TB_RL), getProperty<sal_Int16>(getShape(1), "WritingMode"));
+ if (!isExported())
+ return;
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:body/w:p/w:pPr/w:textDirection"_ostr, "val"_ostr, "tbRl");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_anchoredAfterPgBreak, "tdf153613_anchoredAfterPgBreak.docx")
+{
+ const auto& pLayout = parseLayoutDump();
+ // An anchored TO character image anchors before the page break.
+ assertXPath(pLayout, "//page[1]//anchored"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_anchoredAfterPgBreak2, "tdf153613_anchoredAfterPgBreak2.docx")
+{
+ const auto& pLayout = parseLayoutDump();
+ // An anchored TO character image, followed by more characters moves to the following page
+ assertXPath(pLayout, "//page[2]//anchored"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_anchoredAfterPgBreak3, "tdf153613_anchoredAfterPgBreak3.docx")
+{
+ const auto& pLayout = parseLayoutDump();
+ // An anchored TO character image, with setting splitPgBreakAndParaMark moves to the following page
+ assertXPath(pLayout, "//page[2]//anchored"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_anchoredAfterPgBreak6, "tdf153613_anchoredAfterPgBreak6.docx")
+{
+ // An anchored TO character image, followed by more characters moves to the following page
+ // The difference from test 2 is that it is not the first character run
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(4, getParagraphs());
+
+ const auto& pLayout = parseLayoutDump();
+ CPPUNIT_ASSERT_EQUAL(OUString("y"), getXPathContent(pLayout, "//page[2]/body/txt[1]"_ostr));
+ assertXPath(pLayout, "//page[1]//anchored"_ostr, 1); // DID YOU FIX ME? This should be page[2]
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_inlineAfterPgBreak, "tdf153613_inlineAfterPgBreak.docx")
+{
+ const auto& pLayout = parseLayoutDump();
+ // An inline AS character image moves to the following page when after the page break.
+ assertXPath(pLayout, "//page[2]//anchored"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_inlineAfterPgBreak2, "tdf153613_inlineAfterPgBreak2.docx")
+{
+ // An inline AS character image moves to the following page when after the page break.
+ // The difference from the previous test is that it is not the first character run
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(4, getParagraphs());
+
+ const auto& pLayout = parseLayoutDump();
+ CPPUNIT_ASSERT_EQUAL(OUString("x"), getXPathContent(pLayout, "//page[1]/body/txt[2]"_ostr));
+ assertXPath(pLayout, "//page[2]//anchored"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_sdtAfterPgBreak, "tdf153613_sdtAfterPgBreak.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153613_textboxAfterPgBreak3, "tdf153613_textboxAfterPgBreak3.docx")
+{
+ // both textboxes on on the second (last) page
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ const auto& pLayout = parseLayoutDump();
+ assertXPath(pLayout, "//page[2]/body/txt/anchored/fly"_ostr, 2);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153964_topMarginAfterBreak14, "tdf153964_topMarginAfterBreak14.docx")
+{
+ //The top margin should only apply once in a split paragraph.
+ //In this compat14 (Windows 2010) version, it applies after the break if no prior visible run.
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2, "a w:br at the start of the document. Does it use 60 point top margin?"), uno::UNO_QUERY);
+ //CPPUNIT_ASSERT_EQUAL(sal_Int32(2117), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+
+ xPara.set(getParagraph(3, u"60 pt spacing before"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2117), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xfbe4d5), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin was applied to paragraph 3, so it shouldn't apply here
+ xPara.set(getParagraph(4, u"column break1"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xfbe4d5), getProperty<Color>(xPara, "ParaBackColor"));
+
+ xPara.set(getParagraph(5, u"60 pt followed by page break"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2117), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xdeeaf6), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin was applied to paragraph 5, so it shouldn't apply here
+ xPara.set(getParagraph(6, u"page break1"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xdeeaf6), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin was not applied yet, so with compat14 it should apply here.
+ xPara.set(getParagraph(7, u"column break2"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2117), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xe2efd9), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // In an odd twist, the w:br was actually at the end of the previous w:p, so in that case
+ // we ignore the top margin definition this time.
+ xPara.set(getParagraph(9, u"page break2"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+
+ // The top margin was not applied before the column break, so with compat14 it should apply here
+ xPara.set(getParagraph(10, u""_ustr), uno::UNO_QUERY); // after column break
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2117), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xfff2cc), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // In an odd twist, the w:br was actually at the end of the previous w:p, so in that case
+ // we ignore the top margin definition this time.
+ xPara.set(getParagraph(12, u""_ustr), uno::UNO_QUERY); // after page break
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153964_topMarginAfterBreak15, "tdf153964_topMarginAfterBreak15.docx")
+{
+ //The top margin should only apply once (at most) in a split paragraph.
+ //In this compat15 (Windows 2013) version, it never applies after the break.
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2, "a w:br at the start of the document. Does it use 60 point top margin?"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+
+ xPara.set(getParagraph(3, u"60 pt spacing before"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2117), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xfbe4d5), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin was applied to paragraph 3, so it shouldn't apply here
+ xPara.set(getParagraph(4, u"column break1"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xfbe4d5), getProperty<Color>(xPara, "ParaBackColor"));
+
+ xPara.set(getParagraph(5, u"60 pt followed by page break"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2117), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xdeeaf6), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin was applied to paragraph 5, so it shouldn't apply here
+ xPara.set(getParagraph(6, u"page break1"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xdeeaf6), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin was not applied to paragraph 6, and with compat15 it shouldn't apply here.
+ xPara.set(getParagraph(7, u"column break2"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xe2efd9), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin not was applied to paragraph 8, and with compat15 it shouldn't apply here.
+ xPara.set(getParagraph(9, u"page break2"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+
+ // The top margin was not applied to paragraph 9, and with compat15 it shouldn't apply here.
+ xPara.set(getParagraph(10, u""_ustr), uno::UNO_QUERY); // after column break
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xfff2cc), getProperty<Color>(xPara, "ParaBackColor"));
+
+ // The top margin was not applied to paragraph 11, and with compat15 it shouldn't apply here.
+ xPara.set(getParagraph(12, u""_ustr), uno::UNO_QUERY); // after page break
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153964_numberingAfterBreak14, "tdf153964_numberingAfterBreak14.docx")
+{
+ //Numbering should only apply once in a split paragraph.
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2, "How numbering affected by a column break?"), uno::UNO_QUERY);
+ //CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara.set(getParagraph(3, "How is numbering affected by a page break?"), uno::UNO_QUERY);
+ //CPPUNIT_ASSERT_EQUAL(OUString("2."), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara.set(getParagraph(4, "x"), uno::UNO_QUERY);
+ //CPPUNIT_ASSERT_EQUAL(OUString("3."), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara.set(getParagraph(5, "column break"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara.set(getParagraph(6, "y"), uno::UNO_QUERY);
+ //CPPUNIT_ASSERT_EQUAL(OUString("3."), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara.set(getParagraph(7, "page break"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153964_firstIndentAfterBreak14, "tdf153964_firstIndentAfterBreak14.docx")
+{
+ //First line indents should only apply once in a split paragraph.
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2, "How is first line indent affected by a column break?"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xPara, "ParaFirstLineIndent"));
+ xPara.set(getParagraph(3, "How is first line indent affected by a page break?"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xPara, "ParaFirstLineIndent"));
+ xPara.set(getParagraph(4, "x"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xPara, "ParaFirstLineIndent"));
+ xPara.set(getParagraph(5, "column break"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaFirstLineIndent"));
+ xPara.set(getParagraph(6, "y"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xPara, "ParaFirstLineIndent"));
+ xPara.set(getParagraph(7, "page break"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara, "ParaFirstLineIndent"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148834_lineNumbering)
+{
+ loadAndSave("tdf148834_lineNumbering.odt");
+
+ xmlDocUniquePtr pStylesXml = parseExport("word/styles.xml");
+ // user specified: do not include in line numbering
+ assertXPath(pStylesXml, "//w:style[@w:styleId='Normal']/w:pPr/w:suppressLineNumbers"_ostr, 1);
+ // even though it matches the parent style, these should always avoid showing line numbering
+ assertXPath(pStylesXml, "//w:style[@w:styleId='Footer']/w:pPr/w:suppressLineNumbers"_ostr, 1);
+ assertXPath(pStylesXml,
+ "//w:style[@w:styleId='0NUMBERED']/w:pPr/w:suppressLineNumbers"_ostr, "val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf157598)
+{
+ loadAndSave("tdf157598.docx");
+
+ xmlDocUniquePtr pStylesXml = parseExport("word/styles.xml");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 0
+ // - Actual : 1
+ assertXPath(pStylesXml, "//w:style[@w:styleId='Normal']/w:rPr/w:rtl"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf76022_textboxWrap)
+{
+ // Granted, this is an ODT with a bit of an anomaly - tables ignore fly wrapping.
+ createSwDoc("tdf76022_textboxWrap.odt");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Did you make wrapping sane/interoperable?", 1, getPages());
+
+ // When saving to DOCX, the table should obey the fly wrapping
+ saveAndReload("Office Open XML Text");
+
+ // The fly takes up the whole page, so the table needs to shift down to the next page.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf134114_allowOverlap, "tdf134114_allowOverlap.docx")
+{
+ // CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT(!getProperty<bool>(getShape(1), "AllowOverlap"));
+ CPPUNIT_ASSERT(getProperty<bool>(getShape(2), "AllowOverlap"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf149551_mongolianVert)
+{
+ // Given a docx document with a shape with vert="mongolianVert".
+ createSwDoc("tdf149551_mongolianVert.docx");
+
+ // The shape is imported as custom shape with attached frame.
+ // Without fix the shape itself had WritingMode = 0 = LR_TB,
+ // the frame in it had WritingMode = 2 = TB_RL.
+ // It should be WritingMode = 3 = TB_LR in both cases.
+ const sal_Int16 eExpected(text::WritingMode2::TB_LR);
+ CPPUNIT_ASSERT_EQUAL(eExpected, getProperty<sal_Int16>(getShape(1), "WritingMode"));
+ uno::Reference<beans::XPropertySet> xShapeProps(getShape(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrameProps(xShapeProps->getPropertyValue("TextBoxContent"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(eExpected, getProperty<sal_Int16>(xFrameProps, "WritingMode"));
+
+ // Such shape must have vert="mongolianVert" again after saving.
+ // Without fix the orientation was vert="vert".
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//wps:bodyPr"_ostr, "vert"_ostr, "mongolianVert");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf151912, "tdf151912.docx")
+{
+ // For now just ensure roundtrip is successful
+
+ //tdf#151548 - ensure block SDT preserves id (instead of random re-assignment)
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:sdt//w:sdtPr/w:id"_ostr, "val"_ostr, "1802566103");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf147724, "tdf147724.docx")
+{
+ const auto& pLayout = parseLayoutDump();
+
+ // Ensure we load field value from external XML correctly (it was "HERUNTERLADEN")
+ assertXPathContent(pLayout, "/root/page[1]/body/txt[1]"_ostr, "Placeholder -> *ABC*");
+
+ // This SDT has no storage id, it is not an error, but content can be taken from any suitable XML
+ // There 2 variants possible, both are acceptable
+ OUString sFieldResult = getXPathContent(pLayout, "/root/page[1]/body/txt[2]"_ostr);
+ CPPUNIT_ASSERT(sFieldResult == "Placeholder -> *HERUNTERLADEN*" || sFieldResult == "Placeholder -> *ABC*");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf130782, "chart.docx")
+{
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xAccess(xTEOSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xAccess->getCount());
+ uno::Reference<container::XNamed> xObj(xAccess->getByIndex(0), uno::UNO_QUERY);
+
+ // these properties were not imported
+ CPPUNIT_ASSERT_EQUAL(OUString("Diagramm 1"), xObj->getName());
+ CPPUNIT_ASSERT_EQUAL(OUString("uninspired default chart"), getProperty<OUString>(xObj, "Title"));
+ CPPUNIT_ASSERT_EQUAL(OUString("the description is here"), getProperty<OUString>(xObj, "Description"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNumberPortionFormatFromODT)
+{
+ // Given a document with a single paragraph, direct formatting asks 24pt font size for the
+ // numbering and the text portion:
+ createSwDoc("number-portion-format.odt");
+
+ // When saving to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure that the paragraph marker's char format has that custom font size:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '//w:pPr/w:rPr/w:sz' number of nodes is incorrect
+ // i.e. <w:sz> was missing under <w:pPr>'s <w:rPr>.
+ assertXPath(pXmlDoc, "//w:pPr/w:rPr/w:sz"_ostr, "val"_ostr, "48");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParaStyleCharPosition)
+{
+ // Given a loaded document where the Normal paragraph style has <w:position w:val="-1">:
+ createSwDoc("para-style-char-position.docx");
+
+ // When saving it back to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure that is not turned into a normal subscript text:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - XPath '/w:styles/w:style[@w:styleId='Normal']/w:rPr/w:position' number of nodes is incorrect
+ // i.e. we wrote <w:vertAlign w:val="subscript"> instead of <w:position>.
+ assertXPath(pXmlDoc, "/w:styles/w:style[@w:styleId='Normal']/w:rPr/w:position"_ostr, "val"_ostr, "-1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf150966_regularInset)
+{
+ // Given a docx document with a rectangular shape with height cy="900000" (EMU), tIns="180000"
+ // and bIns="360000", resulting in 360000EMU text area height.
+ createSwDoc("tdf150966_regularInset.docx");
+
+ // The shape is imported as custom shape with attached frame.
+ // The insets are currently imported as margin top="4.99mm" and bottom="10mm".
+ // That should result in tIns="179640" and bIns="360000" on export.
+
+ // Without fix the insets were tIns="359280" and bIns="539640". The text area had 1080Emu height
+ // and Word displays no text at all.
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathAttrs(pXmlDoc, "//wps:bodyPr"_ostr, { { "tIns", "179640" }, { "bIns", "360000" } });
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152636_lostPageBreak)
+{
+ loadAndReload("tdf152636_lostPageBreak.odt");
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152636_lostPageBreak2)
+{
+ loadAndReload("tdf152636_lostPageBreak2.docx");
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtDuplicatedId)
+{
+ // Given a document with 2 inline <w:sdt>, with each a <w:id>:
+ createSwDoc("sdt-duplicated-id.docx");
+
+ // When exporting that back to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure we write 2 <w:sdt> and no duplicates:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 4
+ // i.e. grab-bags introduced 2 unwanted duplicates.
+ assertXPath(pXmlDoc, "//w:sdt"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testImageCropping)
+{
+ loadAndReload("crop-roundtrip.docx");
+
+ // the image has no cropping after roundtrip, because it has been physically cropped
+ // NB: this test should be fixed when the core feature to show image cropped when it
+ // has the "GraphicCrop" is set is implemented
+ auto aGraphicCropStruct = getProperty<text::GraphicCrop>(getShape(1), "GraphicCrop");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aGraphicCropStruct.Left);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aGraphicCropStruct.Right);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aGraphicCropStruct.Top);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aGraphicCropStruct.Bottom);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152200)
+{
+ // Given a document with a fly anchored after a FORMTEXT in the end of the paragraph:
+ createSwDoc("tdf152200-field+textbox.docx");
+
+ // When exporting that back to DOCX:
+ save("Office Open XML Text");
+
+ // Then make sure that fldChar with type 'end' goes prior to the at-char anchored fly.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ const int nRunsBeforeFldCharEnd = countXPathNodes(pXmlDoc, "//w:fldChar[@w:fldCharType='end']/preceding::w:r"_ostr);
+ CPPUNIT_ASSERT(nRunsBeforeFldCharEnd);
+ const int nRunsBeforeAlternateContent = countXPathNodes(pXmlDoc, "//mc:AlternateContent/preceding::w:r"_ostr);
+ CPPUNIT_ASSERT(nRunsBeforeAlternateContent);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 6
+ // - Actual : 5
+ CPPUNIT_ASSERT_GREATER(nRunsBeforeFldCharEnd, nRunsBeforeAlternateContent);
+ // Make sure we only have one paragraph in body, and only three field characters overall,
+ // located directly in runs of this paragraph
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:fldChar"_ostr, 3);
+ assertXPath(pXmlDoc, "//w:fldChar"_ostr, 3); // no field characters elsewhere
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf126477)
+{
+ loadAndReload("embedded_chart.odt");
+
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
+ uno::Sequence<OUString> aSeq(xAccess->getElementNames());
+
+ // Check number of embedded objects.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeq.getLength());
+
+ uno::Reference<document::XEmbeddedObjectSupplier> xEOSupplier(xAccess->getByName(aSeq[0]),
+ uno::UNO_QUERY);
+ uno::Reference<lang::XComponent> xObj(xEOSupplier->getEmbeddedObject());
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier2(xObj, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xAccess2(xTEOSupplier2->getEmbeddedObjects());
+ uno::Sequence<OUString> aSeq2(xAccess2->getElementNames());
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the chart lost in the embedded document.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeq2.getLength());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf152425)
+{
+ loadAndReload("tdf152425.docx");
+
+ // Check that "List Number" and "List 5" styles don't get merged
+ const OUString Para3Style = getProperty<OUString>(getParagraph(3), "ParaStyleName");
+ CPPUNIT_ASSERT_EQUAL(OUString("Numbering 1"), Para3Style);
+ const OUString Para4Style = getProperty<OUString>(getParagraph(4), "ParaStyleName");
+ CPPUNIT_ASSERT_EQUAL(OUString("List 5 (WW)"), Para4Style);
+ // Also check that "List 5" and "List Bullet 5" styles don't get merged
+ const OUString Para5Style = getProperty<OUString>(getParagraph(5), "ParaStyleName");
+ CPPUNIT_ASSERT_EQUAL(OUString("List 5"), Para5Style);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf153104)
+{
+ loadAndReload("tdf153104.docx");
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ OUString numId = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:numPr/w:numId"_ostr, "val"_ostr);
+
+ xmlDocUniquePtr pXmlNum = parseExport("word/numbering.xml");
+ OString numPath = "/w:numbering/w:num[@w:numId='"
+ + OUStringToOString(numId, RTL_TEXTENCODING_ASCII_US) + "']/";
+
+ // Check that first level's w:lvlOverride/w:startOverride is written correctly:
+ // the list defines starting value of 10, which must be kept upon second level
+ // numbering reset.
+ // Without the fix, this would fail with
+ // - Expected: 1
+ // - Actual : 0
+ // - In <>, XPath '/w:numbering/w:num[@w:numId='3']/w:lvlOverride[@w:ilvl='0']/w:startOverride' number of nodes is incorrect
+ assertXPath(pXmlNum, numPath + "w:lvlOverride[@w:ilvl='0']/w:startOverride", "val"_ostr, "10");
+ assertXPath(pXmlNum, numPath + "w:lvlOverride[@w:ilvl='1']/w:startOverride", "val"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf153128)
+{
+ loadAndReload("tdf153128.docx");
+ calcLayout();
+ sal_Int32 nFirstLineHeight
+ = parseDump("/root/page/body/txt[1]/SwParaPortion/SwLineLayout/SwParaPortion"_ostr, "height"_ostr)
+ .toInt32();
+ CPPUNIT_ASSERT_GREATER(sal_Int32(0), nFirstLineHeight);
+
+ // The text height is 1 pt, i.e. 20 twip; without the fix, it would fail with
+ // - Expected less than: 30
+ // - Actual : 414
+ CPPUNIT_ASSERT_LESS(sal_Int32(30), nFirstLineHeight);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testExportingUnknownStyleInRedline)
+{
+ // This must not fail assertions
+ loadAndReload("UnknownStyleInRedline.docx");
+ // Check that the original unknown style name "UnknownStyle" is roundtripped
+ // (maybe this is wrong, because Word does not do this).
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:pPr/w:pPrChange/w:pPr/w:pStyle[@w:val='UnknownStyle']"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf148026)
+{
+ loadAndReload("tdf148026.fodt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - In <>, XPath '//w:hyperlink' number of nodes is incorrect
+ // i.e. a HYPERLINK field was exported instead of the hyperlink XML element.
+ assertXPath(pXmlDoc, "//w:hyperlink"_ostr, "tgtFrame"_ostr, "_self");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf153664)
+{
+ loadAndReload("Table-of-Figures.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ CPPUNIT_ASSERT(pXmlStyles);
+ // Without the fix this was styleId='FigureIndex1' and name was "Figure Index 1"
+ // This led to style settings being reset when ToF was updated in Word
+ // TOF's paragraph style should be exported as "Table of Figures" as that's the default Word style name
+ assertXPath(pXmlStyles, "/w:styles/w:style[12]"_ostr, "styleId"_ostr, "TableofFigures");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableofFigures']/w:name"_ostr, "val"_ostr, "Table of Figures");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf124472_hyperlink, "tdf124472.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.libreoffice.org/"),
+ getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
+ CPPUNIT_ASSERT_EQUAL(OUString("mailto:info@libreoffice.org"),
+ getProperty<OUString>(getRun(getParagraph(2), 1), "HyperLinkURL"));
+ CPPUNIT_ASSERT_EQUAL(OUString(""),
+ getProperty<OUString>(getRun(getParagraph(3), 1), "HyperLinkURL"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf135786, "tdf135786.docx")
+{
+ // Empty first line remain, if the section's initial dummy paragraph is not deleted:
+ // - Expected: 2
+ // - Actual : 3
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf155736, "tdf155736_PageNumbers_footer.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/footer"_ostr);
+ assertXPath(pXmlDoc, "/root/page[2]/footer"_ostr);
+ //Without the fix in place, it would have failed with
+ //- Expected: Page * of *
+ //- Actual : Page of
+ CPPUNIT_ASSERT_EQUAL(OUString("Page * of *"), parseDump("/root/page[1]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Page * of *"), parseDump("/root/page[2]/footer/txt/text()"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf155903, "tdf155903.odt")
+{
+ // Without the accompanying fix in place, this test would have crashed,
+ // because the exported file was corrupted.
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
new file mode 100644
index 0000000000..0c1d1a25fb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
@@ -0,0 +1,1224 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/text/SizeType.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+#include <tools/UnitConversion.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <svx/svdpage.hxx>
+
+#include <drawdoc.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <pagefrm.hxx>
+#include <flyfrms.hxx>
+#include <sortedobjs.hxx>
+#include <txtfrm.hxx>
+#include <IDocumentMarkAccess.hxx>
+#include <xmloff/odffields.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text")
+ {
+ }
+};
+
+DECLARE_OOXMLEXPORT_TEST(testFdo78939, "fdo78939.docx")
+{
+ // fdo#78939 : LO hanged while opening issue document
+
+ // Whenever a para-style was applied to a Numbering format level,
+ // LO incorrectly also changed the para-style...
+
+ // check that file opens and does not hang while opening and also
+ // check that an incorrect numbering style is not applied ...
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(1), "NumberingStyleName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFootnote, "footnote.docx")
+{
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XTextRange> xFootnote(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ OUString aFootnote = xFootnote->getString();
+ // Ensure there are no additional newlines after "bar".
+ CPPUNIT_ASSERT(aFootnote.endsWith("bar"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableBtlrCenter, "table-btlr-center.docx")
+{
+ // Note that this is btLr text, so layout and doc model horizontal/vertical is the opposite of
+ // each other.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A2");
+ // Cell vertical alignment was CENTER, should be NONE.
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::NONE, getProperty<sal_Int16>(xCell, "VertOrient"));
+
+ // Cell horizontal alignment should be CENTER.
+ uno::Reference<text::XText> xCellText(xCell, uno::UNO_QUERY);
+ auto nActual = getProperty<sal_Int32>(getParagraphOfText(1, xCellText), "ParaAdjust");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(style::ParagraphAdjust_CENTER), nActual);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo80555, "fdo80555.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // Shape was wrongly placed at X=0, Y=0
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3318), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(247), xShape->getPosition().Y);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf104418)
+{
+ loadAndReload("tdf104418.odt");
+ // Problem was that <w:hideMark> cell property was ignored.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 750
+ // - Actual : 1499
+ CPPUNIT_ASSERT_EQUAL(sal_Int64(750),
+ getProperty<sal_Int64>(xTableRows->getByIndex(0), "Height"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testHidemark, "hidemark.docx")
+{
+ // Problem was that <w:hideMark> cell property was ignored.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+ // Height should be minimal
+ CPPUNIT_ASSERT_EQUAL(convertTwipToMm100(MINLAY),
+ getProperty<sal_Int64>(xTableRows->getByIndex(1), "Height"));
+ // Size type was MIN, should be FIX to avoid considering the end of paragraph marker.
+ CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX,
+ getProperty<sal_Int16>(xTableRows->getByIndex(1), "SizeType"));
+
+ //tdf#104876: Width was not recognized during import when table size was 'auto'
+ CPPUNIT_ASSERT_MESSAGE("table size is less than 7000?",
+ sal_Int32(7000) > getProperty<sal_Int32>(xTextTable, "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testHidemarkb, "tdf99616_hidemarkb.docx")
+{
+ // Problem was that the smallest possible height was forced, not the min specified size.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+ // Height should be .5cm
+ CPPUNIT_ASSERT_EQUAL(sal_Int64(501),
+ getProperty<sal_Int64>(xTableRows->getByIndex(1), "Height"));
+ // Size type was MIN, should be FIX to avoid considering the end of paragraph marker.
+ CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX,
+ getProperty<sal_Int16>(xTableRows->getByIndex(1), "SizeType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testBnc891663, "bnc891663.docx")
+{
+ // The image should be inside a cell, so the text in the following cell should be below it.
+ int imageTop
+ = parseDump("/root/page/body/tab/row[1]/cell[2]/txt[1]/anchored/fly/infos/bounds"_ostr,
+ "top"_ostr)
+ .toInt32();
+ int imageHeight
+ = parseDump("/root/page/body/tab/row[1]/cell[2]/txt[1]/anchored/fly/infos/bounds"_ostr,
+ "height"_ostr)
+ .toInt32();
+ int textNextRowTop
+ = parseDump("/root/page/body/tab/row[2]/cell[1]/txt[1]/infos/bounds"_ostr, "top"_ostr)
+ .toInt32();
+ CPPUNIT_ASSERT(textNextRowTop >= imageTop + imageHeight);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123104, "tdf123104.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("E1");
+ // See SwXCell::getPropertyValue(), we really put 'long' into an Any there.
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 3;Actual :
+ // 2', i.e. the vertical merge covered one less cell, resulting in a cell with white background.
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(3), getProperty<tools::Long>(xCell, "RowSpan"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo85542, "fdo85542.docx")
+{
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xBookmarksByIdx->getCount());
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("B1"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("B2"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("B3"));
+ // B1
+ uno::Reference<text::XTextContent> xContent1(xBookmarksByName->getByName("B1"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange1 = xContent1->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("ABB"), xRange1->getString());
+ // B2
+ uno::Reference<text::XTextContent> xContent2(xBookmarksByName->getByName("B2"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange2 = xContent2->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("BBC"), xRange2->getString());
+ // B3 -- testing a collapsed bookmark
+ uno::Reference<text::XTextContent> xContent3(xBookmarksByName->getByName("B3"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange3 = xContent3->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(xRange3->getString(), OUString());
+ uno::Reference<text::XText> xText = xRange3->getText();
+ uno::Reference<text::XTextCursor> xNeighborhoodCursor = xText->createTextCursor();
+ xNeighborhoodCursor->gotoRange(xRange3, false);
+ xNeighborhoodCursor->goLeft(1, false);
+ xNeighborhoodCursor->goRight(2, true);
+ CPPUNIT_ASSERT_EQUAL(OUString("AB"), xNeighborhoodCursor->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf65955)
+{
+ loadAndReload("tdf65955.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xBookmarksByIdx->getCount());
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("a"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("b"));
+ // a
+ uno::Reference<text::XTextContent> xContent3(xBookmarksByName->getByName("a"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange3 = xContent3->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(xRange3->getString(), OUString());
+ // b
+ uno::Reference<text::XTextContent> xContent2(xBookmarksByName->getByName("b"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange2 = xContent2->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("r"), xRange2->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf65955_2)
+{
+ loadAndReload("tdf65955_2.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xBookmarksByIdx->getCount());
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("test"));
+
+ uno::Reference<text::XTextContent> xContent3(xBookmarksByName->getByName("test"),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange3 = xContent3->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"), xRange3->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testChtOutlineNumberingOoxml, "chtoutline.docx")
+{
+ static constexpr OUStringLiteral aExpectedNumbering = u"\u7b2c 1 \u7ae0";
+
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(aExpectedNumbering),
+ getProperty<OUString>(xPara, "ListLabelString"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(mathtype, "mathtype.docx")
+{
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEmbeddedObjects(
+ xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
+ // This failed as the Model property was empty.
+ auto xModel
+ = getProperty<uno::Reference<lang::XServiceInfo>>(xEmbeddedObjects->getByIndex(0), "Model");
+ CPPUNIT_ASSERT(xModel->supportsService("com.sun.star.formula.FormulaProperties"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf8255)
+{
+ auto verify = [this]() {
+ // A full-page-wide multi-page floating table should be allowed to split:
+ uno::Reference<text::XTextFramesSupplier> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+ uno::UNO_QUERY);
+ bool bIsSplitAllowed{};
+ xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+ CPPUNIT_ASSERT(bIsSplitAllowed);
+ };
+ createSwDoc("tdf8255.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf87460, "tdf87460.docx")
+{
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(xTextDocument, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEndnotes = xEndnotesSupplier->getEndnotes();
+ // This was 0: endnote was lost on import.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xEndnotes->getCount());
+
+ // Also make sure that <w:tblpPr> is mapped to a text frame (hosting the table):
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xTextFrames = xTextFramesSupplier->getTextFrames();
+ // Without the fix in place, this test would have failed, the table was inline.
+ CPPUNIT_ASSERT(xTextFrames->hasByName("Frame1"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90611, "tdf90611.docx")
+{
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XText> xFootnoteText;
+ xFootnotes->getByIndex(0) >>= xFootnoteText;
+ // This was 11.
+ CPPUNIT_ASSERT_EQUAL(10.f,
+ getProperty<float>(getParagraphOfText(1, xFootnoteText), "CharHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf89702, "tdf89702.docx")
+{
+ // Get the first paragraph's numbering style's 2nd level's character style name.
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ auto xLevels
+ = getProperty<uno::Reference<container::XIndexAccess>>(xParagraph, "NumberingRules");
+ uno::Sequence<beans::PropertyValue> aLevel;
+ xLevels->getByIndex(1) >>= aLevel; // 2nd level
+ OUString aCharStyleName = std::find_if(std::cbegin(aLevel), std::cend(aLevel),
+ [](const beans::PropertyValue& rValue) {
+ return rValue.Name == "CharStyleName";
+ })
+ ->Value.get<OUString>();
+
+ // Make sure that the font name is Arial, this was Verdana.
+ uno::Reference<beans::XPropertySet> xStyle(
+ getStyles("CharacterStyles")->getByName(aCharStyleName), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(xStyle, "CharFontName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf86374, "tdf86374.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTable->getRows();
+ // btLr text direction was imported as FIX, it should be MIN to have enough space for the additionally entered paragraphs.
+ CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN,
+ getProperty<sal_Int16>(xTableRows->getByIndex(0), "SizeType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf87924, "tdf87924.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
+ // This was -270, the text rotation angle was set when it should not be rotated.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ aGeometry["TextPreRotateAngle"].get<sal_Int32>());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testIndents, "indents.docx")
+{
+ //expected left margin and first line indent values
+ static const sal_Int32 indents[] = { 0, 0, -2000, 0, -2000, 1000, -1000, -1000, 2000, -1000 };
+ uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(),
+ uno::UNO_QUERY);
+ // list of paragraphs
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ size_t paraIndex = 0;
+ do
+ {
+ uno::Reference<lang::XServiceInfo> xServiceInfo;
+ if (xParaEnum->nextElement() >>= xServiceInfo)
+ {
+ uno::Reference<beans::XPropertySet> const xPropertySet(xServiceInfo,
+ uno::UNO_QUERY_THROW);
+ sal_Int32 nIndent = 0;
+ sal_Int32 nFirstLine = 0;
+ xPropertySet->getPropertyValue("ParaLeftMargin") >>= nIndent;
+ xPropertySet->getPropertyValue("ParaFirstLineIndent") >>= nFirstLine;
+ CPPUNIT_ASSERT_EQUAL(indents[paraIndex * 2], nIndent);
+ CPPUNIT_ASSERT_EQUAL(indents[paraIndex * 2 + 1], nFirstLine);
+ ++paraIndex;
+ }
+ } while (xParaEnum->hasMoreElements());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf92454, "tdf92454.docx")
+{
+ // The first paragraph had a large indentation / left margin as inheritance
+ // in Word and Writer works differently, and no direct value was set to be
+ // explicit.
+ uno::Reference<beans::XPropertyState> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ // This was beans::PropertyState_DEFAULT_VALUE.
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE,
+ xParagraph->getPropertyState("ParaFirstLineIndent"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95377, "tdf95377.docx")
+{
+ uno::Reference<beans::XPropertyState> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xParagraph, "ParaRightMargin"));
+
+ xParagraph.set(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-501),
+ getProperty<sal_Int32>(xParagraph, "ParaFirstLineIndent"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2501), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE,
+ xParagraph->getPropertyState("ParaFirstLineIndent"));
+
+ xParagraph.set(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-250),
+ getProperty<sal_Int32>(xParagraph, "ParaFirstLineIndent"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(250), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE,
+ xParagraph->getPropertyState("ParaFirstLineIndent"));
+
+ //default style has numbering enabled. Styles inherit numbering unless specifically disabled
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc,
+ "//body/txt/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr,
+ 3); //first three paragraphs have numbering
+ assertXPath(
+ pXmlDoc,
+ "//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr,
+ "expand"_ostr, "a.");
+ assertXPath(
+ pXmlDoc,
+ "//body/txt[2]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr,
+ "expand"_ostr, "b.");
+ assertXPath(
+ pXmlDoc,
+ "//body/txt[3]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr,
+ "expand"_ostr, "c.");
+ assertXPath(
+ pXmlDoc,
+ "/root/page/body/txt[4]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']"_ostr,
+ 0); //last paragraph style disables numbering
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95376, "tdf95376.docx")
+{
+ uno::Reference<beans::XPropertyState> xParagraph(getParagraph(2), uno::UNO_QUERY);
+ // This was beans::PropertyState_DIRECT_VALUE: indentation-from-numbering
+ // did not have priority over indentation-from-paragraph-style, due to a
+ // filter workaround that's not correct here.
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE,
+ xParagraph->getPropertyState("ParaFirstLineIndent"));
+
+ //tdf#131321 - paragraph styles lost their numbering. Bullet+space inherits WWNum1 from Bullet
+ uno::Reference<beans::XPropertySet> xStyle(
+ getStyles("ParagraphStyles")->getByName("Bullet+space"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(!(getProperty<OUString>(xStyle, "NumberingStyleName")).isEmpty());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf92124, "tdf92124.docx")
+{
+ // Get the second paragraph's numbering style's 1st level's suffix.
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(2);
+ auto xLevels
+ = getProperty<uno::Reference<container::XIndexAccess>>(xParagraph, "NumberingRules");
+ uno::Sequence<beans::PropertyValue> aLevel;
+ xLevels->getByIndex(0) >>= aLevel; // 1st level
+ OUString aSuffix
+ = std::find_if(std::cbegin(aLevel), std::cend(aLevel),
+ [](const beans::PropertyValue& rValue) { return rValue.Name == "Suffix"; })
+ ->Value.get<OUString>();
+ // Make sure it's empty as the source document contains <w:suff w:val="nothing"/>.
+ CPPUNIT_ASSERT(aSuffix.isEmpty());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90153, "tdf90153.docx")
+{
+ // This was at-para, so the line-level VertOrientRelation was lost, resulting in an incorrect vertical position.
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf93919, "tdf93919.docx")
+{
+ // This was 0, left margin was not inherited from the list style.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270),
+ getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf91417, "tdf91417.docx")
+{
+ // The first paragraph should contain a link to "http://www.google.com/"
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextCursor> xTextCursor = xTextDocument->getText()->createTextCursor();
+ uno::Reference<beans::XPropertySet> xCursorProps(xTextCursor, uno::UNO_QUERY);
+ OUString aValue;
+ xCursorProps->getPropertyValue("HyperLinkURL") >>= aValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("http://www.google.com/"), aValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90810, "tdf90810short.docx")
+{
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XFootnotesSupplier> xFootnoteSupp(xTextDocument, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnoteIdxAcc = xFootnoteSupp->getFootnotes();
+ uno::Reference<text::XFootnote> xFootnote(xFootnoteIdxAcc->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XText> xFootnoteText(xFootnote, uno::UNO_QUERY);
+ OUString sFootnoteText = xFootnoteText->getString();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(89), sFootnoteText.getLength());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf89165, "tdf89165.docx")
+{
+ // This must not hang in layout
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95777, "tdf95777.docx")
+{
+ // This must not fail on open
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf94374)
+{
+ createSwDoc("hello.docx");
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xText = xTextDocument->getText();
+ uno::Reference<text::XTextRange> xEnd = xText->getEnd();
+ // This failed: it wasn't possible to insert a DOCX document into an existing Writer one.
+ paste(u"ooxmlexport/data/tdf94374.docx", "com.sun.star.comp.Writer.WriterFilter", xEnd);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf83300, "tdf83300.docx")
+{
+ // tdf#143722: This was 'TOC Heading', upon updating a TOC the heading replaced its Word-default blue + Calibri style
+ // with a Writer-default black + Liberation Sans one
+ CPPUNIT_ASSERT_EQUAL(OUString("Contents Heading"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf78902, "tdf78902.docx")
+{
+ // This hung in layout.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95775, "tdf95775.docx")
+{
+ // This must not fail in layout
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf92157, "tdf92157.docx")
+{
+ // A graphic with dimensions 0,0 should not fail on load
+
+ // Additionally, the bookmark names should not change (they got a "1" appended when copied)
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("referentiegegevens"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("referentiegegevens_bk"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf97417, "section_break_numbering.docx")
+{
+ uno::Reference<beans::XPropertySet> xProps(getParagraph(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("1st page: first paragraph erroneous numbering",
+ !xProps->getPropertyValue("NumberingRules").hasValue());
+ // paragraph with numbering and section break was removed by writerfilter
+ // but its numbering was copied to all following paragraphs
+ CPPUNIT_ASSERT_MESSAGE(
+ "2nd page: first paragraph missing numbering",
+ getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(2), "NumberingRules")
+ .is());
+ xProps = uno::Reference<beans::XPropertySet>(getParagraph(3), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("2nd page: second paragraph erroneous numbering",
+ !xProps->getPropertyValue("NumberingRules").hasValue());
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf94043, "tdf94043.docx")
+{
+ auto xTextSection
+ = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(2), "TextSection");
+ auto xTextColumns
+ = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ // This was 0, the separator line was not visible due to 0 width.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(xTextColumns, "SeparatorLineWidth"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95213, "tdf95213.docx")
+{
+ // Get the second paragraph's numbering style's 2nd level's character style name.
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(2);
+ auto xLevels
+ = getProperty<uno::Reference<container::XIndexAccess>>(xParagraph, "NumberingRules");
+ uno::Sequence<beans::PropertyValue> aLevel;
+ xLevels->getByIndex(1) >>= aLevel; // 2nd level
+ OUString aName = std::find_if(std::cbegin(aLevel), std::cend(aLevel),
+ [](const beans::PropertyValue& rValue) {
+ return rValue.Name == "CharStyleName";
+ })
+ ->Value.get<OUString>();
+
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName(aName),
+ uno::UNO_QUERY);
+ // This was awt::FontWeight::BOLD.
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xStyle, "CharWeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf97371, "tdf97371.docx")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pShape = pPage->GetObj(0);
+ SdrObject* pTextBox = pPage->GetObj(1);
+ tools::Long nDiff = std::abs(pShape->GetSnapRect().Top() - pTextBox->GetSnapRect().Top());
+ // The top of the two shapes were 410 and 3951, now it should be 3950 and 3951.
+ CPPUNIT_ASSERT(nDiff < 10);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf99140)
+{
+ auto verify = [this]() {
+ // A multi-page floating table appeared only on the first page.
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ SwFrame* pTab1 = pPage1Fly->GetLower();
+ // This was text::HoriOrientation::NONE, the second table was too wide due to this.
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(9622), pTab1->getFrameArea().Width());
+ SwFrame* pRow1 = pTab1->GetLower();
+ SwFrame* pCell1 = pRow1->GetLower();
+ auto pText1 = dynamic_cast<SwTextFrame*>(pCell1->GetLower());
+ CPPUNIT_ASSERT(pText1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Table2:A1"), pText1->GetText());
+
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ SwFrame* pTab2 = pPage2Fly->GetLower();
+ SwFrame* pRow2 = pTab2->GetLower();
+ SwFrame* pCell2 = pRow2->GetLower();
+ auto pText2 = dynamic_cast<SwTextFrame*>(pCell2->GetLower());
+ CPPUNIT_ASSERT(pText2);
+ CPPUNIT_ASSERT_EQUAL(OUString("Table2:A2"), pText2->GetText());
+ };
+ createSwDoc("tdf99140.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableMarginAdjustment)
+{
+ loadAndReload("table.fodt");
+ // Writer, (new) Word: margin 0 means table border starts at 0
+ // (old) Word: margin 0 means paragraph in table starts at 0
+
+ auto const xTable(getParagraphOrTable(1));
+ // shifted very slightly to account for half of the thin border width, so 4, not 0.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty<sal_Int32>(xTable, "LeftMargin"));
+
+ // Now that compatibilityMode is set to 2013's 15 (new), expect the new values,
+ // since LO is exporting in the NEW way now instead of the OLD way.
+ // This was 55 when using 2007's compatibilityMode of 12 (old)
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "//w:tbl[1]/w:tblPr[1]/w:tblInd[1]"_ostr, "type"_ostr, "dxa");
+ assertXPath(pXmlDoc, "//w:tbl[1]/w:tblPr[1]/w:tblInd[1]"_ostr, "w"_ostr, "0");
+
+ // tdf#143982: automatic tables should export as something better than just left-and-size
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xTable, "RelativeWidth"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf119760_tableInTablePosition, "tdf119760_tableInTablePosition.docx")
+{
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "//w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tblPr[1]/w:tblInd[1]"_ostr,
+ "type"_ostr, "dxa");
+ assertXPath(pXmlDoc, "//w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]//w:tblPr[1]/w:tblInd[1]"_ostr,
+ "w"_ostr, "0");
+ }
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // For compatibilityMode 15: margin 0 means table border starts at 0,
+ // shifted to account for half of the thick border width, so 106, not 0.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(106), getProperty<sal_Int32>(xTable, "LeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableCellMargin, "table-cell-margin.docx")
+{
+ sal_Int32 const cellLeftMarginFromOffice[] = { 250, 100, 0, 0 };
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+
+ for (int i = 0; i < 4; i++)
+ {
+ uno::Reference<text::XTextTable> xTable1(xTables->getByIndex(i), uno::UNO_QUERY);
+
+ // Verify left margin of 1st cell :
+ // * Office left margins are measured relative to the right of the border
+ // * LO left spacing is measured from the center of the border
+ uno::Reference<table::XCell> xCell = xTable1->getCellByName("A1");
+ uno::Reference<beans::XPropertySet> xPropSet(xCell, uno::UNO_QUERY_THROW);
+ sal_Int32 aLeftMargin = -1;
+ xPropSet->getPropertyValue("LeftBorderDistance") >>= aLeftMargin;
+ uno::Any aLeftBorder = xPropSet->getPropertyValue("LeftBorder");
+ table::BorderLine2 aLeftBorderLine;
+ aLeftBorder >>= aLeftBorderLine;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "Incorrect left spacing computed from docx cell margin", cellLeftMarginFromOffice[i],
+ aLeftMargin - 0.5 * aLeftBorderLine.LineWidth, 1);
+ // The 'a' in the fourth table should not be partly hidden by the border
+ if (i == 3)
+ {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect cell left padding",
+ 0.5 * aLeftBorderLine.LineWidth, aLeftMargin, 1);
+ // tdf#119885: cell's edit area must touch right border
+ sal_Int32 aRightMargin = -1;
+ xPropSet->getPropertyValue("RightBorderDistance") >>= aRightMargin;
+ uno::Any aRightBorder = xPropSet->getPropertyValue("RightBorder");
+ table::BorderLine2 aRightBorderLine;
+ aRightBorder >>= aRightBorderLine;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect cell right padding",
+ 0.5 * aRightBorderLine.LineWidth, aRightMargin, 1);
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, TestPuzzleExport)
+{
+ loadAndReload("TestPuzzleExport.odt");
+ // See tdf#148342 for details
+ // Get the doc
+ uno::Reference<text::XTextDocument> xTextDoc(mxComponent, uno::UNO_QUERY_THROW);
+ auto pSwDoc = dynamic_cast<SwXTextDocument*>(xTextDoc.get());
+ CPPUNIT_ASSERT(pSwDoc);
+ // Create a metafile
+ auto pMeta = pSwDoc->GetDocShell()->GetPreviewMetaFile();
+ CPPUNIT_ASSERT(pMeta);
+ MetafileXmlDump aDumper;
+ auto pMetaXml = dumpAndParse(aDumper, *pMeta);
+ CPPUNIT_ASSERT(pMetaXml);
+ // After parsing check that node...
+ auto pXNode = getXPathNode(
+ pMetaXml, "/metafile/push/push/push/push[4]/push/push/polypolygon/polygon"_ostr);
+ CPPUNIT_ASSERT(pXNode);
+ auto pNode = pXNode->nodesetval->nodeTab[0];
+ CPPUNIT_ASSERT(pNode);
+ auto it = pNode->children;
+ int nCount = 0;
+ // .. and count the children
+ while (it != nullptr)
+ {
+ nCount++;
+ it = it->next;
+ }
+ // In case of puzzle there will be so many... Without the fix there was a rectangle with 4 points.
+ CPPUNIT_ASSERT_GREATER(300, nCount);
+}
+
+// tdf#106742 for DOCX with compatibility level <= 14 (MS Word up to and incl. ver.2010), we should use cell margins when calculating table left border position
+DECLARE_OOXMLEXPORT_TEST(testTablePosition14, "table-position-14.docx")
+{
+ sal_Int32 const aXCoordsFromOffice[] = { 2500, -1000, 0, 0 };
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+
+ for (int i = 0; i < 4; i++)
+ {
+ uno::Reference<text::XTextTable> xTable1(xTables->getByIndex(i), uno::UNO_QUERY);
+
+ // Verify X coord
+ uno::Reference<view::XSelectionSupplier> xCtrl(xModel->getCurrentController(),
+ uno::UNO_QUERY);
+ xCtrl->select(uno::Any(xTable1));
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xCtrl,
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursor> xCursor = xTextViewCursorSupplier->getViewCursor();
+ awt::Point pos = xCursor->getPosition();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect X coord computed from docx",
+ aXCoordsFromOffice[i], pos.X, 1);
+ }
+}
+
+// tdf#106742 for DOCX with compatibility level > 14 (MS Word since ver.2013),
+// we should NOT use cell margins when calculating table left border position. But we do need to use border width.
+DECLARE_OOXMLEXPORT_TEST(testTablePosition15, "table-position-15.docx")
+{
+ sal_Int32 const aXCoordsFromOffice[] = { 2751, -899, 1, 212 };
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+
+ for (int i = 0; i < 4; i++)
+ {
+ uno::Reference<text::XTextTable> xTable1(xTables->getByIndex(i), uno::UNO_QUERY);
+
+ // Verify X coord
+ uno::Reference<view::XSelectionSupplier> xCtrl(xModel->getCurrentController(),
+ uno::UNO_QUERY);
+ xCtrl->select(uno::Any(xTable1));
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xCtrl,
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursor> xCursor = xTextViewCursorSupplier->getViewCursor();
+ awt::Point pos = xCursor->getPosition();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect X coord computed from docx",
+ aXCoordsFromOffice[i], pos.X, 1);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf107359, "tdf107359-char-pitch.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+
+ bool bGridSnapToChars;
+ xPropertySet->getPropertyValue("GridSnapToChars") >>= bGridSnapToChars;
+ CPPUNIT_ASSERT_EQUAL(false, bGridSnapToChars);
+
+ sal_Int32 nRubyHeight;
+ xPropertySet->getPropertyValue("GridRubyHeight") >>= nRubyHeight;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nRubyHeight);
+
+ sal_Int32 nBaseHeight;
+ xPropertySet->getPropertyValue("GridBaseHeight") >>= nBaseHeight;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(18 * 20)), nBaseHeight);
+
+ sal_Int32 nBaseWidth;
+ xPropertySet->getPropertyValue("GridBaseWidth") >>= nBaseWidth;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(24 * 20)), nBaseWidth);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf77236_MissingSolidFill)
+{
+ loadAndSave("tdf77236_MissingSolidFill.docx");
+ // tdf#77236: solidFill of VML shape was not exported if the colors of line and style were the same
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(
+ pXmlDoc,
+ "//mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill"_ostr,
+ 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf105875_VmlShapeRotationWithFlip,
+ "tdf105875_VmlShapeRotationWithFlip.docx")
+{
+ // tdf#105875: check whether the rotation of the VML bezier shape is ok (with flip too)
+ // TODO: fix export too
+ if (isExported())
+ return;
+
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ xPropertySet->getPropertyValue("RotateAngle").get<sal_Int32>());
+ }
+
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(2), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(220 * 100),
+ xPropertySet->getPropertyValue("RotateAngle").get<sal_Int32>(),
+ 1);
+ }
+
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(3), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(320 * 100),
+ xPropertySet->getPropertyValue("RotateAngle").get<sal_Int32>(),
+ 1);
+ }
+
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(4), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(140 * 100),
+ xPropertySet->getPropertyValue("RotateAngle").get<sal_Int32>(),
+ 1);
+ }
+
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(5), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(
+ sal_Int32(40 * 100), xPropertySet->getPropertyValue("RotateAngle").get<sal_Int32>(), 1);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133363)
+{
+ loadAndSave("tdf133363.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // tdf#133363: remove extra auto space between first and second list elements
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[2]/w:pPr/w:spacing"_ostr,
+ "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[3]/w:pPr/w:spacing"_ostr,
+ "after"_ostr, "0");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf138093, "tdf138093.docx")
+{
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:sdt"_ostr, 3);
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("B1");
+ uno::Reference<container::XEnumerationAccess> xParagraphsAccess(xCell, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParagraphs
+ = xParagraphsAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphs->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
+ uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
+
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+ uno::Reference<container::XEnumerationAccess> xContentControlEnumAccess(xContentControl,
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentControlEnum
+ = xContentControlEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xTextPortionRange(xContentControlEnum->nextElement(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2017"), xTextPortionRange->getString());
+ }
+ else
+ {
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
+
+ ::sw::mark::IDateFieldmark* pFieldmark
+ = dynamic_cast<::sw::mark::IDateFieldmark*>(*pMarkAccess->getAllMarksBegin());
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(ODF_FORMDATE, pFieldmark->GetFieldname());
+ CPPUNIT_ASSERT_EQUAL(OUString("2017"), pFieldmark->GetContent());
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf131722, "tdf131722.docx")
+{
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:sdt"_ostr, 4);
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ uno::Reference<container::XEnumerationAccess> xParagraphsAccess(xCell, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParagraphs
+ = xParagraphsAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphs->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
+ uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
+
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+ uno::Reference<container::XEnumerationAccess> xContentControlEnumAccess(xContentControl,
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentControlEnum
+ = xContentControlEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xTextPortionRange(xContentControlEnum->nextElement(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Enter a date here!"), xTextPortionRange->getString());
+ }
+ else
+ {
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getFieldmarksCount());
+
+ for (auto aIter = pMarkAccess->getFieldmarksBegin();
+ aIter != pMarkAccess->getFieldmarksEnd(); ++aIter)
+ {
+ ::sw::mark::IDateFieldmark* pFieldmark
+ = dynamic_cast<::sw::mark::IDateFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(ODF_FORMDATE, pFieldmark->GetFieldname());
+ CPPUNIT_ASSERT_EQUAL(OUString("Enter a date here!"), pFieldmark->GetContent());
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf155945)
+{
+ createSwDoc("tdf155945.docx");
+
+ CPPUNIT_ASSERT_EQUAL(3, getParagraphs());
+ // Without a fix in place, this would fail with
+ // - Expected: 0
+ // - Actual : 423
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133560)
+{
+ createSwDoc("lastEmptyLineWithDirectFormatting.docx");
+
+ CPPUNIT_ASSERT_EQUAL(4, getParagraphs());
+ // Without a fix in place, this would fail with
+ // - Expected: 12
+ // - Actual : 48
+ CPPUNIT_ASSERT_EQUAL(12.0f, getProperty<float>(getParagraph(4), "CharHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf150408_isLvl_RoundTrip)
+{
+ loadAndSave("listWithLgl.docx");
+
+ // Second level's numbering should use Arabic numbers for first level reference
+ auto xPara = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("CH I"), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara = getParagraph(2);
+ CPPUNIT_ASSERT_EQUAL(OUString("Sect 1.01"), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara = getParagraph(3);
+ CPPUNIT_ASSERT_EQUAL(OUString("CH II"), getProperty<OUString>(xPara, "ListLabelString"));
+ xPara = getParagraph(4);
+ CPPUNIT_ASSERT_EQUAL(OUString("Sect 2.01"), getProperty<OUString>(xPara, "ListLabelString"));
+
+ xmlDocUniquePtr pXml = parseExport("word/numbering.xml");
+ assertXPath(pXml, "/w:numbering/w:abstractNum"_ostr); // Only one list
+ // The second list level must keep the isLgl element
+ assertXPath(pXml, "/w:numbering/w:abstractNum/w:lvl[2]/w:isLgl"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf156372, "tdf156372.doc")
+{
+ sal_Int32 nHeight
+ = parseDump("//page[1]/header/tab/row[1]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ // Without a fix in place, this would fail with
+ // - Expected: 847
+ // - Actual : 1327
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(847), nHeight, 5);
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf156548)
+{
+ // Given a document using two bookmarks with similar names longer than 40 characters
+ loadAndReload("longBookmarkName.fodt");
+
+ // After the export, the names must be no longer than 40 characters; they must be unique;
+ // and the hyperlinks must use the same names, to still point to the correct targets:
+
+ {
+ // 1st paragraph - hyperlink to 4th paragraph
+ auto sURL = getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL");
+ CPPUNIT_ASSERT_EQUAL(OUString("#A_bookmark_name_longer_than_forty_charac"), sURL);
+ // 4th paragraph - a bookmark
+ auto xBookmark = getProperty<uno::Reference<container::XNamed>>(getRun(getParagraph(4), 1),
+ "Bookmark");
+ CPPUNIT_ASSERT_EQUAL(OUString("A_bookmark_name_longer_than_forty_charac"),
+ xBookmark->getName());
+ }
+
+ {
+ // 2nd paragraph - hyperlink to 5th paragraph
+ auto sURL = getProperty<OUString>(getRun(getParagraph(2), 1), "HyperLinkURL");
+ CPPUNIT_ASSERT_EQUAL(OUString("#A_bookmark_name_longer_than_forty_chara1"), sURL);
+ // 5th paragraph - a bookmark
+ auto xBookmark = getProperty<uno::Reference<container::XNamed>>(getRun(getParagraph(5), 1),
+ "Bookmark");
+ CPPUNIT_ASSERT_EQUAL(OUString("A_bookmark_name_longer_than_forty_chara1"),
+ xBookmark->getName());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf157136)
+{
+ // Given a document with two content controls - one block, one inline
+ createSwDoc("tdf157136_TwoContentControls.docx");
+
+ // Both of them must import with the correct character style
+
+ {
+ // 1st paragraph - block content control
+ auto xRun = getRun(getParagraph(1), 1);
+ auto xContentControl
+ = getProperty<css::uno::Reference<css::text::XTextRange>>(xRun, "ContentControl");
+ CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text."),
+ xContentControl->getString());
+ // Without the fix in place, this would fail with
+ // - Expected: Placeholder Text
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"),
+ getProperty<OUString>(xRun, "CharStyleName"));
+ }
+
+ {
+ // 2nd paragraph - inline content control
+ auto xRun = getRun(getParagraph(2), 1);
+ auto xContentControl
+ = getProperty<css::uno::Reference<css::text::XTextRange>>(xRun, "ContentControl");
+ CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text."),
+ xContentControl->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"),
+ getProperty<OUString>(xRun, "CharStyleName"));
+ }
+
+ // Test the same after round-trip
+ saveAndReload("Office Open XML Text");
+
+ {
+ // 1st paragraph - becomes inline content control after roundtrip
+ auto xRun = getRun(getParagraph(1), 1);
+ auto xContentControl
+ = getProperty<css::uno::Reference<css::text::XTextRange>>(xRun, "ContentControl");
+ CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text."),
+ xContentControl->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"),
+ getProperty<OUString>(xRun, "CharStyleName"));
+ }
+
+ {
+ // 2nd paragraph - inline content control
+ auto xRun = getRun(getParagraph(2), 1);
+ auto xContentControl
+ = getProperty<css::uno::Reference<css::text::XTextRange>>(xRun, "ContentControl");
+ CPPUNIT_ASSERT_EQUAL(OUString("Click or tap here to enter text."),
+ xContentControl->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Placeholder Text"),
+ getProperty<OUString>(xRun, "CharStyleName"));
+ }
+}
+
+//Tests for support of fallback for ECMA-376 1st ed to merge the title value with descr attribute
+CPPUNIT_TEST_FIXTURE(Test, testTdf148952_2007)
+{
+ //Given a document with 1 image (with name, alt title and description field populated) in odt format
+ createSwDoc("tdf148952.odt");
+
+ OUString rFilterName = "MS Word 2007 XML";
+
+ //Export it to MS word 2007(.docx) format
+ saveAndReload(rFilterName);
+
+ // Checks the number of images in the docx file
+ const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 1, getShapes());
+
+ uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
+
+ // Check if alt title value is appended to description
+ OUString descr;
+ xImage->getPropertyValue("Description") >>= descr;
+ CPPUNIT_ASSERT_EQUAL(OUString("Black\nShapes"), descr);
+
+ // Check if alt title field is empty
+ OUString title;
+ xImage->getPropertyValue("Title") >>= title;
+ CPPUNIT_ASSERT_EQUAL(OUString(""), title);
+}
+
+//Tests for support of title attribute for ECMA-376 2nd ed and above
+CPPUNIT_TEST_FIXTURE(Test, testTdf148952_2010)
+{
+ //Given a document with 1 image (with name, alt title and description field populated) in odt format
+ createSwDoc("tdf148952.odt");
+
+ OUString rFilterName = "Office Open XML Text";
+
+ //Export it to MS word 2010-365 (.docx) format
+ saveAndReload(rFilterName);
+
+ // Checks the number of images in the docx file
+ const OString sFailedMessage = OString::Concat("Failed on filter: ") + rFilterName.toUtf8();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 1, getShapes());
+
+ uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
+
+ // Check if description field contains same value after export
+ OUString descr;
+ xImage->getPropertyValue("Description") >>= descr;
+ CPPUNIT_ASSERT_EQUAL(OUString("Shapes"), descr);
+
+ // Check if alt title field contains same value after export
+ OUString title;
+ xImage->getPropertyValue("Title") >>= title;
+ CPPUNIT_ASSERT_EQUAL(OUString("Black"), title);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
new file mode 100644
index 0000000000..6e27f9a6a1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -0,0 +1,1153 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <tools/UnitConversion.hxx>
+
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/awt/Gradient2.hpp>
+#include <com/sun/star/style/TabStop.hpp>
+#include <com/sun/star/view/XViewSettingsSupplier.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <basegfx/utils/gradienttools.hxx>
+#include <docmodel/uno/UnoGradientTools.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testPageGraphicBackground)
+{
+ loadAndReload("page-graphic-background.odt");
+ validate(maTempFile.GetFileName(), test::OOXML);
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // No idea how the graphic background should be exported (seems there is no
+ // way to do a non-tiling export to OOXML), but at least the background
+ // color shouldn't be black.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xPageStyle, "BackColor"));
+}
+
+
+CPPUNIT_TEST_FIXTURE(Test, testCustomProperties)
+{
+ loadAndSave("custom-properties.docx");
+ // tdf#133377 tdf#103987 FILESAVE XLSX: Make sure the custom/core/application
+ // file properties are stored correctly after roundtrip to .docx
+
+ // Extended file properties - specific to Office package,
+ // eg. docx - Number of Pages, pptx - Number of Slides
+ xmlDocUniquePtr pXmlDoc = parseExport("docProps/app.xml");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Paragraphs"_ostr, "1");
+ //assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Lines", "1");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Pages"_ostr, "1");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Words"_ostr, "3");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Characters"_ostr, "22");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:CharactersWithSpaces"_ostr, "24");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Company"_ostr, "hhhhkompany");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Manager"_ostr, "ffffmenadzer;iiiiisecondmanager");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:HyperlinkBase"_ostr, "gggghiperlink");
+ //assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:DocSecurity", "2");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:AppVersion"_ostr, "15.0000");
+
+ // Custom file properties - defined by user
+ xmlDocUniquePtr pCustomXml = parseExport("docProps/custom.xml");
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property"_ostr, 9);
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[1]"_ostr,
+ "name"_ostr, "testDateProperty");
+ assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[1]/vt:filetime"_ostr,
+ "1982-04-19T10:00:00Z");
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[3]"_ostr,
+ "name"_ostr, "testNegativeNumberProperty");
+ assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[3]/vt:r8"_ostr,
+ "-100");
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[4]"_ostr,
+ "name"_ostr, "testNumberProperty");
+ //assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[4]/vt:i4",
+ // "256");
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[5]"_ostr,
+ "name"_ostr, "testRealNumberProperty");
+ assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[5]/vt:r8"_ostr,
+ "-128.1");
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[6]"_ostr,
+ "name"_ostr, "testScientificNumber");
+ assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[6]/vt:r8"_ostr,
+ "1.23456789E+023");
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[7]"_ostr,
+ "name"_ostr, "testTextProperty");
+ assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[7]/vt:lpwstr"_ostr,
+ "testPropertyValue");
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[8]"_ostr,
+ "name"_ostr, "testYesNoProperty");
+ assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[8]/vt:bool"_ostr,
+ "1");
+ // Hidden Custom File Property. With Final set, MS Office notifies recipients that the document is final, and sets the document to read-only.
+ assertXPath(pCustomXml, "/custom-properties:Properties/custom-properties:property[9]"_ostr,
+ "name"_ostr, "_MarkAsFinal");
+ assertXPathContent(pCustomXml, "/custom-properties:Properties/custom-properties:property[9]/vt:bool"_ostr,
+ "1");
+
+ // Core file properties - common for all packages (eg. creation date, modify date)
+ pXmlDoc = parseExport("docProps/core.xml");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/dc:creator"_ostr, "Bartosz Kosiorek;secondauthor");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/dc:description"_ostr, "cccckomentarzglowny");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/cp:lastPrinted"_ostr, "2020-10-15T07:42:00Z");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/dcterms:created"_ostr, "2020-10-14T16:23:00Z");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/cp:category"_ostr, "eeeetokategoria");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/cp:version"_ostr, "xxxxversion");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/cp:contentStatus"_ostr, "ddddstatusnieznany");
+ assertXPathContent(pXmlDoc, "/cp:coreProperties/dc:identifier"_ostr, "zzzzidentifier");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testUTF8CustomProperties, "tdf127864.docx")
+{
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(
+ mxComponent, uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xDocumentProperties
+ = xDocumentPropertiesSupplier->getDocumentProperties();
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ xDocumentProperties->getUserDefinedProperties(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(u"первый"_ustr, getProperty<OUString>(xPropertySet, u"первый"_ustr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testKeywords, "tdf143175.docx")
+{
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(
+ mxComponent, uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xDocumentProperties
+ = xDocumentPropertiesSupplier->getDocumentProperties();
+ uno::Sequence<OUString> aKeywords(xDocumentProperties->getKeywords());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aKeywords.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("One"), aKeywords[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("Two"), aKeywords[1]);
+ CPPUNIT_ASSERT_EQUAL(OUString("Three"), aKeywords[2]);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testZoom, "zoom.docx")
+{
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XViewSettingsSupplier> xViewSettingsSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xViewSettingsSupplier->getViewSettings());
+ sal_Int16 nValue = 0;
+ xPropertySet->getPropertyValue("ZoomValue") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(42), nValue);
+
+ // Validation test: order of elements were wrong.
+ if (!isExported())
+ return;
+ validate(maTempFile.GetFileName(), test::OOXML);
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ // Order was: rsid, next.
+ int nNext = getXPathPosition(pXmlDoc, "/w:styles/w:style[3]"_ostr, "next");
+ int nRsid = getXPathPosition(pXmlDoc, "/w:styles/w:style[3]"_ostr, "rsid");
+ CPPUNIT_ASSERT(nNext < nRsid);
+
+ pXmlDoc = parseExport("docProps/app.xml");
+ // One paragraph in the document.
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Paragraphs"_ostr, "1");
+ assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:Company"_ostr, "Example Ltd");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, defaultTabStopNotInStyles)
+{
+ loadAndReload("empty.odt");
+ validate(maTempFile.GetFileName(), test::OOXML);
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+// The default tab stop was mistakenly exported to a style.
+// xray ThisComponent.StyleFamilies(1)(0).ParaTabStop
+ uno::Reference< container::XNameAccess > paragraphStyles = getStyles( "ParagraphStyles" );
+ uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence< style::TabStop > >(
+ paragraphStyles->getByName( "Standard" ), "ParaTabStops" );
+// There actually be one tab stop, but it will be the default.
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(1), stops.getLength());
+ CPPUNIT_ASSERT_EQUAL( style::TabAlign_DEFAULT, stops[ 0 ].Alignment );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo38244, "fdo38244.docx")
+{
+ /*
+ * Comments attached to a range was imported without the range, check for the annotation mark start/end positions.
+ *
+ * oParas = ThisComponent.Text.createEnumeration
+ * oPara = oParas.nextElement
+ * oRuns = oPara.createEnumeration
+ * oRun = oRuns.nextElement
+ * oRun = oRuns.nextElement 'Annotation
+ * oRun = oRuns.nextElement
+ * oRun = oRuns.nextElement 'AnnotationEnd
+ * xray oRun.TextPortionType
+ */
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+ xRunEnum->nextElement();
+ uno::Reference<beans::XPropertySet> xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Annotation"), getProperty<OUString>(xPropertySet, "TextPortionType"));
+ xRunEnum->nextElement();
+ xPropertySet.set(xRunEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("AnnotationEnd"), getProperty<OUString>(xPropertySet, "TextPortionType"));
+
+ /*
+ * Initials were not imported.
+ *
+ * oFields = ThisComponent.TextFields.createEnumeration
+ * oField = oFields.nextElement
+ * xray oField.Initials
+ */
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("M"), getProperty<OUString>(xPropertySet, "Initials"));
+
+ /*
+ * There was a fake empty paragraph at the end of the comment text.
+ *
+ * oFields = ThisComponent.TextFields.createEnumeration
+ * oField = oFields.nextElement
+ * oParas = oField.TextRange.createEnumeration
+ * oPara = oParas.nextElement
+ * oPara = oParas.nextElement
+ */
+
+ xParaEnumAccess = getProperty< uno::Reference<container::XEnumerationAccess> >(xPropertySet, "TextRange");
+ xParaEnum = xParaEnumAccess->createEnumeration();
+ xParaEnum->nextElement();
+ CPPUNIT_ASSERT(!xParaEnum->hasMoreElements());
+
+ if (isExported())
+ validate(maTempFile.GetFileName(), test::OOXML);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCommentsNested)
+{
+ loadAndReload("comments-nested.odt");
+ validate(maTempFile.GetFileName(), test::OOXML);
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<beans::XPropertySet> xOuter = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 2), "TextField");
+ CPPUNIT_ASSERT_EQUAL(OUString("Outer"), getProperty<OUString>(xOuter, "Content"));
+
+ uno::Reference<beans::XPropertySet> xInner = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 4), "TextField");
+ CPPUNIT_ASSERT_EQUAL(OUString("Inner"), getProperty<OUString>(xInner, "Content"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testMathEscape)
+{
+ loadAndReload("math-escape.docx");
+ CPPUNIT_ASSERT_EQUAL(OUString("\\{ left [ right ] left ( right ) \\}"), getFormula(getRun(getParagraph(1), 1)));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo51034)
+{
+ loadAndReload("fdo51034.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The problem was that the 'l' param of the HYPERLINK field was parsed with = "#", not += "#".
+ CPPUNIT_ASSERT_EQUAL(OUString("http://Www.google.com/#a"), getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
+}
+
+// Remove all spaces, as LO export/import may change that.
+// Replace symbol - (i.e. U+2212) with ASCII - , LO does this change and it shouldn't matter.
+static void CHECK_FORMULA(OUString const & expected, OUString const & actual) {
+ CPPUNIT_ASSERT_EQUAL(
+ expected.replaceAll( " ", "" ).replaceAll( u"\u2212", "-" ),
+ actual.replaceAll( " ", "" ).replaceAll( u"\u2212", "-" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathAccents, "math-accents.docx")
+{
+ CHECK_FORMULA(
+ "acute {a} grave {a} check {a} breve {a} circle {a} widevec {a} widetilde {a}"
+ " widehat {a} dot {a} widevec {a} widevec {a} widetilde {a} underline {a}",
+ getFormula( getRun( getParagraph( 1 ), 1 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathD, "math-d.docx")
+{
+ CHECK_FORMULA( "left (x mline y mline z right )", getFormula( getRun( getParagraph( 1 ), 1 )));
+ CHECK_FORMULA( "left (1 right )", getFormula( getRun( getParagraph( 1 ), 2 )));
+ CHECK_FORMULA( "left [2 right ]", getFormula( getRun( getParagraph( 1 ), 3 )));
+ CHECK_FORMULA( "left ldbracket 3 right rdbracket", getFormula( getRun( getParagraph( 1 ), 4 )));
+ CHECK_FORMULA( "left lline 4 right rline", getFormula( getRun( getParagraph( 1 ), 5 )));
+ CHECK_FORMULA( "left ldline 5 right rdline", getFormula( getRun( getParagraph( 1 ), 6 )));
+ CHECK_FORMULA( "left langle 6 right rangle", getFormula( getRun( getParagraph( 1 ), 7 )));
+ CHECK_FORMULA( "left langle a mline b right rangle", getFormula( getRun( getParagraph( 1 ), 8 )));
+ CHECK_FORMULA( "left ({x} over {y} right )", getFormula( getRun( getParagraph( 1 ), 9 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathEscaping, "math-escaping.docx")
+{
+ CHECK_FORMULA( u"\u2212 \u221E < x < \u221E"_ustr, getFormula( getRun( getParagraph( 1 ), 1 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathLim, "math-lim.docx")
+{
+ CHECK_FORMULA( u"lim from {x \u2192 1} {x}"_ustr, getFormula( getRun( getParagraph( 1 ), 1 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathMatrix, "math-matrix.docx")
+{
+ CHECK_FORMULA( "left [matrix {1 # 2 ## 3 # 4} right ]", getFormula( getRun( getParagraph( 1 ), 1 )));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testMathMso2k7)
+{
+ loadAndReload("math-mso2k7.docx");
+ CHECK_FORMULA( u"A = \u03C0 {r} ^ {2}"_ustr, getFormula( getRun( getParagraph( 1 ), 1 )));
+// TODO check the stack/binom difference
+// CHECK_FORMULA( "{left (x+a right )} ^ {n} = sum from {k=0} to {n} {left (binom {n} {k} right ) {x} ^ {k} {a} ^ {n-k}}",
+ CHECK_FORMULA( "{left (x+a right )} ^ {n} = sum from {k=0} to {n} {left (stack {n # k} right ) {x} ^ {k} {a} ^ {n-k}}",
+ getFormula( getRun( getParagraph( 2 ), 1 )));
+ CHECK_FORMULA( u"{left (1+x right )} ^ {n} =1+ {nx} over {1!} + {n left (n-1 right ) {x} ^ {2}} over {2!} +\u2026"_ustr,
+ getFormula( getRun( getParagraph( 3 ), 1 )));
+// TODO check (cos/sin miss {})
+// CHECK_FORMULA( "f left (x right ) = {a} rsub {0} + sum from {n=1} to {\xe2\x88\x9e} {left ({a} rsub {n} cos {{n\xcf\x80x} over {L}} + {b} rsub {n} sin {{n\xcf\x80x} over {L}} right )}",
+ CHECK_FORMULA( u"f left (x right ) = {a} rsub {0} + sum from {n=1} to {\u221E} {left ({a} rsub {n} cos {n\u03C0x} over {L} + {b} rsub {n} sin {n\u03C0x} over {L} right )}"_ustr,
+ getFormula( getRun( getParagraph( 4 ), 1 )));
+ CHECK_FORMULA( "{a} ^ {2} + {b} ^ {2} = {c} ^ {2}", getFormula( getRun( getParagraph( 5 ), 1 )));
+ CHECK_FORMULA( u"x = {- b \u00B1 sqrt {{b} ^ {2} -4 ac}} over {2 a}"_ustr,
+ getFormula( getRun( getParagraph( 6 ), 1 )));
+ CHECK_FORMULA(
+ u"{e} ^ {x} =1+ {x} over {1!} + {{x} ^ {2}} over {2!} + {{x} ^ {3}} over {3!} +\u2026, -\u221E<x<\u221E"_ustr,
+ getFormula( getRun( getParagraph( 7 ), 1 )));
+ CHECK_FORMULA(
+// "sin {\xce\xb1} \xc2\xb1 sin {\xce\xb2} =2 sin {{1} over {2} left (\xce\xb1\xc2\xb1\xce\xb2 right )} cos {{1} over {2} left (\xce\xb1\xe2\x88\x93\xce\xb2 right )}",
+// TODO check (cos/in miss {})
+ u"sin \u03B1 \u00B1 sin \u03B2 =2 sin {1} over {2} left (\u03B1\u00B1\u03B2 right ) cos {1} over {2} left (\u03B1\u2213\u03B2 right )"_ustr,
+ getFormula( getRun( getParagraph( 8 ), 1 )));
+ CHECK_FORMULA(
+// "cos {\xce\xb1} + cos {\xce\xb2} =2 cos {{1} over {2} left (\xce\xb1+\xce\xb2 right )} cos {{1} over {2} left (\xce\xb1-\xce\xb2 right )}",
+// TODO check (cos/sin miss {})
+ u"cos \u03B1 + cos \u03B2 =2 cos {1} over {2} left (\u03B1+\u03B2 right ) cos {1} over {2} left (\u03B1-\u03B2 right )"_ustr,
+ getFormula( getRun( getParagraph( 9 ), 1 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathNary, "math-nary.docx")
+{
+ CHECK_FORMULA( "lllint from {1} to {2} {x + 1}", getFormula( getRun( getParagraph( 1 ), 1 )));
+ CHECK_FORMULA( "prod from {a} {b}", getFormula( getRun( getParagraph( 1 ), 2 )));
+ CHECK_FORMULA( "sum to {2} {x}", getFormula( getRun( getParagraph( 1 ), 3 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathOverbraceUnderbrace, "math-overbrace_underbrace.docx")
+{
+ CHECK_FORMULA( "{abcd} overbrace {4}", getFormula( getRun( getParagraph( 1 ), 1 )));
+ CHECK_FORMULA( "{xyz} underbrace {3}", getFormula( getRun( getParagraph( 2 ), 1 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathOverstrike, "math-overstrike.docx")
+{
+ CHECK_FORMULA( "overstrike {abc}", getFormula( getRun( getParagraph( 1 ), 1 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathPlaceholders, "math-placeholders.docx")
+{
+ CHECK_FORMULA( "sum from <?> to <?> <?>", getFormula( getRun( getParagraph( 1 ), 1 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathRad, "math-rad.docx")
+{
+ CHECK_FORMULA( "sqrt {4}", getFormula( getRun( getParagraph( 1 ), 1 )));
+ CHECK_FORMULA( "nroot {3} {x + 1}", getFormula( getRun( getParagraph( 1 ), 2 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathSubscripts, "math-subscripts.docx")
+{
+ CHECK_FORMULA( "{x} ^ {y} + {e} ^ {x}", getFormula( getRun( getParagraph( 1 ), 1 )));
+ CHECK_FORMULA( "{x} ^ {b}", getFormula( getRun( getParagraph( 1 ), 2 )));
+ CHECK_FORMULA( "{x} rsub {b}", getFormula( getRun( getParagraph( 1 ), 3 )));
+ CHECK_FORMULA( "{a} rsub {c} rsup {b}", getFormula( getRun( getParagraph( 1 ), 4 )));
+ CHECK_FORMULA( "{x} lsub {2} lsup {1}", getFormula( getRun( getParagraph( 1 ), 5 )));
+ CHECK_FORMULA( "{{x csup {6} csub {3}} lsub {4} lsup {5}} rsub {2} rsup {1}",
+ getFormula( getRun( getParagraph( 1 ), 6 )));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathVerticalStacks, "math-vertical_stacks.docx")
+{
+ CHECK_FORMULA( "{a} over {b}", getFormula( getRun( getParagraph( 1 ), 1 )));
+ CHECK_FORMULA( "{a} / {b}", getFormula( getRun( getParagraph( 2 ), 1 )));
+// TODO check these
+// CHECK_FORMULA( "binom {a} {b}", getFormula( getRun( getParagraph( 3 ), 1 )));
+// CHECK_FORMULA( "binom {a} {binom {b} {c}}", getFormula( getRun( getParagraph( 4 ), 1 )));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTable)
+{
+ loadAndReload("table.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Make sure we write qFormat for well-known style names.
+ xmlDocUniquePtr pXmlDocCT = parseExport("word/styles.xml");
+ CPPUNIT_ASSERT(pXmlDocCT);
+ assertXPath(pXmlDocCT, "//w:style[@w:styleId='Normal']/w:qFormat"_ostr, 1);
+}
+
+namespace {
+
+struct SingleLineBorders {
+ sal_Int16 top, bottom, left, right;
+ SingleLineBorders(int t=0, int b=0, int l=0, int r=0)
+ : top(t), bottom(b), left(l), right(r) {}
+ sal_Int16 getBorder(int i) const
+ {
+ switch (i) {
+ case 0: return top;
+ case 1: return bottom;
+ case 2: return left;
+ case 3: return right;
+ default: assert(false); return 0;
+ }
+ }
+};
+
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableBorders, "table-borders.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ uno::Reference<text::XTextTable> xTextTable (xTables->getByIndex(0), uno::UNO_QUERY);
+
+ std::map<OUString, SingleLineBorders> cellBorders;
+ cellBorders[OUString("A1")] = SingleLineBorders(106, 106, 106, 106);
+ cellBorders[OUString("B1")] = SingleLineBorders(106, 0, 106, 35);
+ cellBorders[OUString("C1")] = SingleLineBorders(106, 106, 35, 106);
+ cellBorders[OUString("A2")] = SingleLineBorders(106, 35, 106, 0);
+ cellBorders[OUString("B2")] = SingleLineBorders(0, 0, 0, 0);
+ cellBorders[OUString("C2")] = SingleLineBorders(106, 106, 0, 106);
+ cellBorders[OUString("A3")] = SingleLineBorders(35, 35, 106, 106);
+ cellBorders[OUString("B3")] = SingleLineBorders(0, 106, 106, 106);
+ cellBorders[OUString("C3")] = SingleLineBorders(106, 106, 106, 106);
+ cellBorders[OUString("A4")] = SingleLineBorders(35, 106, 106, 35);
+ cellBorders[OUString("B4")] = SingleLineBorders(106, 106, 35, 106);
+ cellBorders[OUString("C4")] = SingleLineBorders(106, 106, 106, 106);
+
+ const OUString borderNames[] = {
+ OUString("TopBorder"),
+ OUString("BottomBorder"),
+ OUString("LeftBorder"),
+ OUString("RightBorder"),
+ };
+
+ uno::Sequence<OUString> const cells = xTextTable->getCellNames();
+ sal_Int32 nLength = cells.getLength();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(cellBorders.size()), nLength);
+
+ for (sal_Int32 i = 0; i < nLength; ++i)
+ {
+ uno::Reference<table::XCell> xCell = xTextTable->getCellByName(cells[i]);
+ uno::Reference< beans::XPropertySet > xPropSet(xCell, uno::UNO_QUERY_THROW);
+ const SingleLineBorders& borders = cellBorders[cells[i]];
+
+ for (sal_Int32 j = 0; j < 4; ++j)
+ {
+ uno::Any aBorder = xPropSet->getPropertyValue(borderNames[j]);
+ table::BorderLine aBorderLine;
+ if (aBorder >>= aBorderLine)
+ {
+ std::stringstream message;
+ message << cells[i] << "'s " << borderNames[j] << " is incorrect";
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(message.str(),
+ borders.getBorder(j), aBorderLine.OuterLineWidth);
+ }
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo51550)
+{
+ loadAndReload("fdo51550.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The problem was that we lacked the fallback to export the replacement
+ // graphic for OLE objects. But we can actually export the OLE itself now,
+ // so check that instead.
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xEmbeddedObjects->getCount());
+
+ xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+
+ if (!pXmlDocCT)
+ return; // initial import
+
+ assertXPath(pXmlDocCT, "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.xlsx']"_ostr, "ContentType"_ostr, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xlsx']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent,
+ "/w:document/w:body/w:p/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr,
+ "Excel.Sheet.12");
+}
+
+DECLARE_OOXMLEXPORT_TEST(test1Table1Page, "1-table-1-page.docx")
+{
+ // 2 problem for this document after export:
+ // - invalid sectPr inserted at the beginning of the page
+ // - font of empty cell is not preserved, leading to change in rows height
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTextFrames)
+{
+ loadAndReload("textframes.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The frames were simply missing, so let's check if all 3 frames were imported back.
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextFrameBorders, "textframe-borders.docx")
+{
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ if (xIndexAccess->getCount())
+ {
+ // After import, a TextFrame is created by the VML import.
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xD99594), getProperty<Color>(xFrame, "BackColor"));
+
+ table::BorderLine2 aBorder = getProperty<table::BorderLine2>(xFrame, "TopBorder");
+ CPPUNIT_ASSERT_EQUAL(Color(0xC0504D), Color(ColorTransparency, aBorder.Color));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(35), aBorder.LineWidth);
+
+ table::ShadowFormat aShadowFormat = getProperty<table::ShadowFormat>(xFrame, "ShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadowFormat.Location);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(48), aShadowFormat.ShadowWidth);
+ CPPUNIT_ASSERT_EQUAL(Color(0x622423), Color(ColorTransparency, aShadowFormat.Color));
+ }
+ else
+ {
+ // After export and import, the result is a shape.
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xD99594), getProperty<Color>(xShape, "FillColor"));
+
+ CPPUNIT_ASSERT_EQUAL(Color(0xC0504D), getProperty<Color>(xShape, "LineColor"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(35), getProperty<sal_Int32>(xShape, "LineWidth"));
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(48), getProperty<sal_Int32>(xShape, "ShadowXDistance"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(48), getProperty<sal_Int32>(xShape, "ShadowYDistance"));
+ CPPUNIT_ASSERT_EQUAL(Color(0x622423), getProperty<Color>(xShape, "ShadowColor"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
+ awt::Gradient2 aGradient(getProperty<awt::Gradient2>(xFrame, "FillGradient"));
+
+ // MCGR: Use the completely imported transparency gradient to check for correctness
+ basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aGradient.ColorStops);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size());
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0));
+ CPPUNIT_ASSERT_EQUAL(Color(0xd99594), Color(aColorStops[0].getStopColor()));
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.5));
+ CPPUNIT_ASSERT_EQUAL(Color(0xc0504d), Color(aColorStops[1].getStopColor()));
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[2].getStopOffset(), 1.0));
+ CPPUNIT_ASSERT_EQUAL(Color(0xd99594), Color(aColorStops[2].getStopColor()));
+ CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aGradient.Style);
+
+ xFrame.set(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
+ aGradient = getProperty<awt::Gradient2>(xFrame, "FillGradient");
+
+ // MCGR: Use the completely imported transparency gradient to check for correctness
+ aColorStops = model::gradient::getColorStopsFromUno(aGradient.ColorStops);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size());
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0));
+ CPPUNIT_ASSERT_EQUAL(Color(0x666666), Color(aColorStops[0].getStopColor()));
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.5));
+ CPPUNIT_ASSERT_EQUAL(Color(0x000000), Color(aColorStops[1].getStopColor()));
+ CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[2].getStopOffset(), 1.0));
+ CPPUNIT_ASSERT_EQUAL(Color(0x666666), Color(aColorStops[2].getStopColor()));
+ CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aGradient.Style);
+
+ // Left / right margin was incorrect: the attribute was missing and we
+ // didn't have the right default (had 0 instead of the below one).
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xFrame, "LeftMargin"), 2);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xFrame, "RightMargin"), 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCellBtlr)
+{
+ loadAndSave("cell-btlr.docx");
+ /*
+ * The problem was that the exporter didn't mirror the workaround of the
+ * importer, regarding the btLr text direction: the <w:textDirection
+ * w:val="btLr"/> token was completely missing in the output.
+ */
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:textDirection"_ostr, "val"_ostr, "btLr");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableStylerPrSz, "table-style-rPr-sz.docx")
+{
+ // Verify that font size inside the table is 20pt, despite the sz attribute in the table size.
+ // Also check that other rPr attribute are used: italic, bold, underline
+ // Office has the same behavior
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+// disabled temporarily, next commit enables it again
+#if 0
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(20.f, getProperty<float>(getRun(xPara, 1), "CharHeight"));
+#endif
+// CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::SINGLE, getProperty<short>(getRun(xPara, 1), "CharUnderline"));
+// CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(xPara, 1), "CharWeight"));
+// CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, getProperty<awt::FontSlant>(getRun(xPara, 1), "CharPosture"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMathLiteral, "math-literal.docx")
+{
+ CHECK_FORMULA( u"iiint from {V} to <?> {\"div\" \"F\"} dV= llint from {S} to <?> {\"F\" \u2219 \"n \" dS}"_ustr,
+ getFormula( getRun( getParagraph( 1 ), 1 )));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo48557)
+{
+ loadAndReload("fdo48557.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Inner margins of the textframe wasn't exported.
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TextLeftDistance"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TextRightDistance"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TextUpperDistance"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TextLowerDistance"));
+
+ //tdf#140967 frame border was too small. Expected 0 (hairline), actual was 2
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), getProperty<sal_uInt32>(xFrame, "LineWidth"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testI120928, "i120928.docx")
+{
+ // w:numPicBullet was ignored, leading to missing graphic bullet in numbering.
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+
+ uno::Reference<awt::XBitmap> xBitmap;
+ sal_Int16 nNumberingType = -1;
+
+ for (beans::PropertyValue const & rProp : std::as_const(aProps))
+ {
+ if (rProp.Name == "NumberingType")
+ nNumberingType = rProp.Value.get<sal_Int16>();
+ else if (rProp.Name == "GraphicBitmap")
+ xBitmap = rProp.Value.get<uno::Reference<awt::XBitmap>>();
+ }
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::BITMAP, nNumberingType);
+ CPPUNIT_ASSERT(xBitmap.is());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo64826, "fdo64826.docx")
+{
+ // 'Track-Changes' (Track Revisions) wasn't exported.
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(mxComponent, "RecordChanges"));
+ // 'Show-Changes' should not be exported - default is true.
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:revisionView"_ostr, 0);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPageBackground, "page-background.docx")
+{
+ // 'Document Background' wasn't exported.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getProperty<Color>(xPageStyle, "BackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo65265, "fdo65265.docx")
+{
+ // Redline (tracked changes) of text formatting were not exported
+ uno::Reference<text::XTextRange> xParagraph1 = getParagraph(1);
+ uno::Reference<text::XTextRange> xParagraph2 = getParagraph(2);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Format"), getProperty<OUString>(getRun(xParagraph1, 3), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Format"), getProperty<OUString>(getRun(xParagraph2, 2), "RedlineType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFDO63053, "fdo63053.docx")
+{
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
+ CPPUNIT_ASSERT_EQUAL(OUString("test1&test2"), xDocumentProperties->getTitle());
+ CPPUNIT_ASSERT_EQUAL(OUString("test1&test2"), xDocumentProperties->getSubject());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark.docx")
+{
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ // 1st problem: last character was missing
+ CPPUNIT_ASSERT_EQUAL(OUString("SAMPLE"), xShape->getString());
+
+ const uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry");
+ bool bFound = false;
+ for (beans::PropertyValue const & prop : aProps)
+ if (prop.Name == "TextPath")
+ bFound = true;
+ // 2nd problem: v:textpath wasn't imported
+ CPPUNIT_ASSERT_EQUAL(true, bFound);
+
+ // 3rd problem: rotation angle was 315, not 45.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(45 * 100), getProperty<sal_Int32>(xShape, "RotateAngle"));
+
+ // 4th problem: mso-position-vertical-relative:margin was ignored, VertOrientRelation was text::RelOrientation::FRAME.
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_PRINT_AREA, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
+
+ // These problems were in the exporter
+ // The textpath wasn't semi-transparent.
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty<sal_Int16>(xShape, "FillTransparence"));
+ // The textpath had a stroke.
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_NONE, getProperty<drawing::LineStyle>(xShape, "LineStyle"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWatermarkFont, "watermark-font.docx")
+{
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("TestFont"), xShape->getString());
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+ OUString aFont;
+ float nFontSize;
+
+ // Check font family
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("CharFontName") >>= aFont);
+ CPPUNIT_ASSERT_EQUAL(OUString("DejaVu Serif"), aFont);
+
+ // Check font size
+ CPPUNIT_ASSERT(xPropertySet->getPropertyValue("CharHeight") >>= nFontSize);
+ CPPUNIT_ASSERT_EQUAL(float(72), nFontSize);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo43093, "fdo43093.docx")
+{
+ // The problem was that the alignment are not exchange when the paragraph are RTL.
+ uno::Reference<uno::XInterface> xParaRtlLeft(getParagraph( 1, "RTL Left"));
+ sal_Int32 nRtlLeft = getProperty< sal_Int32 >( xParaRtlLeft, "ParaAdjust" );
+ // test the text Direction value for the paragraph
+ sal_Int16 nRLDir = getProperty< sal_Int32 >( xParaRtlLeft, "WritingMode" );
+
+ uno::Reference<uno::XInterface> xParaRtlRight(getParagraph( 3, "RTL Right"));
+ sal_Int32 nRtlRight = getProperty< sal_Int32 >( xParaRtlRight, "ParaAdjust" );
+ sal_Int16 nRRDir = getProperty< sal_Int32 >( xParaRtlRight, "WritingMode" );
+
+ uno::Reference<uno::XInterface> xParaLtrLeft(getParagraph( 5, "LTR Left"));
+ sal_Int32 nLtrLeft = getProperty< sal_Int32 >( xParaLtrLeft, "ParaAdjust" );
+ sal_Int16 nLLDir = getProperty< sal_Int32 >( xParaLtrLeft, "WritingMode" );
+
+ uno::Reference<uno::XInterface> xParaLtrRight(getParagraph( 7, "LTR Right"));
+ sal_Int32 nLtrRight = getProperty< sal_Int32 >( xParaLtrRight, "ParaAdjust" );
+ sal_Int16 nLRDir = getProperty< sal_Int32 >( xParaLtrRight, "WritingMode" );
+
+ // this will test the both the text direction and alignment for each paragraph
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), nRtlLeft);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, nRLDir);
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_RIGHT), nRtlRight);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, nRRDir);
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), nLtrLeft);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nLLDir);
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_RIGHT), nLtrRight);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nLRDir);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo56679, "fdo56679.docx")
+{
+ // The problem was that the DOCX importer and exporter did not handle the 'color' of an underline
+ // (not the color of the text, the color of the underline itself)
+ uno::Reference< text::XTextRange > xParagraph = getParagraph( 1 );
+ uno::Reference< text::XTextRange > xText = getRun( xParagraph, 2, "This is a simple sentence.");
+
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xText, "CharUnderlineHasColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xFF0000), getProperty<Color>(xText, "CharUnderlineColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo65400, "fdo65400.docx")
+{
+ // The problem was that if in Word you choose 'Character Shading' - then the text portion
+ // is marked with 'w:shd val=pct15'. LO did not store this value and so when importing and exporting
+ // this value was lost (and so Word did not show 'Character Shading' was on)
+ uno::Reference< text::XTextRange > paragraph1 = getParagraph( 1 );
+ uno::Reference< text::XTextRange > shaded = getRun( paragraph1, 2, "normal" );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0x0026 ), getProperty< sal_Int32 >( shaded, "CharShadingValue" ));
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0xd8d8d8 ), getProperty< sal_Int32 >( shaded, "CharBackColor" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo66543, "fdo66543.docx")
+{
+ // The problem was that when importing DOCX with 'line numbers' - the 'start value' was imported
+ // but nothing was done with it.
+
+ uno::Reference< text::XTextRange > paragraph1 = getParagraph( 1 );
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
+ getProperty<sal_Int32>(paragraph1, "ParaLineNumberStartValue"));
+
+ if (!isExported())
+ return;
+
+ // ensure unnecessary suppressLineNumbers entry is not created.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:p[1]/w:pPr/w:suppressLineNumbers"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testN822175)
+{
+ loadAndReload("n822175.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ // Was text::WrapTextMode_THROUGH, due to missing Surround handling in the exporter.
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, getProperty<text::WrapTextMode>(xFrame, "Surround"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo66688, "fdo66688.docx")
+{
+ // The problem was that TextFrame imported and exported the wrong value for transparency
+ // (was stored as 'FillTransparence' instead of 'BackColorTransparency'
+ uno::Reference<beans::XPropertySet> xFrame(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 80 ), getProperty< sal_Int32 >( xFrame, "FillTransparence" ) );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo66773, "fdo66773.docx")
+{
+ // The problem was the line spacing was interpreted by Word as 'Multiple 1.08' if no default settings were written.
+ // Now after the 'docDefaults' section is written in <styles.xml> - there is no more problem.
+ // (Word does not try to calculate some arbitrary value for line spacing).
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ CPPUNIT_ASSERT(xParaEnum->hasMoreElements());
+
+ style::LineSpacing alineSpacing = getProperty<style::LineSpacing>(xParaEnum->nextElement(), "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(style::LineSpacingMode::PROP, alineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(100), static_cast<sal_Int32>(alineSpacing.Height));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo58577)
+{
+ loadAndReload("fdo58577.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The second frame was simply missing, so let's check if both frames were imported back.
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBnc581614)
+{
+ loadAndReload("bnc581614.doc");
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo66929, "fdo66929.docx")
+{
+ // The problem was that the default 'inset' attribute of the 'textbox' node was exported incorrectly.
+ // A node like '<v:textbox inset="0">' was exported back as '<v:textbox inset="0pt,0pt,0pt,0pt">'
+ // This is wrong because the original node denotes a specific 'left' inset, and a default 'top','right','bottom' inset
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ if (xIndexAccess->getCount())
+ {
+ // VML import -> TextFrame
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ) , getProperty< sal_Int32 >( xFrame, "LeftBorderDistance" ) );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 127 ), getProperty< sal_Int32 >( xFrame, "TopBorderDistance" ) );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 254 ), getProperty< sal_Int32 >( xFrame, "RightBorderDistance" ) );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 127 ), getProperty< sal_Int32 >( xFrame, "BottomBorderDistance" ) );
+ }
+ else
+ {
+ // drawingML import -> shape with TextBox
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xShape, "TextLeftDistance"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(127), getProperty<sal_Int32>(xShape, "TextUpperDistance"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(254), getProperty<sal_Int32>(xShape, "TextRightDistance"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(127), getProperty<sal_Int32>(xShape, "TextLowerDistance"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageBorderSpacingExportCase2)
+{
+ loadAndSave("page-borders-export-case-2.docx");
+ // The problem was that the exporter didn't mirror the workaround of the
+ // importer, regarding the page border's spacing : the <w:pgBorders w:offsetFrom="page">
+ // and the inner nodes like <w:top w:space="24" ... />
+ //
+ // The exporter ALWAYS exported 'w:offsetFrom="text"' even when the spacing values where too large
+ // for Word to handle (larger than 31 points)
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Assert the XPath expression - page borders
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgBorders"_ostr, "offsetFrom"_ostr, "page");
+
+ // Assert the XPath expression - 'left' border
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgBorders/w:left"_ostr, "space"_ostr, "24");
+
+ // Assert the XPath expression - 'right' border
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgBorders/w:right"_ostr, "space"_ostr, "24");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testGrabBag)
+{
+ loadAndSave("grabbag.docx");
+ // w:mirrorIndents was lost on roundtrip, now should be handled as a grab bag property
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:mirrorIndents"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo66781, "fdo66781.docx")
+{
+ // The problem was that bullets with level=0 were shown in LO as normal bullets,
+ // and when saved back to DOCX were saved with level=1 (so hidden bullets became visible)
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+
+ for (beans::PropertyValue const & rProp : std::as_const(aProps))
+ {
+ if (rProp.Name == "BulletChar")
+ {
+ CPPUNIT_ASSERT_EQUAL(OUString("\x0", 1, RTL_TEXTENCODING_ASCII_US), rProp.Value.get<OUString>());
+ return;
+ }
+ }
+
+ // Shouldn't reach here
+ CPPUNIT_FAIL("Did not find bullet with level 0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo60990)
+{
+ loadAndReload("fdo60990.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The shape had no background, no paragraph adjust and no font color.
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x00CFE7F5), getProperty<Color>(xShape, "FillColor"));
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText();
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText);
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(xParagraph, "ParaAdjust")));
+ CPPUNIT_ASSERT_EQUAL(Color(0x00FF00), getProperty<Color>(getRun(xParagraph, 1), "CharColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo65718, "fdo65718.docx")
+{
+ // The problem was that the exporter always exported values of "0" for an images distance from text.
+ // the actual attributes where 'distT', 'distB', 'distL', 'distR'
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(0), getProperty<sal_Int32>(xPropertySet, "TopMargin") );
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(0), getProperty<sal_Int32>(xPropertySet, "BottomMargin") );
+
+ // 'getProperty' return 318 (instead of 317.5)
+ // I think this is because it returns an integer, instead of a float.
+ // The actual exporting to DOCX exports the correct value (114300 = 317.5 * 360)
+ // The exporting to DOCX uses the 'SvxLRSpacing' that stores the value in TWIPS (180 TWIPS)
+ // However, the 'LeftMargin' property is an integer property that holds that value in 'MM100' (should hold 317.5, but it is 318)
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(114300), getProperty<sal_Int32>(xPropertySet, "LeftMargin") );
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(114300), getProperty<sal_Int32>(xPropertySet, "RightMargin") );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo64350, "fdo64350.docx")
+{
+ // The problem was that page border shadows were not exported
+ table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName("Standard"), "ShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo67013, "fdo67013.docx")
+{
+ /*
+ * The problem was that borders inside headers \ footers were not exported
+ * This was checked in xray using these commands:
+ *
+ * xHeaderText = ThisComponent.getStyleFamilies().getByName("PageStyles").getByName("Standard").HeaderText
+ * xHeaderEnum = xHeaderText.createEnumeration()
+ * xHeaderFirstParagraph = xHeaderEnum.nextElement()
+ * xHeaderBottomBorder = xHeaderFirstParagraph.BottomBorder
+ *
+ * xFooterText = ThisComponent.getStyleFamilies().getByName("PageStyles").getByName("Standard").FooterText
+ * xFooterEnum = xFooterText.createEnumeration()
+ * xFooterFirstParagraph = xFooterEnum.nextElement()
+ * xFooterTopBorder = xFooterFirstParagraph.TopBorder
+ */
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
+ uno::Reference< text::XTextRange > xHeaderParagraph = getParagraphOfText( 1, xHeaderText );
+ table::BorderLine2 aHeaderBottomBorder = getProperty<table::BorderLine2>(xHeaderParagraph, "BottomBorder");
+ CPPUNIT_ASSERT_EQUAL(Color(0x622423), Color(ColorTransparency, aHeaderBottomBorder.Color));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(106), aHeaderBottomBorder.InnerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(26), aHeaderBottomBorder.LineDistance);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(7), aHeaderBottomBorder.LineStyle);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(159), aHeaderBottomBorder.LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(26), aHeaderBottomBorder.OuterLineWidth);
+
+ uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "FooterText");
+ uno::Reference< text::XTextRange > xFooterParagraph = getParagraphOfText( 1, xFooterText );
+ table::BorderLine2 aFooterTopBorder = getProperty<table::BorderLine2>(xFooterParagraph, "TopBorder");
+ CPPUNIT_ASSERT_EQUAL(Color(0x622423), Color(ColorTransparency, aFooterTopBorder.Color));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(26), aFooterTopBorder.InnerLineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(26), aFooterTopBorder.LineDistance);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(4), aFooterTopBorder.LineStyle);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(159), aFooterTopBorder.LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(106), aFooterTopBorder.OuterLineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testParaShadow, "para-shadow.docx")
+{
+ // The problem was that in w:pBdr, child elements had a w:shadow attribute, but that was ignored.
+ table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getParagraph(2), "ParaShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
+ // w:sz="48" is in eights of a point, 1 pt is 20 twips.
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(convertTwipToMm100(24/8*20)), aShadow.ShadowWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableFloating, "table-floating.docx")
+{
+ // Both the size and the position of the table was incorrect.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ // Second table was too wide: 16249, i.e. as wide as the first table.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11248), getProperty<sal_Int32>(xTables->getByIndex(1), "Width"));
+
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ if (xIndexAccess->getCount())
+ {
+ // After import, table is inside a TextFrame.
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ // This was 0, should be the opposite of (left margin + half of the border width).
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-199), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
+ // Was 0 as well, should be the right margin.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(250), getProperty<sal_Int32>(xFrame, "RightMargin"));
+ }
+ else
+ {
+ // After import, table is inside a TextFrame.
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ // This was 0, should be the opposite of (left margin + half of the border width).
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-199), getProperty<sal_Int32>(xShape, "HoriOrientPosition"));
+ // Was 0 as well, should be the right margin.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(250), getProperty<sal_Int32>(xShape, "RightMargin"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo44689_start_page_0, "fdo44689_start_page_0.docx")
+{
+ // The problem was that the import & export process did not analyze the 'start from page' attribute of a section
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty<sal_Int16>(xPara, "PageNumberOffset"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo44689_start_page_7, "fdo44689_start_page_7.docx")
+{
+ // The problem was that the import & export process did not analyze the 'start from page' attribute of a section
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(7), getProperty<sal_Int16>(xPara, "PageNumberOffset"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo67737, "fdo67737.docx")
+{
+ // The problem was that imported shapes did not import and render the 'flip:x' and 'flip:y' attributes
+ uno::Reference<drawing::XShape> xArrow = getShape(1);
+ const uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(xArrow, "CustomShapeGeometry");
+ for (beans::PropertyValue const & rProp : aProps)
+ {
+ if (rProp.Name == "MirroredY")
+ {
+ CPPUNIT_ASSERT_EQUAL( true, rProp.Value.get<bool>() );
+ return;
+ }
+ }
+
+ // Shouldn't reach here
+ CPPUNIT_FAIL("Did not find MirroredY=true property");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTransparentShadow, "transparent-shadow.docx")
+{
+ uno::Reference<drawing::XShape> xPicture = getShape(1);
+ sal_Int16 nShadowTransparence = getProperty<sal_Int16>(xPicture, "ShadowTransparence");
+ CPPUNIT_ASSERT_EQUAL(Color(0x808080), getProperty<Color>(xPicture, "ShadowColor"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(50), nShadowTransparence);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, NoFillAttrInImagedata)
+{
+ loadAndSave("NoFillAttrInImagedata.docx");
+ //problem was that type and color2 which are v:fill attributes were written in 'v:imagedata'. The
+ //source file has v:fill and no v:imagedata. Same should be in the file written by LO.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Fallback/w:pict/v:rect/v:imagedata"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Fallback/w:pict/v:rect/v:fill"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Fallback/w:pict/v:rect/v:fill"_ostr, "type"_ostr, "tile");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testBnc837302, "bnc837302.docx")
+{
+ // The problem was that text with empty author was not inserted as a redline
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+
+ // previously 'AAA' was not an own run
+ getRun(xParagraph, 3, "AAA");
+ // interestingly the 'Insert' is set on the _previous_ run
+ CPPUNIT_ASSERT_EQUAL(OUString("Insert"), getProperty<OUString>(getRun(xParagraph, 2), "RedlineType"));
+
+ // make sure we don't introduce a redlined delete in the 2nd paragraph
+ xParagraph = getParagraph(2);
+ CPPUNIT_ASSERT_EQUAL(false, hasProperty(getRun(xParagraph, 1), "RedlineType"));
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
new file mode 100644
index 0000000000..8812cf729e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
@@ -0,0 +1,1125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+
+#include <pam.hxx>
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79969_xlsb)
+{
+ loadAndSave("fdo79969_xlsb.docx");
+ // This UT for DOCX embedded with binary excel work sheet.
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/"
+ "vnd.ms-excel.sheet.binary.macroEnabled.12']"_ostr,
+ "PartName"_ostr, "/word/embeddings/oleObject1.xlsb");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xlsb']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent, "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr, "Excel.SheetBinaryMacroEnabled.12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo80097)
+{
+ loadAndSave("fdo80097.docx");
+ //fdo#76635 : Table borders are not getting preserved.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ //Table Cell Borders
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:top[@w:val = 'single']"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:top[@w:sz = 4]"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:top[@w:space = 0]"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:top[@w:color = '000000']"_ostr,
+ 1);
+
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:bottom[@w:val = 'single']"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:bottom[@w:sz = 4]"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:bottom[@w:space = 0]"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:bottom[@w:color = '000000']"_ostr,
+ 1);
+
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:insideH"_ostr,
+ 0);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/"
+ "w:insideV"_ostr,
+ 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf95033)
+{
+ loadAndSave("tdf95033.docx");
+ //tdf#95033 : Table borders defined by row-level tblPrEx are not getting preserved.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ //Not disabled table cell borders
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[5]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[5]/w:tc[2]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[9]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[9]/w:tc[2]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[9]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[9]/w:tc[2]/w:tcPr/w:tcBorders/w:bottom[@w:val = 'nil']"_ostr,
+ 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133455)
+{
+ loadAndSave("tdf133455.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ //Not disabled table cell borders
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:top[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:start[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:end[@w:val = 'nil']"_ostr,
+ 0);
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom[@w:val = 'nil']"_ostr,
+ 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf138612)
+{
+ loadAndSave("tdf138612.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // Row 5 Col 1 - vertically merged cell
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[1]/w:tcPr/w:vMerge"_ostr,
+ "val"_ostr, "restart");
+ // Row 5 Col 2 - split cell
+ // This was w:vMerge="restart"
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[2]/w:tcPr/w:vMerge"_ostr, 0);
+
+ // Row 6 Col 1 - merged with cell in Row 5 Col 1
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[1]/w:tcPr/w:vMerge"_ostr,
+ "val"_ostr, "continue");
+ // Row 6 Col 2 - split cell
+ // This was w:vMerge="continue" (merged with cell in Row 5 Col 2)
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[2]/w:tcPr/w:vMerge"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf140597)
+{
+ loadAndSave("tdf140597.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // There were missing tblPrEx table exception borders
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:top"_ostr);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:start"_ostr);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:top"_ostr);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:start"_ostr);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:top"_ostr);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:start"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128646)
+{
+ loadAndSave("tdf128646.docx");
+ // The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p[7]/w:pPr/w:rPr/w:vanish"_ostr, 1);
+ if (!isExported())
+ // originally no <w:vanish> (the same as <w:vanish val="false">)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p[7]/w:r/w:rPr/w:vanish"_ostr,
+ 0);
+ else
+ // This was hidden (<w:vanish/>)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p[7]/w:r/w:rPr/w:vanish"_ostr,
+ "val"_ostr, "false");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf119800)
+{
+ loadAndSave("tdf119800.docx");
+ // The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
+ // (tdf#128646 solved the same only for table paragraphs)
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:vanish"_ostr, 1);
+ if (!isExported())
+ // originally no <w:vanish> (the same as <w:vanish val="false">)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:rPr/w:vanish"_ostr, 0);
+ else
+ // This was hidden (<w:vanish/>)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:rPr/w:vanish"_ostr, "val"_ostr,
+ "false");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo77129)
+{
+ loadAndSave("fdo77129.docx");
+ // The problem was that text after TOC field was missing if footer reference comes in field.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Data was lost from this paragraph.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:t"_ostr, "Abstract");
+}
+
+// Test the same testdoc used for testFdo77129.
+DECLARE_OOXMLEXPORT_TEST(testTdf129402, "fdo77129.docx")
+{
+ // tdf#129402: ToC title must be "Contents", not "Content"; the index field must include
+ // pre-rendered element.
+
+ // Currently export drops empty paragraph after ToC, so skip getParagraphs test for now
+ // CPPUNIT_ASSERT_EQUAL(5, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("owners."), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Contents"), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("How\t2"), getParagraph(3)->getString());
+ // CPPUNIT_ASSERT_EQUAL(OUString(), getParagraph(4)->getString());
+
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+ uno::Reference<text::XDocumentIndex> xIndex(xIndexes->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange = xIndex->getAnchor();
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ uno::Reference<text::XTextCursor> xTextCursor = xText->createTextCursor();
+ xTextCursor->gotoRange(xTextRange->getStart(), false);
+ xTextCursor->gotoRange(xTextRange->getEnd(), true);
+ OUString aTocString(xTextCursor->getString());
+
+ // Check that the pre-rendered entry is inside the index
+ CPPUNIT_ASSERT_EQUAL(OUString("How\t2"), aTocString);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79969_xlsm)
+{
+ loadAndSave("fdo79969_xlsm.docx");
+ // This UT for DOCX embedded with excel work sheet.
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/"
+ "vnd.ms-excel.sheet.macroEnabled.12']"_ostr,
+ "PartName"_ostr, "/word/embeddings/oleObject1.xlsm");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xlsm']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent, "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr, "Excel.SheetMacroEnabled.12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo80522)
+{
+ loadAndReload("fdo80522.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/"
+ "vnd.ms-word.document.macroEnabled.12']"_ostr,
+ "PartName"_ostr, "/word/embeddings/oleObject1.docm");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.docm']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent, "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr, "Word.DocumentMacroEnabled.12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo80523_pptm)
+{
+ loadAndReload("fdo80523_pptm.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/"
+ "vnd.ms-powerpoint.presentation.macroEnabled.12']"_ostr,
+ "PartName"_ostr, "/word/embeddings/oleObject1.pptm");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.pptm']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent, "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr, "PowerPoint.ShowMacroEnabled.12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo80523_sldm)
+{
+ loadAndReload("fdo80523_sldm.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/"
+ "vnd.ms-powerpoint.slide.macroEnabled.12']"_ostr,
+ "PartName"_ostr, "/word/embeddings/oleObject1.sldm");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.sldm']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent, "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr, "PowerPoint.SlideMacroEnabled.12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo80898)
+{
+ loadAndSave("fdo80898.docx");
+ // This UT for DOCX embedded with binary excel work sheet.
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/msword']"_ostr,
+ "PartName"_ostr, "/word/embeddings/oleObject1.doc");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.doc']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent, "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr, "Word.Document.8");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOleIconDrawAspect)
+{
+ loadAndSave("tdf131537.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object/o:OLEObject"_ostr,
+ "DrawAspect"_ostr, "Icon");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableCellWithDirectFormatting)
+{
+ loadAndSave("fdo80800.docx");
+ // Issue was Direct Formatting for non-first Table cells was not getting preserved.
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Ensure that for Third Table cell Direct Formatting is preserved.
+ // In file, Direct Formatting used for Third Table cell is Line Spacing="1.5 lines"
+ // For Line Spacing "1.5 lines" w:line equals 360
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[3]/w:p/w:pPr/w:spacing"_ostr,
+ "line"_ostr, "360");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo80800b_tableStyle, "fdo80800b_tableStyle.docx")
+{
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Cell1 1.5lines"), xPara->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell A1 1.5 line spacing", sal_Int16(150),
+ getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height);
+
+ xCell.set(xTable->getCellByName("B1"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum = xParaEnumAccess->createEnumeration();
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Cell2 Implicit (Single)"), xPara->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B1 single line spacing", sal_Int16(100),
+ getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height);
+
+ xCell.set(xTable->getCellByName("C1"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum = xParaEnumAccess->createEnumeration();
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Cell3 Implicit (Single)"), xPara->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("C1 paragraph1 single line spacing", sal_Int16(100),
+ getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height);
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("C1 paragraph3 line spacing", sal_Int16(212),
+ getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf117297_tableStyle, "tdf117297_tableStyle.docx")
+{
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("B1"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xPara->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("Green text, default size (9), 1.5 spaced"), xPara->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B1 Paragraph1 green font", Color(0x70AD47),
+ getProperty<Color>(getRun(xPara, 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B1 Paragraph1 1.5 line spacing", sal_Int16(150),
+ getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height);
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ xText = xPara->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("TableGrid color (blue), TableGrid size (9), double spacing"),
+ xPara->getString());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B1 Paragraph3 blue font", Color(0x00B0F0),
+ getProperty<Color>(getRun(xPara, 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B1 Paragraph3 double spacing", sal_Int16(200),
+ getProperty<style::LineSpacing>(xPara, "ParaLineSpacing").Height);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf82175_noStyleInheritance, "tdf82175_noStyleInheritance.docx")
+{
+ // The document's "Default" paragraph style is 1 inch fixed line spacing, and that is what should not be inherited.
+ style::LineSpacing aSpacing
+ = getProperty<style::LineSpacing>(getParagraph(1), "ParaLineSpacing");
+ // MSWord uses 115% line spacing, but LO follows the documentation and sets single spacing.
+ CPPUNIT_ASSERT_MESSAGE("Text Body style 115% line spacing", sal_Int16(120) > aSpacing.Height);
+ CPPUNIT_ASSERT_MESSAGE("THANKS for *FIXING* line spacing", sal_Int16(115) != aSpacing.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aSpacing.Mode);
+}
+
+DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx")
+{
+ // Header was lost on export when the document had multiple columns.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo83048)
+{
+ loadAndSave("fdo83048.docx");
+ // Issue was wrong SDT properties were getting exported for Date SDT
+ xmlDocUniquePtr pXmlDoc = parseExport("word/footer2.xml");
+
+ // Make sure Date is inside SDT tag.
+ // This will happen only if right SDT properties are exported.
+ assertXPathContent(
+ pXmlDoc, "/w:ftr/w:sdt/w:sdtContent/w:p[1]/w:sdt/w:sdtContent/w:r[2]/w:t"_ostr, "1/2/2013");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdt2Run)
+{
+ loadAndSave("sdt-2-run.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // The problem was that <w:sdt> was closed after "first", not after "second", so the second assert failed.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t"_ostr,
+ "firstsecond");
+ // Make sure the third portion is still outside <w:sdt>.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/w:t"_ostr, "third");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFD083057)
+{
+ loadAndSave("fdo83057.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
+
+ // A fly frame was attached to a para which started with a hint (run) containing an SDT.
+ // This SDT was handled while exporting the FLYFRAME and also the text of the run.
+ // So, even though the original file had only one sdt in the header, the RT file had two;
+ // one for a separate run as expected, and one incorrectly exported in the alternateContent (FLYFRAME)
+
+ // Assert that the file has only one sdt, in a separate run
+ assertXPath(pXmlDoc, "//w:sdt"_ostr, 1);
+ assertXPath(pXmlDoc, "//mc:AlternateContent//w:sdt"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testHeaderBorder)
+{
+ loadAndSave("header-border.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 0, as header margin was lost during import.
+ assertXPath(pXmlDoc, "//w:pgMar"_ostr, "header"_ostr, "720");
+ // This was 33: 33 points -> 660 twips. We counted 900 - 240 (distance
+ // of page and body frame) instead of 720 - 240 (distance of page and
+ // header frame).
+ assertXPath(pXmlDoc, "//w:pgBorders/w:top"_ostr, "space"_ostr, "24");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTablepprShape, "tblppr-shape.docx")
+{
+ // Unhandled exception due to unexpected w:tblpPr resulted in not importing page size, either.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ // This was 2000, page width wasn't large enough.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2540),
+ getProperty<sal_Int32>(xPageStyle, "LeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testImageNoborder, "image-noborder.docx")
+{
+ // This was 26; we exported border for an image that had no border.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0),
+ getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf89774)
+{
+ loadAndSave("tdf89774.fodt");
+ xmlDocUniquePtr pXmlDoc = parseExport("docProps/app.xml");
+ // This was 65, as unit was seconds instead of minutes.
+ assertXPathContent(pXmlDoc,
+ "/extended-properties:Properties/extended-properties:TotalTime"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSectionProtection)
+{
+ loadAndReload("sectionprot.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:sectPr/w:formProt"_ostr, "val"_ostr,
+ "true");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:formProt"_ostr, "val"_ostr, "false");
+
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "enforcement"_ostr, "true");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "edit"_ostr, "forms");
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("TextSection is protected", true,
+ getProperty<bool>(xSect, "IsProtected"));
+ xSect.set(xSections->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", false,
+ getProperty<bool>(xSect, "IsProtected"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSectionProtection2)
+{
+ loadAndSave("sectionprot2.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "enforcement"_ostr, "true");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "edit"_ostr, "forms");
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("TextSection is protected", true,
+ getProperty<bool>(xSect, "IsProtected"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(tdf66398_permissions, "tdf66398_permissions.docx")
+{
+ // check document permission settings for the whole document
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "edit"_ostr, "readOnly");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "enforcement"_ostr, "1");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "cryptProviderType"_ostr,
+ "rsaAES");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr,
+ "cryptAlgorithmClass"_ostr, "hash");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr,
+ "cryptAlgorithmType"_ostr, "typeAny");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "cryptAlgorithmSid"_ostr,
+ "14");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "cryptSpinCount"_ostr,
+ "100000");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "hash"_ostr,
+ "A0/"
+ "Xy6KcXljJlZjP0TwJMPJuW2rc46UwXqn2ctxckc2nCECE5i89M85z2Noh3ZEA5NBQ9RJ5ycxiUH6nz"
+ "mJaKw==");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "salt"_ostr,
+ "B8k6wb1pkjUs4Nv/8QBk/w==");
+ }
+
+ // get bookmark interface
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+
+ // check: we have 2 bookmarks
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xBookmarksByIdx->getCount());
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("_GoBack"));
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("permission-for-group:267014232:everyone"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf106843)
+{
+ loadAndSave("tdf106843.fodt");
+ // check Track Changes permission set in Writer/OpenDocument (password: "test", encoded by default encoding of Writer)
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "edit"_ostr,
+ "trackedChanges");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "enforcement"_ostr, "1");
+
+ // LO intends to export a .docx format that is natively compatible with 2013
+ // but this document has an implicitly added setting AddExternalLeading = false
+ assertXPath(pXmlSettings, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "name"_ostr,
+ "compatibilityMode");
+ assertXPath(pXmlSettings, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "uri"_ostr,
+ "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlSettings, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "val"_ostr,
+ "14"); // compatible with 2010
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf89991_revisionView)
+{
+ loadAndSave("tdf89991.docx");
+ // check revisionView (Show Changes) import and export
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:revisionView"_ostr, "insDel"_ostr, "0");
+ assertXPath(pXmlSettings, "/w:settings/w:revisionView"_ostr, "formatting"_ostr, "0");
+
+ // There was no compatibilityMode defined.
+ // 12: Use word processing features specified in ECMA-376. This is the default.
+ assertXPath(pXmlSettings, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "name"_ostr,
+ "compatibilityMode");
+ assertXPath(pXmlSettings, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "uri"_ostr,
+ "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlSettings, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "val"_ostr, "12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf122201_editUnprotectedText)
+{
+ loadAndReload("tdf122201_editUnprotectedText.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // get the document
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ // get two different nodes
+ SwNodeIndex aDocEnd(pDoc->GetNodes().GetEndOfContent());
+ SwNodeIndex aDocStart(*aDocEnd.GetNode().StartOfSectionNode(), 3);
+
+ // check protected area
+ SwPaM aPaMProtected(aDocStart);
+ CPPUNIT_ASSERT(aPaMProtected.HasReadonlySel(false, false));
+
+ // check unprotected area
+ SwPaM aPaMUnprotected(aDocEnd);
+ CPPUNIT_ASSERT(!aPaMUnprotected.HasReadonlySel(false, false));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSectionHeader)
+{
+ loadAndReload("sectionprot.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // this test must not be zero
+ assertXPath(pXmlDoc, "//w:headerReference"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf146491)
+{
+ loadAndReload("tdf146491.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 12 - a page style was unnecessarily created for every section.
+ assertXPath(pXmlDoc, "//w:footerReference"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOO47778_1)
+{
+ loadAndReload("ooo47778-3.odt");
+ CPPUNIT_ASSERT_EQUAL(5, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "(//w:t)[3]"_ostr, "c");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOO47778_2)
+{
+ loadAndReload("ooo47778-4.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "(//w:t)[4]"_ostr, "c");
+
+ // tdf116436: The problem was that the table background was undefined, not white.
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(xCell, "BackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOO67471)
+{
+ loadAndReload("ooo67471-2.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "(//w:t)[2]"_ostr, "B");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testKDE302504)
+{
+ loadAndReload("kde302504-1.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//v:shape"_ostr, "ID"_ostr, "KoPathShape");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testKDE216114)
+{
+ loadAndReload("kde216114-1.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:pict"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOO72950)
+{
+ loadAndReload("ooo72950-1.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:tbl"_ostr, 1);
+}
+
+//There are two tables to export in this doc the second of which is inside a
+//frame anchored to first cell of the first table. They must not be
+//considered the same table
+CPPUNIT_TEST_FIXTURE(Test, fdo60957)
+{
+ loadAndSave("fdo60957-2.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:tbl"_ostr, 2);
+
+ //tdf#154956
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xBookmarksByIdx->getCount());
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("_GoBack"));
+}
+
+//This has more cells than msword supports, we must balance the
+//number of cell start and ends
+CPPUNIT_TEST_FIXTURE(Test, testOO106020)
+{
+ loadAndSave("ooo106020-1.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:tbl"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNonBMPChar, "nonbmpchar.docx")
+{
+ // Assert that UTF8 encoded non-BMP Unicode character is correct
+ uno::Reference<text::XTextRange> xTextRange1 = getRun(getParagraph(1), 1);
+ CPPUNIT_ASSERT_EQUAL(u"\U00024b62"_ustr, xTextRange1->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSpacingGroupShapeText)
+{
+ loadAndSave("tdf131775_SpacingGroupShapeText.docx");
+ // tdf#131775: Check if correct spacing.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/"
+ "w:spacing"_ostr,
+ "val"_ostr, "200");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf100581)
+{
+ loadAndSave("tdf100581.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[1]/w:pPr/w:pStyle"_ostr,
+ "val"_ostr, "FrameContents");
+
+ // w:sectPr is not exported
+ assertXPath(
+ pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[1]/w:pPr/w:sectPr"_ostr,
+ 0);
+
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"
+ "/v:textbox/w:txbxContent/w:p[1]/w:pPr/w:pStyle"_ostr,
+ "val"_ostr, "FrameContents");
+
+ // w:sectPr is not exported
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"
+ "/v:textbox/w:txbxContent/w:p[1]/w:pPr/w:sectPr"_ostr,
+ 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf112287)
+{
+ loadAndSave("tdf112287.docx");
+ // tdf#131775: Check if correct spacing.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "vAnchor"_ostr,
+ "margin");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "hAnchor"_ostr,
+ "text");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "xAlign"_ostr,
+ "center");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "yAlign"_ostr,
+ "bottom");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf157572_defaultVAnchor)
+{
+ loadAndSave("tdf157572_defaultVAnchor.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // vAnchor wasn't defined on import. It should default to 'margin' when w:y=non-zero
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "vAnchor"_ostr,
+ "margin");
+ // yAlign=something is not compatible with w:y=non-zero" - don't write anything out
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr,
+ "yAlign"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf157572_insidiousCombination)
+{
+ loadAndSave("tdf157572_insidiousCombination.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // This is a NASTY example. In MS Word, it IMPORTS yAlign=bottom, but positions it as y=0.
+ // although the UI shows "bottom" instead of position 0cm. Clicking -ok- MOVES the textbox.
+ // Seems best to throw away "bottom" in LO, since a round-trip in MS Word keeps the 0cm
+ // position and the vAlign ONLY affects the UI.
+
+ // vAnchor was defined as text.
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "vAnchor"_ostr,
+ "text");
+ // yAlign=something is not compatible with "text" - don't write anything out
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr,
+ "yAlign"_ostr);
+ // y is zero - no need to write out the default value
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr,
+ "y"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf157572_noVAlignAsText)
+{
+ loadAndSave("tdf157572_noVAlignAsText.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "vAnchor"_ostr,
+ "text");
+ // yAlign=something is not compatible with vAnchor="text" - don't write anything out
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr,
+ "yAlign"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf112287B)
+{
+ loadAndSave("tdf112287B.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "vAnchor"_ostr,
+ "text");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "hAnchor"_ostr,
+ "text");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testZOrderInHeader)
+{
+ loadAndSave("tdf120760_ZOrderInHeader.docx");
+ // tdf#120760 Check that the Z-Order of the background is smaller than the front shape's.
+ xmlDocUniquePtr pXml = parseExport("word/header2.xml");
+
+ // Get the Z-Order of the background image and of the shape in front of it.
+ sal_Int32 nBackground
+ = getXPath(pXml, "/w:hdr/w:p[1]/w:r[1]/w:drawing/wp:anchor"_ostr, "relativeHeight"_ostr)
+ .toInt32();
+ sal_Int32 nFrontShape = getXPath(pXml,
+ "/w:hdr/w:p[1]/w:r[1]/mc:AlternateContent[2]"
+ "/mc:Choice/w:drawing/wp:anchor"_ostr,
+ "relativeHeight"_ostr)
+ .toInt32();
+
+ // Assert that background is in the back.
+ CPPUNIT_ASSERT(nBackground < nFrontShape);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSvgExtensionsSupport)
+{
+ loadAndSave("SvgImageTest.odt");
+
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+
+ // Check we have 2 relationships - one for PNG and one for SVG files
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='media/image1.png']"_ostr, "Id"_ostr,
+ "rId2");
+
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='media/image2.svg']"_ostr, "Id"_ostr,
+ "rId3");
+
+ // Check there is the extension present
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+
+ OString aPath(
+ "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip"_ostr);
+ assertXPath(pXmlDocContent, aPath, "embed"_ostr, "rId2");
+
+ assertXPath(pXmlDocContent, aPath + "/a:extLst/a:ext"_ostr, "uri"_ostr,
+ "{96DAC541-7B7A-43D3-8B79-37D633B846F1}");
+ assertXPath(pXmlDocContent, aPath + "/a:extLst/a:ext/asvg:svgBlip"_ostr, "embed"_ostr, "rId3");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testtdf158044)
+{
+ loadAndSave("tdf158044.odt");
+ // write hard attributes to prevent multiple toggle attributes from vanishing
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr[1]/w:rStyle[1]"_ostr, "val"_ostr,
+ "BoldItalicCapsEmbossedStrike");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr[1]/w:b[1]"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr[1]/w:bCs[1]"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr[1]/w:i[1]"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr[1]/w:iCs[1]"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr[1]/w:strike[1]"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr[1]/w:emboss[1]"_ostr);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr[1]/w:rStyle[1]"_ostr, "val"_ostr,
+ "SmallcapsImprint");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr[1]/w:imprint[1]"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr[1]/w:smallCaps[1]"_ostr);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[2]/w:rPr[1]/w:rStyle[1]"_ostr, "val"_ostr,
+ "AllCaps");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[2]/w:rPr[1]/w:caps[1]"_ostr);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r[2]/w:rPr[1]/w:rStyle[1]"_ostr, "val"_ostr,
+ "Hidden");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r[2]/w:rPr[1]/w:vanish[1]"_ostr);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r[4]/w:rPr[1]/w:rStyle[1]"_ostr, "val"_ostr,
+ "OutlineShadow");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r[4]/w:rPr[1]/w:outline[1]"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r[4]/w:rPr[1]/w:shadow[1]"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158855)
+{
+ // Given a table immediately followed by a section break
+ loadFromFile(u"section_break_after_table.docx");
+
+ // Check that the import doesn't produce an extra empty paragraph before a page break
+ CPPUNIT_ASSERT_EQUAL(2, getPages()); // was 3
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); // was 3
+ uno::Reference<text::XTextTable>(getParagraphOrTable(1), uno::UNO_QUERY_THROW);
+ getParagraph(2, u"Next page"_ustr); // was empty, with the 3rd being "Next page"
+
+ saveAndReload(mpFilter);
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+ uno::Reference<text::XTextTable>(getParagraphOrTable(1), uno::UNO_QUERY_THROW);
+ getParagraph(2, u"Next page"_ustr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf158971)
+{
+ // Given a section break and an SDT in the following paragraph
+ loadFromFile(u"sdt_after_section_break.docx");
+
+ // Check that the import doesn't introduce unwanted character properties in the paragraph after
+ // the section break
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+ {
+ auto para = getParagraph(2, u"text"_ustr);
+ css::uno::Reference<css::beans::XPropertyState> xRunState(getRun(para, 1, u""_ustr),
+ css::uno::UNO_QUERY_THROW);
+ // without the fix, this would fail with
+ // - Expected: 1
+ // - Actual : 0
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"RubyAdjust"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"RubyIsAbove"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"RubyPosition"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"UnvisitedCharStyleName"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"VisitedCharStyleName"_ustr));
+ }
+
+ // Saving must not fail assertions
+ saveAndReload(mpFilter);
+
+ // Check again
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+ {
+ auto para = getParagraph(2, u"text"_ustr);
+ css::uno::Reference<css::beans::XPropertyState> xRunState(getRun(para, 1, u""_ustr),
+ css::uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"RubyAdjust"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"RubyIsAbove"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"RubyPosition"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"UnvisitedCharStyleName"_ustr));
+ CPPUNIT_ASSERT_EQUAL(css::beans::PropertyState_DEFAULT_VALUE,
+ xRunState->getPropertyState(u"VisitedCharStyleName"_ustr));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf159110)
+{
+ // Given a text with an URL with multiple spaces
+ loadAndReload("multi_space_url.fodt");
+
+ constexpr OUString sExpectedURL = u"http://www.example.org/path%20%20with%20%20spaces"_ustr;
+
+ // Without the fix, this would have failed with
+ // - Expected: http://www.example.org/path%20%20with%20%20spaces
+ // - Actual : http://www.example.org/path with spaces
+ CPPUNIT_ASSERT_EQUAL(sExpectedURL,
+ getProperty<OUString>(getRun(getParagraph(1), 1), u"HyperLinkURL"_ustr));
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ OString sId
+ = OUStringToOString(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink"_ostr, "id"_ostr),
+ RTL_TEXTENCODING_UTF8);
+
+ xmlDocUniquePtr pXmlRels = parseExport("word/_rels/document.xml.rels");
+
+ // Without the fix, this would have failed with
+ // - Expected: http://www.example.org/path%20%20with%20%20spaces
+ // - Actual : http://www.example.org/path with spaces
+ // - In <>, attribute 'Target' of '/rels:Relationships/rels:Relationship[@Id='rId2']' incorrect value.
+ // I.e., the spaces were stored without percent-encoding, and collapsed on import
+ assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@Id='"_ostr + sId + "']",
+ "Target"_ostr, sExpectedURL);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
new file mode 100644
index 0000000000..bb20cec1a5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -0,0 +1,1234 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/xml/dom/XDocument.hpp>
+#include <com/sun/star/style/BreakType.hpp>
+
+#include <ftninfo.hxx>
+#include <docsh.hxx>
+#include <unotxdoc.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+DECLARE_OOXMLEXPORT_TEST(testFdo68418, "fdo68418.docx")
+{
+ // The problem was that in 'MSWordExportBase::SectionProperties' function in 'wrt8sty.cxx'
+ // it checked if it 'IsPlausableSingleWordSection'.
+ // The 'IsPlausableSingleWordSection' compared different aspects of 2 'SwFrameFormat' objects.
+ // One of the checks was 'do both formats have the same distance from the top and bottom ?'
+ // This check is correct if both have headers or both don't have headers.
+ // However - if one has a header, and the other one has an empty header (no header) - it is not correct to compare
+ // between them (same goes for 'footer').
+ uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "FooterText");
+ uno::Reference< text::XTextRange > xFooterParagraph = getParagraphOfText( 1, xFooterText );
+
+ // First page footer is empty, second page footer is 'aaaa'
+ CPPUNIT_ASSERT_EQUAL(OUString("aaaa"), xFooterParagraph->getString()); // I get an error that it expects ''
+}
+
+DECLARE_OOXMLEXPORT_TEST(testA4AndBorders, "a4andborders.docx")
+{
+ /*
+ * The problem was that in case of a document with borders, the pgSz attribute
+ * was exported as a child of pgBorders, thus being ignored on reload.
+ * We assert dimension against A4 size in mm (to avoid minor rounding errors)
+ */
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect Page Width (mm)", sal_Int32(210), getProperty<sal_Int32>(xPageStyle, "Width") / 100);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect Page Height (mm)", sal_Int32(297), getProperty<sal_Int32>(xPageStyle, "Height") / 100);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo68787, "fdo68787.docx")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ // This was 25, the 'lack of w:separator' <-> '0 line width' mapping was missing.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf92470_footnoteRestart, "tdf92470_footnoteRestart.docx")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT( pTextDoc );
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT( pDoc );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote doesn't restart every Page", FTNNUM_PAGE, pDoc->GetFootnoteInfo().m_eNum );
+
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf108944_footnoteSeparator2)
+{
+ loadAndReload("tdf108944_footnoteSeparator2.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ //This was zero. The comment was causing the bHasFtnSep flag to be reset to false, so the separator was missing.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCharacterBorder)
+{
+ loadAndReload("charborder.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),1), uno::UNO_QUERY);
+ // OOXML has just one border attribute (<w:bdr>) for text border so all side has
+ // the same border with the same padding
+ // Border
+ {
+ const table::BorderLine2 aTopBorder = getProperty<table::BorderLine2>(xRun,"CharTopBorder");
+ CPPUNIT_ASSERT_BORDER_EQUAL(table::BorderLine2(0xFF6600,0,318,0,0,318), aTopBorder);
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharLeftBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharBottomBorder"));
+ CPPUNIT_ASSERT_BORDER_EQUAL(aTopBorder, getProperty<table::BorderLine2>(xRun,"CharRightBorder"));
+ }
+
+ // Padding (w:space)
+ {
+ const sal_Int32 nTopPadding = getProperty<sal_Int32>(xRun,"CharTopBorderDistance");
+ // In the original ODT the padding is 150, but the unit conversion round it down.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(141), nTopPadding);
+ CPPUNIT_ASSERT_EQUAL(nTopPadding, getProperty<sal_Int32>(xRun,"CharLeftBorderDistance"));
+ CPPUNIT_ASSERT_EQUAL(nTopPadding, getProperty<sal_Int32>(xRun,"CharBottomBorderDistance"));
+ CPPUNIT_ASSERT_EQUAL(nTopPadding, getProperty<sal_Int32>(xRun,"CharRightBorderDistance"));
+ }
+
+ // Shadow (w:shadow)
+ /* OOXML use just one bool value for shadow so the next conversions
+ are made during an export-import round
+ color: any -> black
+ location: any -> bottom-right
+ width: any -> border width */
+ {
+ const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xRun, "CharShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(318), aShadow.ShadowWidth);
+ }
+
+ // Also check shadow when it is in middle of the paragraph
+ // (problem can be during export with SwWW8AttrIter::HasTextItem())
+ {
+ uno::Reference<beans::XPropertySet> xMiddleRun(getRun(getParagraph(2),2), uno::UNO_QUERY);
+ const table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xMiddleRun, "CharShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(318), aShadow.ShadowWidth);
+ }
+
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ // Make sure we write qFormat for custom style names.
+ assertXPath(pXmlStyles, "//w:style[@w:styleId='Heading']/w:qFormat"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testStyleInheritance)
+{
+ loadAndSave("style-inheritance.docx");
+
+ // Check that now styleId's are more like what MSO produces
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ // the 1st style always must be Normal
+ assertXPath(pXmlStyles, "/w:styles/w:style[1]"_ostr, "styleId"_ostr, "Normal");
+ // some random style later
+ assertXPath(pXmlStyles, "/w:styles/w:style[4]"_ostr, "styleId"_ostr, "Heading3");
+
+ // Check that we do _not_ export w:next for styles that point to themselves.
+ assertXPath(pXmlStyles, "/w:styles/w:style[1]/w:next"_ostr, 0);
+
+ // Check that we roundtrip <w:next> correctly - on XML level
+ assertXPath(pXmlStyles, "/w:styles/w:style[2]/w:next"_ostr, "val"_ostr, "Normal");
+ // And to be REALLY sure, check it on the API level too ;-)
+ uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles");
+ uno::Reference< beans::XPropertySet > properties(paragraphStyles->getByName("Heading 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty<OUString>(properties, "FollowStyle"));
+
+ // This was 0, as export of w:outlineLvl was missing.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(properties, "OutlineLevel"));
+
+ properties.set(paragraphStyles->getByName("Heading 11"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"), getProperty<OUString>(properties, "FollowStyle"));
+
+ // Make sure style #2 is Heading 1.
+ assertXPath(pXmlStyles, "/w:styles/w:style[2]"_ostr, "styleId"_ostr, "Heading1");
+ // w:ind was copied from the parent (Normal) style without a good reason.
+ assertXPath(pXmlStyles, "/w:styles/w:style[2]/w:pPr/w:ind"_ostr, 0);
+
+ // We output exactly 2 properties in rPrDefault, nothing else was
+ // introduced as an additional default
+ assertXPath(pXmlStyles, "/w:styles/w:docDefaults/w:rPrDefault/w:rPr/*"_ostr, 2);
+ // Check that we output real content of rPrDefault
+ assertXPath(pXmlStyles, "/w:styles/w:docDefaults/w:rPrDefault/w:rPr/w:rFonts"_ostr, "ascii"_ostr, "Times New Roman");
+ assertXPath(pXmlStyles, "/w:styles/w:docDefaults/w:rPrDefault/w:rPr/w:lang"_ostr, "bidi"_ostr, "ar-SA");
+ // pPrDefault contains only one hyphenation property
+ assertXPath(pXmlStyles, "/w:styles/w:docDefaults/w:pPrDefault/w:pPr/*"_ostr, 1);
+
+ // Check latent styles
+ uno::Sequence<beans::PropertyValue> aGrabBag = getProperty< uno::Sequence<beans::PropertyValue> >(mxComponent, "InteropGrabBag");
+ uno::Sequence<beans::PropertyValue> aLatentStyles;
+ for (beans::PropertyValue const & prop : std::as_const(aGrabBag))
+ if (prop.Name == "latentStyles")
+ prop.Value >>= aLatentStyles;
+ CPPUNIT_ASSERT(aLatentStyles.getLength()); // document should have latent styles
+
+ // Check latent style default attributes
+ OUString aCount;
+ uno::Sequence<beans::PropertyValue> aLatentStyleExceptions;
+ for (beans::PropertyValue const & prop : std::as_const(aLatentStyles))
+ {
+ if (prop.Name == "count")
+ aCount = prop.Value.get<OUString>();
+ else if (prop.Name == "lsdExceptions")
+ prop.Value >>= aLatentStyleExceptions;
+ }
+ CPPUNIT_ASSERT_EQUAL(OUString("371"), aCount); // This check the "count" attribute.
+
+ // Check exceptions to the latent style defaults.
+ uno::Sequence<beans::PropertyValue> aLatentStyleException;
+ aLatentStyleExceptions[0].Value >>= aLatentStyleException;
+ OUString aName;
+ for (beans::PropertyValue const & prop : std::as_const(aLatentStyleException))
+ if (prop.Name == "name")
+ aName = prop.Value.get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(OUString("Normal"), aName); // This checks the "name" attribute of the first exception.
+
+ // This numbering style wasn't roundtripped.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='NoList']/w:name"_ostr, "val"_ostr, "No List");
+
+ // Table style wasn't roundtripped.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableNormal']/w:tblPr/w:tblCellMar/w:left"_ostr, "w"_ostr, "108");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableNormal']/w:semiHidden"_ostr, 1);
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableNormal']/w:unhideWhenUsed"_ostr, 1);
+
+ // Additional para style properties should be also roundtripped.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='ListParagraph']/w:uiPriority"_ostr, "val"_ostr, "34");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']/w:qFormat"_ostr, 1);
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']/w:rsid"_ostr, "val"_ostr, "00780346");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']"_ostr, "default"_ostr, "1");
+
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading1']/w:link"_ostr, "val"_ostr, "Heading1Char");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading1']/w:locked"_ostr, 1);
+
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading11']"_ostr, "customStyle"_ostr, "1");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading11']/w:autoRedefine"_ostr, 1);
+
+ // Additional char style properties should be also roundtripped.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='DefaultParagraphFont']"_ostr, "default"_ostr, "1");
+
+ // Finally check the same for numbering styles.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='NoList']"_ostr, "default"_ostr, "1");
+
+ // This was 1, the default style had <w:suppressAutoHyphens w:val="true"/> even for a default style having no RES_PARATR_HYPHENZONE set.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']/w:pPr/w:suppressAutoHyphens"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCalendar1)
+{
+ loadAndSave("calendar1.docx");
+ // Document has a non-trivial table style, test the roundtrip of it.
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:basedOn"_ostr, "val"_ostr, "TableNormal");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:rsid"_ostr, "val"_ostr, "00903003");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblPr/w:tblStyleColBandSize"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tcPr/w:shd"_ostr, "val"_ostr, "clear");
+
+ // Table style lost its paragraph / run properties.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:pPr/w:spacing"_ostr, "lineRule"_ostr, "auto");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:rPr/w:lang"_ostr, "eastAsia"_ostr, "ja-JP");
+
+ // Table style lost its conditional table formatting properties.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblStylePr[@w:type='firstRow']/w:pPr/w:wordWrap"_ostr, 1);
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblStylePr[@w:type='firstRow']/w:rPr/w:rFonts"_ostr, "hAnsiTheme"_ostr, "minorHAnsi");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblStylePr[@w:type='firstRow']/w:tblPr"_ostr, 1);
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblStylePr[@w:type='firstRow']/w:tcPr/w:vAlign"_ostr, "val"_ostr, "bottom");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblStylePr[@w:type='lastRow']/w:tcPr/w:tcBorders/w:tr2bl"_ostr, "val"_ostr, "nil");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblStylePr[@w:type='band2Horz']/w:tcPr/w:tcBorders/w:top"_ostr, "themeColor"_ostr, "text1");
+
+ // w:tblLook element and its attributes were missing.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblLook"_ostr, "firstRow"_ostr, "1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblLook"_ostr, "lastRow"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblLook"_ostr, "lastColumn"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblLook"_ostr, "firstColumn"_ostr, "1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblLook"_ostr, "noHBand"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblLook"_ostr, "noVBand"_ostr, "1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblLook"_ostr, "val"_ostr, "04a0");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testCalendar2, "calendar2.docx")
+{
+ // Problem was that CharCaseMap was style::CaseMap::NONE.
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(style::CaseMap::UPPERCASE, getProperty<sal_Int16>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharCaseMap"));
+ // Font size in the second row was 11.
+ xCell.set(xTable->getCellByName("A2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharHeight"));
+ // Font size in the third row was 11 as well.
+ xCell.set(xTable->getCellByName("B3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(14.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharHeight"));
+
+ // This paragraph property was missing in table style.
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:pPr/w:jc"_ostr, "val"_ostr, "center");
+
+ // These run properties were missing
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:rPr/w:lang"_ostr, "val"_ostr, "en-US");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:rPr/w:lang"_ostr, "bidi"_ostr, "ar-SA");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:tblStylePr[@w:type='firstRow']/w:rPr/w:caps"_ostr, 1);
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:tblStylePr[@w:type='firstRow']/w:rPr/w:smallCaps"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:tblStylePr[@w:type='firstRow']/w:rPr/w:color"_ostr, "themeColor"_ostr, "accent1");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:tblStylePr[@w:type='firstRow']/w:rPr/w:spacing"_ostr, "val"_ostr, "20");
+
+ // Table borders were also missing
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:tblPr/w:tblBorders/w:insideV"_ostr, "themeTint"_ostr, "99");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testCalendar3, "calendar3.docx")
+{
+ // TableStyle:firstRow (for header rows 1 and 2) color and size overrides document rPrDefault
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x5B9BD5), getProperty<Color>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()),1), "CharHeight"));
+ // direct formatting in A1
+ uno::Reference<text::XTextRange> xCell2(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x2E74B5), getProperty<Color>(getRun(getParagraphOfText(1, xCell2->getText()), 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(20.f, getProperty<float>(getRun(getParagraphOfText(1, xCell2->getText()),1), "CharHeight"));
+
+ // tdf#132149 Despite specifying portrait, the page size's specified width is greater than its height.
+ // Both Word and LO display it as landscape, so ensure that it round-trips with landscape dimensions.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Page Width (mm) ", sal_Int32(148), getProperty<sal_Int32>(xPageStyle, "Width") / 100);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Page Height (mm)", sal_Int32(104), getProperty<sal_Int32>(xPageStyle, "Height") / 100);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testCalendar4, "calendar4.docx")
+{
+ // TableStyle:fontsize - overrides DocDefaults, but not Style.
+ // In this case the style does not define anything (but does copy-inherit the DocDefaults size 36)
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(14.f, getProperty<float>(getRun(xCell,1), "CharHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testCalendar5, "calendar5.docx")
+{
+ // check text portions with and without direct formatting
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // text portions with direct formatting
+ CPPUNIT_ASSERT_EQUAL(Color(0x2E74B5), getProperty<Color>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xFF0000), getProperty<Color>(getRun(getParagraphOfText(1, xCell->getText()), 2), "CharColor"));
+ // default paragraph text color
+ CPPUNIT_ASSERT_EQUAL(Color(0x5B9BD5), getProperty<Color>(getRun(getParagraphOfText(1, xCell->getText()), 3), "CharColor"));
+ // text portions with direct formatting
+ CPPUNIT_ASSERT_EQUAL(20.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()),1), "CharHeight"));
+ CPPUNIT_ASSERT_EQUAL(10.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()),2), "CharHeight"));
+ // default paragraph text size
+ CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(getRun(getParagraphOfText(1, xCell->getText()),3), "CharHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTcBorders)
+{
+ loadAndSave("testTcBorders.docx");
+ //fdo#76635 : Table borders are not getting preserved.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tcPr[1]/w:tcBorders[1]/w:bottom[1][@w:val = 'single']"_ostr,1);
+ assertXPath(pXmlDocument, "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tcPr[1]/w:tcBorders[1]/w:bottom[1][@w:sz = 4]"_ostr, 1);
+ assertXPath(pXmlDocument, "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tcPr[1]/w:tcBorders[1]/w:bottom[1][@w:space = 0]"_ostr, 1);
+ assertXPath(pXmlDocument, "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tcPr[1]/w:tcBorders[1]/w:bottom[1][@w:color = 808080]"_ostr, 1);
+
+ uno::Reference<beans::XPropertySet> xStyle(
+ getStyles("CharacterStyles")->getByName("Code Featured Element"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Bold", float(150), getProperty<float>(xStyle, "CharWeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testQuicktables)
+{
+ loadAndSave("quicktables.docx");
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+
+ // These were missing in the Calendar3 table style.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar3']/w:rPr/w:rFonts"_ostr, "cstheme"_ostr, "majorBidi");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar3']/w:rPr/w:color"_ostr, "themeTint"_ostr, "80");
+ CPPUNIT_ASSERT(getXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar3']/w:tblStylePr[@w:type='firstRow']/w:rPr/w:color"_ostr, "themeShade"_ostr).equalsIgnoreAsciiCase("BF"));
+
+ // Calendar4.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:pPr/w:snapToGrid"_ostr, "val"_ostr, "0");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:rPr/w:bCs"_ostr, 1);
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tcPr/w:shd"_ostr, "themeFill"_ostr, "accent1");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tcPr/w:shd"_ostr, "themeFillShade"_ostr, "80");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tblStylePr[@w:type='firstCol']/w:pPr/w:ind"_ostr, "rightChars"_ostr, "0");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tblStylePr[@w:type='firstCol']/w:pPr/w:ind"_ostr, "right"_ostr, "144");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tblStylePr[@w:type='band2Horz']/w:tcPr/w:tcMar/w:bottom"_ostr, "w"_ostr, "86");
+
+ // LightList.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='LightList']/w:tblStylePr[@w:type='firstRow']/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+
+ // MediumList2-Accent1.
+ CPPUNIT_ASSERT(getXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='MediumList2-Accent1']/w:tblStylePr[@w:type='band1Vert']/w:tcPr/w:shd"_ostr, "themeFillTint"_ostr).equalsIgnoreAsciiCase("3F"));
+
+ // MediumShading2-Accent5.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='MediumShading2-Accent5']/w:tblStylePr[@w:type='firstRow']/w:tcPr/w:tcBorders/w:top"_ostr, "color"_ostr, "auto");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo71302)
+{
+ loadAndSave("fdo71302.docx");
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+
+ // This got renamed to "Strong Emphasis" without a good reason.
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Strong']"_ostr, 1);
+}
+
+
+DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx")
+{
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag(0);
+ xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
+
+ bool bTheme = false;
+ for(beans::PropertyValue const & prop : std::as_const(aGrabBag))
+ {
+ if (prop.Name == "OOXTheme")
+ {
+ bTheme = true;
+ uno::Reference<xml::dom::XDocument> aThemeDom;
+ CPPUNIT_ASSERT(prop.Value >>= aThemeDom); // PropertyValue of proper type
+ CPPUNIT_ASSERT(aThemeDom); // Reference not empty
+ }
+ }
+ CPPUNIT_ASSERT(bTheme); // Grab Bag has all the expected elements
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes()); // One groupshape in the doc
+
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xGroup->getCount()); // 1 rendered bitmap from the original shapes
+
+ uno::Reference<beans::XPropertySet> xGroupPropertySet(getShape(1), uno::UNO_QUERY);
+ xGroupPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
+
+ bool bData = false, bLayout = false, bQStyle = false, bColor = false, bDrawing = false;
+ for(beans::PropertyValue const & prop : std::as_const(aGrabBag))
+ {
+ if (prop.Name == "OOXData")
+ {
+ bData = true;
+ uno::Reference<xml::dom::XDocument> aDataDom;
+ CPPUNIT_ASSERT(prop.Value >>= aDataDom); // PropertyValue of proper type
+ CPPUNIT_ASSERT(aDataDom); // Reference not empty
+ }
+ else if (prop.Name == "OOXLayout")
+ {
+ bLayout = true;
+ uno::Reference<xml::dom::XDocument> aLayoutDom;
+ CPPUNIT_ASSERT(prop.Value >>= aLayoutDom); // PropertyValue of proper type
+ CPPUNIT_ASSERT(aLayoutDom); // Reference not empty
+ }
+ else if (prop.Name == "OOXStyle")
+ {
+ bQStyle = true;
+ uno::Reference<xml::dom::XDocument> aStyleDom;
+ CPPUNIT_ASSERT(prop.Value >>= aStyleDom); // PropertyValue of proper type
+ CPPUNIT_ASSERT(aStyleDom); // Reference not empty
+ }
+ else if (prop.Name == "OOXColor")
+ {
+ bColor = true;
+ uno::Reference<xml::dom::XDocument> aColorDom;
+ CPPUNIT_ASSERT(prop.Value >>= aColorDom); // PropertyValue of proper type
+ CPPUNIT_ASSERT(aColorDom); // Reference not empty
+ }
+ else if (prop.Name == "OOXDrawing")
+ {
+ bDrawing = true;
+ uno::Sequence< uno::Any > diagramDrawing;
+ uno::Reference<xml::dom::XDocument> aDrawingDom;
+ CPPUNIT_ASSERT(prop.Value >>= diagramDrawing);
+ CPPUNIT_ASSERT(diagramDrawing[0] >>= aDrawingDom); // PropertyValue of proper type
+ CPPUNIT_ASSERT(aDrawingDom); // Reference not empty
+ }
+ }
+ // Grab Bag has all the expected elements:
+ CPPUNIT_ASSERT(bData);
+ CPPUNIT_ASSERT(bLayout);
+ CPPUNIT_ASSERT(bQStyle);
+ CPPUNIT_ASSERT(bColor);
+ CPPUNIT_ASSERT(bDrawing);
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xGroup->getByIndex(0), uno::UNO_QUERY);
+ OUString nValue;
+ xPropertySet->getPropertyValue("Name") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("RenderedShapes"), nValue); // Rendered bitmap has the proper name
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFontNameIsEmpty)
+{
+ loadAndSave("font-name-is-empty.docx");
+ // Check no empty font name is exported
+ // This test does not fail, if the document contains a font with empty name.
+
+ xmlDocUniquePtr pXmlFontTable = parseExport("word/fontTable.xml");
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlFontTable, "/w:fonts/w:font"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ sal_Int32 length = xmlXPathNodeSetGetLength(pXmlNodes);
+ for(sal_Int32 index = 0; index < length; index++){
+ xmlNodePtr pXmlNode = pXmlNodes->nodeTab[index];
+ OUString attrVal = OUString::createFromAscii(reinterpret_cast<char*>(xmlGetProp(pXmlNode, BAD_CAST("name"))));
+ if (attrVal.isEmpty()){
+ CPPUNIT_FAIL("Font name is empty.");
+ }
+ }
+ xmlXPathFreeObject(pXmlObj);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testMultiColumnLineSeparator)
+{
+ loadAndSave("multi-column-line-separator-SAVED.docx");
+ // Check for the Column Separator value.It should be FALSE as the document does not contain separator line.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:sectPr/w:cols"_ostr,"sep"_ostr,"false");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testCustomXmlGrabBag, "customxml.docx")
+{
+ // The problem was that item[n].xml and itemProps[n].xml and .rels files for item[n].xml
+ // files were missing from docx file after saving file.
+ // This test case tests whether customxml files grabbagged properly in correct object.
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag(0);
+ xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
+ bool CustomXml = false;
+ for(beans::PropertyValue const & prop : std::as_const(aGrabBag))
+ {
+ if (prop.Name == "OOXCustomXml" || prop.Name == "OOXCustomXmlProps")
+ {
+ CustomXml = true;
+ uno::Reference<xml::dom::XDocument> aCustomXmlDom;
+ uno::Sequence<uno::Reference<xml::dom::XDocument> > aCustomXmlDomList;
+ CPPUNIT_ASSERT(prop.Value >>= aCustomXmlDomList); // PropertyValue of proper type
+ sal_Int32 length = aCustomXmlDomList.getLength();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), length);
+ aCustomXmlDom = aCustomXmlDomList[0];
+ CPPUNIT_ASSERT(aCustomXmlDom); // Reference not empty
+ }
+ }
+ CPPUNIT_ASSERT(CustomXml); // Grab Bag has all the expected elements
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCustomXmlRelationships)
+{
+ loadAndSave("customxml.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("customXml/_rels/item1.xml.rels");
+
+ // Check there is a relation to itemProps1.xml.
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship"_ostr, 1);
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr, "Target"_ostr, "itemProps1.xml");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo69644)
+{
+ loadAndSave("fdo69644.docx");
+ // The problem was that the exporter exported the table definition
+ // with only 3 columns, instead of 5 columns.
+ // Check that the table grid is exported with 5 columns
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol"_ostr, 5);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo70812, "fdo70812.docx")
+{
+ // Import just crashed.
+ getParagraph(1, "Sample pages document.");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPgMargin)
+{
+ loadAndSave("testPgMargin.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgMar"_ostr, "left"_ostr, "1440");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testImageCrop, "ImageCrop.docx")
+{
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ css::text::GraphicCrop aGraphicCropStruct;
+
+ imageProperties->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropStruct;
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 2955 ), aGraphicCropStruct.Left );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 5477 ), aGraphicCropStruct.Right );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 2856 ), aGraphicCropStruct.Top );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 2291 ), aGraphicCropStruct.Bottom );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106974_int32Crop, "tdf106974_int32Crop.docx")
+{
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ css::text::GraphicCrop aGraphicCropStruct;
+
+ imageProperties->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropStruct;
+
+ // The crop is constructed in GraphicProperties::pushToPropMap, where
+ // GraphicHelper::getOriginalSize tries to get graphic size in mm, then falls back to pixels,
+ // which are then converted to mm taking screen DPI scaling into account. Thus, the resulting
+ // values are DPI-dependent.
+ const double fXScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIX();
+
+ CPPUNIT_ASSERT_MESSAGE(
+ OString::number(aGraphicCropStruct.Right).getStr(),
+ 40470 * fXScaleFactor < aGraphicCropStruct.Right);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testLineSpacingexport, "test_line_spacing.docx")
+{
+ // The Problem was that the w:line attribute value in w:spacing tag was incorrect
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ CPPUNIT_ASSERT(xParaEnum->hasMoreElements());
+
+ // FIXME The test passes on most machines (including Linux x86_64 with gcc-4.7), but fails on various configs:
+ // Linux arm, Linux x86_64 with gcc-4.8 and Mac. Need to figure out what goes wrong and fix that.
+#if 0
+ style::LineSpacing alineSpacing = getProperty<style::LineSpacing>(xParaEnum->nextElement(), "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(13200), static_cast<sal_Int16>(alineSpacing.Height));
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing", "line", "31680");
+#endif
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextBoxGradientAngle, "fdo65295.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+
+ // Angle of frame#1 is 135 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame1(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame1, "FillStyle"));
+ awt::Gradient aGradient1 = getProperty<awt::Gradient>(xFrame1, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(135 * 10), aGradient1.Angle);
+
+ // Angle of frame#2 is 180 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame2(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame2, "FillStyle"));
+ awt::Gradient aGradient2 = getProperty<awt::Gradient>(xFrame2, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(180 * 10), aGradient2.Angle);
+
+ // Angle of frame#3 is 90 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame3(getShape(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame3, "FillStyle"));
+ awt::Gradient aGradient3 = getProperty<awt::Gradient>(xFrame3, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16( 90 * 10), aGradient3.Angle);
+
+ // Angle of frame#4 is 225 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame4(getShape(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame4, "FillStyle"));
+ awt::Gradient aGradient4 = getProperty<awt::Gradient>(xFrame4, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(225 * 10), aGradient4.Angle);
+
+ // Angle of frame#5 is 270 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame5(getShape(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame5, "FillStyle"));
+ awt::Gradient aGradient5 = getProperty<awt::Gradient>(xFrame5, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(270 * 10), aGradient5.Angle);
+
+ // Angle of frame#6 is 315 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame6(getShape(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame6, "FillStyle"));
+ awt::Gradient aGradient6 = getProperty<awt::Gradient>(xFrame6, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(315 * 10), aGradient6.Angle);
+
+ // Angle of frame#7 is 0 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame7(getShape(7), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame7, "FillStyle"));
+ awt::Gradient aGradient7 = getProperty<awt::Gradient>(xFrame7, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16( 0 * 10), aGradient7.Angle);
+
+ // Angle of frame#8 is 45 degrees, but 'aGradient.Angle' holds value in 1/10 of a degree
+ uno::Reference<beans::XPropertySet> xFrame8(getShape(8), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xFrame8, "FillStyle"));
+ awt::Gradient aGradient8 = getProperty<awt::Gradient>(xFrame8, "FillGradient");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16( 45 * 10), aGradient8.Angle);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCellGridSpan)
+{
+ loadAndSave("cell-grid-span.docx");
+ // The problem was during export gridSpan value for 1st & 2nd cells for test document
+ // used to get set wrongly to 5 and 65532 respectively which was the reason for crash during save operation
+ // Verifying gridSpan element is not present in RoundTripped Document (As it's Default value is 1).
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:tcPr/w:gridSpan"_ostr,0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:tcPr/w:gridSpan"_ostr,0);
+}
+DECLARE_OOXMLEXPORT_TEST(testFdo71646, "fdo71646.docx")
+{
+ // The problem was after save file created by MS the direction changed to RTL.
+ uno::Reference<uno::XInterface> xParaLTRLeft(getParagraph( 1, "LTR LEFT"));
+ sal_Int32 nLTRLeft = getProperty< sal_Int32 >( xParaLTRLeft, "ParaAdjust" );
+ // test the text Direction value for the paragraph
+ sal_Int16 nLRDir = getProperty< sal_Int32 >( xParaLTRLeft, "WritingMode" );
+
+ // this will test the both the text direction and alignment for paragraph
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), nLTRLeft);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nLRDir);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParaAutoSpacing)
+{
+ loadAndSave("para-auto-spacing.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing"_ostr, "beforeAutospacing"_ostr,"1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing"_ostr, "afterAutospacing"_ostr,"1");
+
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing"_ostr,
+ "beforeAutospacing"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing"_ostr,
+ "afterAutospacing"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing"_ostr, "before"_ostr,"400");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing"_ostr, "after"_ostr,"400");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGIFImageCrop, "test_GIF_ImageCrop.docx")
+{
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ css::text::GraphicCrop aGraphicCropStruct;
+
+ imageProperties->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropStruct;
+
+ // The crop is constructed in GraphicProperties::pushToPropMap, where
+ // GraphicHelper::getOriginalSize tries to get graphic size in mm, then falls back to pixels,
+ // which are then converted to mm taking screen DPI scaling into account. Thus, the resulting
+ // values are DPI-dependent.
+ const double fXScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIX();
+ const double fYScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIY();
+
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1085 * fXScaleFactor, aGraphicCropStruct.Left, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(3651 * fXScaleFactor, aGraphicCropStruct.Right, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(953 * fYScaleFactor, aGraphicCropStruct.Top, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1244 * fYScaleFactor, aGraphicCropStruct.Bottom, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPNGImageCrop, "test_PNG_ImageCrop.docx")
+{
+ /* The problem was image cropping information was not getting saved
+ * after roundtrip.
+ * Check for presence of cropping parameters in exported file.
+ */
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ css::text::GraphicCrop aGraphicCropStruct;
+
+ imageProperties->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropStruct;
+
+ // The crop is constructed in GraphicProperties::pushToPropMap, where
+ // GraphicHelper::getOriginalSize tries to get graphic size in mm, then falls back to pixels,
+ // which are then converted to mm taking screen DPI scaling into account. Thus, the resulting
+ // values are DPI-dependent.
+ const double fXScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIX();
+ const double fYScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIY();
+
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1058 * fXScaleFactor, aGraphicCropStruct.Left, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1111 * fXScaleFactor, aGraphicCropStruct.Right, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1164 * fYScaleFactor, aGraphicCropStruct.Top, 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(635 * fYScaleFactor, aGraphicCropStruct.Bottom, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf41542_imagePadding)
+{
+ loadAndReload("tdf41542_imagePadding.odt");
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // borderlessImage - image WITHOUT BORDERS : simulate padding with -crop
+ text::GraphicCrop crop = getProperty<text::GraphicCrop>(getShape(2), "GraphicCrop");
+ CPPUNIT_ASSERT( crop.Left != 0 );
+ CPPUNIT_ASSERT( crop.Right != 0 );
+ CPPUNIT_ASSERT_EQUAL( crop.Left, crop.Top);
+ CPPUNIT_ASSERT_EQUAL( crop.Right, crop.Bottom);
+ CPPUNIT_ASSERT_EQUAL( crop.Left, crop.Right);
+
+ // borderedImage - image WITH BORDERS : simulate padding with -crop
+ crop = getProperty<text::GraphicCrop>(getShape(3), "GraphicCrop");
+ CPPUNIT_ASSERT( crop.Left != 0 );
+ CPPUNIT_ASSERT( crop.Right != 0 );
+ CPPUNIT_ASSERT_EQUAL( crop.Left, crop.Top);
+ CPPUNIT_ASSERT_EQUAL( crop.Right, crop.Bottom);
+ CPPUNIT_ASSERT_EQUAL( crop.Left, crop.Right);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFootnoteParagraphTag)
+{
+ loadAndSave("testFootnote.docx");
+ /* In footnotes.xml, the paragraph tag inside <w:footnote w:id="2"> was getting written into document.xml.
+ * Check for, paragraph tag is correctly written into footnotes.xml.
+ */
+ xmlDocUniquePtr pXmlFootnotes = parseExport("word/footnotes.xml");
+ assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]"_ostr,"id"_ostr,"2");
+ assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]/w:p/w:r/w:footnoteRef"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSpacingLineRule)
+{
+ loadAndReload("table_lineRule.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr, "auto");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableLineSpacing)
+{
+ loadAndSave("table_atleast.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:pPr/w:spacing"_ostr, "line"_ostr, "320");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testOoxmlTriangle, "ooxml-triangle.docx")
+{
+ // The problem was that ooxml-triangle shape type wasn't handled by VML
+ // export (only isosceles-triangle), leading to a missing shape.
+ getShape(1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMce, "mce.docx")
+{
+ // The shape is red in Word2007, green in Word2010. Check that our import follows the later.
+ CPPUNIT_ASSERT_EQUAL(Color(0x9bbb59), getProperty<Color>(getShape(1), "FillColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testThemePreservation)
+{
+ loadAndSave("theme-preservation.docx");
+ // check default font theme values have been preserved
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ assertXPath(pXmlStyles, "/w:styles/w:docDefaults/w:rPrDefault/w:rPr/w:rFonts"_ostr, "asciiTheme"_ostr, "minorHAnsi");
+ assertXPath(pXmlStyles, "/w:styles/w:docDefaults/w:rPrDefault/w:rPr/w:rFonts"_ostr, "cstheme"_ostr, "minorBidi");
+
+ // check the font theme values in style definitions
+ assertXPath(pXmlStyles, "/w:styles/w:style[1]/w:rPr/w:rFonts"_ostr, "eastAsiaTheme"_ostr, "minorEastAsia");
+
+ // check the color theme values in style definitions
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Custom1']/w:rPr/w:color"_ostr, "themeColor"_ostr, "accent1");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Custom1']/w:rPr/w:color"_ostr, "themeTint"_ostr, "99");
+
+ // check direct format font theme values have been preserved
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[5]/w:r[1]/w:rPr/w:rFonts"_ostr, "hAnsiTheme"_ostr, "majorHAnsi");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[5]/w:r[1]/w:rPr/w:rFonts"_ostr, "asciiTheme"_ostr, "majorHAnsi");
+
+ // check theme font color value has been preserved
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w:color"_ostr, "themeColor"_ostr, "accent3");
+ OUString sThemeShade = getXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w:color"_ostr, "themeShade"_ostr);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0xbf), sThemeShade.toInt32(16));
+
+ // check the themeFontLang values in settings file
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:themeFontLang"_ostr, "val"_ostr, "en-US");
+ assertXPath(pXmlSettings, "/w:settings/w:themeFontLang"_ostr, "eastAsia"_ostr, "zh-CN");
+ assertXPath(pXmlSettings, "/w:settings/w:themeFontLang"_ostr, "bidi"_ostr, "he-IL");
+
+ // check fonts have been applied properly
+ sal_Unicode fontName[2]; //represents the string "宋体"
+ fontName[0] = 0x5b8b;
+ fontName[1] = 0x4f53;
+ CPPUNIT_ASSERT_EQUAL(OUString(fontName, 2), getProperty<OUString>(getParagraph(1), "CharFontNameAsian"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial"),
+ getProperty<OUString>(getParagraph(2), "CharFontNameComplex"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Trebuchet MS"),
+ getProperty<OUString>(getParagraph(3, "Default style theme font"), "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial Black"),
+ getProperty<OUString>(getRun(getParagraph(4, "Direct format font"), 1), "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Trebuchet MS"),
+ getProperty<OUString>(getParagraph(5, "Major theme font"), "CharFontName"));
+
+ // check the paragraph background pattern has been preserved including theme colors
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[6]/w:pPr/w:shd"_ostr, "val"_ostr, "thinHorzStripe");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[6]/w:pPr/w:shd"_ostr, "themeFill"_ostr, "text2");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[6]/w:pPr/w:shd"_ostr, "themeFillTint"_ostr, "33");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[6]/w:pPr/w:shd"_ostr, "themeColor"_ostr, "accent1");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[6]/w:pPr/w:shd"_ostr, "themeShade"_ostr, "80");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableThemePreservation)
+{
+ loadAndSave("table-theme-preservation.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // check cell theme colors have been preserved
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:shd"_ostr, "themeFill"_ostr, "accent6");
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:shd"_ostr,
+ "themeFillShade"_ostr);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:shd"_ostr, "themeFillTint"_ostr, "33");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:tcPr/w:shd"_ostr, "themeFill"_ostr, "accent6");
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:tcPr/w:shd"_ostr,
+ "themeFillShade"_ostr);
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:tcPr/w:shd"_ostr,
+ "themeFillTint"_ostr);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:tcPr/w:shd"_ostr, "themeFill"_ostr, "accent6");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:tcPr/w:shd"_ostr, "themeFillShade"_ostr, "80");
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:tcPr/w:shd"_ostr,
+ "themeFillTint"_ostr);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:tcPr/w:shd"_ostr, "val"_ostr, "horzStripe");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:tcPr/w:shd"_ostr, "themeColor"_ostr, "accent3");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:tcPr/w:shd"_ostr, "themeTint"_ostr, "33");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[3]/w:tcPr/w:shd"_ostr, "color"_ostr, "E7EEEE");
+
+ // check table style has been preserved
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tblPr/w:tblStyle"_ostr, "val"_ostr, "Sombreadoclaro-nfasis1");
+ // check table style is not overwritten by other properties
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:tcPr/w:tcBorders/*"_ostr, 0);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[3]/w:tcPr/w:tcBorders/*"_ostr, 0);
+ // check that one cell attribute present in the original document has been preserved
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:tcBorders/*"_ostr, 1);
+
+ // Check that w:cnfStyle row, cell and paragraph property is preserved.
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:trPr/w:cnfStyle"_ostr, "val"_ostr, "100000000000");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:trPr/w:cnfStyle"_ostr, "firstRow"_ostr, "1");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:trPr/w:cnfStyle"_ostr, "lastRow"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:trPr/w:cnfStyle"_ostr, "firstColumn"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:trPr/w:cnfStyle"_ostr, "lastColumn"_ostr, "0");
+
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc/w:tcPr/w:cnfStyle"_ostr, "val"_ostr, "001000000000");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc/w:tcPr/w:cnfStyle"_ostr, "oddVBand"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc/w:tcPr/w:cnfStyle"_ostr, "evenVBand"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc/w:tcPr/w:cnfStyle"_ostr, "oddHBand"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc/w:tcPr/w:cnfStyle"_ostr, "evenHBand"_ostr, "0");
+
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc[2]/w:p/w:pPr/w:cnfStyle"_ostr, "val"_ostr, "100000000000");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc[2]/w:p/w:pPr/w:cnfStyle"_ostr, "firstRowFirstColumn"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc[2]/w:p/w:pPr/w:cnfStyle"_ostr, "firstRowLastColumn"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc[2]/w:p/w:pPr/w:cnfStyle"_ostr, "lastRowFirstColumn"_ostr, "0");
+ assertXPath(pXmlDocument, "//w:tbl/w:tr[1]/w:tc[2]/w:p/w:pPr/w:cnfStyle"_ostr, "lastRowLastColumn"_ostr, "0");
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testcantSplit)
+{
+ loadAndSave("2_table_doc.docx");
+ // if Split table value is true for a table then during export do not write <w:cantSplit w:val="false"/>
+ // in table row property,As default row prop is allow row to break across page.
+ // writing <w:cantSplit w:val="false"/> during export was causing problem that all the cell data used to come on same page
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:cantSplit"_ostr,0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr/w:trPr/w:cantSplit"_ostr,"val"_ostr,"true");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDontSplitTable)
+{
+ loadAndReload("tdf101589_dontSplitTable.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ //single row tables need to prevent split by setting row to no split
+ CPPUNIT_ASSERT_EQUAL( OUString("Row 1"), parseDump("/root/page[2]/body/tab[1]/row[1]/cell[1]/txt[1]"_ostr) );
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable (xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTable, "Split"));
+
+ uno::Reference<table::XTableRows> xTableRows = xTable->getRows();
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTableRows->getByIndex(0), "IsSplitAllowed"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testExtraSectionBreak, "1_page.docx")
+{
+ // There was a problem for some documents during export.Invalid sectPr getting added
+ // because of faulty calculation of PageDesc value
+ // This was the reason for increasing number of pages after RT
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // tdf126544 Styles were being added before their base/parent/inherited-from style existed, and so were using default settings.
+ uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles"));
+ uno::Reference<style::XStyle> xStyle(xParaStyles->getByName("Heading 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( OUString("Heading Base"), xStyle->getParentStyle() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testcolumnbreak)
+{
+ loadAndSave("columnbreak.docx");
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(5, "This is first line after col brk."), "BreakType"));
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:r[1]/w:br"_ostr, "type"_ostr, "column");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testGlossary)
+{
+ loadAndSave("testGlossary.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/glossary/document.xml");
+ assertXPath(pXmlDoc, "/w:glossaryDocument"_ostr, "Ignorable"_ostr, "w14 wp14");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testGlossaryWithEmail)
+{
+ // tdf#152289
+ loadAndSave("glossaryWithEmail.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/glossary/_rels/document.xml.rels");
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@Id='rId4' "
+ "and @Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink' "
+ "and @Target='mailto:emailgoeshere@example.com' "
+ "and @TargetMode='External']"_ostr);
+
+ // preserve the ShowingPlaceholder setting on both block SDTs.
+ pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:showingPlcHdr"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:sdt/w:sdtPr/w:showingPlcHdr"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo71785, "fdo71785.docx")
+{
+ // crashtest
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCrashWhileSave)
+{
+ loadAndSave("testCrashWhileSave.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/footer1.xml");
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:ftr/w:tbl/w:tr/w:tc[1]/w:p[1]/w:pPr/w:pStyle"_ostr, "val"_ostr).match("Normal"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFileOpenInputOutputError)
+{
+ loadAndReload("floatingtbl_with_formula.docx");
+ // Docx containing Floating table with formula was giving "General input/output error" while opening in LibreOffice
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pStyle"_ostr, "val"_ostr, "Normal");
+
+ // let's also assert that the formula was exported properly
+ assertXPathContent(pXmlDoc, "//w:tbl/w:tr/w:tc[2]/w:p/m:oMathPara/m:oMath/m:sSubSup/m:e/m:r/m:t"_ostr, u"\u03C3"_ustr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSingleCellTableBorders)
+{
+ loadAndSave("tdf124399_SingleCellTableBorders.docx");
+ // tdf#124399: Extra borders on single cell tables fixed.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:tcBorders/w:top [@w:val = 'nil']"_ostr, 1);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testInsideBorders)
+{
+ loadAndSave("tdf129242_InsideBorders.docx");
+ // tdf#129242: Don't remove inside borders if the table has more than one cells.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // If this is not 0, then inside borders are removed.
+ assertXPathChildren(pXmlDocument, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:tcPr/w:tcBorders"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRightBorder)
+{
+ loadAndSave("tdf129442_RightBorder.docx");
+ // tdf#129442: Right border of a one column table was missing.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // If the right border is missing like in the bug, then there is a <w:right w:val="nil" /> tag in tcBorders.
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:tcPr/w:tcBorders/w:end [@w:val = 'nil']"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBottomBorder)
+{
+ loadAndSave("tdf129450_BottomBorder.docx");
+ // tdf#129450: Missing bottom border in one row table.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // If there is no bottom border, it is shown in tcBorders.
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBottomBorders)
+{
+ loadAndSave("tdf129452_BottomBorders.docx");
+ // tdf#129452: Do not omit bottom borders when a column in a table is vertically merged and
+ // the inside borders are turned off.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']"_ostr, 0);
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[2]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']"_ostr, 0);
+
+ // But also don't treat separately merged cells as one - the topmost merged cell shouldn't gain a border.
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[4]/w:tcPr/w:tcBorders/w:bottom"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFontTypes)
+{
+ loadAndSave("tdf120344_FontTypes.docx");
+ // tdf#120344: Font type of numbering symbols can be different than the font type of the text.
+
+ // Check the font type of the text, should be Consolas.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/w:rPr/w:rFonts [@w:ascii='Consolas']"_ostr, 1);
+
+ // Now the font type of the numbering symbols, should be Arial Black.
+ xmlDocUniquePtr qXmlDocument = parseExport("word/numbering.xml");
+ assertXPath(qXmlDocument, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:rPr/w:rFonts [@w:ascii='Arial Black']"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNumberingLevels)
+{
+ loadAndSave("tdf95495.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // tdf#95495: set list level of the custom style based on the setting of the parent style
+ // [this assertXPath is not a very good test, since the numbering definition is not set on the paragraph itself,
+ // but in a style. This just tests the current copy-to-paragraph implementation. But leaving it for now,
+ // since this example is very much a corner case, so anyone trespassing here should double-check everything...]
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:numPr/w:ilvl [@w:val = '1']"_ostr, 1);
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Note: _Toc and _Ref hidden bookmarks are imported from OOXML as normal bookmarks.
+ // Without hiding them from visible bookmarks (SwBookmarkPortion), this line would be
+ // shown as "A.2.1 [[[[[.DESCRIPTION]]]] with XML layout dump "A.2.1 #_Ref... Bookmark Start..."
+ assertXPath(pXmlDoc, "//body/txt[5]/SwParaPortion/SwLineLayout/child::*[1]"_ostr, "expand"_ostr, "A.2.1 ");
+ assertXPath(pXmlDoc, "//body/txt[5]/SwParaPortion/SwLineLayout/child::*[2]"_ostr, "portion"_ostr, ".DESCRIPTION");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVerticalBorders)
+{
+ loadAndSave("calendar3.docx");
+ // tdf#130799: Inside vertical borders of a table should not be missing.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ // Left and right borders.
+ assertXPathChildren(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[3]/w:tcPr/w:tcBorders"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testArrowFlipXY)
+{
+ loadAndSave("tdf100751_arrowBothFlip.docx");
+ // tdf#100751: Both x and y flip should happen.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ OUString arrowStyle = getXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/"
+ "w:pict/v:group/v:shape[@type='_x0000_t32']"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(arrowStyle.indexOf(u"flip:xy") != sal_Int32(-1));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testArrowPosition)
+{
+ loadAndSave("tdf104565_ArrowPosition.docx");
+ // tdf#104565: Test correct position.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // This is the correct Y coordinate, the incorrect was 817880.
+ assertXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/wp:positionV/wp:posOffset"_ostr, "516255");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testArrowMarker)
+{
+ loadAndSave("tdf123346_ArrowMarker.docx");
+ // tdf#123346: Check arrow marker.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:tailEnd"_ostr, "type"_ostr, "arrow");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testShapeLineWidth)
+{
+ loadAndSave("tdf92526_ShapeLineWidth.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // tdf#92526: Make sure that line with stays 0.
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+
+ // "w" attribute was not exported.
+ assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing"
+ "/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln"_ostr, "w"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorWidthFromLeftMargin)
+{
+ loadAndSave("tdf132976_testRelativeAnchorWidthFromLeftMargin.docx");
+ // tdf#132976 The size of the width of this shape should come from the size of the left margin.
+ // It was set to the size of the width of the entire page before.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "width"_ostr, "1133");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorWidthFromInsideOutsideMargin)
+{
+ loadAndSave("tdf133861_RelativeAnchorWidthFromInsideOutsideMargin.docx");
+ // tdf#133863 tdf#133864 The sizes of the width of these shapes depend on the sizes of the inside and outside margins.
+ // The open book: outside --text-- inside | inside --text-- outside
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Inside
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[1]/bounds"_ostr, "width"_ostr, "1440");
+ // Outside
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[2]/bounds"_ostr, "width"_ostr, "2552");
+ // Outside
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[3]/bounds"_ostr, "width"_ostr, "2552");
+ // Inside
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[4]/bounds"_ostr, "width"_ostr, "1440");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBodyPrUpright)
+{
+ loadAndSave("tdf123610_handle_upright.docx");
+ // tdf#123610: Check grab-bag attribute upright to keep text upright regardless of shape rotation.
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp/wps:bodyPr"_ostr, "upright"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLostArrow)
+{
+ loadAndReload("tdf99810-lost-arrow.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // tdf#99810: check whether we use normal shape instead of connector shape if the XML namespace
+ // is wps, because wps:
+ xmlDocUniquePtr pDoc = parseExport("word/document.xml");
+
+ assertXPath(pDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp"_ostr);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
new file mode 100644
index 0000000000..f1c4fc5f54
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -0,0 +1,1313 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+
+#include <config_fonts.h>
+#include <officecfg/Office/Writer.hxx>
+#include <vcl/svapp.hxx>
+#include <comphelper/scopeguard.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+
+protected:
+ void verifyComboBoxExport(bool aComboBoxAsDropDown);
+};
+
+DECLARE_OOXMLEXPORT_TEST(testRelorientation, "relorientation.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // This was text::RelOrientation::FRAME, when handling relativeFrom=page, align=right
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
+
+ uno::Reference<drawing::XShapes> xGroup(xShape, uno::UNO_QUERY);
+ // This resulted in lang::IndexOutOfBoundsException, as nested groupshapes weren't handled.
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xGroup->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GroupShape"), xShapeDescriptor->getShapeType());
+
+ // 'actual child size' = 'group ext' * 'child ext' / 'chExt from group', see section 'chExt' in
+ // [MS-OI29500]. Here for width from file 3108960 * 4896 / 4911 = 3099464 EMU. That corresponds to
+ // width 8.61cm and 325px in UI in Word and rounds down to 8609 Hmm. Considering scaling of the
+ // parent group to the anchor extent (* 3118485 / 3108960) we get a display width of 3108960 EMU
+ // = 8636Hmm. FIXME: Expected value is as in LO 7.2. Reason for difference is yet unknown.
+ if (isExported())
+ {
+ uno::Reference<drawing::XShape> xYear(xGroup->getByIndex(1), uno::UNO_QUERY);
+ // This was 2, due to incorrect handling of parent transformations inside DML groupshapes.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8662), xYear->getSize().Width);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBezier)
+{
+ loadAndReload("bezier.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Check that no shape got lost: a bezier, a line and a text shape.
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGroupshapeTextbox, "groupshape-textbox.docx")
+{
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // The VML export lost text on textboxes inside groupshapes.
+ // The DML export does not, make sure it stays that way.
+ CPPUNIT_ASSERT_EQUAL(OUString("first"), xShape->getString());
+ // This was 16, i.e. inheriting doc default char height didn't work.
+ CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(getParagraphOfText(1, xShape->getText()), "CharHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGroupshapePicture, "groupshape-picture.docx")
+{
+ // Picture in the groupshape got lost, groupshape had only one child.
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xGroup->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GraphicObjectShape"), xShapeDescriptor->getShapeType());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testAutofit, "autofit.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "TextAutoGrowHeight"));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(2), "TextAutoGrowHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesDeletedParagraphMark)
+{
+ loadAndSave("testTrackChangesDeletedParagraphMark.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:del"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesInsertedParagraphMark)
+{
+ loadAndSave("testTrackChangesInsertedParagraphMark.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:ins"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesDeletedTableRow)
+{
+ loadAndSave("testTrackChangesDeletedTableRow.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:trPr/w:del"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesInsertedTableRow)
+{
+ loadAndSave("testTrackChangesInsertedTableRow.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:trPr/w:ins"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesDeletedTableCell)
+{
+ loadAndSave("testTrackChangesDeletedTableCell.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:tcPr/w:cellDel"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesInsertedTableCell)
+{
+ loadAndSave("testTrackChangesInsertedTableCell.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:tcPr/w:cellIns"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, "textbox_picturefill.docx")
+{
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
+ auto xBitmap = getProperty<uno::Reference<awt::XBitmap>>(xFrame, "FillBitmap");
+ CPPUNIT_ASSERT(xBitmap.is());
+ uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xGraphic.is());
+ Graphic aGraphic(xGraphic);
+ CPPUNIT_ASSERT(!aGraphic.IsNone());
+ CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0L);
+ CPPUNIT_ASSERT_EQUAL(tools::Long(447), aGraphic.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(528), aGraphic.GetSizePixel().Height());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO73034)
+{
+ loadAndSave("FDO73034.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:u"_ostr, "val"_ostr).match("single"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO71834)
+{
+ loadAndSave("fdo71834.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[2]/w:tc[1]/w:tcPr[1]/w:tcW[1]"_ostr,"type"_ostr, "dxa");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTrackChangesParagraphProperties)
+{
+ loadAndSave("testTrackChangesParagraphProperties.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathChildren(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pPrChange"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testMsoSpt180)
+{
+ loadAndReload("mso-spt180.docx");
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ const uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(xGroup->getByIndex(0), "CustomShapeGeometry");
+ OUString aType;
+ for (beans::PropertyValue const & prop : aProps)
+ if (prop.Name == "Type")
+ aType = prop.Value.get<OUString>();
+ // This was exported as borderCallout90, which is an invalid drawingML preset shape string.
+ CPPUNIT_ASSERT_EQUAL(OUString("ooxml-borderCallout1"), aType);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo73550)
+{
+ loadAndSave("fdo73550.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ // This was wrap="none".
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:rFonts"_ostr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPageRelSize, "pagerelsize.docx")
+{
+ // First shape: width is relative from page, but not height.
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "RelativeWidthRelation"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty<sal_Int16>(xShape, "RelativeHeightRelation"));
+
+ // Second shape: height is relative from page, but not height.
+ xShape = getShape(2);
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "RelativeHeightRelation"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty<sal_Int16>(xShape, "RelativeWidthRelation"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testRelSizeRound, "rel-size-round.docx")
+{
+ // This was 9: 9.8 was imported as 9 instead of being rounded to 10.
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10), getProperty<sal_Int16>(getShape(1), "RelativeHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTestTitlePage, "testTitlePage.docx")
+{
+ // this has 2 pages in Word
+ CPPUNIT_ASSERT_EQUAL(OUString("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), parseDump("/root/page[2]/footer/txt/text()"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableRowDataDisplayedTwice, "table-row-data-displayed-twice.docx")
+{
+ // fdo#73534: There was a problem for some documents during export.Invalid sectPr getting added
+ // because of wrong condition in code.
+ // This was the reason for increasing number of pages after RT
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo73556)
+{
+ loadAndSave("fdo73556.docx");
+ /*
+ * The file contains a table with 3 columns
+ * the gridcols are as follows: {1210, 1331, 1210}
+ * whereas the individual cells have {1210, 400, 1210}
+ * The table column separators were taken from the Grid, while
+ * the table width was calculated as 2820 from cells instead
+ * of 3751 from the Grid.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol"_ostr, 3);
+ sal_Int32 tableWidth = 0;
+ tableWidth += getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol[1]"_ostr, "w"_ostr).toInt32();
+ tableWidth += getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol[2]"_ostr, "w"_ostr).toInt32();
+ tableWidth += getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol[3]"_ostr, "w"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3751), tableWidth);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSegFaultWhileSave)
+{
+ loadAndSave("test_segfault_while_save.docx");
+ // fdo#74499
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6137), getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol[2]"_ostr, "w"_ostr).toInt32());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, fdo69656)
+{
+ loadAndSave("Table_cell_auto_width_fdo69656.docx");
+ // Changed the UT to check "dxa" instead of "auto"
+ // For this particular issue file few cells have width type "auto"
+ // LO supports VARIABLE and FIXED width type.
+ // If type is VARIABLE LO calculates width as percent of PageSize
+ // Else if the width is fixed it uses the width value.
+ // After changes for fdo76741 the fixed width is exported as "dxa" for DOCX
+
+ // Check for the width type of table and its cells.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblW"_ostr,"type"_ostr,"dxa");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo76741)
+{
+ loadAndSave("fdo76741.docx");
+
+ // There are two issue related to table in the saved(exported) file
+ // - the table alignment in saved file is "left" instead of "center"
+ // - the table width type in properties is "auto" instead of "dxa"
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "//w:jc"_ostr, "val"_ostr, "center");
+ assertXPath(pXmlDoc, "//w:tblW"_ostr, "w"_ostr, "10081");
+ assertXPath(pXmlDoc, "//w:tblW"_ostr, "type"_ostr, "dxa");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo73541)
+{
+ loadAndSave("fdo73541.docx");
+ // fdo#73541: The mirrored margins were not imported and mapped correctly in Page Layout
+ // Hence <w:mirrorMargins /> tag was not exported back in settings.xml
+ xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
+ assertXPath(pXmlDoc, "/w:settings/w:mirrorMargins"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo106029)
+{
+ loadAndSave("fdo106029.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:doNotExpandShiftReturn"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf146515)
+{
+ loadAndSave("tdf146515.odt");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:usePrinterMetrics"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO74106)
+{
+ loadAndSave("FDO74106.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:numFmt"_ostr, "val"_ostr,"hebrew1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO74215)
+{
+ loadAndSave("FDO74215.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+ // tdf#106849 NumPicBullet xShape should not be resized.
+
+ // This is dependent on the running system: see MSWordExportBase::BulletDefinitions
+ // FIXME: the size of a bullet is defined by GraphicSize property
+ // (stored in SvxNumberFormat::aGraphicSize) so use that for the size
+ // (properly convert from 100mm to pt (1 inch is 72 pt, 1 pt is 20 twips).
+
+ // On 96 DPI "width:11.25pt;height:11.25pt"; on 120 DPI "width:9pt;height:9pt"
+ const OUString sStyle
+ = getXPath(pXmlDoc, "/w:numbering/w:numPicBullet[2]/w:pict/v:shape"_ostr, "style"_ostr);
+ {
+ OUString sWidth = sStyle.getToken(0, ';');
+ CPPUNIT_ASSERT(sWidth.startsWith("width:", &sWidth));
+ CPPUNIT_ASSERT(sWidth.endsWith("pt", &sWidth));
+ const double fWidth = sWidth.toDouble();
+ const double fXScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIX();
+ // note: used to fail on Mac with 14.7945205479452 vs. 14.8
+ // note: used to fail on another Mac with 12.1348314606742 vs 12.15
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25 * fXScaleFactor, fWidth, 0.1);
+ }
+ {
+ OUString sHeight = sStyle.getToken(1, ';');
+ CPPUNIT_ASSERT(sHeight.startsWith("height:", &sHeight));
+ CPPUNIT_ASSERT(sHeight.endsWith("pt", &sHeight));
+ const double fHeight = sHeight.toDouble();
+ const double fYScaleFactor = 96.0 / Application::GetDefaultDevice()->GetDPIY();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25 * fYScaleFactor, fHeight, 0.1);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testColumnBreak_ColumnCountIsZero,"fdo74153.docx")
+{
+ /* fdo73545: Column Break with Column_count = 0 was not getting preserved.
+ * The <w:br w:type="column" /> was missing after roundtrip
+ */
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:br"_ostr,"type"_ostr,"column");
+ }
+
+ //tdf76349 match Word's behavior of treating breaks in single columns as page breaks.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90697_complexBreaksHeaders,"tdf90697_complexBreaksHeaders.docx")
+{
+// This is a complex document using many types of section breaks and re-defined headers.
+// Paragraphs 44-47 were in two columns
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(45), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+// after that, the section break should switch things back to one column.
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(50), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testIndentation)
+{
+ loadAndSave("test_indentation.docx");
+ // fdo#74141 :There was a problem that in style.xml and document.xml in <w:ind> tag "right" & "left" margin
+ // attributes gets added(w:right=0 & w:left=0) if these attributes are not set in original document.
+ // This test is to verify <w:ind> does not contain w:right attribute.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:ind"_ostr, "end"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testChartInFooter)
+{
+ loadAndSave("chart-in-footer.docx");
+ // fdo#73872: document contains chart in footer.
+ // The problem was that footer1.xml.rels files for footer1.xml
+ // files were missing from docx file after roundtrip.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/footer2.xml.rels");
+
+ // Check footer2.xml.rels contains in doc after roundtrip.
+ // Check Id = rId1 in footer2.xml.rels
+ assertXPath(pXmlDoc,"/rels:Relationships/rels:Relationship"_ostr,"Id"_ostr,"rId1");
+ assertXPath(pXmlDoc,
+ "/rels:Relationships/rels:Relationship[@Id='rId1']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart");
+
+ xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDocCT,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/charts/chart1.xml']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml");
+
+ // check the content too
+ xmlDocUniquePtr pXmlDocFooter2 = parseExport("word/footer2.xml");
+ assertXPath(pXmlDocFooter2,
+ "/w:ftr/w:p[1]/w:r/w:drawing/wp:inline/a:graphic/a:graphicData"_ostr,
+ "uri"_ostr,
+ "http://schemas.openxmlformats.org/drawingml/2006/chart");
+ assertXPath(pXmlDocFooter2,
+ "/w:ftr/w:p[1]/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/c:chart"_ostr,
+ "id"_ostr,
+ "rId1");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNestedTextFrames)
+{
+ loadAndReload("nested-text-frames.odt");
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // First problem was LO crashed during export (crash test)
+
+ // Second problem was LO made file corruption, writing out nested text boxes, which can't be handled by Word.
+ // Test that all three exported text boxes are anchored to the same paragraph and not each other.
+ uno::Reference<text::XTextContent> xTextContent(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xTextContent->getAnchor();
+ uno::Reference<text::XText> xText = xRange->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("Anchor point"), xText->getString());
+
+ xTextContent.set(getShape(2), uno::UNO_QUERY);
+ xRange = xTextContent->getAnchor();
+ xText = xRange->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("Anchor point"), xText->getString());
+
+ xTextContent.set(getShape(3), uno::UNO_QUERY);
+ xRange = xTextContent->getAnchor();
+ xText = xRange->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("Anchor point"), xText->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFloatingTablePosition, "floating-table-position.docx")
+{
+ // Position of shape was wrong, because some conversion was missing.
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ // This was 3295.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5964), getProperty<sal_Int32>(xShape, "HoriOrientPosition"));
+ // This was 4611.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8133), getProperty<sal_Int32>(xShape, "VertOrientPosition"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAbi11739)
+{
+ loadAndSave("abi11739.docx");
+ // Validation test: order of elements were wrong.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ // Order was: uiPriority, link, basedOn.
+ CPPUNIT_ASSERT(getXPathPosition(pXmlDoc, "/w:styles/w:style[3]"_ostr, "basedOn") < getXPathPosition(pXmlDoc, "/w:styles/w:style[3]"_ostr, "link"));
+ CPPUNIT_ASSERT(getXPathPosition(pXmlDoc, "/w:styles/w:style[3]"_ostr, "link") < getXPathPosition(pXmlDoc, "/w:styles/w:style[3]"_ostr, "uiPriority"));
+ // Order was: qFormat, unhideWhenUsed.
+ CPPUNIT_ASSERT(getXPathPosition(pXmlDoc, "/w:styles/w:style[11]"_ostr, "unhideWhenUsed") < getXPathPosition(pXmlDoc, "/w:styles/w:style[11]"_ostr, "qFormat"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testEmbeddedXlsx, "embedded-xlsx.docx")
+{
+ // check there are two objects and they are FrameShapes
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), getShape(1)->getShapeType());
+ CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), getShape(2)->getShapeType());
+
+ // check the objects are present in the exported document.xml
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/w:object"_ostr, 2);
+
+ // finally check the embedded files are present in the zipped document
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ const uno::Sequence<OUString> names = xNameAccess->getElementNames();
+ int nSheetFiles = 0;
+ int nImageFiles = 0;
+ for (OUString const & n : names)
+ {
+ if(n.startsWith("word/embeddings/oleObject"))
+ nSheetFiles++;
+ if(n.startsWith("word/media/image"))
+ nImageFiles++;
+ }
+ CPPUNIT_ASSERT_EQUAL(2, nSheetFiles);
+ CPPUNIT_ASSERT_EQUAL(2, nImageFiles);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNumberedLists_StartingWithZero)
+{
+ loadAndSave("FDO74105.docx");
+ /* Issue : Numbered lists Starting with value '0' is not preserved after RT.
+ * In numbering.xml, an XML tag <w:start> is optional. If not mentioned,
+ * the Numbered list should start from 0.
+ * Problem was LO was writing <w:start> for all levels 0-8 with default value "1".
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+
+ // Check that we do _not_ export w:start for <w:lvl w:ilvl="0">.
+ assertXPath(pXmlDoc, "w:numbering/w:abstractNum[1]/w:lvl[1]/w:start"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageBreak)
+{
+ loadAndReload("fdo74566.docx");
+ /* Break to next page was written into wrong paragraph as <w:pageBreakBefore />.
+ * LO was not preserving Page Break as <w:br w:type="page" />.
+ * Now after fix , LO writes Page Break as the new paragraph and also
+ * preserves the xml tag <w:br>.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ uno::Reference<text::XTextRange> xParagraph2 = getParagraph(2);
+ uno::Reference<text::XTextRange> xParagraph4 = getParagraph(4);
+
+ getRun(xParagraph2, 1, "First Page Second Line");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:br"_ostr,"type"_ostr,"page");
+ getRun(xParagraph4, 1, "Second Page First line after Page Break");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOleObject)
+{
+ loadAndSave("test_ole_object.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object/v:shape/v:imagedata"_ostr,
+ "o:title"_ostr);
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/w:object/o:OLEObject"_ostr,
+ "DrawAspect"_ostr,
+ "Content");
+ // TODO: ProgID="Package" - what is this? Zip with 10k extra header?
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.bin']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
+ // check the media type too
+ xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDocCT,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.bin']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-officedocument.oleObject");
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo74792)
+{
+ loadAndSave("fdo74792.docx");
+ /*
+ * fdo#74792 : The images associated with smart-art data[i].xml
+ * were not preserved on exporting to DOCX format
+ * Added support to grabbag the rels, with associated images.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/diagrams/_rels/data1.xml.rels");
+ assertXPath(pXmlDoc,"/rels:Relationships/rels:Relationship"_ostr, 4);
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(
+ comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+
+ //check that images are also saved
+ uno::Reference<io::XInputStream> xInputStream(xNameAccess->getByName( "word/media/OOXDiagramDataRels1_0.jpeg" /*added anchor id to form a unique name*/ ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT( xInputStream.is() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo77718)
+{
+ loadAndSave("fdo77718.docx");
+ //in case of multiple smart arts the names for images were getting
+ //repeated and thereby causing a data loss as the binary stream was
+ //getting over written. This test case ensures that unique names are
+ //given for images in different smart arts.
+ xmlDocUniquePtr pXmlDataRels1 = parseExport("word/diagrams/_rels/data1.xml.rels");
+ xmlDocUniquePtr pXmlDataRels2 = parseExport("word/diagrams/_rels/data2.xml.rels");
+
+ //ensure that the rels file is present.
+ assertXPath(pXmlDataRels1,"/rels:Relationships/rels:Relationship"_ostr, 4);
+ assertXPath(pXmlDataRels2,"/rels:Relationships/rels:Relationship"_ostr, 4);
+
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(
+ comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+
+ //check that images are also saved
+ uno::Reference<io::XInputStream> xInputStream1(xNameAccess->getByName( "word/media/OOXDiagramDataRels1_0.jpeg" /*added anchor id to form a unique name*/ ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT( xInputStream1.is() );
+
+ //check that images are saved for other smart-arts as well.
+ uno::Reference<io::XInputStream> xInputStream2(xNameAccess->getByName( "word/media/OOXDiagramDataRels2_0.jpeg" /*added anchor id to form a unique name*/ ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT( xInputStream2.is() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableCurruption)
+{
+ loadAndSave("tableCurrupt.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
+ CPPUNIT_ASSERT(pXmlDoc) ;
+ assertXPath(pXmlDoc, "/w:hdr/w:tbl[1]/w:tr[1]/w:tc[1]"_ostr,1);
+
+ // tdf#116549: header paragraph should not have a bottom border.
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xStyle.is());
+ uno::Reference<text::XText> xHeaderText = getProperty<uno::Reference<text::XText>>(xStyle, "HeaderTextFirst");
+ CPPUNIT_ASSERT(xHeaderText.is());
+ auto xParagraph = getParagraphOfText(1, xHeaderText);
+ CPPUNIT_ASSERT(xParagraph.is());
+ table::BorderLine2 aHeaderBottomBorder = getProperty<table::BorderLine2>(xParagraph, "BottomBorder");
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), aHeaderBottomBorder.LineWidth);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDateControl)
+{
+ loadAndSave("date-control.docx");
+ // check XML
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date"_ostr, "fullDate"_ostr, "2014-03-05T00:00:00Z");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:dateFormat"_ostr, "val"_ostr, "dddd, dd' de 'MMMM' de 'yyyy");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:lid"_ostr, "val"_ostr, "es-ES");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t"_ostr, u"mi\u00E9rcoles, 05 de marzo de 2014"_ustr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test_Tdf115030)
+{
+ loadAndSave("tdf115030.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ sal_Unicode aDot = {0x02D9};
+ sal_Unicode aDobleDot = {0x00A8};
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/m:oMath[1]/m:acc/m:accPr/m:chr"_ostr, "val"_ostr, OUString(aDot));
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/m:oMath[2]/m:acc/m:accPr/m:chr"_ostr, "val"_ostr, OUString(aDobleDot));
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/m:oMathPara/m:oMath[1]/m:acc/m:accPr/m:chr"_ostr, "val"_ostr, OUString(aDot));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test_OpeningBrace)
+{
+ loadAndSave("2120112713_OpenBrace.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Checking for OpeningBrace tag
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/m:oMath[1]/m:d[1]/m:dPr[1]/m:begChr[1]"_ostr,"val"_ostr,"");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test_Tdf132305)
+{
+ loadAndSave("tdf132305.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/m:oMath[1]/m:bar/m:barPr/m:pos"_ostr,"val"_ostr,"top");
+}
+
+// Checks that all runs of the field have text properties.
+// Old behaviour: only first run has text properties of the field
+//
+// There are several runs are used in fields:
+// <w:r>
+// <w:rPr>
+// <!-- properties written with DocxAttributeOutput::StartRunProperties() / DocxAttributeOutput::EndRunProperties().
+// </w:rPr>
+// <w:fldChar w:fldCharType="begin" />
+// </w:r>
+// <w:r>
+// <w:rPr>
+// <!-- properties written with DocxAttributeOutput::DoWriteFieldRunProperties()
+// </w:rPr>
+// <w:instrText>TIME \@"HH:mm:ss"</w:instrText>
+// </w:r>
+// <w:r>
+// <w:rPr>
+// <!-- properties written with DocxAttributeOutput::DoWriteFieldRunProperties()
+// </w:rPr>
+// <w:fldChar w:fldCharType="separate" />
+// </w:r>
+// <w:r>
+// <w:rPr>
+// <!-- properties written with DocxAttributeOutput::DoWriteFieldRunProperties()
+// </w:rPr>
+// <w:t>14:01:13</w:t>
+// </w:r>
+// <w:r>
+// <w:rPr>
+// <!-- properties written with DocxAttributeOutput::DoWriteFieldRunProperties()
+// </w:rPr>
+// <w:fldChar w:fldCharType="end" />
+// </w:r>
+// See, tdf#38778
+CPPUNIT_TEST_FIXTURE(Test, testTdf38778)
+{
+ loadAndSave("tdf38778_properties_in_run_for_field.doc");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ static constexpr OUString psz(u"20"_ustr);
+ static constexpr OUString pszCs(u"20"_ustr);
+
+ // w:fldCharType="begin"
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:sz"_ostr, "val"_ostr, psz);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:szCs"_ostr, "val"_ostr, pszCs);
+
+ // PAGE
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[4]/w:rPr/w:sz"_ostr, "val"_ostr, psz);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[4]/w:rPr/w:szCs"_ostr, "val"_ostr, pszCs);
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[4]/w:instrText"_ostr, " PAGE ");
+
+ // w:fldCharType="separate"
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[5]/w:rPr/w:sz"_ostr, "val"_ostr, psz);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[5]/w:rPr/w:szCs"_ostr, "val"_ostr, pszCs);
+
+ // field result: 1
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[6]/w:rPr/w:sz"_ostr, "val"_ostr, psz);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[6]/w:rPr/w:szCs"_ostr, "val"_ostr, pszCs);
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[6]/w:t"_ostr, "1"); // field result
+
+ // w:fldCharType="end"
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[7]/w:rPr/w:sz"_ostr, "val"_ostr, psz);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[7]/w:rPr/w:szCs"_ostr, "val"_ostr, pszCs);
+
+ // tdf#127862: page fill color (in this case white) was lost
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(drawing::FillStyle_NONE != getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO76312)
+{
+ loadAndSave("FDO76312.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]"_ostr);
+}
+
+void Test::verifyComboBoxExport(bool aComboBoxAsDropDown)
+{
+ if (aComboBoxAsDropDown)
+ {
+ // ComboBox was imported as DropDown text field
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Any aField = xFields->nextElement();
+ uno::Reference<lang::XServiceInfo> xServiceInfo(aField, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown"));
+
+ uno::Sequence<OUString> aItems = getProperty< uno::Sequence<OUString> >(aField, "Items");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aItems.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("manolo"), aItems[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("pepito"), aItems[1]);
+ CPPUNIT_ASSERT_EQUAL(OUString("Manolo"), aItems[2]);
+ }
+ else
+ {
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XControlShape> xControl(xShape, uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Manolo"), getProperty<OUString>(xControl->getControl(), "Text"));
+
+ uno::Sequence<OUString> aItems = getProperty< uno::Sequence<OUString> >(xControl->getControl(), "StringItemList");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("manolo"), aItems[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("pepito"), aItems[1]);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testComboBoxControl)
+{
+ loadAndSave("combobox-control.docx");
+ // check XML
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]"_ostr, "value"_ostr, "manolo");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[2]"_ostr, "value"_ostr, "pepito");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t"_ostr, "Manolo");
+
+ // check imported control
+ verifyComboBoxExport(getShapes() == 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf134043_ImportComboBoxAsDropDown_true)
+{
+ createSwDoc("combobox-control.docx");
+ verifyComboBoxExport(true);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf134043_ImportComboBoxAsDropDown_false)
+{
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Writer::Filter::Import::DOCX::ImportComboBoxAsDropDown::set(false, batch);
+ batch->commit();
+ comphelper::ScopeGuard g(
+ [batch]
+ {
+ officecfg::Office::Writer::Filter::Import::DOCX::ImportComboBoxAsDropDown::set(true,
+ batch);
+ batch->commit();
+ });
+
+ createSwDoc("combobox-control.docx");
+ verifyComboBoxExport(false);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCheckBoxControl)
+{
+ loadAndSave("checkbox-control.docx");
+ // check XML
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w14:checkbox/w14:checked"_ostr, "val"_ostr, "1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w14:checkbox/w14:checkedState"_ostr, "val"_ostr, "2612");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w14:checkbox/w14:uncheckedState"_ostr, "val"_ostr, "2610");
+
+ // TODO: import control and add a check here
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParagraphWithComments)
+{
+ loadAndSave("paragraphWithComments.docx");
+ /* Comment id's were getting overwritten for annotation mark(s),
+ which was causing a mismatch in the relationship for comment id's
+ in document.xml and comment.xml
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pXmlComm = parseExport("word/comments.xml");
+
+ sal_Int32 idInDocXml = getXPath(pXmlDoc,"/w:document/w:body/w:p[3]/w:commentRangeEnd[1]"_ostr,"id"_ostr).toInt32();
+ sal_Int32 idInCommentXml = getXPath(pXmlComm,"/w:comments/w:comment[1]"_ostr,"id"_ostr).toInt32();
+ CPPUNIT_ASSERT_EQUAL( idInDocXml, idInCommentXml );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf104707_urlComment)
+{
+ loadAndReload("tdf104707_urlComment.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ auto aField1 = xFields->nextElement();
+ // the comment/annotation/postit text
+ auto xText = getProperty< uno::Reference<text::XText> >(aField1, "TextRange");
+ // the hyperlink within the comment text
+ auto xURLField = getProperty< uno::Reference<text::XTextField> >(xText, "TextField");
+ auto aURL = getProperty< OUString >(xURLField, "URL");
+ CPPUNIT_ASSERT_EQUAL(OUString("https://bugs.documentfoundation.org/show_bug.cgi?id=104707"), aURL);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOLEObjectinHeader)
+{
+ loadAndSave("2129393649.docx");
+ // fdo#76015 : Document contains oleobject in header xml.
+ // Problem was relationship entry for oleobject from header was
+ // exported into document.xml.rels file because of this rels file
+ // for headers were missing from document/word/rels.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/header2.xml.rels");
+
+ assertXPath(pXmlDoc,"/rels:Relationships/rels:Relationship[1]"_ostr,"Id"_ostr,"rId1");
+
+ xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+
+ // check the media type too
+ assertXPath(pXmlDocCT,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.bin']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-officedocument.oleObject");
+
+ // check the content too
+ xmlDocUniquePtr pXmlDocHeader2 = parseExport("word/header2.xml");
+ assertXPath(pXmlDocHeader2,
+ "/w:hdr/w:tbl/w:tr[1]/w:tc[2]/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr,
+ "Word.Picture.8");
+ xmlDocUniquePtr pXmlDocHeader3 = parseExport("word/header3.xml");
+ assertXPath(pXmlDocHeader2,
+ "/w:hdr/w:tbl/w:tr[1]/w:tc[2]/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr,
+ "Word.Picture.8");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test_ClosingBrace)
+{
+ loadAndSave("2120112713.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Checking for ClosingBrace tag
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/m:oMath[1]/m:d[2]/m:dPr[1]/m:endChr[1]"_ostr,"val"_ostr,"");
+
+ // tdf#154371 paragraph style Подзаголовок ур3 inherits from Heading 3 (includes list level and list id)
+ uno::Reference<beans::XPropertySet> xParaStyle(getStyles("ParagraphStyles")->getByName(u"Подзаголовок ур3"_ustr), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2), getProperty<sal_Int16>(xParaStyle, "NumberingLevel"));
+ CPPUNIT_ASSERT(!getProperty<OUString>(xParaStyle, "NumberingStyleName").isEmpty());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testlvlPicBulletId)
+{
+ loadAndSave("lvlPicBulletId.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+ assertXPath(pXmlDoc, "/w:numbering[1]/w:abstractNum[1]/w:lvl[1]/w:lvlPicBulletId[1]"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtContent)
+{
+ loadAndSave("SdtContent.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml");
+// assertXPath(pXmlDoc, "/w:hdr[1]/w:p[1]/w:sdt/w:sdtContent[1]/w:del[1]");
+}
+
+#if 0
+// Currently LibreOffice exports custom geometry for this up arrow, not preset shape.
+// When LibreOffice can export preset shape with correct modifiers, then this test can be re-enabled.
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo76016)
+{
+ loadAndSave("fdo76016.docx");
+ // check XML
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[1]", "name", "adj1");
+ assertXPath(pXmlDoc, "//a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]", "name", "adj2");
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, testFileWithInvalidImageLink)
+{
+ loadAndSave("FileWithInvalidImageLink.docx");
+ /* In case if the original file has an image whose link is
+ invalid, then the RT file used to result in corruption
+ since the exported image would be an empty image.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathNoAttribute(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r[2]/w:drawing[1]/wp:inline[1]/"
+ "a:graphic[1]/a:graphicData[1]/pic:pic[1]/pic:blipFill[1]/a:blip[1]"_ostr,
+ "embed"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentTypeDOCX)
+{
+ loadAndSave("fdo80410.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.docx']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.docx']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent,
+ "/w:document/w:body/w:p[6]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr,
+ "Word.Document.12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentTypeXLSM)
+{
+ loadAndSave("fdo76098.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/Microsoft_Excel_Macro-Enabled_Worksheet1.xlsm']"_ostr, "ContentType"_ostr, "application/vnd.ms-excel.sheet.macroEnabled.12");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/charts/_rels/chart1.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='../embeddings/Microsoft_Excel_Macro-Enabled_Worksheet1.xlsm']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocChart1 = parseExport("word/charts/chart1.xml");
+ assertXPath(pXmlDocChart1,
+ "/c:chartSpace/c:externalData"_ostr,
+ "id"_ostr,
+ "rId1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test76108)
+{
+ loadAndSave("test76108.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ //docx file after RT is getting corrupted.
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:fldChar[1]"_ostr, "fldCharType"_ostr, "begin");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTCTagMisMatch)
+{
+ loadAndSave("TCTagMisMatch.docx");
+ // TCTagMisMatch.docx : This document contains an empty table with borders.
+ // there was a TC tag mismatch which resulted into a crash.
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]"_ostr,0);
+ assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO78292)
+{
+ loadAndSave("FDO78292.docx");
+ //text node is a leaf node, it should not have any children
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[14]/w:sdt[3]/w:sdtPr[1]/w:text/w14:checked"_ostr,0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSimpleSdts)
+{
+ loadAndSave("simple-sdts.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtPr/w:text"_ostr, 1);
+ assertXPath(pXmlDoc, "//*/w:sdt/w:sdtPr/w:id"_ostr, 5);
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:lock"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt[1]/w:sdtPr/w:picture"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt[2]/w:sdtPr/w:group"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:sdt/w:sdtPr/w:citation"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testEmbeddedExcelChart)
+{
+ loadAndSave("EmbeddedExcelChart.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/embeddings/oleObject1.xls']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.ms-excel");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xls']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
+
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent,
+ "/w:document/w:body/w:p/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr,
+ "Excel.Chart.8");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf83227)
+{
+ loadAndReload("tdf83227.docx");
+ // Bug document contains a rotated image, which is handled as a draw shape (not as a Writer image) on export.
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("word/media/image1.png")));
+ // This was also true, image was written twice.
+ CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess->hasByName("word/media/image2.png")));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf103001)
+{
+ loadAndReload("tdf103001.docx");
+ // The same image is featured in the header and in the body text, make sure
+ // the header relation is still written, even when caching is enabled.
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ // This failed: header reused the RelId of the body text, even if RelIds
+ // are local to their stream.
+ CPPUNIT_ASSERT(xNameAccess->hasByName("word/_rels/header2.xml.rels"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf92521)
+{
+ loadAndSave("tdf92521.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // There should be a section break that's in the middle of the document: right after the table.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:sectPr"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf102466, "tdf102466.docx")
+{
+ // the problem was: file is truncated: the first page is missing.
+ // More precisely, the table in the first page was clipped.
+ {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nFlyPrtHeight = getXPath(pXmlDoc, "(/root/page[1]//anchored/fly)[1]/infos/prtBounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nTableHeight = getXPath(pXmlDoc, "(/root/page[1]//anchored/fly)[1]/tab/infos/bounds"_ostr, "height"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE("The table is clipped in a fly frame.", nFlyPrtHeight >= nTableHeight);
+ }
+
+ // check how much pages we have: it should match the Word layout result
+ CPPUNIT_ASSERT_EQUAL(11, getPages());
+
+ // check content of the first page
+ {
+ uno::Reference<beans::XPropertySet> xFrame(getShapeByName(u"Marco1"), uno::UNO_QUERY);
+
+ // no border
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xFrame, "LineWidth"));
+ }
+
+ // Make sure we have 19 tables created
+ {
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTables->getCount() >= sal_Int32(19)); // TODO
+
+ // check the text inside first cell of the first table
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+
+ const OUString aActualText = xCell->getString();
+
+ CPPUNIT_ASSERT(aActualText.indexOf("Requerimientos del Cliente") > 0);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf99090_pgbrkAfterTable)
+{
+ loadAndSave("tdf99090_pgbrkAfterTable.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // There should be a regular page break that's in the middle of the document: right after the table.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf96750_landscapeFollow, "tdf96750_landscapeFollow.docx")
+{
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf86926_A3, "tdf86926_A3.docx")
+{
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(42000), getProperty<sal_Int32>(xStyle, "Height"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(29700), getProperty<sal_Int32>(xStyle, "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf64372_continuousBreaks,"tdf64372_continuousBreaks.docx")
+{
+ //There are no page breaks, so everything should be on the first page.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf92724_continuousBreaksComplex,"tdf92724_continuousBreaksComplex.docx")
+{
+ //There are 2 page breaks, so there should be 3 pages.
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90697_continuousBreaksComplex2,"tdf92724_continuousBreaksComplex2.docx")
+{
+// Continuous section breaks with new headers/footers should not immediately switch to a new page style.
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+ xCursor->jumpToLastPage();
+
+ sal_Int16 nPages = xCursor->getPage();
+ while( nPages > 0 )
+ {
+ OUString sPageStyleName = getProperty<OUString>( xCursor, "PageStyleName" );
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText");
+// Specific case to avoid. Testing separately (even though redundant).
+// The first header (defined on page 3) ONLY is shown IF the section happens to start on a new page (which it doesn't in this document).
+ CPPUNIT_ASSERT( xHeaderText->getString() != "Third section - First page header. No follow defined" );
+// Same test stated differently: Pages 4 and 5 OUGHT to use "Second section header", but currently don't. Page 6 does.
+ if( nPages <= 3 )
+ CPPUNIT_ASSERT_EQUAL( OUString("First section header"), xHeaderText->getString() );
+ else
+ CPPUNIT_ASSERT( xHeaderText->getString() == "First section header" || xHeaderText->getString() == "Second section header" );
+
+ xCursor->jumpToPage( --nPages );
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95367_inheritFollowStyle, "tdf95367_inheritFollowStyle.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(OUString("header"), parseDump("/root/page[2]/header/txt/text()"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testInheritFirstHeader,"inheritFirstHeader.docx")
+{
+// First page headers always link to last used first header, never to a follow header
+ CPPUNIT_ASSERT_EQUAL(OUString("First Header"), parseDump("/root/page[1]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Follow Header"), parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Follow Header"), parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First Header"), parseDump("/root/page[4]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Last Header"), parseDump("/root/page[5]/header/txt/text()"_ostr));
+}
+
+#if HAVE_MORE_FONTS
+DECLARE_OOXMLEXPORT_TEST(testTdf81345_045Original, "tdf81345.docx")
+{
+ //Header wasn't replaced and columns were missing because no new style was created.
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+
+ xCursor->jumpToLastPage();
+ OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ CPPUNIT_ASSERT(pageStyleName != "Standard");
+
+ // tdf89297 Styles were being added before their base/parent/inherited-from style existed, and so were using default settings.
+ uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles"));
+ uno::Reference<beans::XPropertySet> xStyle(xParaStyles->getByName("Pull quote"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6736947), getProperty<sal_Int32>(xStyle, "CharColor"));
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, testDocxTablePosition)
+{
+ loadAndSave("floating-table-position.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // the exported positions were wrong due to some missing shifting in the export code
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblpPr"_ostr, "tblpX"_ostr, "3494");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblpPr"_ostr, "tblpY"_ostr, "4611");
+}
+#if 0
+// FIXME:
+CPPUNIT_TEST_FIXTURE(Test, testUnderlineGroupShapeText)
+{
+ loadAndSave("tdf123351_UnderlineGroupSapeText.docx");
+ // tdf#123351: Check if correct underline is used.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "single");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "double");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "thick");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dotted");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dottedHeavy");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dash");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dashedHeavy");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r[1]/w:rPr/w:u", "val", "dashLongHeavy");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dotDash");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dashDotHeavy");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dotDotDash");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "dashDotDotHeavy");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "wave");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "wavyHeavy");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "wavyDouble");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[32]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "none");
+
+ // TODO: Import of "words".
+ // This must fail when import of "words" is implemented. This is a temporary solution, we read "words" as "single".
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[32]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u", "val", "single");
+}
+#endif
+CPPUNIT_TEST_FIXTURE(Test, testUnderlineColorGroupedShapes)
+{
+ loadAndSave("tdf132491_UnderlineColorGroupedShapes.docx");
+ // tdf#132491 : Check if correct color is used for underline.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u"_ostr, "color"_ostr, "FF0000");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u"_ostr, "color"_ostr, "00B050");
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[3]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:u"_ostr, "color"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRelativeAnchorWidthFromRightMargin)
+{
+ loadAndSave("tdf133670_testRelativeAnchorWidthFromRightMargin.docx");
+ // tdf#133670 The width was set relative from right margin, but this was handled relative from page width.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ auto nWidth = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "width"_ostr).toInt32();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2408, nWidth, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAutoFitForLegacyShapes)
+{
+ loadAndSave("tdf112312_AutoFitForLegacyShapes.odt");
+ // tdf#112312: check if noAutoFit is used instead of spAutoFit even if the TextAutoGrowHeight is set
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr/a:noAutofit"_ostr);
+ assertXPathNoAttribute(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr"_ostr, "a:spAutofit"_ostr);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
new file mode 100644
index 0000000000..db504be317
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -0,0 +1,699 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/rdf/URI.hpp>
+#include <com/sun/star/rdf/Statement.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <o3tl/cppunittraitshelper.hxx>
+
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO76248)
+{
+ loadAndSave("FDO76248.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // In two cases the a:graphicData elements had no children, which is invalid.
+ assertXPath(pXmlDoc, "//a:graphicData[not(*)]"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTscp, "tscp.docx")
+{
+ uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext());
+ uno::Reference<rdf::XURI> xType = rdf::URI::create(xComponentContext, "urn:bails");
+ uno::Reference<rdf::XDocumentMetadataAccess> xDocumentMetadataAccess(mxComponent, uno::UNO_QUERY);
+ uno::Sequence< uno::Reference<rdf::XURI> > aGraphNames = xDocumentMetadataAccess->getMetadataGraphsWithType(xType);
+ // This failed, no graphs had the urn:bails type.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aGraphNames.getLength());
+ uno::Reference<rdf::XURI> xGraphName = aGraphNames[0];
+ uno::Reference<rdf::XNamedGraph> xGraph = xDocumentMetadataAccess->getRDFRepository()->getGraph(xGraphName);
+
+ // No RDF statement on the first paragraph.
+ uno::Reference<rdf::XResource> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xStatements = xGraph->getStatements(xParagraph, uno::Reference<rdf::XURI>(), uno::Reference<rdf::XURI>());
+ CPPUNIT_ASSERT_EQUAL(false, static_cast<bool>(xStatements->hasMoreElements()));
+
+ // 3 RDF statements on the second paragraph.
+ xParagraph.set(getParagraph(2), uno::UNO_QUERY);
+ std::map<OUString, OUString> aExpectedStatements =
+ {
+ {"urn:bails:ExportControl:BusinessAuthorization:Identifier", "urn:example:tscp:1"},
+ {"urn:bails:ExportControl:BusinessAuthorizationCategory:Identifier", "urn:example:tscp:1:confidential"},
+ {"urn:bails:ExportControl:Authorization:StartValidity", "2015-11-27"}
+ };
+ std::map<OUString, OUString> aActualStatements;
+ xStatements = xGraph->getStatements(xParagraph, uno::Reference<rdf::XURI>(), uno::Reference<rdf::XURI>());
+ while (xStatements->hasMoreElements())
+ {
+ rdf::Statement aStatement = xStatements->nextElement().get<rdf::Statement>();
+ aActualStatements[aStatement.Predicate->getNamespace() + aStatement.Predicate->getLocalName()] = aStatement.Object->getStringValue();
+ }
+ CPPUNIT_ASSERT(bool(aExpectedStatements == aActualStatements));
+
+ // No RDF statement on the third paragraph.
+ xParagraph.set(getParagraph(3), uno::UNO_QUERY);
+ xStatements = xGraph->getStatements(xParagraph, uno::Reference<rdf::XURI>(), uno::Reference<rdf::XURI>());
+ CPPUNIT_ASSERT_EQUAL(false, static_cast<bool>(xStatements->hasMoreElements()));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo76589 )
+{
+ loadAndSave("fdo76589.docx");
+ /* Numbered list was not preserve after RT.
+ * In numbering.xml, when NumberingType is "decimal" and level is zero,
+ * w:val of w:lvlText was empty.
+ * It should be <w:lvlText w:val="%1" />
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+
+ assertXPath ( pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText"_ostr,"val"_ostr,"%1" );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDecimalNumberingNoLeveltext)
+{
+ loadAndSave("decimal-numbering-no-leveltext.docx");
+ // This was "%1", not empty: we turned a kind-of-none numbering into a decimal one.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText"_ostr,"val"_ostr,"");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNoDuplicateAttributeExport)
+{
+ loadAndSave("duplicate-east-asia.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // File asserting while saving in LO.
+ parseExport("word/document.xml");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79008)
+{
+ loadAndReload("fdo79008.docx");
+ /* File crashing while saving in LO.
+ * Check if document.xml file is created after fix
+ */
+ parseExport("word/document.xml");
+
+ // tdf#134951: there is only one comment
+ xmlDocUniquePtr pXmlSettings = parseExport("word/comments.xml");
+ assertXPath(pXmlSettings, "/w:comments/w:comment"_ostr, 1);
+
+ // Read-only is set, but it is not enforced, so it should be off...
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ CPPUNIT_ASSERT(!pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf120852_readOnlyProtection, "tdf120852_readOnlyProtection.docx")
+{
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "enforcement"_ostr, "1");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "edit"_ostr, "readOnly");
+ }
+
+ // Read-only is set, so Enforcement must enable it.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ CPPUNIT_ASSERT(pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf120852_readOnlyUnProtected, "tdf120852_readOnlyUnProtected.docx")
+{
+ // Readonly is not enforced, just a suggestion,
+ // so when a section is protected, the document should enable forms protection.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ CPPUNIT_ASSERT(!pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly());
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY_THROW);
+ const sal_Int32 nLastSection = xSections->getCount() - 1;
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(nLastSection), uno::UNO_QUERY_THROW);
+ if ( !isExported() )
+ {
+ CPPUNIT_ASSERT_MESSAGE("Section is not protected", !getProperty<bool>(xSect, "IsProtected"));
+ // Enable section protection. The round-trip should have forms protection enabled.
+ xSect->setPropertyValue("IsProtected", uno::Any(true));
+ }
+ else
+ {
+ CPPUNIT_ASSERT_MESSAGE("Section is protected", getProperty<bool>(xSect, "IsProtected"));
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "edit"_ostr, "forms");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection"_ostr, "enforcement"_ostr, "true");
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAuthorPropertySdt)
+{
+ loadAndSave("author-property.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding"_ostr, "xpath"_ostr, "/ns1:coreProperties[1]/ns0:creator[1]");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding"_ostr, "storeItemID"_ostr,"{6C3C8BC8-F283-45AE-878A-BAB7291924A1}");
+ // FIXME: the next property doesn't match, though it's correct in theory. A bug in assertXPath?
+ // assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "prefixMappings",
+ // "xmlns:ns0='http://purl.org/dc/elements/1.1/' xmlns:ns1='http://schemas.openxmlformats.org/package/2006/metadata/core-properties'");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO76586)
+{
+ loadAndSave("fdo76586.docx");
+ /*
+ * In the test file gridCol had only one value for entire table width
+ * while there are two cells in a table row.
+ * So the table was not imported with the correct cell widths
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // there is only one table in the test file
+ assertXPath(pXmlDoc, "//w:tblGrid/w:gridCol[1]"_ostr, "w"_ostr, "1601");
+ assertXPath(pXmlDoc, "//w:tblGrid/w:gridCol[2]"_ostr, "w"_ostr, "7843");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO76587 )
+{
+ loadAndSave("fdo76587.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing"_ostr, "line"_ostr, "240");
+ assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing"_ostr, "lineRule"_ostr, "auto");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO77890 )
+{
+ loadAndSave("fdo77890.docx");
+ /*
+ Ensure that the page break is preserved i.e it should not be converted to a section break, in case
+ if the different first page is set for the pages in the document.
+ For additional comments please refer to https://www.libreoffice.org/bugzilla/show_bug.cgi?id=77890#c2
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:br"_ostr, "type"_ostr, "page");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNumberedList)
+{
+ loadAndReload("NumberedList.docx");
+ //fdo74150:In document.xml, for pStyle = "NumberedList1", iLvl and numId was not preserved
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr[1]/w:pStyle"_ostr, "val"_ostr, "NumberedList1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr[1]/w:numPr/w:ilvl"_ostr,"val"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr[1]/w:numPr/w:numId"_ostr,"val"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[3]/w:pPr[1]/w:pStyle"_ostr,"val"_ostr, "NumberedList1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[3]/w:pPr[1]/w:numPr/w:ilvl"_ostr,"val"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[3]/w:pPr[1]/w:numPr/w:numId"_ostr,"val"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131819)
+{
+ loadAndSave("NumberedList.docx");
+ // keep width of fixed size cells in the nested table
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // These were 4030 and 4249.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tblGrid/w:gridCol[1]"_ostr, "w"_ostr, "3841");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tblGrid/w:gridCol[2]"_ostr, "w"_ostr, "4049");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131959)
+{
+ loadAndSave("NumberedList.docx");
+ // import tblInd from table style
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // These were 0.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblInd"_ostr, "w"_ostr, "360");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tbl/w:tblPr/w:tblInd"_ostr, "w"_ostr, "360");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131203)
+{
+ loadAndSave("tdf131203.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // loading thrown divide_by_zero()
+ assertXPath(pXmlDoc, "//w:tbl"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO76597)
+{
+ loadAndSave("fdo76597.docx");
+ // check XML
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing"_ostr, "before"_ostr, "96");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing"_ostr, "after"_ostr, "120");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentTypeTIF)
+{
+ loadAndSave("fdo77476.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@ContentType='image/tiff']"_ostr, "PartName"_ostr, "/word/media/image1.tif");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFDO77117, "fdo77117.docx")
+{
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // This checks textbox textrun size of font which is in group shape.
+ CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(xShape, "CharHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloatingTable)
+{
+ loadAndSave("fdo77887.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]"_ostr, "horzAnchor"_ostr, "margin");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]"_ostr, "leftFromText"_ostr, "141");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]"_ostr, "rightFromText"_ostr, "141");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]"_ostr, "tblpXSpec"_ostr, "center");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]"_ostr, "tblpY"_ostr, "2266");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]"_ostr, "vertAnchor"_ostr, "page");
+
+ //make sure not to write empty attributes which requires enumeration
+ assertXPathNoAttribute(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]"_ostr, "tblpYSpec"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeRight)
+{
+ loadAndSave("tdf90681-1.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:tcPr/w:vMerge"_ostr, "val"_ostr, "restart");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[2]/w:tcPr/w:vMerge"_ostr, "val"_ostr, "continue");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[2]/w:tcPr/w:vMerge"_ostr, "val"_ostr, "continue");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[2]/w:tcPr/w:vMerge"_ostr, "val"_ostr, "continue");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeleft)
+{
+ loadAndSave("tdf90681-2.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:vMerge"_ostr, "val"_ostr, "restart");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:vMerge"_ostr, "val"_ostr, "continue");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOldComplexMergeTableInTable)
+{
+ loadAndSave("ooo96040-2.odt");
+ parseExport("word/document.xml");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testHyperlinkContainingPlaceholderField)
+{
+ loadAndReload("hyperlink-field.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ parseExport("word/document.xml");
+
+ // tdf#148380 output unknown field's contents("") instead of field name("Sender" aka e-mail)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getParagraph(1)->getString().indexOf("Sender"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTablePreferredWidth)
+{
+ loadAndSave("tablePreferredWidth.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Problem :If the table preferred width is in percent, then after RT it changes to 0 & width type changes
+ // to 'auto' instead of 'pct'.
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblW[1]"_ostr, "w"_ostr, "3000");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblW[1]"_ostr, "type"_ostr,"pct");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO75431)
+{
+ loadAndSave("fdo75431.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "//w:tbl"_ostr, 2);
+ assertXPath(pXmlDoc, "//w:p/w:pPr/w:sectPr/w:type"_ostr, "val"_ostr, "nextPage");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO77725)
+{
+ loadAndSave("fdo77725.docx");
+ xmlDocUniquePtr pXmlFootnotes = parseExport("word/footnotes.xml");
+
+ assertXPath(pXmlFootnotes, "//w:footnotes[1]/w:footnote[3]/w:p[3]/w:r[1]/w:br[1]"_ostr, 0);
+ assertXPath(pXmlFootnotes, "//w:footnotes[1]/w:footnote[3]/w:p[3]/w:r[1]/w:br[2]"_ostr, 0);
+ assertXPath(pXmlFootnotes, "//w:footnotes[1]/w:footnote[3]/w:p[3]/w:r[1]/w:br[3]"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFieldRotation)
+{
+ loadAndReload("field-rotated.fodt");
+ uno::Reference<text::XTextRange> const xRun(getRun(uno::Reference<text::XTextRange>(getParagraphOrTable(1), uno::UNO_QUERY), 1));
+ uno::Reference<text::XTextField> const xField(getProperty<uno::Reference<text::XTextField>>(xRun, "TextField"));
+ CPPUNIT_ASSERT(xField.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Title"), xField->getPresentation(true));
+ CPPUNIT_ASSERT_EQUAL(OUString("Rotationeering"), xField->getPresentation(false));
+ // problem was that the rotation wasn't applied to all runs of the field
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(900), getProperty<sal_Int16>(xRun, "CharRotation"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFootnoteSeparator)
+{
+ loadAndSave("footnotesep.fodt");
+ // footnote separator definitions - taken from default page style
+ xmlDocUniquePtr pXmlFootnotes = parseExport("word/footnotes.xml");
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[1]"_ostr, "id"_ostr, "0");
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[1]"_ostr, "type"_ostr, "separator");
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[1]/w:p[1]/w:r[1]/w:separator"_ostr, 0);
+ // use paragraph font size to simulate height
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[1]/w:p[1]/w:pPr[1]/w:rPr[1]/w:sz"_ostr, "val"_ostr, "12");
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[2]"_ostr, "id"_ostr, "1");
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[2]"_ostr, "type"_ostr, "continuationSeparator");
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[2]/w:p[1]/w:r[1]/w:continuationSeparator"_ostr, 0);
+ assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[2]/w:p[1]/w:pPr[1]/w:rPr[1]/w:sz"_ostr, "val"_ostr, "12");
+
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ assertXPath(pXmlSettings, "/w:settings[1]/w:footnotePr[1]/w:footnote[1]"_ostr, "id"_ostr, "0");
+ assertXPath(pXmlSettings, "/w:settings[1]/w:footnotePr[1]/w:footnote[2]"_ostr, "id"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf121441)
+{
+ loadAndSave("tdf121441.docx");
+ xmlDocUniquePtr pXmlFootnotes = parseExport("word/footnotes.xml");
+ assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]/w:p/w:r[1]/w:rPr/w:rStyle"_ostr, 1);
+ assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]/w:p/w:r[2]/w:rPr/w:rStyle"_ostr, 0);
+ assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]/w:p/w:r[2]/w:rPr/w:rFonts"_ostr, 0);
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:rFonts"_ostr, "eastAsia"_ostr, "Symbol");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:rFonts"_ostr, "cs"_ostr, "Symbol");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:rFonts"_ostr, "ascii"_ostr, "Symbol");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:rFonts"_ostr, "hAnsi"_ostr, "Symbol");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO77812)
+{
+ loadAndSave("fdo77812.docx");
+ /* Additional sectPr was getting inserted and hence Column properties
+ * were getting added into this additional sectPr instead of Default setPr.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Check no additional section break is inserted.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:pPr/w:sectPr"_ostr, 0);
+
+ // Check w:cols comes under Default sectPr
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols"_ostr, "num"_ostr, "2");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col[1]"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col[2]"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentTypeOLE)
+{
+ loadAndSave("fdo77759.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']"_ostr,
+ "PartName"_ostr,
+ "/word/embeddings/oleObject1.xlsx");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.xlsx']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent,
+ "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr,
+ "Excel.Sheet.12");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78420)
+{
+ loadAndSave("fdo78420.docx");
+ xmlDocUniquePtr pXmlHeader = parseExport("word/header2.xml");
+
+ xmlDocUniquePtr pXmlHeaderRels = parseExport("word/_rels/header2.xml.rels");
+
+ assertXPath(pXmlHeaderRels,"/rels:Relationships/rels:Relationship[1]"_ostr,"Id"_ostr,"rId1");
+}
+
+
+CPPUNIT_TEST_FIXTURE(Test, testPageBreakInFirstPara)
+{
+ loadAndReload("fdo77727.docx");
+ /* Break to next page was not exported if it is in first paragraph of the section.
+ * Now after fix , LO writes Next Page Break and also preserves <w:br> tag.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br"_ostr,"type"_ostr,"page");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO78284)
+{
+ loadAndSave("fdo78284.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDoc,"/ContentType:Types/ContentType:Override[@PartName='/word/media/OOXDiagramDataRels1_0.png']"_ostr,
+ "ContentType"_ostr,
+ "image/png");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO78384)
+{
+ loadAndReload("fdo78384.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w:rFonts"_ostr,"ascii"_ostr,"Wingdings");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78469)
+{
+ loadAndSave("fdo78469.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml");
+ // make sure dataBinding & text tags not present in sdtcontent
+ assertXPath(pXmlDoc, "/w:hdr[1]/w:tbl[1]/w:tr[1]/w:tc[2]/w:p[1]/w:sdt[2]/w:sdtPr[1]/w:dataBinding[1]"_ostr,0);
+ assertXPath(pXmlDoc, "/w:hdr[1]/w:tbl[1]/w:tr[1]/w:tc[2]/w:p[1]/w:sdt[2]/w:sdtPr[1]/w:text[1]"_ostr,0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO78887)
+{
+ loadAndSave("fdo78887.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:br[1]"_ostr, 1);
+ assertXPathContent(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:t[1]"_ostr, "Lyrics: ");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:br[2]"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO78887b)
+{
+ loadAndSave("missing_newline.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[2]/w:br[1]"_ostr, 1);
+ assertXPathContent(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:t[1]"_ostr, "Tab and line break");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[5]/w:br[1]"_ostr, 1);
+ assertXPathContent(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[6]/w:t[1]"_ostr, "New line");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo78651)
+{
+ loadAndSave("fdo78651.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // ensure that there are only two tables
+ assertXPath(pXmlDoc, "//w:tbl"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78882)
+{
+ loadAndSave("fdo78882.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Ensure that Section Break is getting written inside second paragraph
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[2]/w:pPr[1]/w:sectPr[1]"_ostr,1);
+
+ // Ensure that no dummy paragraph gets created inside second paragraph for Section Break
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[2]/w:p[1]/w:pPr[1]/w:sectPr[1]"_ostr,0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo76934)
+{
+ loadAndSave("fdo76934.docx");
+ /* Issue was, AutoSpacing property if present inside styles.xml, LO was not able to
+ * preserve it.
+ */
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+
+ // Ensure that after fix LO is preserving AutoSpacing property in styles.xml
+ assertXPath ( pXmlDoc, "/w:styles[1]/w:style[@w:styleId='Title']/w:pPr[1]/w:spacing[1]"_ostr, "beforeAutospacing"_ostr, "1" );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79540)
+{
+ loadAndSave("fdo79540.docx");
+ /* Issue was, <w:drawing> was getting written inside <w:drawing>.
+ * So postpone the writing of Inner Drawing tag.
+ * MS Office does not allow nesting of drawing tags.
+ */
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Ensure that two separate w:drawing tags are written and they are not nested.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO79062)
+{
+ loadAndSave("fdo79062.docx");
+ xmlDocUniquePtr pXmlFootNotes = parseExport("word/footnotes.xml");
+ assertXPath(pXmlFootNotes, "/w:footnotes"_ostr, "Ignorable"_ostr, "w14 wp14 w15");
+
+ xmlDocUniquePtr pXmlEndNotes = parseExport("word/endnotes.xml");
+ assertXPath(pXmlEndNotes, "/w:endnotes"_ostr, "Ignorable"_ostr, "w14 wp14 w15");
+
+ //tdf#93121 don't add fake tabs in front of extra footnote paragraphs
+ uno::Reference<text::XFootnotesSupplier> xFootnoteSupp(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnoteIdxAcc = xFootnoteSupp->getFootnotes();
+ uno::Reference<text::XFootnote> xFootnote(xFootnoteIdxAcc->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XText> xFootnoteText(xFootnote, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess>xParaEnumAccess(xFootnoteText->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration>xParaEnum = xParaEnumAccess->createEnumeration();
+
+ uno::Reference<text::XTextRange> xTextRange;
+ xParaEnum->nextElement();
+ xParaEnum->nextElement() >>= xTextRange;
+ OUString sFootnotePara = xTextRange->getString();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Paragraph starts with W(87), not tab(9)", u'W', sFootnotePara[0] );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf123262_textFootnoteSeparators, "tdf123262_textFootnoteSeparators.docx")
+{
+ //Everything easily fits on one page
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 1, getPages() );
+
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XText> xFootnoteText(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+
+ // The text in the separator footnote should not be added to the footnotes
+ CPPUNIT_ASSERT_EQUAL(OUString(" Microsoft Office."), xFootnoteText->getString());
+
+ // Ensure that paragraph markers are not lost.
+ xFootnoteText.set(xFootnotes->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of paragraphs in second footnote", 2, getParagraphs(xFootnoteText) );
+
+
+ // tdf#136706: Two useless page styles were created for each of the four footnotes.
+ CPPUNIT_ASSERT( !getStyles("PageStyles")->hasByName("Converted8") );
+ CPPUNIT_ASSERT( !getStyles("PageStyles")->hasByName("Converted1") );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79668)
+{
+ loadAndReload("fdo79668.docx");
+ // fdo#79668: Document was Crashing on DebugUtil build while Saving
+ // because of repeated attribute value in same element.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:pPr's w:shd attributes were getting added to w:pPrChange/w:pPr's w:shd hence checking
+ // w:fill for both shd elements
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:shd"_ostr, "fill"_ostr, "FFFFFF" );
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:pPrChange/w:pPr/w:shd"_ostr, "fill"_ostr, "FFFFFF" );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78907)
+{
+ loadAndReload("fdo78907.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br"_ostr, "type"_ostr, "page" );
+
+ xmlDocUniquePtr pXmlDoc1 = parseExport("word/footer1.xml");
+ assertXPath ( pXmlDoc1, "/w:ftr[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl"_ostr, 0 );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf118702)
+{
+ loadAndReload("tdf118702.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:sectPr/w:type"_ostr, "val"_ostr, "nextPage" );
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:sectPr/w:pgSz"_ostr, "orient"_ostr, "landscape" );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79822)
+{
+ loadAndSave("fdo79822.docx");
+ /* File getting crash while saving in LO.
+ * The Docx contain smartart and the file was created in ms word 2007
+ */
+ parseExport("word/document.xml");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO79915)
+{
+ loadAndSave("fdo79915.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[9]/w:t"_ostr, "How much buoyancy does the water provide?");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79817)
+{
+ loadAndSave("fdo79817.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding"_ostr, "storeItemID"_ostr, "{9222E47B-A68B-4AEB-9855-21C912B9D3D2}");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding"_ostr, "xpath"_ostr, "/ns0:properties[1]/documentManagement[1]/ns2:Responsible_x0020_Officer_x0020_Title[1]");
+}
+
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79968_sldx)
+{
+ loadAndSave("fdo79968.docx");
+ // This UT for DOCX embedded with powerpoint slide
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@ContentType='application/vnd.openxmlformats-officedocument.presentationml.slide']"_ostr,
+ "PartName"_ostr,
+ "/word/embeddings/oleObject1.sldx");
+
+ // check the rels too
+ xmlDocUniquePtr pXmlDocRels = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDocRels,
+ "/rels:Relationships/rels:Relationship[@Target='embeddings/oleObject1.sldx']"_ostr,
+ "Type"_ostr,
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
+ // check the content too
+ xmlDocUniquePtr pXmlDocContent = parseExport("word/document.xml");
+ assertXPath(pXmlDocContent,
+ "/w:document/w:body/w:p[1]/w:r/w:object/o:OLEObject"_ostr,
+ "ProgID"_ostr,
+ "PowerPoint.Slide.12");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
new file mode 100644
index 0000000000..83fd5b7ff3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -0,0 +1,1055 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+
+#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/processfactory.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133701)
+{
+ loadAndSave("tdf133701.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "hSpace"_ostr, "567");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "vSpace"_ostr, "284");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDmlShapeTitle, "dml-shape-title.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(OUString("Title"), getProperty<OUString>(getShape(1), "Title"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Description"), getProperty<OUString>(getShape(1), "Description"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDmlZorder)
+{
+ loadAndSave("dml-zorder.odt");
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was "0": causing that in Word, the second shape was on top, while in the original odt the first shape is on top.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor"_ostr, "relativeHeight"_ostr, "2");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDmlShapeRelsize)
+{
+ loadAndSave("dml-shape-relsize.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Relative size wasn't exported all, then relativeFrom was "page", not "margin".
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH"_ostr, "relativeFrom"_ostr, "margin");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDmlPictureInTextframe)
+{
+ loadAndReload("dml-picture-in-textframe.docx");
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("word/media/image1.gif")));
+ // This was also true, image was written twice.
+ CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess->hasByName("word/media/image2.gif")));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapeRelsize)
+{
+ loadAndSave("dml-groupshape-relsize.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Relative size wasn't imported.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH"_ostr, "relativeFrom"_ostr, "margin");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx")
+{
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::TOP, getProperty<sal_Int16>(xGroup, "VertOrient"));
+ uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(1), uno::UNO_QUERY);
+ // This was drawing::FillStyle_NONE.
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xShape, "FillStyle"));
+ // This was drawing::LineStyle_NONE.
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_SOLID, getProperty<drawing::LineStyle>(xShape, "LineStyle"));
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ // This was wrap="none".
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:bodyPr"_ostr, "wrap"_ostr, "square");
+
+ xShape.set(xGroup->getByIndex(3), uno::UNO_QUERY);
+ OUString aType = comphelper::SequenceAsHashMap(getProperty<beans::PropertyValues>(xShape, "CustomShapeGeometry"))["Type"].get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(OUString("ooxml-bentConnector3"), aType);
+ // Connector was incorrectly shifted towards the top left corner, X was 552, Y was 0.
+ // It is not a DML, but a VML shape. The whole group is shifted 3mm right and 6mm up.
+ // Values are as in LO7.2, original problem is still fixed.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4016), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4485), xShape->getPosition().Y);
+
+ xShape.set(xGroup->getByIndex(5), uno::UNO_QUERY);
+ // This was incorrectly shifted towards the top of the page, Y was 106.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4729), xShape->getPosition().Y);
+}
+
+// testDmlTextshapeB was only made export-only because as an import-export test it failed for an unknown reason
+CPPUNIT_TEST_FIXTURE(Test, testDmlTextshapeB)
+{
+ loadAndReload("dml-textshapeB.docx");
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(3), uno::UNO_QUERY);
+ // Connector was incorrectly shifted towards the top left corner, X was 192, Y was -5743.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3896), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4775), xShape->getPosition().Y);
+ // Values are as in LO7.3, the original problem is still fixed.
+ // FixMe: The shape is a VML group, not a DML. Connector handles are still wrong and whole group
+ // is still shifted.
+
+ xShape.set(xGroup->getByIndex(5), uno::UNO_QUERY);
+ // This was incorrectly shifted towards the top of the page, Y was -5011.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4720), xShape->getPosition().Y);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLSolidfillAlpha, "dml-solidfill-alpha.docx")
+{
+ // Problem was that the transparency was not exported (a:alpha).
+ // RGB color (a:srgbClr)
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(70), getProperty<sal_Int16>(xShape, "FillTransparence"));
+
+ // Theme color (a:schemeClr)
+ xShape.set(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(20), getProperty<sal_Int16>(xShape, "FillTransparence"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDMLTextFrameNoFill)
+{
+ loadAndReload("frame.fodt");
+ // Problem is that default text frame background is white in Writer and transparent in Word
+ uno::Reference<beans::XPropertySet> xShape1(getShape(1), uno::UNO_QUERY);
+// it is re-imported as solid
+// CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xShape1, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xShape1, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty<sal_Int16>(xShape1, "FillTransparence"));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(xShape1, "FillColor"));
+
+ uno::Reference<beans::XPropertySet> xShape2(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xShape2, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty<sal_Int16>(xShape2, "FillTransparence"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xE8F2A1), getProperty<Color>(xShape2, "FillColor"));
+
+ uno::Reference<beans::XPropertySet> xShape3(getShape(3), uno::UNO_QUERY);
+// it is re-imported as solid
+// CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xShape3, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xShape3, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(xShape3, "FillColor"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xShape3, "FillTransparence"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLCustomGeometry, "dml-customgeometry-cubicbezier.docx")
+{
+
+ // The problem was that a custom shape was not exported.
+ const uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(getShape(1), "CustomShapeGeometry");
+ uno::Sequence<beans::PropertyValue> aPathProps;
+ for (beans::PropertyValue const & rProp : aProps)
+ {
+ if (rProp.Name == "Path")
+ rProp.Value >>= aPathProps;
+ }
+ uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aPairs;
+ uno::Sequence<drawing::EnhancedCustomShapeSegment> aSegments;
+ for (beans::PropertyValue const & rProp : std::as_const(aPathProps))
+ {
+ if (rProp.Name == "Coordinates")
+ rProp.Value >>= aPairs;
+ else if (rProp.Name == "Segments")
+ rProp.Value >>= aSegments;
+ }
+
+ // (a:moveTo)
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), aSegments[0].Count);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(drawing::EnhancedCustomShapeSegmentCommand::MOVETO), aSegments[0].Command );
+
+ // (a:cubicBezTo)
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(5), aSegments[1].Count);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(drawing::EnhancedCustomShapeSegmentCommand::CURVETO), aSegments[1].Command );
+
+ // Coordinates
+ sal_Int32 nLength = 16;
+ CPPUNIT_ASSERT_EQUAL(nLength, aPairs.getLength());
+ std::pair<sal_Int32,sal_Int32> aCoordinates[] =
+ {
+ std::pair<sal_Int32,sal_Int32>(9084, 0),
+ std::pair<sal_Int32,sal_Int32>(6734, 689),
+ std::pair<sal_Int32,sal_Int32>(4489, 893),
+ std::pair<sal_Int32,sal_Int32>(2633, 893),
+ std::pair<sal_Int32,sal_Int32>(1631, 893),
+ std::pair<sal_Int32,sal_Int32>(733, 830),
+ std::pair<sal_Int32,sal_Int32>(0, 752),
+ std::pair<sal_Int32,sal_Int32>(987, 908),
+ std::pair<sal_Int32,sal_Int32>(2274, 1034),
+ std::pair<sal_Int32,sal_Int32>(3756, 1034),
+ std::pair<sal_Int32,sal_Int32>(5357, 1034),
+ std::pair<sal_Int32,sal_Int32>(7183, 877),
+ std::pair<sal_Int32,sal_Int32>(9084, 423),
+ std::pair<sal_Int32,sal_Int32>(9084, 0),
+ std::pair<sal_Int32,sal_Int32>(9084, 0),
+ std::pair<sal_Int32,sal_Int32>(9084, 0)
+ };
+
+ for( int i = 0; i < nLength; ++i )
+ {
+ CPPUNIT_ASSERT(abs(aCoordinates[i].first - aPairs[i].First.Value.get<sal_Int32>()) < 20);
+ CPPUNIT_ASSERT(abs(aCoordinates[i].second - aPairs[i].Second.Value.get<sal_Int32>()) < 20);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDmlRectangleRelsize, "dml-rectangle-relsize.docx")
+{
+ // This was around 19560, as we did not read wp14:pctHeight for
+ // drawinglayer shapes and the fallback data was invalid.
+ OString aMessage("Height is only " + OString::number(getShape(1)->getSize().Height));
+ CPPUNIT_ASSERT_MESSAGE(aMessage.getStr(), getShape(1)->getSize().Height >= 20967);
+
+ // This was around 0: relative size of 0% was imported as 0, not "fall back to absolute size".
+ CPPUNIT_ASSERT(getShape(2)->getSize().Height > 300);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLTextFrameVertAdjust, "dml-textframe-vertadjust.docx")
+{
+ // DOCX textboxes with text are imported as text frames but in Writer text frames did not have
+ // TextVerticalAdjust attribute so far.
+
+ // 1st frame's context is adjusted to the top
+ uno::Reference<beans::XPropertySet> xFrame(getShapeByName(u"Rectangle 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_TOP, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust"));
+ // 2nd frame's context is adjusted to the center
+ xFrame.set(getShapeByName(u"Rectangle 2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_CENTER, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust"));
+ // 3rd frame's context is adjusted to the bottom
+ xFrame.set(getShapeByName(u"Rectangle 3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillBitmapCrop, "dml-shape-fillbitmapcrop.docx")
+{
+ // Test the new GraphicCrop property which is introduced to define
+ // cropping of shapes filled with a picture in stretch mode.
+
+ // 1st shape has some cropping
+ text::GraphicCrop aGraphicCropStruct = getProperty<text::GraphicCrop>(getShape(1), "GraphicCrop");
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 455 ), aGraphicCropStruct.Left );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 368 ), aGraphicCropStruct.Right );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( -455 ), aGraphicCropStruct.Top );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( -368 ), aGraphicCropStruct.Bottom );
+
+ // 2nd shape has no cropping
+ aGraphicCropStruct = getProperty<text::GraphicCrop>(getShape(2), "GraphicCrop");
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Left );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Right );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Top );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), aGraphicCropStruct.Bottom );
+
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillPattern, "dml-shape-fillpattern.docx")
+{
+ // Hatching was ignored by the export.
+
+ // 1st shape: light horizontal pattern (ltHorz)
+ drawing::Hatch aHatch = getProperty<drawing::Hatch>(getShape(1), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(50), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(Color(0x99FF66), Color(ColorTransparency, aHatch.Color));
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 2nd shape: horizontal pattern (horz)
+ aHatch = getProperty<drawing::Hatch>(getShape(2), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 3rd shape: light vertical pattern (ltVert)
+ aHatch = getProperty<drawing::Hatch>(getShape(3), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(900), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(50), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 4th shape: vertical pattern (vert)
+ aHatch = getProperty<drawing::Hatch>(getShape(4), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(900), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 5th shape: light upward diagonal pattern (ltUpDiag)
+ aHatch = getProperty<drawing::Hatch>(getShape(5), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(450), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(50), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 6th shape: wide upward diagonal pattern (wdUpDiag)
+ aHatch = getProperty<drawing::Hatch>(getShape(6), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(450), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 7th shape: light downward diagonal pattern (ltDnDiag)
+ aHatch = getProperty<drawing::Hatch>(getShape(7), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1350), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(50), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 8th shape: wide downward diagonal pattern (wdDnDiag)
+ aHatch = getProperty<drawing::Hatch>(getShape(8), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1350), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_SINGLE, aHatch.Style);
+
+ // 9th shape: small grid pattern (smGrid)
+ aHatch = getProperty<drawing::Hatch>(getShape(9), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(50), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_DOUBLE, aHatch.Style);
+
+ // 10th shape: large grid pattern (lgGrid)
+ aHatch = getProperty<drawing::Hatch>(getShape(10), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_DOUBLE, aHatch.Style);
+
+ // 11th shape: small checker board pattern (smCheck)
+ aHatch = getProperty<drawing::Hatch>(getShape(11), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(450), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(50), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_DOUBLE, aHatch.Style);
+
+ // 12th shape: outlined diamond pattern (openDmnd)
+ aHatch = getProperty<drawing::Hatch>(getShape(12), "FillHatch");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(450), aHatch.Angle);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), aHatch.Distance);
+ CPPUNIT_ASSERT_EQUAL(drawing::HatchStyle_DOUBLE, aHatch.Style);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeChildPosition, "dml-groupshape-childposition.docx")
+{
+ // Problem was parent transformation was ignored fully, but translate component
+ // which specify the position must be also applied for children of the group.
+
+ uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xChildGroup(xGroup->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-2123), xChildGroup->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11331), xChildGroup->getPosition().Y);
+
+ xGroup.set(xChildGroup, uno::UNO_QUERY);
+ xChildGroup.set(xGroup->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1859), xChildGroup->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11331), xChildGroup->getPosition().Y);
+
+ xChildGroup.set(xGroup->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-2123), xChildGroup->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(isExported() ? 14023 : 14021), xChildGroup->getPosition().Y);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDMLGradientFillTheme)
+{
+ loadAndSave("dml-gradientfill-theme.docx");
+ // Problem was when a fill gradient was imported from a theme, (fillRef in ooxml)
+ // not just the theme was written out but the explicit values too
+ // Besides the duplication of values it causes problems with writing out
+ // <a:schemeClr val="phClr"> into document.xml, while phClr can be used just for theme definitions.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // check no explicit gradFill has been exported
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill"_ostr,
+ 0);
+
+ // check shape style has been exported
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef"_ostr,
+ "idx"_ostr, "2");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeParaSpacing, "dml-groupshape-paraspacing.docx")
+{
+ // Paragraph spacing (top/bottom margin and line spacing) inside a group shape was not imported
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY_THROW)->getText();
+
+ // 1st paragraph has 1.5x line spacing but it has no spacing before/after.
+ uno::Reference<text::XTextRange> xRun = getRun(getParagraphOfText(1, xText),1);
+ style::LineSpacing aLineSpacing = getProperty<style::LineSpacing>(xRun, "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(150), aLineSpacing.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaBottomMargin"));
+
+ // 2nd paragraph has double line spacing but it has no spacing before/after.
+ xRun.set(getRun(getParagraphOfText(2, xText),1));
+ aLineSpacing = getProperty<style::LineSpacing>(xRun, "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(200), aLineSpacing.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaBottomMargin"));
+
+ // 3rd paragraph has 24 pt line spacing but it has no spacing before/after.
+ xRun.set(getRun(getParagraphOfText(3, xText),1));
+ aLineSpacing = getProperty<style::LineSpacing>(xRun, "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::MINIMUM), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(847), aLineSpacing.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaBottomMargin"));
+
+ // 4th paragraph has 1.75x line spacing but it has no spacing before/after.
+ xRun.set(getRun(getParagraphOfText(4, xText),1));
+ aLineSpacing = getProperty<style::LineSpacing>(xRun, "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(175), aLineSpacing.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaBottomMargin"));
+
+ // 5th paragraph has margins which are defined by w:beforeLines and w:afterLines.
+ xRun.set(getRun(getParagraphOfText(5, xText),1));
+ aLineSpacing = getProperty<style::LineSpacing>(xRun, "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aLineSpacing.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(635), getProperty<sal_Int32>(xRun, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(741), getProperty<sal_Int32>(xRun, "ParaBottomMargin"));
+
+ // 6th paragraph has margins which are defined by w:before and w:after.
+ xRun.set(getRun(getParagraphOfText(6, xText),1));
+ aLineSpacing = getProperty<style::LineSpacing>(xRun, "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aLineSpacing.Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(423), getProperty<sal_Int32>(xRun, "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(635), getProperty<sal_Int32>(xRun, "ParaBottomMargin"));
+
+ // FIXME:
+ // 7th paragraph has auto paragraph margins a:afterAutospacing and a:beforeAutospacing, which means margins must be ignored.
+ // xRun.set(getRun(getParagraphOfText(7, xText),1));
+ // CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaTopMargin"));
+ // CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xRun, "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableFloatingMargins, "table-floating-margins.docx")
+{
+ // In case the table had custom left cell margin, the horizontal position was still incorrect (too small, -199).
+ uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
+ sal_Int32 nHoriOrientPosition = getProperty<sal_Int32>(xFrame, "HoriOrientPosition");
+ CPPUNIT_ASSERT(nHoriOrientPosition < sal_Int32(-495));
+ // These were 0 as well, due to lack of import.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xFrame, "TopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xFrame, "BottomMargin"));
+
+ if (!isExported())
+ return;
+ // Paragraph bottom margin wasn't 0 in the A1 cell of the floating table.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf127814)
+{
+ loadAndSave("tdf127814.docx");
+ // Paragraph top margin was 0 in a table started on a new page
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf128752)
+{
+ loadAndSave("tdf128752.docx");
+ // Paragraph bottom margin was 200, docDefault instead of table style setting
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf119054)
+{
+ loadAndSave("tdf119054.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Don't overwrite before and after spacing of Heading2 by table style.
+ // Heading2 overrides table style's values from DocDefaults.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing"_ostr, "after"_ostr, "360");
+ // Use table style based single line spacing instead of the docDefaults' 254
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing"_ostr, "line"_ostr, "240");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf131258)
+{
+ loadAndSave("tdf131258.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Use table style based bottom margin instead of the docDefaults in empty tables, too
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132514)
+{
+ loadAndSave("tdf132514.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Keep table style setting, when the footer also contain a table
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:p[2]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:p[2]/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf153891, "tdf153891.docx")
+{
+ // This document simply crashed the importer.
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo69636)
+{
+ loadAndSave("fdo69636.docx");
+ /*
+ * The problem was that the exporter didn't mirror the workaround of the
+ * importer, regarding the btLr text frame direction: the
+ * mso-layout-flow-alt property was completely missing in the output.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // VML
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox"_ostr, "style"_ostr).match("mso-layout-flow-alt:bottom-to-top"));
+ // drawingML
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:bodyPr"_ostr, "vert"_ostr, "vert270");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVMLData)
+{
+ loadAndSave("TestVMLData.docx");
+ // The problem was exporter was exporting vml data for shape in w:rPr element.
+ // vml data should not come under w:rPr element.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header3.xml");
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape"_ostr, "stroked"_ostr).match("f"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testImageData)
+{
+ loadAndSave("image_data.docx");
+ // The problem was exporter was exporting v:imagedata data for shape in w:pict as v:fill w element.
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header3.xml");
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape/v:imagedata"_ostr, "detectmouseclick"_ostr).match("t"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo70838)
+{
+ loadAndSave("fdo70838.docx");
+ // The problem was that VMLExport::Commit didn't save the correct width and height,
+ // and ImplEESdrWriter::ImplFlipBoundingBox made a mistake calculating the position
+
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // Check DML document
+
+ sal_Int32 aXPos[4], aYPos[4];
+ aXPos[0] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/wp:positionH/wp:posOffset"_ostr).toInt32();
+ aXPos[1] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/wp:positionH/wp:posOffset"_ostr).toInt32();
+ aXPos[2] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/wp:positionH/wp:posOffset"_ostr).toInt32();
+ aXPos[3] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/wp:positionH/wp:posOffset"_ostr).toInt32();
+
+ aYPos[0] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/wp:positionV/wp:posOffset"_ostr).toInt32();
+ aYPos[1] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/wp:positionV/wp:posOffset"_ostr).toInt32();
+ aYPos[2] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/wp:positionV/wp:posOffset"_ostr).toInt32();
+ aYPos[3] = getXPathContent(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/wp:positionV/wp:posOffset"_ostr).toInt32();
+
+ // certain degree of error is tolerated due to rounding in unit conversions
+ CPPUNIT_ASSERT(abs(1239520 - aXPos[0]) < 1000);
+ CPPUNIT_ASSERT(abs(1239520 - aXPos[1]) < 1000);
+ CPPUNIT_ASSERT(abs(1238250 - aXPos[2]) < 1000);
+ CPPUNIT_ASSERT(abs(1238885 - aXPos[3]) < 1000);
+
+ CPPUNIT_ASSERT(abs(2095500 - aYPos[0]) < 1000);
+ CPPUNIT_ASSERT(abs(2094865 - aYPos[1]) < 1000);
+ CPPUNIT_ASSERT(abs(2094230 - aYPos[2]) < 1000);
+ CPPUNIT_ASSERT(abs(2094865 - aYPos[3]) < 1000);
+
+ sal_Int32 aHSize[4], aVSize[4];
+ aHSize[0] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cx"_ostr).toInt32();
+ aHSize[1] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cx"_ostr).toInt32();
+ aHSize[2] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cx"_ostr).toInt32();
+ aHSize[3] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cx"_ostr).toInt32();
+
+ aVSize[0] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cy"_ostr).toInt32();
+ aVSize[1] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cy"_ostr).toInt32();
+ aVSize[2] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cy"_ostr).toInt32();
+ aVSize[3] = getXPath(pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/wp:extent"_ostr, "cy"_ostr).toInt32();
+
+ // certain degree of error is tolerated due to rounding in unit conversions
+ CPPUNIT_ASSERT(abs(3599280 - aHSize[0]) < 1000);
+ CPPUNIT_ASSERT(abs(3599280 - aHSize[1]) < 1000);
+ CPPUNIT_ASSERT(abs(3599280 - aHSize[2]) < 1000);
+ CPPUNIT_ASSERT(abs(3599280 - aHSize[3]) < 1000);
+
+ CPPUNIT_ASSERT(abs(1799640 - aVSize[0]) < 1000);
+ CPPUNIT_ASSERT(abs(1799640 - aVSize[1]) < 1000);
+ CPPUNIT_ASSERT(abs(1799640 - aVSize[2]) < 1000);
+ CPPUNIT_ASSERT(abs(1799640 - aVSize[3]) < 1000);
+
+ // Check VML document
+
+ // get styles of the four shapes
+ OUString aStyles[4];
+ aStyles[0] = getXPath( pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Fallback/w:pict/v:rect"_ostr, "style"_ostr);
+ // original is: "position:absolute;margin-left:97.6pt;margin-top:165pt;width:283.4pt;height:141.7pt;rotation:285"
+ aStyles[1] = getXPath( pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Fallback/w:pict/v:rect"_ostr, "style"_ostr);
+ // original is: "position:absolute;margin-left:97.6pt;margin-top:164.95pt;width:283.4pt;height:141.7pt;rotation:255"
+ aStyles[2] = getXPath( pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Fallback/w:pict/v:rect"_ostr, "style"_ostr);
+ // original is: "position:absolute;margin-left:97.5pt;margin-top:164.9pt;width:283.4pt;height:141.7pt;rotation:105"
+ aStyles[3] = getXPath( pXmlDocument, "/w:document/w:body/w:p/w:r/mc:AlternateContent[4]/mc:Fallback/w:pict/v:rect"_ostr, "style"_ostr);
+ // original is: "position:absolute;margin-left:97.55pt;margin-top:164.95pt;width:283.4pt;height:141.7pt;rotation:75"
+
+ //check the size and position of each of the shapes
+ for( int i = 0; i < 4; ++i )
+ {
+ CPPUNIT_ASSERT(!aStyles[i].isEmpty());
+
+ sal_Int32 nextTokenPos = 0;
+ do
+ {
+ OUString aStyleCommand = aStyles[i].getToken( 0, ';', nextTokenPos );
+ CPPUNIT_ASSERT(!aStyleCommand.isEmpty());
+
+ OUString aStyleCommandName = aStyleCommand.getToken( 0, ':' );
+ OUString aStyleCommandValue = aStyleCommand.getToken( 1, ':' );
+
+ if( aStyleCommandName == "margin-left" )
+ {
+ float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(97.6, fValue, 0.1);
+ }
+ else if( aStyleCommandName == "margin-top" )
+ {
+ float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(165.0, fValue, 0.2);
+ }
+ else if( aStyleCommandName == "width" )
+ {
+ float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(283.4, fValue, 0.1);
+ }
+ else if( aStyleCommandName == "height" )
+ {
+ float fValue = aStyleCommandValue.getToken( 0, 'p' ).toFloat();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(141.7, fValue, 0.1);
+ }
+
+ } while( nextTokenPos != -1 );
+ }
+
+ // Check shape objects
+
+ awt::Point aPos[4];
+ aPos[0] = getShape(1)->getPosition();
+ aPos[1] = getShape(2)->getPosition();
+ aPos[2] = getShape(3)->getPosition();
+ aPos[3] = getShape(4)->getPosition();
+
+ // certain degree of error is tolerated due to rounding in unit conversions
+ CPPUNIT_ASSERT(abs(4734 - aPos[0].X) < 10);
+ CPPUNIT_ASSERT(abs(4734 - aPos[1].X) < 10);
+ CPPUNIT_ASSERT(abs(4731 - aPos[2].X) < 10);
+ CPPUNIT_ASSERT(abs(4733 - aPos[3].X) < 10);
+
+ CPPUNIT_ASSERT(abs(2845 - aPos[0].Y) < 10);
+ CPPUNIT_ASSERT(abs(2843 - aPos[1].Y) < 10);
+ CPPUNIT_ASSERT(abs(2842 - aPos[2].Y) < 10);
+ CPPUNIT_ASSERT(abs(2843 - aPos[3].Y) < 10);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo73215)
+{
+ loadAndSave("fdo73215.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // 'rect' was 'pictureFrame', which isn't valid.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:prstGeom"_ostr,
+ "prst"_ostr, "rect");
+ // 'adj1' was 'adj', which is not valid for bentConnector3.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp[9]/wps:spPr/a:prstGeom/a:avLst/a:gd"_ostr,
+ "name"_ostr, "adj1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBehinddoc)
+{
+ loadAndSave("behinddoc.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was "0", shape was in the foreground.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"_ostr, "behindDoc"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSmartArtAnchoredInline)
+{
+ loadAndSave("fdo73227.docx");
+ /* Given file contains 3 DrawingML objects as 1Picture,1SmartArt and 1Shape.
+ * Check for SmartArt.
+ * SmartArt should get written as "Floating Object" i.e. inside <wp:anchor> tag.
+ * Also check for value of attribute "id" of <wp:docPr>. It should be unique for
+ * all 3 DrawingML objects in a document.
+ */
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing[2]/wp:anchor/wp:docPr"_ostr,"id"_ostr,"2");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing[2]/wp:anchor/wp:docPr"_ostr,"name"_ostr,"Diagram2");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr"_ostr,"id"_ostr,"3");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr"_ostr,"name"_ostr,"10-Point Star 3");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing[1]/wp:anchor/wp:docPr"_ostr,"id"_ostr,"1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing[1]/wp:anchor/wp:docPr"_ostr,"name"_ostr,"Picture 1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo65833)
+{
+ loadAndSave("fdo65833.docx");
+ // The "editas" attribute for vml group shape was not preserved.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:group"_ostr, "editas"_ostr, "canvas");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo73247)
+{
+ loadAndSave("fdo73247.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm"_ostr,
+ "rot"_ostr, "1969200");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo70942)
+{
+ loadAndSave("fdo70942.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
+ "prst"_ostr, "ellipse");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDrawinglayerPicPos)
+{
+ loadAndSave("drawinglayer-pic-pos.docx");
+ // The problem was that the position of the picture was incorrect, it was shifted towards the bottom right corner.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ OString aXPath("/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:xfrm/a:off"_ostr);
+ // This was 720.
+ assertXPath(pXmlDocument, aXPath, "x"_ostr, "0");
+ // This was 1828800.
+ assertXPath(pXmlDocument, aXPath, "y"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testShapeThemePreservation)
+{
+ loadAndSave("shape-theme-preservation.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // check shape style has been preserved
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef"_ostr,
+ "idx"_ostr, "1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef"_ostr,
+ "idx"_ostr, "1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef"_ostr,
+ "idx"_ostr, "1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:fillRef/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:lnRef"_ostr,
+ "idx"_ostr, "2");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:lnRef/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:lnRef/a:schemeClr/a:shade"_ostr,
+ "val"_ostr, "50000");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:effectRef"_ostr,
+ "idx"_ostr, "0");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:style/a:effectRef/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+
+ // check shape style hasn't been overwritten
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:solidFill"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill"_ostr,
+ 1);
+
+ // check direct theme assignments have been preserved
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:solidFill/a:schemeClr"_ostr,
+ "val"_ostr, "accent6");
+ // check whether theme color has been converted into native color
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr, "9bbb59");
+
+ // check color transformations applied to theme colors have been preserved
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:solidFill/a:schemeClr/a:lumMod"_ostr,
+ "val"_ostr, "40000");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:solidFill/a:schemeClr/a:lumOff"_ostr,
+ "val"_ostr, "60000");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill/a:srgbClr/a:lumMod"_ostr,
+ "val"_ostr, "50000");
+
+ // check direct color assignments have been preserved
+ OUString sFillColor = getXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr);
+ CPPUNIT_ASSERT_EQUAL(Color(0x00b050), Color(ColorTransparency, sFillColor.toInt32(16)));
+ sal_Int32 nLineColor = getXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill/a:srgbClr"_ostr,
+ "val"_ostr).toInt32(16);
+ CPPUNIT_ASSERT_EQUAL(Color(0xff0000), Color(ColorTransparency, nLineColor));
+
+ // check direct line type assignments have been preserved
+ sal_Int32 nLineWidth = getXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln"_ostr,
+ "w"_ostr).toInt32();
+ CPPUNIT_ASSERT(abs(63500 - nLineWidth) < 1000); //some rounding errors in the conversion ooxml -> libo -> ooxml are tolerated
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:miter"_ostr,
+ 1);
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr,
+ 1);
+
+ uno::Reference<drawing::XShape> xShape1 = getShape(1);
+ uno::Reference<drawing::XShape> xShape2 = getShape(2);
+ uno::Reference<drawing::XShape> xShape3 = getShape(3);
+
+ // check colors are properly applied to shapes on import
+ CPPUNIT_ASSERT_EQUAL(Color(0x4f81bd), getProperty<Color>(xShape1, "FillColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xfcd5b5), getProperty<Color>(xShape2, "FillColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0x00b050), getProperty<Color>(xShape3, "FillColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0x3a5f8b), getProperty<Color>(xShape1, "LineColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0x4f6228), getProperty<Color>(xShape2, "LineColor"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xff0000), getProperty<Color>(xShape3, "LineColor"));
+
+ // check line properties are properly applied to shapes on import
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_SOLID, getProperty<drawing::LineStyle>(xShape1, "LineStyle"));
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_SOLID, getProperty<drawing::LineStyle>(xShape2, "LineStyle"));
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_DASH, getProperty<drawing::LineStyle>(xShape3, "LineStyle"));
+ CPPUNIT_ASSERT_EQUAL(drawing::LineJoint_ROUND, getProperty<drawing::LineJoint>(xShape1, "LineJoint"));
+ CPPUNIT_ASSERT_EQUAL(drawing::LineJoint_ROUND, getProperty<drawing::LineJoint>(xShape2, "LineJoint"));
+ CPPUNIT_ASSERT_EQUAL(drawing::LineJoint_MITER, getProperty<drawing::LineJoint>(xShape3, "LineJoint"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO73546)
+{
+ loadAndSave("FDO73546.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
+ assertXPath(pXmlDoc, "/w:hdr/w:p[1]/w:r[3]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"_ostr, "distL"_ostr,"0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo69616)
+{
+ loadAndSave("fdo69616.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // VML
+ // FIXME: VML needs correction, because DrawingML WPG shapes from now imported as
+ // shape+textframe pairs. VML implementation still missing.
+ // CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[1]/mc:AlternateContent/mc:Fallback/w:pict/v:group", "coordorigin").match("696,725"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAlignForShape)
+{
+ loadAndReload("Shape.docx");
+ //fdo73545:Shape Horizontal and vertical orientation is wrong
+ //The wp:align tag is missing after roundtrip
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionH/wp:align"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLineStyle_DashType)
+{
+ loadAndSave("LineStyle_DashType.docx");
+ /* DOCX containing Shape with LineStyle as Dash Type should get preserved inside
+ * an XML tag <a:prstDash> with value "dash", "sysDot", "lgDot", etc.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "lgDashDotDot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "lgDashDot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "lgDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "dashDot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "dash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "sysDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash"_ostr, "val"_ostr, "sysDot");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testGradientFillPreservation)
+{
+ loadAndSave("gradient-fill-preservation.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // check rgb colors for every step in the gradient of the first shape
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr"_ostr,
+ "val"_ostr, "ffff00");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr"_ostr,
+ "val"_ostr, "ffff33");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[3]/a:srgbClr"_ostr,
+ "val"_ostr, "ff0000");
+
+ // check theme colors for every step in the gradient of the second shape
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[@pos='0']/a:schemeClr"_ostr,
+ "val"_ostr, "accent5");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[@pos='50000']/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[@pos='100000']/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[@pos='50000']/a:srgbClr/a:alpha"_ostr,
+ "val"_ostr, "20000");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[@pos='50000']/a:schemeClr/a:tint"_ostr,
+ "val"_ostr, "44500");
+ assertXPath(pXmlDocument,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:gradFill/a:gsLst/a:gs[@pos='50000']/a:schemeClr/a:satMod"_ostr,
+ "val"_ostr, "160000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLineStyle_DashType_VML)
+{
+ loadAndSave("LineStyle_DashType_VML.docx");
+ /* DOCX containing "Shape with text inside" having Line Style as "Dash Type" should get
+ * preserved inside an XML tag <v:stroke> with attribute dashstyle having value "dash".
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:stroke"_ostr, "dashstyle"_ostr, "dash");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo74110)
+{
+ loadAndReload("fdo74110.docx");
+ /*
+ The File contains word art which is being exported as shape and the mapping is defaulted to
+ shape type rect since the actual shape type(s) is/are commented out for some reason.
+ The actual shape type(s) has/have adjustment value(s) where as rect does not have adjustment value.
+ Hence the following test case.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]"_ostr,
+ "prst"_ostr, "rect");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]/a:avLst[1]/a:gd[1]"_ostr,0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOuterShdw)
+{
+ loadAndReload("testOuterShdw.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:effectLst[1]/a:outerShdw[1]"_ostr, "dist"_ostr, "1041400");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testExtentValue)
+{
+ loadAndSave("fdo74605.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ sal_Int32 nX = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:extent"_ostr, "cx"_ostr).toInt32();
+ // This was negative.
+ CPPUNIT_ASSERT(nX >= 0);
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 2, getPages() );
+}
+
+// part of tdf#93676, word gives the frame in the exported .docx a huge height,
+// because it's exported with 255% height percentage from a 255 HeightPercent
+// settings, but 255 is a special flag that the value is synced to the
+// other dimension.
+CPPUNIT_TEST_FIXTURE(Test, testSyncedRelativePercent)
+{
+ loadAndSave("tdf93676-1.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // check no explicit pctHeight has been exported, all we care
+ // about at this point is that it's not 255000
+ assertXPath(pXmlDoc, "//wp14:pctHeight"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf107119, "tdf107119.docx")
+{
+ uno::Reference<beans::XPropertySet> XPropsWrap(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, getProperty<text::WrapTextMode>(XPropsWrap, "Surround"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133457)
+{
+ loadAndSave("tdf133457.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[3]/w:pPr/w:framePr"_ostr, "vAnchor"_ostr, "text");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133924)
+{
+ loadAndSave("tdf133924.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:pPr/w:framePr"_ostr, "wrap"_ostr, "around");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:framePr"_ostr, "wrap"_ostr, "notBeside");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testRelativeAlignmentFromTopMargin,
+ "tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx")
+{
+ // tdf#133045 These shapes are relatively aligned from top margin, vertically to
+ // top, center and bottom.
+
+ if (isExported())
+ return;
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds"_ostr, "top"_ostr, "1502"); // center
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "top"_ostr, "2683"); // bottom
+ assertXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds"_ostr, "top"_ostr, "313"); // top
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
new file mode 100644
index 0000000000..85c4396cba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -0,0 +1,1150 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+#include <config_fonts.h>
+#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+
+protected:
+ // We import OOXML's EMUs into integral mm100 internal representation, then export back into
+ // EMUs. This results in inaccuracies.
+ void assertXPathHasApproxEMU(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath,
+ const OString& rAttribute, sal_Int64 nAttributeVal)
+ {
+ OUString val = getXPath(pXmlDoc, rXPath, rAttribute);
+ // Use precision of 1/2 of 100th of mm, which is 180 EMU
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ OString("XPath: " + rXPath + "\nAttribute: " + rAttribute).getStr(), nAttributeVal,
+ val.toInt64(), 180);
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testChildNodesOfCubicBezierTo)
+{
+ loadAndSave("FDO74774.docx");
+ /* Number of children required by cubicBexTo is 3 of type "pt".
+ While exporting, sometimes the child nodes are less than 3.
+ The test case ensures that there are 3 child nodes of type "pt"
+ for cubicBexTo
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath( pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent[1]/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[3]/wps:spPr[1]/a:custGeom[1]/a:pathLst[1]/a:path[1]/a:cubicBezTo[2]/a:pt[3]"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testMSwordHang)
+{
+ loadAndSave("test_msword_hang.docx");
+ // fdo#74771:
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r[2]/w:drawing/wp:inline"_ostr, "distT"_ostr, "0");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGroupshapeThemeFont, "groupshape-theme-font.docx")
+{
+ // Font was specified using a theme reference, which wasn't handled.
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(0), uno::UNO_QUERY_THROW)->getText();
+ uno::Reference<text::XTextRange> xRun = getRun(getParagraphOfText(1, xText),1);
+ // This was Calibri.
+ CPPUNIT_ASSERT_EQUAL(OUString("Cambria"), getProperty<OUString>(xRun, "CharFontName"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAnchorIdForWP14AndW14)
+{
+ loadAndSave("AnchorId.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/mc:AlternateContent/mc:Choice/w:drawing/wp:inline"_ostr, "anchorId"_ostr, "78735EFD");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr, "anchorId"_ostr, "78735EFD");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDkVert, "dkvert.docx")
+{
+ // <a:pattFill prst="dkVert"> was exported as ltVert.
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
+ // This was 50.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty<drawing::Hatch>(xShape, "FillHatch").Distance);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTextWatermark)
+{
+ loadAndSave("textWatermark.docx");
+ //The problem was that the watermark ID was not preserved,
+ //and Word uses the object ID to identify if it is a watermark.
+ //It has to have the 'PowerPlusWaterMarkObject' string in it
+ xmlDocUniquePtr pXmlHeader2 = parseExport("word/header2.xml");
+
+ assertXPath(pXmlHeader2, "/w:hdr[1]/w:p[1]/w:r[1]/w:pict[1]/v:shape[1]"_ostr,"id"_ostr,"PowerPlusWaterMarkObject93701316");
+
+ //The second problem was that Word uses also "o:spid"
+ const OUString& sSpid = getXPath(pXmlHeader2, "/w:hdr[1]/w:p[1]/w:r[1]/w:pict[1]/v:shape[1]"_ostr,"spid"_ostr);
+ CPPUNIT_ASSERT(!sSpid.isEmpty());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPictureWatermark)
+{
+ loadAndSave("pictureWatermark.docx");
+ //The problem was that the watermark ID was not preserved,
+ //and Word uses the object ID to identify if it is a watermark.
+ //It has to have the 'WordPictureWaterMarkObject' string in it
+
+ xmlDocUniquePtr pXmlHeader2 = parseExport("word/header2.xml");
+
+ // Check the watermark ID
+ assertXPath(pXmlHeader2, "/w:hdr[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Fallback[1]/w:pict[1]/v:shape[1]"_ostr,"id"_ostr,"WordPictureWatermark11962361");
+}
+
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo76249)
+{
+ loadAndSave("fdo76249.docx");
+ /*
+ * The Locked Canvas is imported correctly, but while exporting
+ * the drawing element is exported inside a textbox. However the drawing has to exported
+ * as a Locked Canvas inside a text-box for the RT file to work in MS Word, as drawing elements
+ * are not allowed inside the textboxes.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Fallback[1]/w:pict[1]/v:rect[1]/v:textbox[1]/w:txbxContent[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/lc:lockedCanvas[1]"_ostr,1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo76979)
+{
+ loadAndSave("fdo76979.docx");
+ // The problem was that black was exported as "auto" fill color, resulting in well-formed, but invalid XML.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
+ // This was "auto", not "FFFFFF".
+ assertXPath(pXmlDoc, "//wps:spPr/a:solidFill/a:srgbClr"_ostr, "val"_ostr, "FFFFFF");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf104539)
+{
+ loadAndSave("tdf104539.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "dir"_ostr, "13500000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testShapeEffectPreservation)
+{
+ loadAndSave("shape-effect-preservation.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // first shape with outer shadow, rgb color
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "algn"_ostr, "tl");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "blurRad"_ostr, "50760"); // because convertEMUtoHmm rounds fractions into nearest integer 50800 will be 50760
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "dir"_ostr, "2700000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "dist"_ostr, "37674");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "rotWithShape"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr"_ostr,
+ "val"_ostr, "000000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr/a:alpha"_ostr,
+ "val"_ostr, "40000");
+
+ // second shape with outer shadow, scheme color
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "algn"_ostr, "tl");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "blurRad"_ostr, "114480"); // because convertEMUtoHmm rounds fractions into nearest integer 114300 will be 114480
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "dir"_ostr, "2700000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "dist"_ostr, "203137");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw"_ostr,
+ "rotWithShape"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr"_ostr,
+ "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr/a:lumMod"_ostr,
+ "val"_ostr, "40000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr/a:lumOff"_ostr,
+ "val"_ostr, "60000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr/a:alpha"_ostr,
+ "val"_ostr, "40000");
+
+ // third shape with inner shadow, rgb color
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw"_ostr,
+ "blurRad"_ostr, "63500");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw"_ostr,
+ "dir"_ostr, "16200000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw"_ostr,
+ "dist"_ostr, "50800");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr"_ostr,
+ "val"_ostr, "ffff00");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr/a:alpha"_ostr,
+ "val"_ostr, "50000");
+
+ // 4th shape with soft edge
+ assertXPathHasApproxEMU(
+ pXmlDoc,
+ "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:softEdge"_ostr,
+ "rad"_ostr, 127000); // actually, it returns 127080
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:softEdge/*"_ostr,
+ 0 ); // should not be present
+
+ // 5th shape with glow effect, scheme color
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:srgbClr"_ostr,
+ "val"_ostr, "eb2722");
+
+ // 6th shape with reflection
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection"_ostr,
+ "blurRad"_ostr, "6350");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection"_ostr,
+ "stA"_ostr, "50000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection"_ostr,
+ "endA"_ostr, "300");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection"_ostr,
+ "endPos"_ostr, "55500");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection/*"_ostr,
+ 0 ); // should not be present
+
+ // 7th shape with several effects: glow, inner shadow and reflection
+ assertXPathHasApproxEMU(pXmlDoc,
+ "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow"_ostr,
+ "rad"_ostr, 63500); // actually, it returns 63360
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:srgbClr"_ostr,
+ "val"_ostr, "eb2722");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw"_ostr,
+ "blurRad"_ostr, "63500");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw"_ostr,
+ "dir"_ostr, "2700000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr"_ostr,
+ "val"_ostr, "000000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr/a:alpha"_ostr,
+ "val"_ostr, "50000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection"_ostr,
+ "blurRad"_ostr, "6350");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection"_ostr,
+ "stA"_ostr, "52000");
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testShape3DEffectPreservation)
+{
+ loadAndSave("shape-3d-effect-preservation.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // first shape: extrusion and shift on z, rotated camera with zoom, rotated light rig
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera"_ostr,
+ "prst"_ostr, "perspectiveRelaxedModerately");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera"_ostr,
+ "zoom"_ostr, "150000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot"_ostr,
+ "lat"_ostr, "19490639");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot"_ostr,
+ "lon"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot"_ostr,
+ "rev"_ostr, "12900001");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig"_ostr,
+ "rig"_ostr, "threePt");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig"_ostr,
+ "dir"_ostr, "t");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot"_ostr,
+ "lat"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot"_ostr,
+ "lon"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot"_ostr,
+ "rev"_ostr, "4800000");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d"_ostr,
+ "extrusionH"_ostr, "63500");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d"_ostr,
+ "z"_ostr, "488950");
+
+ // second shape: extrusion with theme color, no camera or light rotation, metal material
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera"_ostr,
+ "prst"_ostr, "isometricLeftDown");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot"_ostr,
+ 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig"_ostr,
+ "rig"_ostr, "threePt");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig"_ostr,
+ "dir"_ostr, "t");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot"_ostr,
+ 0);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d"_ostr,
+ "extrusionH"_ostr, "25400");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d"_ostr,
+ "prstMaterial"_ostr, "metal");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr"_ostr,
+ "val"_ostr, "accent5");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr/a:lumMod"_ostr,
+ "val"_ostr, "40000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr/a:lumOff"_ostr,
+ "val"_ostr, "60000");
+
+ // third shape: colored contour and top and bottom bevel, plastic material
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d"_ostr,
+ "contourW"_ostr, "50800");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d"_ostr,
+ "prstMaterial"_ostr, "plastic");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelT"_ostr,
+ "w"_ostr, "139700");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelT"_ostr,
+ "h"_ostr, "88900");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelT"_ostr,
+ "prst"_ostr, "cross");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelB"_ostr,
+ "h"_ostr, "88900");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelB"_ostr,
+ "prst"_ostr, "relaxedInset");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:contourClr/a:srgbClr"_ostr,
+ "val"_ostr, "3333ff");
+
+ // fourth shape: wireframe
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d"_ostr,
+ "prstMaterial"_ostr, "legacyWireframe");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPictureEffectPreservation)
+{
+ loadAndSave("picture-effects-preservation.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // first picture: glow effect with theme color and transformations, 3d rotation and extrusion
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:glow"_ostr,
+ "rad"_ostr, "228600");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:glow/a:srgbClr"_ostr,
+ "val"_ostr, "267de6");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:glow/a:srgbClr/a:alpha"_ostr,
+ "val"_ostr, "40000");
+
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:scene3d/a:camera"_ostr,
+ "prst"_ostr, "isometricRightUp");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:scene3d/a:lightRig"_ostr,
+ "rig"_ostr, "threePt");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:sp3d"_ostr,
+ "extrusionH"_ostr, "76200");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:sp3d/a:extrusionClr/a:srgbClr"_ostr,
+ "val"_ostr, "92d050");
+
+ // second picture: shadow and reflection effects
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:outerShdw"_ostr,
+ "dir"_ostr, "8100000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:outerShdw/a:srgbClr"_ostr,
+ "val"_ostr, "000000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:outerShdw/a:srgbClr/a:alpha"_ostr,
+ "val"_ostr, "40000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:reflection"_ostr,
+ "dir"_ostr, "5400000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:reflection/*"_ostr,
+ 0 ); // should not be present
+
+ // third picture: soft edge effect
+ assertXPathHasApproxEMU(
+ pXmlDoc,
+ "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:softEdge"_ostr,
+ "rad"_ostr, 63500); // actually, it returns 63360
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPictureArtisticEffectPreservation)
+{
+ loadAndSave("picture-artistic-effects-preservation.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlDocUniquePtr pRelsDoc = parseExport("word/_rels/document.xml.rels");
+
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(
+ comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+
+ // 1st picture: marker effect
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticMarker"_ostr,
+ "trans"_ostr, "14000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticMarker"_ostr,
+ "size"_ostr, "80");
+
+ OUString sEmbedId1 = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer"_ostr,
+ "embed"_ostr);
+ OUString sXmlPath = "/rels:Relationships/rels:Relationship[@Id='" + sEmbedId1 + "']";
+ OUString sFile = getXPath(pRelsDoc, OUStringToOString( sXmlPath, RTL_TEXTENCODING_UTF8 ), "Target"_ostr);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("word/" + sFile)));
+
+ // 2nd picture: pencil grayscale
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticPencilGrayscale"_ostr,
+ "trans"_ostr, "15000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticPencilGrayscale"_ostr,
+ "pencilSize"_ostr, "66");
+
+ OUString sEmbedId2 = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer"_ostr,
+ "embed"_ostr);
+ CPPUNIT_ASSERT_EQUAL(sEmbedId1, sEmbedId2);
+
+ // 3rd picture: pencil sketch
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticPencilSketch"_ostr,
+ "trans"_ostr, "7000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticPencilSketch"_ostr,
+ "pressure"_ostr, "17");
+
+ OUString sEmbedId3 = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer"_ostr,
+ "embed"_ostr);
+ CPPUNIT_ASSERT_EQUAL(sEmbedId1, sEmbedId3);
+
+ // 4th picture: light screen
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticLightScreen"_ostr,
+ "trans"_ostr, "13000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticLightScreen"_ostr,
+ "gridSize"_ostr, "1");
+
+ OUString sEmbedId4 = getXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer"_ostr,
+ "embed"_ostr);
+ sXmlPath = "/rels:Relationships/rels:Relationship[@Id='" + sEmbedId4 + "']";
+ sFile = getXPath(pRelsDoc, OUStringToOString( sXmlPath, RTL_TEXTENCODING_UTF8 ), "Target"_ostr);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("word/" + sFile)));
+
+ // 5th picture: watercolor sponge
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticWatercolorSponge"_ostr,
+ "brushSize"_ostr, "4");
+
+ OUString sEmbedId5 = getXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer"_ostr,
+ "embed"_ostr);
+ CPPUNIT_ASSERT_EQUAL(sEmbedId1, sEmbedId5);
+
+ // 6th picture: photocopy (no attributes)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
+ "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
+ "a14:artisticPhotocopy"_ostr, 1);
+
+ OUString sEmbedId6 = getXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
+ "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer"_ostr,
+ "embed"_ostr);
+ CPPUNIT_ASSERT_EQUAL(sEmbedId1, sEmbedId6);
+
+ // no redundant wdp files saved
+ CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess->hasByName("word/media/hdphoto3.wdp")));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, fdo77719)
+{
+ loadAndSave("fdo77719.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:custGeom[1]"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNestedAlternateContent)
+{
+ loadAndSave("nestedAlternateContent.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // We check alternateContent could not contains alternateContent (i.e. nested alternateContent)
+ assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[2]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]"_ostr,0);
+}
+
+#if 0
+// Currently LibreOffice exports custom geometry for this hexagon, not preset shape.
+// When LibreOffice can export preset shapes with correct modifiers, then this test can be re-enabled.
+
+CPPUNIT_TEST_FIXTURE(Test, test76317)
+{
+ loadAndSave("test76317.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]", "prst", "hexagon");
+}
+
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, fdo76591)
+{
+ loadAndSave("fdo76591.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]"_ostr, "relativeHeight"_ostr, "3");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test76317_2K10)
+{
+ loadAndSave("test76317_2K10.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:prstGeom[1]/a:avLst[1]/a:gd[1]"_ostr, "name"_ostr, "adj");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO77122)
+{
+ loadAndSave("LinkedTextBoxes.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ //ensure that the text box links are preserved.
+ assertXPath(pXmlDoc, "//wps:txbx[1]"_ostr, "id"_ostr, "1");
+ assertXPath(pXmlDoc, "//wps:linkedTxbx[1]"_ostr, "id"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test76734_2K7)
+{
+ loadAndSave("test76734_2K7.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]"_ostr, "Requires"_ostr, "wps");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test77219)
+{
+ loadAndSave("test77219.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[6]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]"_ostr, "behindDoc"_ostr, "1");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf77219_backgroundShape, "tdf77219_backgroundShape.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", false, getProperty<bool>(getShape(1), "Opaque"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf77219_foregroundShape, "tdf77219_foregroundShape.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", true, getProperty<bool>(getShape(1), "Opaque"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf108973_backgroundTextbox, "tdf108973_backgroundTextbox.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in front of the paragraph", false, getProperty<bool>(getShape(1), "Opaque"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf108973_foregroundTextbox, "tdf108973_foregroundTextbox.docx")
+{
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in front of the paragraph", true, getProperty<bool>(getShape(1), "Opaque"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPresetShape, "preset-shape.docx")
+{
+ // Document contains a flowChartMultidocument preset shape, our date for that shape wasn't correct.
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
+ comphelper::SequenceAsHashMap aPath(aCustomShapeGeometry["Path"]);
+ uno::Sequence<awt::Size> aSubViewSize((aPath["SubViewSize"]).get<uno::Sequence<awt::Size> >() );
+
+ // This was 0.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), aSubViewSize[0].Height);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo76101)
+{
+ loadAndSave("fdo76101.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "/w:styles/w:style"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ CPPUNIT_ASSERT(4091 >= xmlXPathNodeSetGetLength(pXmlNodes));
+ xmlXPathFreeObject(pXmlObj);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtAndShapeOverlapping)
+{
+ loadAndSave("ShapeOverlappingWithSdt.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/mc:AlternateContent"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent[1]/w:r[1]"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLockedCanvas)
+{
+ loadAndSave("fdo78658.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Checking for lockedCanvas tag
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/lc:lockedCanvas"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, fdo78474)
+{
+ loadAndSave("fdo78474.docx");
+ xmlDocUniquePtr pXmlDoc1 = parseExport("word/document.xml");
+ //docx file after RT is getting corrupted.
+ assertXPath(pXmlDoc1, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/pic:pic[1]/pic:blipFill[1]/a:blip[1]"_ostr, "embed"_ostr, "rId2");
+
+ xmlDocUniquePtr pXmlDoc2 = parseExport("word/_rels/document.xml.rels");
+ assertXPath(pXmlDoc2,"/rels:Relationships/rels:Relationship[2]"_ostr,"Id"_ostr,"rId2");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAbsolutePositionOffsetValue)
+{
+ loadAndSave("fdo78432.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ xmlXPathObjectPtr pXmlObjs[6];
+ pXmlObjs[0] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]"_ostr);
+ pXmlObjs[1] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]"_ostr);
+
+ pXmlObjs[2] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[2]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]"_ostr);
+ pXmlObjs[3] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[2]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]"_ostr);
+
+ pXmlObjs[4] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[3]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]"_ostr);
+ pXmlObjs[5] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[3]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]"_ostr);
+
+ for(sal_Int32 index = 0; index<6; ++index)
+ {
+ CPPUNIT_ASSERT(pXmlObjs[index]->nodesetval != nullptr);
+ xmlNodePtr pXmlNode = pXmlObjs[index]->nodesetval->nodeTab[0];
+ OUString contents = OUString::createFromAscii(reinterpret_cast<const char*>((pXmlNode->children[0]).content));
+ CPPUNIT_ASSERT( contents.toInt64() <= SAL_MAX_INT32 );
+ xmlXPathFreeObject(pXmlObjs[index]);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRubyHyperlink)
+{
+ loadAndReload("rubyhyperlink.fodt");
+ // test that export doesn't assert with overlapping ruby / hyperlink attr
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78300)
+{
+ loadAndSave("fdo78300.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing[1]/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[1]/w:r[1]/w:drawing[1]"_ostr,
+ 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWordArtWithinDraingtool)
+{
+ loadAndSave("testWordArtWithinDraingtool.docx");
+/* * Within a file, there is a 2007 wordArt enclosed in a drawing tool
+ * LO was exporting it as below:
+ * Sample XML as in Original file:
+ * <p> <r> <ac> <drawing> <txbx> <txbxContent> .. <pict> </pict> </txbxContent></txbx> </drawing> </ac> </r> </p>
+ * After RT :
+ * <p> <r> <ac> <drawing> <txbx> <txbxContent> .. <drawing> <txbx> <txbxContent> .. </txbxContent></txbx> </drawing> .. </txbxContent></txbx> </drawing> </ac> </r> </p>
+ * Expected : as there is nesting of a 2007 Word Art within a drawing tool, then can be separated in two different runs.
+ * */
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent"_ostr,1);
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:r/w:pict/v:shape"_ostr,1);
+ // Make sure that the shape inside a shape is exported as VML-only, no embedded mc:AlternateContent before w:pict.
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:pict"_ostr,1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78663)
+{
+ loadAndSave("fdo78663.docx");
+/* * A 2007 word art tool is enclosed in a 2010 drawing toolWithin a file,
+ * Originally the file has the following xml tag hierarchy.
+ *
+ * <p> <r> <ac> <drawing> <txbx> <txbxContent> <pict><shapetype> <shape> ...</shape></shapetype> </pict> </txbxContent></txbx> </drawing> </ac> </r> </p>
+ * After RT :
+ * <p> <r> <ac> <drawing> <txbx> <txbxContent> <pict><shapetype> <shape> <textbox><txbxContent> ... </txbxContent></textbox></shape></shapetype> </pict> </txbxContent></txbx> </drawing> </ac> </r> </p>
+ * MSO doesn't allow nesting of txbxContent tags.
+ * As the text of the wordart tool is written in the tag <v:textpath string="Welcome to... "History is fun and informative"/>
+ * We shouldn't repeat it again in <shapetype><shape> <textbox><txbxContent>
+ * */
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:pict/v:shape/v:path"_ostr,1);
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:r/w:pict/v:shape/v:path"_ostr,1);
+ // Make sure that the shape inside a shape is exported as VML-only, no embedded mc:AlternateContent before w:pict.
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:pict"_ostr,1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo78957)
+{
+ loadAndSave("fdo78957.docx");
+ xmlDocUniquePtr pXmlHeader = parseExport("word/header2.xml");
+
+ const sal_Int64 IntMax = SAL_MAX_INT32;
+ sal_Int64 cx = 0, cy = 0;
+ cx = getXPath(pXmlHeader,"/w:hdr[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:extent[1]"_ostr,"cx"_ostr).toInt64();
+ cy = getXPath(pXmlHeader,"/w:hdr[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:extent[1]"_ostr,"cy"_ostr).toInt64();
+ // Here we check the values of extent width & height
+ CPPUNIT_ASSERT(cx <= IntMax );
+ CPPUNIT_ASSERT(cy >= 0 );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79256)
+{
+ loadAndSave("fdo79256.docx");
+ /* corruption issue also solved by fixing tdf#108064:
+ * since that LO keeps MSO preset dash styles during OOXML export
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln/a:prstDash"_ostr, "val"_ostr, "lgDash");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDashedLine_CustDash1000thOfPercent)
+{
+ loadAndSave("dashed_line_custdash_1000th_of_percent.docx");
+ /* Make sure that preset line is exported correctly as "1000th of a percent".
+ * This test-file has a CUSTOM dash-line that is defined as '1000th of a percent'.
+ * This should be imported by LO as-is, and exported back with the same values.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]"_ostr, "d"_ostr , "800000");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]"_ostr, "sp"_ostr, "300000");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]"_ostr, "d"_ostr , "100000");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]"_ostr, "sp"_ostr, "300000");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]"_ostr, "d"_ostr , "100000");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]"_ostr, "sp"_ostr, "300000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDashedLine_CustDashPercentage)
+{
+ loadAndSave("dashed_line_custdash_percentage.docx");
+ /* Make sure that preset line is exported correctly as "1000th of a percent".
+ * This test-file has a CUSTOM dash-line that is defined as percentages.
+ * This should be imported by LO as '1000th of a percent', and exported back
+ * as '1000th of a percent'.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]"_ostr, "d"_ostr , "800000");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]"_ostr, "sp"_ostr, "300000");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]"_ostr, "d"_ostr , "100000");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]"_ostr, "sp"_ostr, "300000");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]"_ostr, "d"_ostr , "100000");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]"_ostr, "sp"_ostr, "300000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCommentInitials)
+{
+ loadAndSave("comment_initials.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/comments.xml");
+
+ assertXPath(pXmlDoc,"/w:comments/w:comment[1]"_ostr, "initials"_ostr, "initials");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry"));
+
+ // Test that the shape is a rounded rectangle.
+ CPPUNIT_ASSERT_EQUAL(OUString("ooxml-roundRect"), aCustomShapeGeometry["Type"].get<OUString>());
+
+ // The shape text should start with a table, with "a" in its A1 cell.
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xShape, uno::UNO_QUERY_THROW)->getText();
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1, xText), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), xCell->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo79591)
+{
+ loadAndSave("fdo79591.docx");
+ /* Values set for docPr name and shape ID attributes
+ * in RT file were not valid as per UTF-8 encoding format
+ * and hence was showing RT document as corrupt with error
+ * message "invalid character"
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr"_ostr, "name"_ostr, "_x0000_t0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape"_ostr, "ID"_ostr, "_x0000_t0");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testBnc884615, "bnc884615.docx")
+{
+ // The problem was that the shape in the header wasn't in the background.
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(1), "Opaque"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo80894)
+{
+ loadAndSave("TextFrameRotation.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Rotation value was not roundtripped for textframe.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm"_ostr,
+ "rot"_ostr,"16200000");
+
+ // w:enforcement defaults to off if not explicitly specified, so DocProtect forms should not be enabled.
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("No protected sections", sal_Int32(0), xSections->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo80895)
+{
+ loadAndSave("fdo80895.docx");
+ // DML shapes in header and footer were not getting rendered in LO and the same were not preserved after RT.
+ // In actual there was a shape but because of fetching wrong theme for header.xml or footer.xml
+ // resultant shape was with <a:noFill/> prop in <wps:spPr> hence was not visible.
+ // Checking there is a shape in header without <a:noFill/> element.
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
+ assertXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:noFill"_ostr,0);
+ assertXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:noFill"_ostr,0);
+
+ // Check for fallback (required for MSO-2007)
+ assertXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr, "fillcolor"_ostr, "#4f81bd");
+ assertXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:fill"_ostr, "type"_ostr, "solid");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf118242)
+{
+ loadAndSave("tdf118242.odt");
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[2]/w:pPr/w:pStyle"_ostr, "val"_ostr, "HeaderRight");
+
+ // w:sectPr is not exported
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+ "/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[2]/w:pPr/w:sectPr"_ostr, 0);
+
+ // and drawing is no longer in the document
+ assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[3]"_ostr, 0);
+
+ //but it's in the header
+ pXmlDocument = parseExport("word/header1.xml");
+
+ assertXPath(pXmlDocument, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData"
+ "/wps:wsp/wps:txbx/w:txbxContent/w:p[1]/w:r/w:drawing"_ostr, 1);
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testWrapTightThrough)
+{
+ loadAndSave("wrap-tight-through.docx");
+ // These were wrapSquare without a wrap polygon before.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // The first shape should be wrapThrough with a wrap polygon (was wrapSquare).
+ assertXPath(pXmlDoc, "//w:drawing/wp:anchor[1]/wp:wrapThrough/wp:wrapPolygon/wp:start"_ostr, "x"_ostr, "-1104");
+ // The second shape should be wrapTight with a wrap polygon (was wrapSquare).
+ assertXPath(pXmlDoc, "//w:drawing/wp:anchor[1]/wp:wrapTight/wp:wrapPolygon/wp:start"_ostr, "y"_ostr, "792");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPictureWrapPolygon, "picture-wrap-polygon.docx")
+{
+ // The problem was that the wrap polygon was ignored during export.
+ drawing::PointSequenceSequence aSeqSeq = getProperty<drawing::PointSequenceSequence>(getShape(1), "ContourPolyPolygon");
+ // This was 0: the polygon list was empty.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeqSeq.getLength());
+
+ drawing::PointSequence aSeq = aSeqSeq[0];
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11), aSeq.getLength());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPictureColormodeGrayscale)
+{
+ loadAndSave("picture_colormode_grayscale.docx");
+ // The problem was that the grayscale was not exported
+ xmlDocUniquePtr pXmlDoc = parseExport ("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:grayscl"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPictureColormodeBlackWhite)
+{
+ loadAndSave("picture_colormode_black_white.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport ("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:biLevel"_ostr, "thresh"_ostr, "50000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPictureColormodeWatermark)
+{
+ loadAndSave("picture_colormode_watermark.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport ("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:lum"_ostr, "bright"_ostr, "70000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:lum"_ostr, "contrast"_ostr, "-70000");
+}
+
+
+CPPUNIT_TEST_FIXTURE(Test, testExportShadow)
+{
+ loadAndSave("bnc637947.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // The problem was that shadows of shapes from non-OOXML origin were not exported to DrawingML
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw"_ostr, "dist"_ostr , "109865");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw"_ostr, "dir"_ostr , "634411");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr"_ostr, "val"_ostr , "000000");
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr/a:alpha"_ostr, "val"_ostr , "38000");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testExportAdjustmentValue)
+{
+ loadAndSave("tdf91429.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,"/w:document/w:body/w:p/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd"_ostr, "fmla"_ostr, "val 50000");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTextVerticalAdjustment, "tdf36117_verticalAdjustment.docx")
+{
+ //Preserve the page vertical alignment setting for .docx
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ SwPageDesc* pDesc = &pDoc->GetPageDesc( 0 );
+ drawing::TextVerticalAdjust nVA = pDesc->GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_CENTER, nVA );
+
+ pDesc = &pDoc->GetPageDesc( 1 );
+ nVA = pDesc->GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_TOP, nVA );
+
+ pDesc = &pDoc->GetPageDesc( 2 );
+ nVA = pDesc->GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_BOTTOM, nVA );
+
+ pDesc = &pDoc->GetPageDesc( 3 );
+ nVA = pDesc->GetVerticalAdjustment();
+ CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_BLOCK, nVA );
+}
+
+#if HAVE_MORE_FONTS
+DECLARE_OOXMLEXPORT_TEST(testTDF87348, "tdf87348_linkedTextboxes.docx")
+{
+ int followCount=0;
+ int precedeCount=0;
+ if( !parseDump("/root/page/body/txt/anchored/fly[1]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[1]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[2]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[2]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[3]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[3]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[4]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[4]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[5]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[5]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[6]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[6]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[7]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[7]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[8]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[8]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[9]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[9]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[10]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[10]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[11]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[11]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[12]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[12]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[13]/txt"_ostr,"follow"_ostr).isEmpty() )
+ followCount++;
+ if( !parseDump("/root/page/body/txt/anchored/fly[13]/txt"_ostr,"precede"_ostr).isEmpty() )
+ precedeCount++;
+ //there should be 4 chains/13 linked textboxes (set of 5, set of 3, set of 3, set of 2)
+ //that means 9 NEXT links and 9 PREV links.
+ //however, the current implementation adds leftover shapes, so can't go on exact numbers
+ // (unknown number of flys, unknown order of leftovers)
+ CPPUNIT_ASSERT ( (followCount >= 6) );
+ CPPUNIT_ASSERT ( (precedeCount >= 6) );
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, testTDF93675)
+{
+ loadAndSave("no-numlevel-but-indented.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "//w:ind"_ostr, "start"_ostr, "1418");
+}
+
+
+
+CPPUNIT_TEST_FIXTURE(Test, testFlipAndRotateCustomShape)
+{
+ loadAndSave("flip_and_rotate.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // there should be no flipH
+ assertXPathNoAttribute(pXmlDoc, "//a:xfrm"_ostr, "flipH"_ostr);
+ // flipV should be there
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "flipV"_ostr, "1");
+ // check rotation angle
+ assertXPath(pXmlDoc, "//a:xfrm"_ostr, "rot"_ostr, "8100000");
+ // point values depend on path size, values as of March 2022
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path"_ostr, "w"_ostr, "21600");
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path"_ostr, "h"_ostr, "21600");
+ // check the first few coordinates of the polygon
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(
+ 0, getXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:moveTo/a:pt"_ostr, "x"_ostr).toInt32(), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(
+ 15831, getXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:moveTo/a:pt"_ostr, "y"_ostr).toInt32(), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(
+ 6098, getXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[1]/a:pt"_ostr, "x"_ostr).toInt32(), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(
+ 10062, getXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[1]/a:pt"_ostr, "y"_ostr).toInt32(), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(
+ 13284, getXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[4]/a:pt"_ostr, "x"_ostr).toInt32(), 1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(
+ 6098, getXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[4]/a:pt"_ostr, "y"_ostr).toInt32(), 1);
+ // check path is closed
+ assertXPath(pXmlDoc, "//a:close"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf92335)
+{
+ loadAndSave("tdf92335.docx");
+ // Don't export redundant ListLabel character styles
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+
+ assertXPath(pXmlStyles, "//w:style[@w:styleId='ListLabel1']"_ostr, 0);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
new file mode 100644
index 0000000000..10fd87ebec
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -0,0 +1,1240 @@
+/* -*- 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/.
+ */
+
+
+#ifdef MACOSX
+#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#include <premac.h>
+#include <AppKit/AppKit.h>
+#include <postmac.h>
+#endif
+
+#include <swmodeltestbase.hxx>
+
+#include <IDocumentSettingAccess.hxx>
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/TableColumnSeparator.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/style/BreakType.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/table/TableBorder2.hpp>
+
+#include <tools/UnitConversion.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <xmloff/odffields.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <IDocumentMarkAccess.hxx>
+#include <bordertest.hxx>
+#include <unotxdoc.hxx>
+#include <docsh.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+DECLARE_OOXMLEXPORT_TEST(testN751054, "n751054.docx")
+{
+ text::TextContentAnchorType eValue = getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType");
+ CPPUNIT_ASSERT(eValue != text::TextContentAnchorType_AS_CHARACTER);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf48569)
+{
+ loadAndReload("tdf48569.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // File crashing while saving in LO
+ text::TextContentAnchorType eValue = getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType");
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, eValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN751117, "n751117.docx")
+{
+ // First shape: the end should be an arrow, should be rotated and should be flipped.
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ OUString aValue;
+ xPropertySet->getPropertyValue("LineEndName") >>= aValue;
+ CPPUNIT_ASSERT(aValue.indexOf("Arrow") != -1);
+
+ // Rotating & Flipping will cause the angle to change from 90 degrees to 270 degrees
+ sal_Int32 nValue = 0;
+ xPropertySet->getPropertyValue("RotateAngle") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(270 * 100), nValue);
+
+ uno::Reference<drawing::XShape> xShape(xPropertySet, uno::UNO_QUERY);
+ awt::Size aActualSize(xShape->getSize());
+ CPPUNIT_ASSERT(aActualSize.Width > 0);
+
+ // The second shape should be a line
+ uno::Reference<lang::XServiceInfo> xServiceInfo(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.LineShape"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo74745, "fdo74745.docx")
+{
+ uno::Reference<text::XTextRange > paragraph = getParagraph(3);
+ CPPUNIT_ASSERT_EQUAL(OUString("09/02/2014"), paragraph->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo81486, "fdo81486.docx")
+{
+ uno::Reference<text::XTextRange > paragraph = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("CustomTitle"), paragraph->getString());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo79738, "fdo79738.docx")
+{
+ uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( mxComponent, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xStyleFamilies = xStylesSupplier->getStyleFamilies();
+ uno::Reference<container::XNameContainer> xStyles;
+ xStyleFamilies->getByName("ParagraphStyles") >>= xStyles;
+ uno::Reference<beans::XPropertySet> xPropertySetHeader( xStyles->getByName("Header"), uno::UNO_QUERY );
+ CPPUNIT_ASSERT_EQUAL(false, xPropertySetHeader->getPropertyValue("ParaLineNumberCount").get<bool>());
+ uno::Reference<beans::XPropertySet> xPropertySetFooter( xStyles->getByName("Footer"), uno::UNO_QUERY );
+ CPPUNIT_ASSERT_EQUAL(false, xPropertySetFooter->getPropertyValue("ParaLineNumberCount").get<bool>());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN705956_1, "n705956-1.docx")
+{
+/*
+Get the first image in the document and check it's the one image in the document.
+It should be also anchored inline (as character) and be inside a groupshape.
+image = ThisComponent.DrawPage.getByIndex(0)
+graphic = image(0).Graphic
+xray graphic.Size
+xray image.AnchorType
+*/
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ uno::Reference<drawing::XShapes> shapes(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> image;
+ shapes->getByIndex(0) >>= image;
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> graphic;
+ imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
+ uno::Reference<awt::XBitmap> bitmap(graphic, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(120), bitmap->getSize().Width );
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int32>(106), bitmap->getSize().Height );
+ text::TextContentAnchorType anchorType;
+ imageProperties->getPropertyValue( "AnchorType" ) >>= anchorType;
+ CPPUNIT_ASSERT_EQUAL( text::TextContentAnchorType_AS_CHARACTER, anchorType );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN705956_2, "n705956-2.docx")
+{
+/*
+<v:shapetype> must be global, reachable even from <v:shape> inside another <w:pict>
+image = ThisComponent.DrawPage.getByIndex(0)
+xray image.FillColor
+*/
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ Color fillColor;
+ imageProperties->getPropertyValue( "FillColor" ) >>= fillColor;
+ CPPUNIT_ASSERT_EQUAL( Color( 0xc0504d ), fillColor );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN747461, "n747461.docx")
+{
+/*
+The document contains 3 images (Red, Black, Green, in this order), with explicit
+w:relativeHeight (300, 0, 225763766). Check that they are in the right ZOrder
+after they are loaded.
+*/
+ uno::Reference<drawing::XShape> image1 = getShape(1), image2 = getShape(2), image3 = getShape(3);
+ sal_Int32 zOrder1, zOrder2, zOrder3;
+ OUString descr1, descr2, descr3;
+ uno::Reference<beans::XPropertySet> imageProperties1(image1, uno::UNO_QUERY);
+ imageProperties1->getPropertyValue( "ZOrder" ) >>= zOrder1;
+ imageProperties1->getPropertyValue( "Description" ) >>= descr1;
+ uno::Reference<beans::XPropertySet> imageProperties2(image2, uno::UNO_QUERY);
+ imageProperties2->getPropertyValue( "ZOrder" ) >>= zOrder2;
+ imageProperties2->getPropertyValue( "Description" ) >>= descr2;
+ uno::Reference<beans::XPropertySet> imageProperties3(image3, uno::UNO_QUERY);
+ imageProperties3->getPropertyValue( "ZOrder" ) >>= zOrder3;
+ imageProperties3->getPropertyValue( "Description" ) >>= descr3;
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ), zOrder1 );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 1 ), zOrder2 );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( 2 ), zOrder3 );
+ CPPUNIT_ASSERT_EQUAL( OUString( "Black" ), descr1 );
+ CPPUNIT_ASSERT_EQUAL( OUString( "Red" ), descr2 );
+ CPPUNIT_ASSERT_EQUAL( OUString( "Green" ), descr3 );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN750255, "n750255.docx")
+{
+
+/*
+Column break without columns on the page is a page break, so check those paragraphs
+are on page 2 and page 3
+*/
+ CPPUNIT_ASSERT_EQUAL( OUString("one"), parseDump("/root/page[2]/body/txt/text()"_ostr) );
+ CPPUNIT_ASSERT_EQUAL( OUString("two"), parseDump("/root/page[3]/body/txt/text()"_ostr) );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN652364, "n652364.docx")
+{
+/*
+Related to 750255 above, column break with columns on the page however should be a column break.
+enum = ThisComponent.Text.createEnumeration
+enum.nextElement
+para1 = enum.nextElement
+xray para1.String
+xray para1.PageStyleName
+enum.nextElement
+para2 = enum.nextElement
+xray para2.String
+xray para2.PageStyleName
+*/
+ // get the 2nd and 4th paragraph
+ uno::Reference<uno::XInterface> paragraph1(getParagraph( 2, "text1" ));
+ uno::Reference<uno::XInterface> paragraph2(getParagraph( 4, "text2" ));
+ OUString pageStyle1 = getProperty< OUString >( paragraph1, "PageStyleName" );
+ OUString pageStyle2 = getProperty< OUString >( paragraph2, "PageStyleName" );
+ // "Standard" is the style for the first page (2nd is "Converted1").
+ CPPUNIT_ASSERT_EQUAL( OUString( "Standard" ), pageStyle1 );
+ CPPUNIT_ASSERT_EQUAL( OUString( "Standard" ), pageStyle2 );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN764005, "n764005.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+
+ // The picture in the header wasn't absolutely positioned and wasn't in the background.
+ text::TextContentAnchorType eValue;
+ xPropertySet->getPropertyValue("AnchorType") >>= eValue;
+ CPPUNIT_ASSERT(eValue != text::TextContentAnchorType_AS_CHARACTER);
+ bool bValue = true;
+ xPropertySet->getPropertyValue("Opaque") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(false, bValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN766481, "n766481.docx")
+{
+ /*
+ * The problem was that we had an additional paragraph before the pagebreak.
+ *
+ * oParas = ThisComponent.Text.createEnumeration
+ * oPara = oParas.nextElement
+ * oPara = oParas.nextElement
+ * xray oParas.hasMoreElements ' should be false
+ */
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum(xParaEnumAccess->createEnumeration());
+ for (int i = 0; i < 2; ++i)
+ xParaEnum->nextElement();
+ CPPUNIT_ASSERT_EQUAL(sal_False, xParaEnum->hasMoreElements());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN766487, "n766487.docx")
+{
+ /*
+ * The problem was that 1) the font size of the first para was too large 2) numbering had no first-line-indent.
+ *
+ * oParas = ThisComponent.Text.createEnumeration
+ * oPara = oParas.nextElement
+ * oRuns = oPara.createEnumeration
+ * oRun = oRuns.nextElement
+ * xray oRun.CharHeight ' 11, was larger
+ * oPara = oParas.nextElement
+ * xray oPara.ParaFirstLineIndent ' -635, was 0
+ */
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum(xParaEnumAccess->createEnumeration());
+
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xRunEnum(xRunEnumAccess->createEnumeration());
+ uno::Reference<beans::XPropertySet> xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+ float fValue = 0;
+ xPropertySet->getPropertyValue("CharHeight") >>= fValue;
+ CPPUNIT_ASSERT_EQUAL(11.f, fValue);
+
+ xPropertySet.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ sal_Int32 nValue = 0;
+ xPropertySet->getPropertyValue("ParaFirstLineIndent") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-360)), nValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN693238, "n693238.docx")
+{
+ /*
+ * The problem was that a continuous section break at the end of the doc caused the margins to be ignored.
+ *
+ * xray ThisComponent.StyleFamilies.PageStyles.Default.LeftMargin ' was 2000, should be 635
+ */
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ sal_Int32 nValue = 0;
+ xPropertySet->getPropertyValue("LeftMargin") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(635), nValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testNumbering1, "numbering1.docx")
+{
+/* <w:numPr> in the paragraph itself was overridden by <w:numpr> introduced by the paragraph's <w:pStyle>
+enum = ThisComponent.Text.createEnumeration
+para = enum.NextElement
+xray para.NumberingStyleName
+numberingstyle = ThisComponent.NumberingRules.getByIndex(6)
+xray numberingstyle.name - should match name above
+numbering = numberingstyle.getByIndex(0)
+xray numbering(11) - should be 4, arabic
+note that the indexes may get off as the implementation evolves, C++ code searches in loops
+*/
+ uno::Reference< text::XTextRange > paragraph(getParagraph( 1, "Text1." ));
+ OUString numberingStyleName = getProperty< OUString >( paragraph, "NumberingStyleName" );
+ uno::Reference<text::XNumberingRulesSupplier> xNumberingRulesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> numberingRules = xNumberingRulesSupplier->getNumberingRules();
+ uno::Reference<container::XIndexAccess> numberingRule;
+ for( int i = 0;
+ i < numberingRules->getCount();
+ ++i )
+ {
+ OUString name = getProperty< OUString >( numberingRules->getByIndex( i ), "Name" );
+ if( name == numberingStyleName )
+ {
+ numberingRule.set( numberingRules->getByIndex( i ), uno::UNO_QUERY );
+ break;
+ }
+ }
+ CPPUNIT_ASSERT( numberingRule.is());
+ uno::Sequence< beans::PropertyValue > numbering;
+ numberingRule->getByIndex( 0 ) >>= numbering;
+ sal_Int16 numberingType = style::NumberingType::NUMBER_NONE;
+ for( int i = 0;
+ i < numbering.getLength();
+ ++i )
+ {
+ if( numbering[ i ].Name == "NumberingType" )
+ {
+ numbering[ i ].Value >>= numberingType;
+ break;
+ }
+ }
+ CPPUNIT_ASSERT_EQUAL( style::NumberingType::ARABIC, numberingType );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testAllGapsWord, "all_gaps_word.docx")
+{
+ BorderTest borderTest;
+ BorderTest::testTheBorders(mxComponent, false);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN775906, "n775906.docx")
+{
+ /*
+ * The problem was that right margin (via direct formatting) erased the left/first margin (inherited from numbering style).
+ *
+ * oParas = ThisComponent.Text.createEnumeration
+ * oPara = oParas.nextElement
+ * xray oPara.ParaFirstLineIndent ' was 0
+ * xray oPara.ParaLeftMargin ' was 0
+ */
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-635), getProperty<sal_Int32>(getParagraph(1), "ParaFirstLineIndent"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1905), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf59699, "tdf59699.docx")
+{
+ uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
+ auto xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
+ // This was false: the referenced graphic data wasn't imported.
+ CPPUNIT_ASSERT(xGraphic.is());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN777337, "n777337.docx")
+{
+ // The problem was that the top and bottom margin on the first page was only 0.1cm instead of 1.7cm.
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1702), getProperty<sal_Int32>(xPropertySet, "TopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1702), getProperty<sal_Int32>(xPropertySet, "BottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN778836, "n778836.docx")
+{
+ /*
+ * The problem was that the paragraph inherited margins from the numbering
+ * and parent paragraph styles and the result was incorrect.
+ */
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1270), getProperty<sal_Int32>(getParagraph(1), "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3810), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-635), getProperty<sal_Int32>(getParagraph(1), "ParaFirstLineIndent"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN778828, "n778828.docx")
+{
+ /*
+ * The problem was that a page break after a continuous section break caused
+ * double page break on title page.
+ */
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106724, "tdf106724.docx")
+{
+ // This document simply crashed the importer.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN779834, "n779834.docx")
+{
+ // This document simply crashed the importer.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testRHBZ1180114, "rhbz1180114.docx")
+{
+ // This document simply crashed the importer.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf66496, "tdf66496.docx")
+{
+ // This document simply crashed the importer.
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTDF91122, "tdf91122.docx")
+{
+ /*
+ * OLE object shape: default vertical position is top in MSO, not bottom
+ */
+ { // Check first shape
+ uno::Reference<beans::XPropertySet> xShapeProperties( getShape(1), uno::UNO_QUERY );
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xShapeProperties, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), xShapeDescriptor->getShapeType());
+ sal_Int16 nValue;
+ xShapeProperties->getPropertyValue("VertOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", text::VertOrientation::TOP, nValue);
+ }
+
+ { // Check second shape
+ uno::Reference<beans::XPropertySet> xShapeProperties( getShape(2), uno::UNO_QUERY );
+ uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xShapeProperties, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), xShapeDescriptor->getShapeType());
+ sal_Int16 nValue;
+ xShapeProperties->getPropertyValue("VertOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", text::VertOrientation::TOP, nValue);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo76803)
+{
+ loadAndReload("fdo76803.docx");
+ // The ContourPolyPolygon was wrong
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+
+ drawing::PointSequenceSequence rContour = getProperty<drawing::PointSequenceSequence>(xPropertySet, "ContourPolyPolygon");
+ basegfx::B2DPolyPolygon aPolyPolygon(basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon(rContour));
+
+ // We've got exactly one polygon inside
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(1), aPolyPolygon.count());
+
+ // Now check it deeply
+ basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0));
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(4), aPolygon.count());
+
+ CPPUNIT_ASSERT_EQUAL(double(-149), aPolygon.getB2DPoint(0).getX());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: -35
+ // - Actual : -67
+ // i.e. the cropping did not influence the wrap polygon during export.
+ CPPUNIT_ASSERT_EQUAL(double(-35), aPolygon.getB2DPoint(0).getY());
+
+ CPPUNIT_ASSERT_EQUAL(double(-149), aPolygon.getB2DPoint(1).getX());
+ CPPUNIT_ASSERT_EQUAL(double(3511), aPolygon.getB2DPoint(1).getY());
+
+ CPPUNIT_ASSERT_EQUAL(double(16889), aPolygon.getB2DPoint(2).getX());
+ CPPUNIT_ASSERT_EQUAL(double(3511), aPolygon.getB2DPoint(2).getY());
+
+ CPPUNIT_ASSERT_EQUAL(double(16889), aPolygon.getB2DPoint(3).getX());
+ CPPUNIT_ASSERT_EQUAL(double(-35), aPolygon.getB2DPoint(3).getY());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTDF91260, "tdf91260.docx")
+{
+ uno::Reference<text::XTextRange> xFrame(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFrame->getString().startsWith( "Lorem ipsum" ) );
+
+ //Check the textbox doesn't get shrunk
+ CPPUNIT_ASSERT_GREATER(sal_Int32(10900), getProperty<sal_Int32>(xFrame, "Height"));
+
+ uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5450), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(21946), xShape->getPosition().Y);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo74357, "fdo74357.docx")
+{
+ // Normal outer table, floating inner table.
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+
+ // Bottom margin of the first paragraph was too large, causing a layout problem.
+ // This was 494.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(86), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo55187, "fdo55187.docx")
+{
+ // 0x010d was imported as a newline.
+ getParagraph(1, u"lup\u010Dka"_ustr);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN780563, "n780563.docx")
+{
+ /*
+ * Make sure we have the table in the fly frame created
+ */
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount( ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN780853, "n780853.docx")
+{
+ /*
+ * The problem was that the table was not imported.
+ *
+ * xray ThisComponent.TextTables.Count 'was 0
+ */
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ //tdf#102619 - I would have expected this to be "Standard", but MSO 2013/2010/2003 all give FollowStyle==Date
+ uno::Reference< beans::XPropertySet > properties(getStyles("ParagraphStyles")->getByName("Date"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Date"), getProperty<OUString>(properties, "FollowStyle"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN780843, "n780843.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(OUString("shown footer"), parseDump("/root/page[2]/footer/txt/text()"_ostr));
+
+ //tdf64372 this document should only have one page break (2 pages, not 3)
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN780843b, "n780843b.docx")
+{
+ // Same document as testN780843 except there is more text before the continuous break. Now the opposite footer results should happen.
+ uno::Reference< text::XTextRange > xPara = getParagraph(3);
+ OUString aStyleName = getProperty<OUString>(xPara, "PageStyleName");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(aStyleName), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xFooterText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, "FooterText");
+ CPPUNIT_ASSERT_EQUAL( OUString("hidden footer"), xFooterText->getString() );
+
+ CPPUNIT_ASSERT_EQUAL( 7, getParagraphs() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testShadow, "imgshadow.docx")
+{
+ /*
+ * The problem was that drop shadows on inline images were not being
+ * imported and applied.
+ */
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(2), uno::UNO_QUERY);
+
+ bool bShadow = getProperty<bool>(xPropertySet, "Shadow");
+ CPPUNIT_ASSERT(bShadow);
+
+ sal_Int32 nShadowXDistance = getProperty<sal_Int32>(xPropertySet, "ShadowXDistance");
+ CPPUNIT_ASSERT(nShadowXDistance != 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN782345, "n782345.docx")
+{
+ /*
+ * The problem was that the page break was inserted before the 3rd para, instead of before the 2nd para.
+ */
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN779941, "n779941.docx")
+{
+ /*
+ * Make sure top/bottom margins of tables are set to 0 (problem was: bottom margin set to 0.35cm)
+ */
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTableProperties(xTables->getByIndex(0), uno::UNO_QUERY);
+ {
+ uno::Any aValue = xTableProperties->getPropertyValue("TopMargin");
+ sal_Int32 nTopMargin;
+ aValue >>= nTopMargin;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nTopMargin);
+ }
+ {
+ uno::Any aValue = xTableProperties->getPropertyValue("BottomMargin");
+ sal_Int32 nBottomMargin;
+ aValue >>= nBottomMargin;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nBottomMargin);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN783638, "n783638.docx")
+{
+ // The problem was that the margins of inline images were not zero.
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPropertySet, "LeftMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo52208, "fdo52208.docx")
+{
+ // The problem was that the document had 2 pages instead of 1.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN785767, "n785767.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+ // Check the A1 and B1 cells, the width of both of them was the default value (10000 / 9, as there were 9 cells in the row).
+ CPPUNIT_ASSERT_MESSAGE("A1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
+ CPPUNIT_ASSERT_MESSAGE("B1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFineTableDash, "tableborder-finedash.docx")
+{
+ // The problem was that finely dashed borders on tables were unsupported
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTableProperties(xTables->getByIndex(0), uno::UNO_QUERY);
+ table::TableBorder2 aBorder;
+ xTableProperties->getPropertyValue("TableBorder2") >>= aBorder;
+ CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::FINE_DASHED, aBorder.RightLine.LineStyle);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN792778, "n792778.docx")
+{
+ /*
+ * The problem was that the importer didn't handle complex groupshapes with groupshapes, textboxes and graphics inside.
+ *
+ * xray ThisComponent.DrawPage.Count ' 1 groupshape
+ * xray ThisComponent.DrawPage(0).Count ' 2 sub-groupshapes
+ * xray ThisComponent.DrawPage(0).getByIndex(0).Count ' first sub-groupshape: 1 pic
+ * xray ThisComponent.DrawPage(0).getByIndex(1).Count ' second sub-groupshape: 1 pic
+ * xray ThisComponent.DrawPage(0).getByIndex(0).getByIndex(0).Position.Y ' 11684, the vertical position of the shapes were also wrong
+ * xray ThisComponent.DrawPage(0).getByIndex(1).getByIndex(0).Position.Y ' 11684
+ */
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xGroupShape->getCount());
+
+ uno::Reference<drawing::XShapes> xInnerGroupShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xInnerGroupShape->getCount());
+
+ uno::Reference<drawing::XShape> xInnerShape(xInnerGroupShape->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11684), xInnerShape->getPosition().Y);
+
+ xInnerGroupShape.set(xGroupShape->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xInnerGroupShape->getCount());
+
+ xInnerShape.set(xInnerGroupShape->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11684), xInnerShape->getPosition().Y);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGroupshapeSmarttag, "groupshape-smarttag.docx")
+{
+ uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
+ // First run of shape text was missing due to the w:smartTag wrapper around it.
+ CPPUNIT_ASSERT_EQUAL(OUString("Box 2"), xShape->getString());
+
+ // Font size of the shape text was 10.
+ CPPUNIT_ASSERT_EQUAL(12.f, getProperty<float>(getParagraphOfText(1, xShape->getText()), "CharHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN793262, "n793262.docx")
+{
+ uno::Reference<container::XEnumerationAccess> xHeaderText = getProperty< uno::Reference<container::XEnumerationAccess> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
+ uno::Reference<container::XEnumeration> xHeaderParagraphs(xHeaderText->createEnumeration());
+ xHeaderParagraphs->nextElement();
+ // Font size of the last empty paragraph in the header was ignored, this was 11.
+ CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xHeaderParagraphs->nextElement(), "CharHeight"));
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // Cell margins as direct formatting were ignored, this was 0.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(76), getProperty<sal_Int32>(xTable->getCellByName("A1"), "TopBorderDistance"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN793998, "n793998.docx")
+{
+ sal_Int32 nTextPortion = parseDump("/root/page/body/txt/SwParaPortion/SwLineLayout/child::*[1]"_ostr, "width"_ostr).toInt32(); // Width of the first (text) portion
+ sal_Int32 nTabPortion = parseDump("/root/page/body/txt/SwParaPortion/SwLineLayout/child::*[2]"_ostr, "width"_ostr).toInt32(); // Width of the second (tab) portion
+ sal_Int32 nParagraph = parseDump("/root/page/body/txt/infos/bounds"_ostr, "width"_ostr).toInt32(); // Width of the paragraph
+ sal_Int32 const nRightMargin = 3000;
+ // The problem was that the tab portion didn't ignore the right margin, so text + tab width wasn't larger than body (paragraph - right margin) width.
+ CPPUNIT_ASSERT(nTextPortion + nTabPortion > nParagraph - nRightMargin);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testN779642)
+{
+ auto verify = [this]() {
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+
+ // First problem: check that we have 2 tables, nesting caused the
+ // creation of outer one to fail
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong number of imported tables", sal_Int32(2), xTables->getCount());
+
+ // Second problem: check that the outer table is in a frame, at the bottom of the page
+ uno::Reference<text::XTextTable> xTextTable(xTextTablesSupplier->getTextTables()->getByName("Table2"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xAnchor(xTextTable->getAnchor(), uno::UNO_QUERY);
+ uno::Any aFrame = xAnchor->getPropertyValue("TextFrame");
+ uno::Reference<beans::XPropertySet> xFrame;
+ aFrame >>= xFrame;
+ CPPUNIT_ASSERT(xFrame.is());
+ sal_Int16 nValue;
+ xFrame->getPropertyValue("VertOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", text::VertOrientation::BOTTOM, nValue);
+ xFrame->getPropertyValue("VertOrientRelation") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation relation", text::RelOrientation::PAGE_PRINT_AREA, nValue);
+ };
+ createSwDoc("n779642.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTbLrHeight, "tblr-height.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("B1");
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, getProperty<sal_Int16>(xCell, "WritingMode"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testBnc865381, "bnc865381.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTextTable->getCellByName("A2");
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, getProperty<sal_Int16>(xCell, "WritingMode"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo53985, "fdo53985.docx")
+{
+ // Unhandled exception prevented import of the rest of the document.
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTables->getCount()); // Only 4 tables were imported.
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE("Compatibility: Protect form", pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM ) );
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xSections->getCount()); // The first paragraph wasn't counted as a section.
+
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("TextSection is protected", true, getProperty<bool>(xSect, "IsProtected"));
+ xSect.set(xSections->getByIndex(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section3 is protected", false, getProperty<bool>(xSect, "IsProtected"));
+
+ // This was increasing by 3 every round-trip - an extra paragraph after each table in sections
+ CPPUNIT_ASSERT_EQUAL(6, getParagraphs());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo59638, "fdo59638.docx")
+{
+ // The problem was that w:lvlOverride inside w:num was ignores by dmapper.
+
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+
+ for (beans::PropertyValue const & rProp : std::as_const(aProps))
+ {
+ if (rProp.Name == "BulletChar")
+ {
+ // Was '*', should be 'o'.
+ CPPUNIT_ASSERT_EQUAL(u"\uF0B7"_ustr, rProp.Value.get<OUString>());
+ return;
+ }
+ }
+ CPPUNIT_FAIL("no BulletChar property");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo61343, "fdo61343.docx")
+{
+ // The problem was that there were a groupshape in the doc, followed by an
+ // OLE object, and this lead to a crash.
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testToolsLineNumbering, "tools-line-numbering.docx")
+{
+ /*
+ * Test the line numbering feature import (Tools->Line Numbering ...)
+ *
+ * xray ThisComponent.getLineNumberingProperties().IsOn == True
+ * xray ThisComponent.getLineNumberingProperties().CountEmptyLines == True
+ * xray ThisComponent.getLineNumberingProperties().NumberPosition == 0
+ * xray ThisComponent.getLineNumberingProperties().NumberingType == 4
+ * xray ThisComponent.getLineNumberingProperties().SeparatorInterval == 3
+ */
+
+ bool bValue = false;
+ sal_Int32 nValue = -1;
+
+ uno::Reference< text::XTextDocument > xtextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference< text::XLineNumberingProperties > xLineProperties( xtextDocument, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xPropertySet = xLineProperties->getLineNumberingProperties();
+
+ xPropertySet->getPropertyValue("IsOn") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(true, bValue);
+
+ xPropertySet->getPropertyValue("CountEmptyLines") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(true, bValue);
+
+ xPropertySet->getPropertyValue("NumberPosition") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nValue);
+
+ xPropertySet->getPropertyValue("NumberingType") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), nValue);
+
+ xPropertySet->getPropertyValue("SeparatorInterval") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), nValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testfdo78904, "fdo78904.docx")
+{
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ if (xIndexAccess->getCount())
+ {
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(0), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo60922, "fdo60922.docx")
+{
+ // This was 0, not 100, due to wrong import of w:position w:val="0"
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraph(1), 1), "CharEscapementHeight"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo59273, "fdo59273.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // Was 115596 (i.e. 10 times wider than necessary), as w:tblW was missing and the importer didn't set it.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12963), getProperty<sal_Int32>(xTextTable, "Width"));
+
+ uno::Reference<table::XTableRows> xTableRows = xTextTable->getRows();
+ // Was 9997, so the 4th column had ~zero width
+ CPPUNIT_ASSERT_LESSEQUAL(2, (sal_Int16(7500)
+ - getProperty<uno::Sequence<text::TableColumnSeparator>>(
+ xTableRows->getByIndex(0), "TableColumnSeparators")[2]
+ .Position));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testConditionalstylesTablelook, "conditionalstyles-tbllook.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // Background was -1.
+ CPPUNIT_ASSERT_EQUAL(Color(0x7F7F7F), getProperty<Color>(xTable->getCellByName("A1"), "BackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo63685, "fdo63685.docx")
+{
+ // An inline image's wrapping should be always zero, even if the doc model has a non-zero value.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getShape(1), "TopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN592908_Frame, "n592908-frame.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ text::WrapTextMode eValue;
+ xPropertySet->getPropertyValue("Surround") >>= eValue;
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, eValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN592908_Picture, "n592908-picture.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ text::WrapTextMode eValue;
+ xPropertySet->getPropertyValue("Surround") >>= eValue;
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, eValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN779630, "n779630.docx")
+{
+ // A combo box is imported
+ if (getShapes() > 0)
+ {
+ uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.ComboBox")));
+ CPPUNIT_ASSERT_EQUAL(OUString("dropdown default text"), getProperty<OUString>(xPropertySet, "DefaultText"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty< uno::Sequence<OUString> >(xPropertySet, "StringItemList").getLength());
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPropertySet, "Dropdown"));
+ }
+ else
+ {
+ // Inline SDT: dropdown is imported as content control.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("B1");
+ uno::Reference<container::XEnumerationAccess> xParagraphsAccess(xCell, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParagraphs = xParagraphsAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphs->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
+ // Label:
+ xPortions->nextElement();
+ // Space:
+ xPortions->nextElement();
+ // Default text:
+ uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValues> aListItems;
+ xContentControlProps->getPropertyValue("ListItems") >>= aListItems;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aListItems.getLength());
+ uno::Reference<container::XEnumerationAccess> xContentEnumAccess(xContentControl, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentEnum = xContentEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xContent(xContentEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("dropdown default text"), xContent->getString());
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testIndentation, "indentation.docx")
+{
+ uno::Reference<uno::XInterface> xParaLTRTitle(getParagraph( 1, "Title aligned"));
+ uno::Reference<uno::XInterface> xParaLTRNormal(getParagraph( 2, ""));
+
+ // this will test the text direction for paragraphs
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( xParaLTRTitle, "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( xParaLTRNormal, "WritingMode" ));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPageBorderShadow, "page-border-shadow.docx")
+{
+ // The problem was that in w:pgBorders, child elements had a w:shadow attribute, but that was ignored.
+ table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName("Standard"), "ShadowFormat");
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(ColorTransparency, aShadow.Color));
+ CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
+ // w:sz="48" is in eights of a point, 1 pt is 20 twips.
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(convertTwipToMm100(48/8*20)), aShadow.ShadowWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN816593, "n816593.docx")
+{
+ // Two consecutive <w:tbl> without any paragraph in between, but with different tblpPr. In this
+ // case we need to have 2 different tables instead of 1
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN820509, "n820509.docx")
+{
+ // M.d.yyyy date format was unhandled.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ if (isExported())
+ {
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ uno::Reference<container::XEnumerationAccess> xParagraphsAccess(xCell, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParagraphs = xParagraphsAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphs->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
+ uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+ OUString aDateFormat;
+ xContentControlProps->getPropertyValue("DateFormat") >>= aDateFormat;
+ CPPUNIT_ASSERT_EQUAL(OUString("M.d.yyyy"), aDateFormat);
+ }
+ else
+ {
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
+
+ ::sw::mark::IFieldmark* pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*pMarkAccess->getAllMarksBegin());
+
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(ODF_FORMDATE, pFieldmark->GetFieldname());
+
+ const sw::mark::IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
+ OUString sDateFormat;
+ auto pResult = pParameters->find(ODF_FORMDATE_DATEFORMAT);
+ if (pResult != pParameters->end())
+ {
+ pResult->second >>= sDateFormat;
+ }
+ CPPUNIT_ASSERT_EQUAL(OUString("M.d.yyyy"), sDateFormat);
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf151548_activeContentDemo, "tdf151548_activeContentDemo.docm")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ for(auto aIter = pMarkAccess->getFieldmarksBegin(); aIter != pMarkAccess->getFieldmarksEnd(); ++aIter)
+ {
+ const OUString sName = (*aIter)->GetName();
+ CPPUNIT_ASSERT(sName == "Check1" || sName == "Text1" || sName == "Dropdown1");
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN830205, "n830205.docx")
+{
+ // Previously import just crashed (due to infinite recursion).
+ getParagraph(1, "XXX");
+}
+
+DECLARE_OOXMLEXPORT_TEST(tdf123705, "tdf123705.docx")
+{
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableAutoColumnFixedSize, "table-auto-column-fixed-size.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // Width was not recognized during import when table size was 'auto'
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(3996)), getProperty<sal_Int32>(xTextTable, "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableAutoColumnFixedSize2, "table-auto-column-fixed-size2.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // This was 17907, i.e. the sum of the width of the 3 cells (10152 twips each), which is too wide.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16891), getProperty<sal_Int32>(xTextTable, "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo46361, "fdo46361.docx")
+{
+ uno::Reference<container::XIndexAccess> xGroupShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextBox;
+
+ // FIXME:
+ // uno::Reference<drawing::XShape> xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
+ // CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_TOP, getProperty<drawing::TextVerticalAdjust>(xShape, "TextVerticalAdjust"));
+
+ // This was CENTER
+ xTextBox.set(xGroupShape->getByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER,
+ static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(
+ getParagraphOfText(1, xTextBox->getText()), "ParaAdjust")));
+ // This was BLACK
+ CPPUNIT_ASSERT_EQUAL(
+ Color(0x008000),
+ getProperty<Color>(getRun(getParagraphOfText(1, xTextBox->getText()), 1),
+ "CharColor"));
+ // Count the paragraphs
+ xTextBox.set(xGroupShape->getByIndex(1), uno::UNO_QUERY_THROW);
+ const auto& sText1 = xTextBox->getString();
+
+ xTextBox.set(xGroupShape->getByIndex(2), uno::UNO_QUERY_THROW);
+ const auto& sText2 = xTextBox->getString();
+
+ sal_Int32 nCount1 = 0;
+ sal_Int32 nCount2 = 0;
+
+ for (sal_Int32 i = 0; i < sText1.getLength(); i++)
+ if (sText1[i] == '\n')
+ nCount1++;
+ for (sal_Int32 i = 0; i < sText2.getLength(); i++)
+ if (sText2[i] == '\n')
+ nCount2++;
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), nCount1);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), nCount2);
+
+ // This was CENTER
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER,
+ static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(
+ getParagraphOfText(2, xTextBox->getText(), "text"), "ParaAdjust")));
+
+ // This must not be left.
+ CPPUNIT_ASSERT_MESSAGE("You FIXED me!", style::ParagraphAdjust_LEFT !=
+ static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(
+ getParagraphOfText(3, xTextBox->getText(), ""), "ParaAdjust")));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo65632, "fdo65632.docx")
+{
+ // The problem was that the footnote text had fake redline: only the body
+ // text has redline in fact.
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XText> xText(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ //uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"), getProperty<OUString>(getRun(getParagraphOfText(1, xText), 1), "TextPortionType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo66474, "fdo66474.docx")
+{
+ // The table width was too small, so the text in the second cell was unreadable: this was 1397.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(10492), getProperty<sal_Int32>(xTables->getByIndex(0), "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testGroupshapeRotation, "groupshape-rotation.docx")
+{
+ // Rotation on groupshapes wasn't handled at all by the VML importer.
+ // Note: the shapes are still shifting on the page, so the rotation drifts after multiple round-trips.
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(31500.0, getProperty<double>(getShape(1), "RotateAngle"), 100);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testBnc780044Spacing, "bnc780044_spacing.docx")
+{
+ // The document has global w:spacing in styles.xml , and local w:spacing in w:pPr, which however
+ // only applied to text runs, not to as-character pictures. So the picture made the line higher.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableAutoNested, "table-auto-nested.docx")
+{
+ // This was 176, when compat option is not enabled, the auto paragraph bottom margin value was incorrect.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(494), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ // This was 115596, i.e. the width of the outer table was too large.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(23051), getProperty<sal_Int32>(xTables->getByIndex(1), "Width"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTableStyleParprop, "table-style-parprop.docx")
+{
+ // The problem was that w:spacing's w:after=0 (a paragraph property) wasn't imported from table style.
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // This was 353, the document default, i.e. paragraph property from table style had no effect.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTablePagebreak, "table-pagebreak.docx")
+{
+ // Page break inside table: should be ignored (was style::BreakType_PAGE_BEFORE before).
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE, getProperty<style::BreakType>(getParagraphOrTable(2), "BreakType"));
+
+ // This one is outside the table: should not be ignored.
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(getParagraph(3), "BreakType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo68607, "fdo68607.docx")
+{
+ // Bugdoc was 8 pages in Word, 1 in Writer due to pointlessly wrapping the
+ // table in a frame. Exact layout may depend on fonts available, etc. --
+ // but at least make sure that our table spans over multiple pages now.
+ CPPUNIT_ASSERT(getPages() > 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testVmlTextVerticalAdjust, "vml-text-vertical-adjust.docx")
+{
+ uno::Reference<drawing::XShapes> xOuterGroupShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShapes> xInnerGroupShape(xOuterGroupShape->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xInnerGroupShape->getByIndex(0), uno::UNO_QUERY);
+ // Was CENTER.
+ CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_TOP, getProperty<drawing::TextVerticalAdjust>(xShape, "TextVerticalAdjust"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
+{
+ // The problem was that the mso-layout-flow-alt:bottom-to-top VML shape property wasn't handled for sw text frames.
+ // Note: VML is no longer used on import. OOXML import uses WritingMode2::BT_LR now.
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(text::WritingMode2::BT_LR), getProperty<sal_Int16>(xPropertySet, "WritingMode"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testChartProp, "chart-prop.docx")
+{
+ // The problem was that chart was not getting parsed in writer module.
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(15240), getProperty<sal_Int32>(xPropertySet, "Width"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8890), getProperty<sal_Int32>(xPropertySet, "Height"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo43093, "fdo43093b.docx")
+{
+ // The problem was that the direction and alignment are not correct for RTL paragraphs.
+ uno::Reference<uno::XInterface> xParaRtlRight(getParagraph( 1, "Right and RTL in M$"));
+ sal_Int32 nRtlRight = getProperty< sal_Int32 >( xParaRtlRight, "ParaAdjust" );
+ sal_Int16 nRRDir = getProperty< sal_Int32 >( xParaRtlRight, "WritingMode" );
+
+ uno::Reference<uno::XInterface> xParaRtlLeft(getParagraph( 2, "Left and RTL in M$"));
+ sal_Int32 nRtlLeft = getProperty< sal_Int32 >( xParaRtlLeft, "ParaAdjust" );
+ sal_Int16 nRLDir = getProperty< sal_Int32 >( xParaRtlLeft, "WritingMode" );
+
+ uno::Reference<uno::XInterface> xParaLtrRight(getParagraph( 3, "Right and LTR in M$"));
+ sal_Int32 nLtrRight = getProperty< sal_Int32 >( xParaLtrRight, "ParaAdjust" );
+ sal_Int16 nLRDir = getProperty< sal_Int32 >( xParaLtrRight, "WritingMode" );
+
+ uno::Reference<uno::XInterface> xParaLtrLeft(getParagraph( 4, "Left and LTR in M$"));
+ sal_Int32 nLtrLeft = getProperty< sal_Int32 >( xParaLtrLeft, "ParaAdjust" );
+ sal_Int16 nLLDir = getProperty< sal_Int32 >( xParaLtrLeft, "WritingMode" );
+
+ // this will test the both the text direction and alignment for each paragraph
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_RIGHT), nRtlRight);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, nRRDir);
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), nRtlLeft);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, nRLDir);
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_RIGHT), nLtrRight);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nLRDir);
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), nLtrLeft);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nLLDir);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
new file mode 100644
index 0000000000..ad3bba49df
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -0,0 +1,1604 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <config_fonts.h>
+
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/style/BreakType.hpp>
+#include <com/sun/star/style/PageStyleLayout.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/view/XFormLayerAccess.hpp>
+#include <com/sun/star/view/XViewSettingsSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+#include <sfx2/docfile.hxx>
+#include <sfx2/docfilt.hxx>
+#include <comphelper/processfactory.hxx>
+#include <tools/UnitConversion.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <docsh.hxx>
+#include <ftninfo.hxx>
+#include <unotxdoc.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+class DocmTest : public SwModelTestBase
+{
+public:
+ DocmTest()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "MS Word 2007 XML VBA")
+ {
+ }
+};
+
+DECLARE_OOXMLEXPORT_TEST(testFdo55381, "fdo55381.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+ //TODO: frames not located on the correct pages
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDocm)
+{
+ loadAndSave("hello.docm");
+ // Make sure that we check the name of the export filter.
+ // This was application/vnd.ms-word.document.macroEnabled.main+xml when the
+ // name of the import filter was checked.
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/document.xml']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDefaultContentTypes)
+{
+ loadAndSave("fdo55381.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='xml']"_ostr,
+ "ContentType"_ostr,
+ "application/xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='rels']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-package.relationships+xml");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='png']"_ostr,
+ "ContentType"_ostr,
+ "image/png");
+
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='jpeg']"_ostr,
+ "ContentType"_ostr,
+ "image/jpeg");
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testDocmSave, "hello.docm", nullptr, DocmTest)
+{
+ // This was
+ // application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml,
+ // we used the wrong content type for .docm files.
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/document.xml']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.ms-word.document.macroEnabled.main+xml");
+ }
+}
+
+DECLARE_SW_ROUNDTRIP_TEST(testBadDocm, "bad.docm", nullptr, DocmTest)
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ // This was 'MS Word 2007 XML', broken docm files were not recognized.
+ CPPUNIT_ASSERT_EQUAL(OUString("MS Word 2007 XML VBA"), pTextDoc->GetDocShell()->GetMedium()->GetFilter()->GetName());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf109063)
+{
+ auto verify = [this]() {
+ // A near-page-width table should be allowed to split:
+ uno::Reference<text::XTextFramesSupplier> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+ uno::UNO_QUERY);
+ bool bIsSplitAllowed{};
+ xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+ CPPUNIT_ASSERT(bIsSplitAllowed);
+ };
+ createSwDoc("tdf109063.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(DocmTest, testTdf108269)
+{
+ loadAndReload("tdf108269.docm");
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ // This failed: VBA streams were not roundtripped via the doc-level
+ // grab-bag.
+ CPPUNIT_ASSERT(xNameAccess->hasByName("word/vbaProject.bin"));
+ CPPUNIT_ASSERT(xNameAccess->hasByName("word/vbaData.xml"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf125338)
+{
+ loadAndSave("tdf125338.docm");
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ // docm files should not retain macros when saved as docx
+ CPPUNIT_ASSERT(!xNameAccess->hasByName("word/vbaProject.bin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf92045, "tdf92045.docx")
+{
+ // This was true, <w:effect w:val="none"/> resulted in setting the blinking font effect.
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getRun(getParagraph(1), 1), "CharFlash"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf95031, "tdf95031.docx")
+{
+ // This was 494, in-numbering paragraph's automating spacing was handled as visible spacing, while it should not.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(3), "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106690, "tdf106690.docx")
+{
+ // This was 0, numbering rules with automatic spacing meant 0
+ // before/autospacing for all text nodes, even for ones at the start/end of
+ // a numbered text node block.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraph(2), "ParaTopMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106690Cell, "tdf106690-cell.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // This was 0, bottom margin of the second paragraph in the A1 table cell
+ // had a reduced auto-space, just because of a next paragraph in the A2
+ // cell.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf122342, "tdf122342.docx")
+{
+ // These were 494, style based numbering rules with automatic spacing meant 0
+ // before/autospacing for all text nodes, even for ones at the start/end of
+ // a numbered text node block.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+ // last list item
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraph(3), "ParaBottomMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132802)
+{
+ loadAndSave("tdf132802.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+ // This was 0 (list auto spacing is not zero before tables)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:spacing"_ostr, "after"_ostr, "280");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[1]/w:pPr/w:spacing"_ostr, "after"_ostr, "0");
+ // This was 0 (list auto spacing is not zero at the end of table cells)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[2]/w:pPr/w:spacing"_ostr, "after"_ostr, "280");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[1]/w:pPr/w:spacing"_ostr, "after"_ostr, "280");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p[1]/w:pPr/w:spacing"_ostr, "after"_ostr, "280");
+ // This was 0 (list auto spacing is not zero at list end)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing"_ostr, "after"_ostr, "280");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132807)
+{
+ loadAndSave("tdf132807.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing"_ostr, "before"_ostr, "280");
+ // This was 240 (list auto spacing is zero in lists)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[1]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ // This was 240 (list auto spacing is zero in lists)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[2]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[1]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p[2]/w:pPr/w:spacing"_ostr, "before"_ostr, "280");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p[1]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:spacing"_ostr, "before"_ostr, "280");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf133052)
+{
+ loadAndSave("tdf133052.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // These were 240 (top auto spacing of list subitems are zero)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ // in tables, too
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[2]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[3]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[4]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p[5]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf134648)
+{
+ loadAndSave("tdf134648.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // list item with direct top auto spacing
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing"_ostr, "after"_ostr, "240");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing"_ostr, "beforeAutospacing"_ostr, "1");
+
+ // This was spacing w:after=200, but bottom auto spacing of first list subitem is zero
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:spacing"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129575_directBefore, "tdf129575-directBefore.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // direct paragraph formatting
+ // This was 212 twips from the table style, but always direct paragraph formatting wins, in the case of the default 0 margin, too
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaTopMargin"));
+ // default margin
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129575_directAfter, "tdf129575-directAfter.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // from table style
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(212), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaTopMargin"));
+ // direct paragraph formatting
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129575_styleAfter, "tdf129575-styleAfter.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // direct paragraph formatting
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaTopMargin"));
+ // from table style
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(212), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf129575_docDefault, "tdf129575-docDefault.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // docDefault defines both bottom margin and line spacing, but
+ // applied bottom margin values are based on non-docDefault paragraph styles, line spacing is based on table style
+
+ // docDefault: <w:spacing w:after="160" w:line="320" w:lineRule="auto"/>
+ // table style: <w:spacing w:after="0" w:line="240" w:lineRule="auto"/> (single line space, overwriting bigger docDefault)
+
+ // Paragraph style Normal: <w:spacing w:after="160"/> (same as docDefault),
+ // table style based single line spacing
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(282), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+ style::LineSpacing aLineSpacing = getProperty<style::LineSpacing>(getParagraphOfText(1, xCell->getText()), "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aLineSpacing.Height);
+ // Heading 2: <w:spacing w:after="360"/> (different from docDefault),
+ // table style based single line spacing
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(635), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaBottomMargin"));
+ aLineSpacing = getProperty<style::LineSpacing>(getParagraphOfText(1, xCell->getText()), "ParaLineSpacing");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(style::LineSpacingMode::PROP), aLineSpacing.Mode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aLineSpacing.Height);
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf118812)
+{
+ loadAndSave("tdf118812_tableStyles-comprehensive.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // cell A1
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:pPr/w:pStyle"_ostr, "val"_ostr, "Normal");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:pPr/w:spacing"_ostr, "line"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:pPr/w:spacing"_ostr, "before"_ostr, "480");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:r[1]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:r[1]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:r[2]/w:rPr/w:rStyle"_ostr, "val"_ostr, "CharSubStyleDefaults");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:r[2]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:r[2]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ // cell A2
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:pPr/w:pStyle"_ostr, "val"_ostr, "Normal");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:pPr/w:spacing"_ostr, "line"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:pPr/w:spacing"_ostr, "before"_ostr, "480");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[1]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[1]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[2]/w:rPr/w:rStyle"_ostr, "val"_ostr, "ParaSubStyleDefaultsChar");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[2]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[2]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[3]/w:rPr/w:rStyle"_ostr, "val"_ostr, "CharSubStyleNormal");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[3]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc/w:p/w:r[3]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ // cell A3
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:pPr/w:pStyle"_ostr, "val"_ostr, "ParaSubStyleNormal");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:pPr/w:spacing"_ostr, "line"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:pPr/w:spacing"_ostr, "before"_ostr, "480");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "280");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[1]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[1]/w:rPr/w:sz"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[2]/w:rPr/w:rStyle"_ostr, "val"_ostr, "CharSubStyleNormal");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[2]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:p/w:r[2]/w:rPr/w:sz"_ostr, 0);
+ // cell A4
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:pPr/w:pStyle"_ostr, "val"_ostr, "ParaSubStyleDefaults");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:pPr/w:spacing"_ostr, "line"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:pPr/w:spacing"_ostr, "before"_ostr, "480");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "200");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[1]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[1]/w:rPr/w:sz"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[2]/w:rPr/w:rStyle"_ostr, "val"_ostr, "CharSubStyleDefaults");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[2]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[2]/w:rPr/w:sz"_ostr, 0);
+ // cell A5
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:pPr/w:pStyle"_ostr, "val"_ostr, "Normal");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:pPr/w:spacing"_ostr, "line"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:pPr/w:rPr"_ostr, "color"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:pPr/w:rPr"_ostr, "sz"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:pPr/w:spacing"_ostr, "before"_ostr, "480");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:r[1]/w:rPr/w:color"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:r[1]/w:rPr/w:color"_ostr, "val"_ostr, "AAAA00"); // all text in color
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[5]/w:tc/w:p/w:r[1]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ // cell A6
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:pPr/w:pStyle"_ostr, "val"_ostr, "Normal");
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:pPr/w:spacing"_ostr, "lineRule"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:pPr/w:spacing"_ostr, "line"_ostr);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:pPr/w:rPr"_ostr, "color"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:pPr/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:pPr/w:spacing"_ostr, "before"_ostr, "480");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:pPr/w:spacing"_ostr, "after"_ostr, "20");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:r[1]/w:rPr/w:color"_ostr, 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:r[1]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:r[2]/w:rPr/w:color"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:r[2]/w:rPr/w:color"_ostr, "val"_ostr, "AAAA00");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[6]/w:tc/w:p/w:r[2]/w:rPr/w:sz"_ostr, "val"_ostr, "16");
+
+ // tdf#131070 keep paragraph style based right indentation with indentation of direct numbering
+ // cell A7 - This was <w:ind w:start="1440" w:hanging="0"/>
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[7]/w:tc/w:p/w:pPr/w:ind"_ostr, 0);
+ // cell A8
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[8]/w:tc/w:p/w:pPr/w:ind"_ostr, "start"_ostr, "714");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[8]/w:tc/w:p/w:pPr/w:ind"_ostr, "end"_ostr, "1701");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[8]/w:tc/w:p/w:pPr/w:ind"_ostr, "hanging"_ostr, "357");
+ // cell A9
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[9]/w:tc/w:p/w:pPr/w:ind"_ostr, "end"_ostr, "1440");
+ // This was 1440
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[9]/w:tc/w:p/w:pPr/w:ind"_ostr, "start"_ostr, "720");
+ // This was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[9]/w:tc/w:p/w:pPr/w:ind"_ostr, "hanging"_ostr, "360");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107626)
+{
+ loadAndSave("tdf107626.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 2 (missing trailing cell in merged cell range)
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc"_ostr, 3);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106970, "tdf106970.docx")
+{
+ // The second paragraph (first numbered one) had 0 bottom margin:
+ // autospacing was even collapsed between different numbering styles.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(3), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraph(4), "ParaBottomMargin"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf79272_strictDxa, "tdf79272_strictDxa.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4318), getProperty<sal_Int32>(xTables->getByIndex(0), "Width"));
+
+ if (!isExported())
+ return;
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ // Validation test: order of elements was wrong. Order was: insideH, end, insideV.
+ int nEnd = getXPathPosition(pXmlDoc, "/w:styles/w:style[@w:styleId='TableGrid']/w:tblPr/w:tblBorders"_ostr, "end");
+ int nInsideH = getXPathPosition(pXmlDoc, "/w:styles/w:style[@w:styleId='TableGrid']/w:tblPr/w:tblBorders"_ostr, "insideH");
+ int nInsideV = getXPathPosition(pXmlDoc, "/w:styles/w:style[@w:styleId='TableGrid']/w:tblPr/w:tblBorders"_ostr, "insideV");
+ CPPUNIT_ASSERT(nEnd < nInsideH);
+ CPPUNIT_ASSERT(nInsideH < nInsideV);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf109306, "tdf109306.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ // Both types of relative width specification (pct): simple integers (in fiftieths of percent)
+ // and floats with "%" unit specification must be treated correctly
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTables->getByIndex(0), "IsWidthRelative"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(9), getProperty<sal_Int16>(xTables->getByIndex(0), "RelativeWidth"));
+
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTables->getByIndex(1), "IsWidthRelative"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(80), getProperty<sal_Int16>(xTables->getByIndex(1), "RelativeWidth"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testKern, "kern.docx")
+{
+ CPPUNIT_ASSERT(getProperty<bool>(getRun(getParagraph(1), 1), "CharAutoKerning"));
+ // This failed: kerning was also enabled for the second paragraph.
+ CPPUNIT_ASSERT(!getProperty<bool>(getRun(getParagraph(2), 1), "CharAutoKerning"));
+
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Default Paragraph Style"), uno::UNO_QUERY);
+ //tdf107801: kerning normally isn't enabled by default for .docx
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("AutoKern should be false", false, getProperty<bool>(xStyle, "CharAutoKerning"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf89377, "tdf89377_tableWithBreakBeforeParaStyle.docx")
+{
+ // the paragraph style should set table's text-flow break-before-page
+ CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Default Paragraph Style"), uno::UNO_QUERY);
+ //tdf107801: kerning info wasn't exported previously.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("AutoKern should be true", true, getProperty<bool>(xStyle, "CharAutoKerning"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104420, "tdf104420_lostParagraph.docx")
+{
+ // the add/remove dummy paragraph was losing an entire header and paragraph
+ CPPUNIT_ASSERT_EQUAL( 2, getPages() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf41542_borderlessPadding)
+{
+ loadAndReload("tdf41542_borderlessPadding.odt");
+ // the page style's borderless padding should force this to 3 pages, not 1
+ CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+}
+
+#if HAVE_MORE_FONTS
+DECLARE_OOXMLEXPORT_TEST(tdf105490_negativeMargins, "tdf105490_negativeMargins.docx")
+{
+ // negative margins should change to minimal margins, not default margins.
+ CPPUNIT_ASSERT_EQUAL( 1, getPages() );
+}
+#endif
+
+DECLARE_OOXMLEXPORT_TEST(testTdf97648_relativeWidth, "tdf97648_relativeWidth.docx")
+{
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(7616), getShape(1)->getSize().Width, 10);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(8001), getShape(2)->getSize().Width, 10);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(4001), getShape(3)->getSize().Width, 10);
+ CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_LEFT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(6), "ParaAdjust")) );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(1600), getShape(4)->getSize().Width, 10);
+ CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(8), "ParaAdjust")) );
+
+
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), getProperty<sal_Int32>(getShape(1), "LeftMargin") );
+ if (!isExported())
+ {
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Text should wrap above/below the line", text::WrapTextMode_NONE, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(getShape(2), "HoriOrient"));
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::RIGHT, getProperty<sal_Int16>(getShape(3), "HoriOrient"));
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::LEFT, getProperty<sal_Int16>(getShape(4), "HoriOrient"));
+ }
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xSections->getCount());
+
+ uno::Reference<beans::XPropertySet> xTextSection(xSections->getByIndex(2), uno::UNO_QUERY);
+ uno::Reference<text::XTextColumns> xTextColumns
+ = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf144362, "tdf144362.odt")
+{
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+
+ // This is difference OK: tdf#107837 extra section added on export to preserve balanced columns.
+ CPPUNIT_ASSERT_GREATEREQUAL(sal_Int32(2), xSections->getCount());
+
+ uno::Reference<beans::XPropertySet> xTextSection(xSections->getByIndex(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextColumns> xTextColumns
+ = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104061_tableSectionColumns,"tdf104061_tableSectionColumns.docx")
+{
+ CPPUNIT_ASSERT_MESSAGE("There should be two or three pages", getPages() <= 3 );
+
+ //tdf#95114 - follow style is Text Body - DOCX test
+ uno::Reference< beans::XPropertySet > properties(getStyles("ParagraphStyles")->getByName("annotation subject"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("annotation text"), getProperty<OUString>(properties, "FollowStyle"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf46940_dontEquallyDistributeColumns, "tdf46940_dontEquallyDistributeColumns.docx")
+{
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTextSections->getByIndex(0), "DontBalanceTextColumns"));
+ // This was false, columns before a section-page-break were balanced.
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextSections->getByIndex(2), "DontBalanceTextColumns"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextSections->getByIndex(3), "DontBalanceTextColumns"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf98700_keepWithNext)
+{
+ loadAndReload("tdf98700_keepWithNext.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Heading style keeps with next", true, getProperty<bool>(getParagraph(1), "ParaKeepTogether"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Default style doesn't keep with next", false, getProperty<bool>(getParagraph(2), "ParaKeepTogether"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Heading 1 style inherits keeps with next", true, getProperty<bool>(getParagraph(3), "ParaKeepTogether"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Heading 2 style disabled keep with next", false, getProperty<bool>(getParagraph(4), "ParaKeepTogether"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Text Body style toggled off keep with next", false, getProperty<bool>(getParagraph(5), "ParaKeepTogether"));
+
+ //tdf#95114 - follow style is Text Body - ODT test
+ uno::Reference< beans::XPropertySet > properties(getStyles("ParagraphStyles")->getByName("Heading 1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Text body"), getProperty<OUString>(properties, "FollowStyle"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testRhbz988516, "rhbz988516.docx")
+{
+ // The problem was that the list properties of the footer leaked into body
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(1), "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Enclosure 3"), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(3), "NumberingStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(4), "NumberingStyleName"));
+
+ // tdf#103975 The problem was that an empty paragraph with page break info was removed.
+ CPPUNIT_ASSERT_EQUAL( 2, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakB, "tdf103975_notPageBreakB.docx")
+{
+ // turn on View Formatting Marks to see these documents.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(4), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+ CPPUNIT_ASSERT_EQUAL( 4, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL( 1, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakC, "tdf103975_notPageBreakC.docx")
+{
+ // turn on View Formatting Marks to see these documents.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(4), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+ CPPUNIT_ASSERT_EQUAL( 4, getParagraphs() );
+ CPPUNIT_ASSERT_EQUAL( 1, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakD, "tdf103975_notPageBreakD.docx")
+{
+ // The problem was that the column break was moving outside of the columns, making a page break.
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+ CPPUNIT_ASSERT_EQUAL( 1, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakE, "tdf103975_notPageBreakE.docx")
+{
+ // The problem was that the column break was getting lost.
+ CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf112352_nextPageColumns, "tdf112352_nextPageColumns.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection");
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf109310_endnoteStyleForMSO)
+{
+ loadAndSave("tdf109310_endnoteStyleForMSO.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/endnotes.xml");
+ // Check w:rStyle element has w:val attribute - note that w: is not specified for attribute
+ assertXPath(pXmlDoc, "/w:endnotes/w:endnote[@w:id='2']/w:p/w:r[1]/w:rPr/w:rStyle"_ostr, "val"_ostr,
+ "EndnoteCharacters");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf103389)
+{
+ loadAndSave("tdf103389.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // No geometry was exported for the second canvas
+ // Check both canvases' geometry
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp/wps:spPr/a:prstGeom"_ostr, "prst"_ostr, "rect");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp/wps:spPr/a:prstGeom"_ostr, "prst"_ostr, "rect");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf84678, "tdf84678.docx")
+{
+ // This was 0, left margin inside a shape+text wasn't imported from DOCX.
+ // 360000 EMU, but layout uses twips.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(567), parseDump("/root/page/body/txt/anchored/fly/infos/prtBounds"_ostr, "left"_ostr).toInt32());
+
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103544, "tdf103544.docx")
+{
+ // We have two shapes: a frame and an image
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ // Image was lost because of the frame export
+ uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
+ auto xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
+ CPPUNIT_ASSERT(xGraphic.is());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103573, "tdf103573.docx")
+{
+ // Relative positions to the left or right margin (MS Word naming) was not handled.
+ uno::Reference<beans::XPropertySet> xShapeProperties( getShape(1), uno::UNO_QUERY );
+ sal_Int16 nValue;
+ xShapeProperties->getPropertyValue("HoriOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Not centered horizontally", text::HoriOrientation::CENTER, nValue);
+ xShapeProperties->getPropertyValue("HoriOrientRelation") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Not centered horizontally relatively to left page border", text::RelOrientation::PAGE_LEFT, nValue);
+
+ xShapeProperties.set( getShape(2), uno::UNO_QUERY );
+ xShapeProperties->getPropertyValue("HoriOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Not centered horizontally", text::HoriOrientation::CENTER, nValue);
+ xShapeProperties->getPropertyValue("HoriOrientRelation") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Not centered horizontally relatively to right page border", text::RelOrientation::PAGE_RIGHT, nValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106132, "tdf106132.docx")
+{
+ uno::Reference<beans::XPropertySet> xShape(getShapeByName(u"Frame1"), uno::UNO_QUERY);
+ // This was 250, <wps:bodyPr ... rIns="0" ...> was ignored for an outer shape.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xShape, "TextRightDistance"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf79329)
+{
+ auto verify = [this]() {
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ // This was 1: only the inner, not the outer table was created.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xTables->getCount());
+ };
+ createSwDoc("tdf79329.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf103982)
+{
+ loadAndReload("tdf103982.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ sal_Int32 nDistB = getXPath(pXmlDoc, "//wp:anchor"_ostr, "distB"_ostr).toInt32();
+ // This was -260350, which is not a valid value for an unsigned type.
+ CPPUNIT_ASSERT(nDistB >= 0);
+
+ // tdf#115670 the shadow should not be enabled (no on="t")
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(!getProperty<bool>(xPropertySet, "Shadow"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf104115)
+{
+ loadAndSave("tdf104115.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This found 0 nodes: the custom geometry was not written for the Bezier
+ // curve -> Word refused to open the document.
+ assertXPath(pXmlDoc, "//a:custGeom"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103651, "tdf103651.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 1), "TextField");
+ OUString sContent;
+ xTextField->getPropertyValue("Content") >>= sContent;
+ // Comment in the first paragraph should not have smiley ( 0xf04a ).
+ CPPUNIT_ASSERT_EQUAL( sal_Int32( -1 ) , sContent.indexOf( u'\xf04a' ));
+
+ // this document has a w:kern setting in the DocDefault character properties. Ensure it applies.
+ CPPUNIT_ASSERT(getProperty<bool>(getRun(getParagraph(1), 1), "CharAutoKerning"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf99227)
+{
+ loadAndSave("tdf99227.docx");
+ // A drawing anchored as character to a footnote caused write past end of document.xml at export to docx.
+ // After that, importing after export failed with
+ // SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word / document.xml',
+ // and before commit ebf767eeb2a169ba533e1b2ffccf16f41d95df35, the drawing was silently lost.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/footnotes.xml");
+
+ assertXPath(pXmlDoc, "//w:footnote/w:p/w:r/w:drawing"_ostr, 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGH, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::BOTTOM, getProperty<sal_Int16>(xTable->getCellByName("A1"), "VertOrient"));
+
+ //For MSO compatibility, the textbox should be at the top of the cell, not at the bottom - despite VertOrientation::BOTTOM
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nFlyTop = getXPath(pXmlDoc, "/root/page/body/tab/row/cell[1]/txt/anchored/fly/infos/bounds"_ostr, "top"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE("FlyTop should be 2865, not 5649", nFlyTop < sal_Int32(3000));
+ sal_Int32 nTextTop = getXPath(pXmlDoc, "/root/page/body/tab/row/cell[2]/txt[1]/infos/bounds"_ostr, "top"_ostr).toInt32();
+ CPPUNIT_ASSERT_MESSAGE("TextTop should be 3856", nTextTop > 3000);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf112446_frameStyle, "tdf112446_frameStyle.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::NONE, getProperty<sal_Int16>(getShape(1), "HoriOrient"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf82173_footnoteStyle, "tdf82173_footnoteStyle.docx")
+{
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+
+ uno::Reference<text::XText> xFootnoteText;
+ xFootnotes->getByIndex(0) >>= xFootnoteText;
+ // This was footnote text, which didn't match with newly created footnotes
+ CPPUNIT_ASSERT_EQUAL(OUString("Footnote"), getProperty<OUString>(getParagraphOfText(1, xFootnoteText), "ParaStyleName"));
+
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("CharacterStyles")->getByName("Footnote Characters"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(58), getProperty< sal_Int32 >(xPageStyle, "CharEscapementHeight") );
+ CPPUNIT_ASSERT_EQUAL( Color(0x00FF00), getProperty<Color>(xPageStyle, "CharColor"));
+
+ xPageStyle.set(getStyles("CharacterStyles")->getByName("Footnote anchor"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(58), getProperty< sal_Int32 >(xPageStyle, "CharEscapementHeight") );
+ CPPUNIT_ASSERT_EQUAL( Color(0x00FF00), getProperty<Color>(xPageStyle, "CharColor"));
+
+ //tdf#118361 - in RTL locales, the footnote separator should still be left aligned.
+ uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footnote separator LTR", sal_Int16(0), getProperty<sal_Int16>(aPageStyle, "FootnoteLineAdjust"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf82173_endnoteStyle, "tdf82173_endnoteStyle.docx")
+{
+ uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEndnotes = xEndnotesSupplier->getEndnotes();
+ uno::Reference<text::XFootnote> xEndnote;
+ xEndnotes->getByIndex(0) >>= xEndnote;
+ // character properties were previously not assigned to the footnote/endnote in-text anchor.
+ CPPUNIT_ASSERT_EQUAL( 24.0f, getProperty< float >(xEndnote->getAnchor(), "CharHeight") );
+ CPPUNIT_ASSERT_EQUAL( Color(0xFF0000), getProperty<Color>(xEndnote->getAnchor(), "CharColor"));
+
+ uno::Reference<text::XText> xEndnoteText;
+ xEndnotes->getByIndex(0) >>= xEndnoteText;
+ // This was Endnote Symbol
+ CPPUNIT_ASSERT_EQUAL(OUString("Endnote"), getProperty<OUString>(getParagraphOfText(1, xEndnoteText), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(Color(0x993300), getProperty<Color>(getParagraphOfText(1, xEndnoteText), "CharColor"));
+
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("CharacterStyles")->getByName("Endnote Characters"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(58), getProperty< sal_Int32 >(xPageStyle, "CharEscapementHeight") );
+ CPPUNIT_ASSERT_EQUAL( Color(0xFF00FF), getProperty<Color>(xPageStyle, "CharColor"));
+
+ xPageStyle.set(getStyles("CharacterStyles")->getByName("Endnote anchor"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(58), getProperty< sal_Int32 >(xPageStyle, "CharEscapementHeight") );
+ CPPUNIT_ASSERT_EQUAL( Color(0xFF00FF), getProperty<Color>(xPageStyle, "CharColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf55427_footnote2endnote)
+{
+ loadAndReload("tdf55427_footnote2endnote.odt");
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("ParagraphStyles")->getByName("Footnote"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote style is rose color", Color(0xFF007F), getProperty<Color>(xPageStyle, "CharColor"));
+ xPageStyle.set(getStyles("ParagraphStyles")->getByName("Endnote"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Endnote style is cyan3 color", Color(0x2BD0D2), getProperty<Color>(xPageStyle, "CharColor"));
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ // The footnote numbering type of ARABIC will not transfer over when those footnotes are converted to endnotes.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote numbering type", SVX_NUM_ARABIC, pDoc->GetFootnoteInfo().m_aFormat.GetNumberingType() );
+ // The original document has a real endnote using ROMAN_LOWER numbering, so that setting MUST remain unchanged.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Endnote numbering type", SVX_NUM_ROMAN_LOWER, pDoc->GetEndNoteInfo().m_aFormat.GetNumberingType() );
+
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+
+ uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEndnotes = xEndnotesSupplier->getEndnotes();
+ uno::Reference<text::XFootnote> xEndnote;
+ xEndnotes->getByIndex(0) >>= xEndnote;
+ uno::Reference<text::XText> xEndnoteText;
+ xEndnotes->getByIndex(0) >>= xEndnoteText;
+
+ // ODT footnote-at-document-end's closest DOCX match is an endnote, so the two imports will not exactly match by design.
+ if (!isExported())
+ {
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original footnote count", sal_Int32(5), xFootnotes->getCount() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original endnote count", sal_Int32(1), xEndnotes->getCount() );
+
+ uno::Reference<text::XFootnote> xFootnote;
+ xFootnotes->getByIndex(0) >>= xFootnote;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original footnote's number", OUString("1"), xFootnote->getAnchor()->getString() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original endnote's number", OUString("i"), xEndnote->getAnchor()->getString() );
+
+ uno::Reference<text::XText> xFootnoteText;
+ xFootnotes->getByIndex(0) >>= xFootnoteText;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original footnote style", OUString("Footnote"), getProperty<OUString>(getParagraphOfText(1, xFootnoteText), "ParaStyleName") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original endnote style", OUString("Endnote"), getProperty<OUString>(getParagraphOfText(1, xEndnoteText), "ParaStyleName") );
+ }
+ else
+ {
+ // These asserted items are major differences in the conversion from footnote to endnote, NOT necessary conditions for a proper functioning document.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "At-Document-End footnotes were converted into endnotes", sal_Int32(0), xFootnotes->getCount() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "At-Document-End footnotes became endnotes", sal_Int32(6), xEndnotes->getCount() );
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "converted footnote's number", OUString("i"), xEndnote->getAnchor()->getString() );
+ xEndnotes->getByIndex(4) >>= xEndnote;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original endnote's new number", OUString("v"), xEndnote->getAnchor()->getString() );
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "retained footnote style", OUString("Footnote"), getProperty<OUString>(getParagraphOfText(1, xEndnoteText), "ParaStyleName") );
+ xEndnotes->getByIndex(4) >>= xEndnoteText;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "original endnote style", OUString("Endnote"), getProperty<OUString>(getParagraphOfText(1, xEndnoteText), "ParaStyleName") );
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104162, "tdf104162.docx")
+{
+ // This crashed: the comment field contained a table with a <w:hideMark/>.
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XElementAccess> xTextFields(xTextFieldsSupplier->getTextFields());
+ CPPUNIT_ASSERT(xTextFields->hasElements());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104150, "tdf104150.docx")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ // This was 0xff0000, i.e. red: background shape wasn't ignored.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), getProperty<sal_Int32>(xPageStyle, "BackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf103976, "tdf103976.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // This was 0, table style inheritance went wrong and w:afterLines had priority over w:after.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(convertTwipToMm100(60)), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+
+ // tdf#116549: heading 2 style should not have a bottom border.
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Heading 2"), uno::UNO_QUERY);
+ table::BorderLine2 aBottomBorder = getProperty<table::BorderLine2>(xStyle, "BottomBorder");
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), aBottomBorder.LineWidth);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf106001, "tdf106001.docx")
+{
+ // This was 0 (1 on UI), while Word treats outliers as 100 (outlier = not in [1..600])
+ CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int16>( 100 ), getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharScaleWidth" ));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf106001_2)
+{
+ loadAndSave("tdf106001-2.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // In test ODT CharScaleWidth = 900, this was not changed upon OOXML export to stay in [1..600], now it's clamped to 600
+ // Note: we disregard what's set in pPr / rPr and only care about r / rPr
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:w"_ostr,"val"_ostr,"600");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf99074, "tdf99074.docx")
+{
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XViewSettingsSupplier> const xController(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> const xViewSettings(
+ xController->getViewSettings());
+
+ // The behavior changed - Word 2013 and 2016 ignore this setting on
+ // import, and instead honor the user's setting.
+ // Let's ignore the <w:view w:val="web"/> too.
+ CPPUNIT_ASSERT(!getProperty<bool>(xViewSettings, "ShowOnlineLayout"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testDefaultSectBreakCols, "default-sect-break-cols.docx")
+{
+ // First problem: the first two paragraphs did not have their own text section, so the whole document had two columns.
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1, "First."), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ // Second problem: the page style had two columns, while it shouldn't have any.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xPageStyle, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
+ // Check for the Column Separator value.It should be FALSE as the document does not contain separator line.
+ bool bValue = getProperty< bool >(xTextColumns, "SeparatorLineIsOn");
+ CPPUNIT_ASSERT(!bValue) ;
+}
+
+DECLARE_OOXMLEXPORT_TEST(testMultiColumnSeparator, "multi-column-separator-with-line.docx")
+{
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1, "First data."), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+ // Check for the Column Separator value.It should be TRUE as the document contains separator line.
+ bool bValue = getProperty< bool >(xTextColumns, "SeparatorLineIsOn");
+ CPPUNIT_ASSERT(bValue);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testUnbalancedColumns, "unbalanced-columns.docx")
+{
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ // This was false, last section was balanced, but it's unbalanced in Word.
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextSections->getByIndex(2), "DontBalanceTextColumns"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf121670_columnsInSectionsOnly, "tdf121670_columnsInSectionsOnly.docx")
+{
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("DontBalanceTextColumns?", true, getProperty<bool>(xTextSections->getByIndex(0), "DontBalanceTextColumns"));
+
+ uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
+ CPPUNIT_ASSERT(xTextSection.is());
+ uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("# of columns", sal_Int16(3), xTextColumns->getColumnCount());
+
+ xTextSection.set( getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection") );
+ CPPUNIT_ASSERT(xTextSection.is());
+ xTextColumns.set( getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("# of columns", sal_Int16(0), xTextColumns->getColumnCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf106492)
+{
+ loadAndSave("tdf106492.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 4: an additional sectPr was added to the document.
+ assertXPath(pXmlDoc, "//w:sectPr"_ostr, 3);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf107104, "tdf107104.docx")
+{
+ CPPUNIT_ASSERT(getShape(1)->getSize().Width > 0);
+ // This failed: the second arrow was invisible because it had zero width.
+ CPPUNIT_ASSERT(getShape(2)->getSize().Width > 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf107033, "tdf107033.docx")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ // This was 0: footnote separator was disabled even in case the document
+ // had no footnotes.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
+}
+
+#if HAVE_MORE_FONTS
+CPPUNIT_TEST_FIXTURE(Test, testTdf107889)
+{
+ auto verify = [this]() {
+ // This was 1, multi-page table was imported as a non-split fly.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//tab"_ostr, 2);
+ };
+ createSwDoc("tdf107889.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107837)
+{
+ loadAndReload("tdf107837.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ // This was true, a balanced section from ODF turned into a non-balanced one after OOXML roundtrip.
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTextSections->getByIndex(0), "DontBalanceTextColumns"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107684)
+{
+ loadAndReload("tdf107684.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+ // This was 1, <w:outlineLvl> was duplicated for Heading1.
+ assertXPath(pXmlDoc, "//w:style[@w:styleId='Heading1']/w:pPr/w:outlineLvl"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107618)
+{
+ loadAndReload("tdf107618.doc");
+ // This was false, header was lost on export.
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf108682, "tdf108682.docx")
+{
+ auto aLineSpacing = getProperty<style::LineSpacing>(getParagraph(1), "ParaLineSpacing");
+ // This was style::LineSpacingMode::PROP.
+ CPPUNIT_ASSERT_EQUAL(style::LineSpacingMode::FIX, aLineSpacing.Mode);
+ // 260 twips in mm100, this was a negative value.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(459), aLineSpacing.Height);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf100075, "tdf100075.docx")
+{
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+
+ // There are two frames in document
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xIndexAccess->getCount());
+
+ uno::Reference<beans::XPropertySet> xFrame1(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame2(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
+
+ // Ensure that frame#1 height is more that frame#2: if no hRul attribute
+ // defined, MS Word will use hRul=auto if height is not defined,
+ // and hRul=atLeast if height is provided. So frame#1 should be higher
+ CPPUNIT_ASSERT(getProperty<sal_Int32>(xFrame1, "Height") > getProperty<sal_Int32>(xFrame2, "Height"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf105095, "tdf105095.docx")
+{
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ // This failed, tab between the footnote number and the footnote content
+ // was lost on import.
+ CPPUNIT_ASSERT_EQUAL( OUString("\tfootnote"), xTextRange->getString() );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf106062_nonHangingFootnote)
+{
+ loadAndReload("tdf106062_nonHangingFootnote.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+ uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ // This failed, tab between the footnote number and the footnote content was lost on import.
+ CPPUNIT_ASSERT_MESSAGE( "Footnote starts with a tab", xTextRange->getString().startsWith("\t") );
+}
+
+DECLARE_OOXMLEXPORT_TEST( testActiveXTextfield, "activex_textbox.docx" )
+{
+ uno::Reference<drawing::XControlShape> xControlShape( getShape(1), uno::UNO_QUERY );
+ CPPUNIT_ASSERT( xControlShape.is() );
+
+ // Check control type
+ uno::Reference<beans::XPropertySet> xPropertySet( xControlShape->getControl(), uno::UNO_QUERY );
+ uno::Reference<lang::XServiceInfo> xServiceInfo( xPropertySet, uno::UNO_QUERY );
+ CPPUNIT_ASSERT_EQUAL( true, bool( xServiceInfo->supportsService ( "com.sun.star.form.component.TextField" ) ) );
+
+ // Check textfield is multi-line
+ CPPUNIT_ASSERT_EQUAL( true, getProperty<bool>(xPropertySet, "MultiLine") );
+
+ uno::Reference<drawing::XControlShape> xControlShape2( getShape(2), uno::UNO_QUERY );
+ CPPUNIT_ASSERT( xControlShape2.is() );
+
+ // Check control type
+ uno::Reference<beans::XPropertySet> xPropertySet2( xControlShape2->getControl(), uno::UNO_QUERY );
+ uno::Reference<lang::XServiceInfo> xServiceInfo2( xPropertySet2, uno::UNO_QUERY );
+ CPPUNIT_ASSERT_EQUAL( true, bool( xServiceInfo2->supportsService ( "com.sun.star.form.component.TextField" ) ) );
+
+ // Check textfield is single-line
+ CPPUNIT_ASSERT_EQUAL( false, getProperty<bool>(xPropertySet2, "MultiLine") );
+
+ // Don't open in design mode when form controls exist
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XFormLayerAccess> xFormLayerAccess(xModel->getCurrentController(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT( !xFormLayerAccess->isFormDesignMode() );
+}
+
+DECLARE_OOXMLEXPORT_TEST( testActiveXCheckbox, "activex_checkbox.docx" )
+{
+ uno::Reference<drawing::XControlShape> xControlShape( getShape(1), uno::UNO_QUERY );
+ CPPUNIT_ASSERT( xControlShape.is() );
+
+ // Check control type
+ uno::Reference<beans::XPropertySet> xPropertySet( xControlShape->getControl(), uno::UNO_QUERY );
+ uno::Reference<lang::XServiceInfo> xServiceInfo( xPropertySet, uno::UNO_QUERY );
+ CPPUNIT_ASSERT_EQUAL( true, bool( xServiceInfo->supportsService( "com.sun.star.form.component.CheckBox" ) ) );
+
+ // Check custom label
+ CPPUNIT_ASSERT_EQUAL( OUString( "Custom Caption" ), getProperty<OUString>(xPropertySet, "Label") );
+
+ // Check background color (highlight system color)
+ CPPUNIT_ASSERT_EQUAL( Color( 0x316AC5 ), getProperty<Color>(xPropertySet, "BackgroundColor") );
+
+ // Check Text color (active border system color)
+ CPPUNIT_ASSERT_EQUAL(Color(0xD4D0C8), getProperty<Color>(xPropertySet, "TextColor"));
+
+ // Check state of the checkbox
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(xPropertySet, "State"));
+
+ // Check anchor type
+ uno::Reference<beans::XPropertySet> xPropertySet2(xControlShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testActiveXControlAlign)
+{
+ loadAndReload("activex_control_align.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // First check box aligned as a floating object
+ uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xControlShape.is());
+
+ // Check whether we have the right control
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService( "com.sun.star.form.component.CheckBox")));
+ CPPUNIT_ASSERT_EQUAL(OUString("Floating Check Box"), getProperty<OUString>(xPropertySet, "Label"));
+
+ // Check anchor type
+ uno::Reference<beans::XPropertySet> xPropertySet2(xControlShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
+
+ // Also check position and size
+ uno::Reference<drawing::XShape> xShape(xControlShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShape.is());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4470), xShape->getSize().Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1427), xShape->getSize().Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5126), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2341), xShape->getPosition().Y);
+
+ // Second check box aligned inline / as character
+ xControlShape.set(getShape(2), uno::UNO_QUERY);
+
+ // Check whether we have the right control
+ xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY);
+ xServiceInfo.set(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.CheckBox")));
+ CPPUNIT_ASSERT_EQUAL(OUString("Inline Check Box"), getProperty<OUString>(xPropertySet, "Label"));
+
+ // Check anchor type
+ xPropertySet2.set(xControlShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(text::VertOrientation::TOP),getProperty<sal_Int32>(xPropertySet2,"VertOrient"));
+
+ // Also check position and size
+ xShape.set(xControlShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShape.is());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4410), xShape->getSize().Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1083), xShape->getSize().Height);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1085), xShape->getPosition().Y);
+
+ // Also check the specific OOXML elements
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // For inline controls use w:object as parent element and pictureFrame shapetype
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:object"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:object/v:shapetype"_ostr, "spt"_ostr, "75");
+ // For floating controls use w:pict as parent element and hostControl shapetype
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:pict"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:pict/v:shapetype"_ostr, "spt"_ostr, "201");
+
+ // Have different shape ids
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:object/v:shape"_ostr, "id"_ostr) !=
+ getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:pict/v:shape"_ostr, "id"_ostr));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf109184, "tdf109184.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ // Before table background color was white, should be transparent (auto).
+ uno::Reference<text::XTextRange> xCell1(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), getProperty<sal_Int32>(xCell1, "BackColor"));
+
+ // Cell with auto color but with 15% fill, shouldn't be transparent.
+ uno::Reference<text::XTextRange> xCell2(xTable->getCellByName("B1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xd8d8d8), getProperty<sal_Int32>(xCell2, "BackColor"));
+
+ // Cell with color defined (red).
+ uno::Reference<text::XTextRange> xCell3(xTable->getCellByName("A2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xff0000), getProperty<sal_Int32>(xCell3, "BackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf111964)
+{
+ loadAndSave("tdf111964.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Unicode spaces that are not XML whitespace must not be trimmed
+ static constexpr OUStringLiteral sWSReference = u"\u2002\u2002\u2002\u2002\u2002";
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:t"_ostr, sWSReference);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark-shapetype.docx")
+{
+ uno::Reference<drawing::XShape> xShape1(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShape1.is());
+ uno::Reference<beans::XPropertySet> xPropertySet1(xShape1, uno::UNO_QUERY);
+
+ uno::Reference<drawing::XShape> xShape2(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShape2.is());
+ uno::Reference<beans::XPropertySet> xPropertySet2(xShape2, uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(xPropertySet1->getPropertyValue("TextAutoGrowHeight"), xPropertySet2->getPropertyValue("TextAutoGrowHeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testActiveXControlAtRunEnd)
+{
+ loadAndReload("activex_control_at_run_end.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Two issues were here:
+ // 1) second shape was not export (it is anchored to the end of the run)
+ // 2) inline property was inherited to the second shape by mistake
+
+ // First checkbox is the inlined one
+ uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xControlShape.is());
+
+ // Check whether we have the right control
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService( "com.sun.star.form.component.CheckBox")));
+ CPPUNIT_ASSERT_EQUAL(OUString("Inline Checkbox"), getProperty<OUString>(xPropertySet, "Label"));
+
+ // Check anchor type
+ uno::Reference<beans::XPropertySet> xPropertySet2(xControlShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
+
+ // Second check box anchored to character
+ xControlShape.set(getShape(2), uno::UNO_QUERY);
+
+ // Check whether we have the right control
+ xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY);
+ xServiceInfo.set(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.CheckBox")));
+ CPPUNIT_ASSERT_EQUAL(OUString("Floating Checkbox"), getProperty<OUString>(xPropertySet, "Label"));
+
+ // Check anchor type
+ xPropertySet2.set(xControlShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_group.docx")
+{
+ // Optionbutton groups were not handled
+ // The two optionbutton should have the same group name
+ constexpr OUString sGroupName = u"GroupX"_ustr;
+
+ uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xControlShape.is());
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty<OUString>(xPropertySet, "GroupName"));
+
+ xControlShape.set(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xControlShape.is());
+ xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty<OUString>(xPropertySet, "GroupName"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, tdf112169)
+{
+ loadAndSave("tdf112169.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+ // LO crashed while export because of character background color handling
+
+ //tdf76683 - Cannot be negative number - use firstLine instead of hanging
+ xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml");
+ assertXPathNoAttribute(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:pPr/w:ind"_ostr, "hanging"_ostr);
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:pPr/w:ind"_ostr, "firstLine"_ostr,"360");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf103090)
+{
+ loadAndSave("tdf103090.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Get bookmark name
+ OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:bookmarkStart"_ostr, "name"_ostr);
+
+ // Ensure that name has no spaces
+ CPPUNIT_ASSERT(bookmarkName.indexOf(" ") < 0);
+
+ // Get PAGEREF field
+ OUString fieldName = getXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText"_ostr);
+
+ // Ensure that PAGEREF field refers exactly our bookmark
+ OUString expectedFieldName = " PAGEREF " + bookmarkName + " \\h ";
+ CPPUNIT_ASSERT_EQUAL(expectedFieldName, fieldName);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf107111)
+{
+ loadAndSave("tdf107111.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Ensure that hyperlink and its properties are in place.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:hyperlink/w:r/w:rPr"_ostr, 1);
+
+ // Ensure that hyperlink properties do not contain <w:webHidden/>.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:hyperlink/w:r/w:rPr/w:webHidden"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90789, "tdf90789.docx")
+{
+ uno::Reference<text::XTextContent> xShape(getShape(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xShape->getAnchor() != nullptr);
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<view::XSelectionSupplier> xCtrl(xModel->getCurrentController(), uno::UNO_QUERY_THROW);
+ xCtrl->select(uno::Any(xShape->getAnchor()));
+
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xCtrl, uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextViewCursor> xTextCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_SET_THROW);
+ uno::Reference<text::XPageCursor> xPageCursor(xTextCursor, uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(1), xPageCursor->getPage());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf90789_2, "tdf90789-2.docx")
+{
+ // Section break before frame and shape was ignored
+ CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, "tdf104354-2.docx")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+
+ // top margin of the first paragraph and bottom margin of the last paragraph
+ // is zero, when auto spacing is used.
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), "ParaBottomMargin"));
+
+ // top margin is not auto spacing
+ uno::Reference<text::XTextRange> xCell2(xTable->getCellByName("A2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(847), getProperty<sal_Int32>(getParagraphOfText(1, xCell2->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell2->getText()), "ParaBottomMargin"));
+
+ // bottom margin is not auto spacing
+ uno::Reference<text::XTextRange> xCell3(xTable->getCellByName("A3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell3->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(847), getProperty<sal_Int32>(getParagraphOfText(1, xCell3->getText()), "ParaBottomMargin"));
+
+ // auto spacing, if the paragraph contains footnotes
+ uno::Reference<text::XTextRange> xCell4(xTable->getCellByName("A4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell4->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell4->getText()), "ParaBottomMargin"));
+
+ // auto spacing is explicitly disabled, and no margins are defined.
+ xCell.set(xTable->getCellByName("A5"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), "ParaBottomMargin"));
+
+ // auto spacing on a paragraph
+ uno::Reference<text::XTextTable> xTable2(xTables->getByIndex(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell5(xTable2->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell5->getText()), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell5->getText()), "ParaBottomMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf137593)
+{
+ loadAndSave("tdf137593.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // zero auto spacing, if the first paragraph contains text boxes
+ // This was 280.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:tc/w:p[1]/w:pPr/w:spacing"_ostr, "before"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf115557)
+{
+ loadAndSave("tdf115557.docx");
+ // A chart anchored to a footnote multiplied during import
+ xmlDocUniquePtr pXmlDoc = parseExport("word/footnotes.xml");
+
+ assertXPath(pXmlDoc, "//w:footnote/w:p/w:r/w:drawing"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAlignmentRelativeFromTopMarginDML)
+{
+ loadAndSave("tdf137641_RelativeFromTopMargin.docx");
+ // Import as DML.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV"_ostr,
+ "relativeFrom"_ostr, "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align"_ostr,
+ "top");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV"_ostr,
+ "relativeFrom"_ostr, "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align"_ostr,
+ "bottom");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV"_ostr,
+ "relativeFrom"_ostr, "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align"_ostr,
+ "center");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAlignmentRelativeFromTopMarginVML)
+{
+ loadAndSave("tdf137642_Vertical_Alignment_toppage.docx");
+ // Import as VML.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV"_ostr,
+ "relativeFrom"_ostr, "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align"_ostr,
+ "top");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV"_ostr,
+ "relativeFrom"_ostr, "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align"_ostr,
+ "bottom");
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV"_ostr,
+ "relativeFrom"_ostr, "topMargin");
+ assertXPathContent(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/"
+ "wp:anchor/wp:positionV/wp:align"_ostr,
+ "center");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVmlShapeWithTextbox)
+{
+ loadAndSave("tdf41466_testVmlShapeWithTextbox.docx");
+ // Import as VML.
+ // tdf#41466: check whether VML DOCX shape with text is imported as shape with a text frame
+ // (text box). These kind of shapes were imported only as text frames previously, losing the
+ // preset shape geometry, in this case "wedgeRectCallout".
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // the wrong value was "rect" instead of "wedgeRectCallout"
+ assertXPath(pXmlDoc,
+ "/w:document/w:body/w:p/w:r/"
+ "mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom"_ostr,
+ "prst"_ostr, "wedgeRectCallout");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testLayoutFlowAltAlone)
+{
+ loadAndSave("layout-flow-alt-alone.docx");
+ // moved from oox/qa/unit/vml.cxx
+ // FIXME: now the DML part is checked, but we should check VML part in Fallback (too)
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/"
+ "a:graphic/a:graphicData/wps:wsp/wps:bodyPr"_ostr, "vert"_ostr, "vert270");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport_template.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport_template.cxx
new file mode 100644
index 0000000000..c41b71a96f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport_template.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+#include <o3tl/string_view.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "MS Word 2007 XML Template")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testSaveAsDotX)
+{
+ loadAndReload("sample.dotx");
+ xmlDocUniquePtr pXmlDocCT = parseExport("[Content_Types].xml");
+
+ // Ensure that document has correct content type
+ assertXPath(pXmlDocCT,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/document.xml']"_ostr,
+ "ContentType"_ostr,
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
new file mode 100644
index 0000000000..a97d8e8b84
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -0,0 +1,972 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+#include <xmloff/odffields.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <IDocumentMarkAccess.hxx>
+#include <IMark.hxx>
+#include <docsh.hxx>
+#include <unotxdoc.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+DECLARE_OOXMLEXPORT_TEST(testFdo47669, "fdo47669.docx")
+{
+ /*
+ * Problem: we created imbalance </w:hyperlink> which shouldn't be there,
+ * resulting in loading error: missing last character of hyperlink text
+ * and content after it wasn't loaded.
+ */
+ getParagraph(1, "This is a hyperlink with anchor. Also, this sentence should be seen.");
+ getRun(getParagraph(1), 2, "hyperlink with anchor");
+ CPPUNIT_ASSERT_EQUAL(OUString("http://www.google.com/#a"), getProperty<OUString>(getRun(getParagraph(1), 2), "HyperLinkURL"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testN789482, "n789482.docx")
+{
+ // The problem was that w:del was exported before w:hyperlink, resulting in an invalid XML.
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ getRun(xParagraph, 1, "Before. ");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"), getProperty<OUString>(getRun(xParagraph, 2), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getRun(xParagraph, 2), "IsStart"));
+
+ getRun(xParagraph, 3, "www.test.com");
+ CPPUNIT_ASSERT_EQUAL(OUString("http://www.test.com/"), getProperty<OUString>(getRun(xParagraph, 3), "HyperLinkURL"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"), getProperty<OUString>(getRun(xParagraph, 4), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getRun(xParagraph, 4), "IsStart"));
+
+ getRun(xParagraph, 5, " After.");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBnc834035)
+{
+ loadAndReload("bnc834035.odt");
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+ // Illustration index had wrong hyperlinks: anchor was using Writer's
+ // <seqname>!<index>|sequence syntax, not a bookmark name.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was Figure!1|sequence.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:hyperlink"_ostr, "anchor"_ostr, "_Toc363553908");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCp1000015)
+{
+ loadAndReload("cp1000015.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // Redline and hyperlink end got exported in an incorrect order.
+ getParagraph(1, "Hello.");
+ getParagraph(2, "http://www.google.com/");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testHyperlineIsEnd)
+{
+ loadAndReload("hyperlink.docx");
+ // Check that the document.xml contents all the tag properly closed.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // If document.xml miss any ending tag then parseExport() returns NULL which fail the test case.
+ CPPUNIT_ASSERT(pXmlDoc) ;
+ // Check hyperlink is properly open.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:hyperlink"_ostr,1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo69649)
+{
+ loadAndReload("fdo69649.docx");
+ // The DOCX containing the Table of Contents was not exported with correct page nos
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[21]/w:hyperlink/w:r[5]/w:t"_ostr, "15");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFieldFlagO)
+{
+ loadAndReload("TOC_field_f.docx");
+ // This test case is to verify \o flag should come once.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
+ // not to insert an empty paragraph before TOC.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText"_ostr, " TOC \\z \\f \\o \"1-3\" \\u \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTOCFlag_f)
+{
+ loadAndReload("toc_doc.docx");
+ // Export logic for all TOC field flags was enclosed inside
+ // if( SwTOXElement::Mark & pTOX->GetCreateType() ) in ww8atr.cxx which gets true for \f,
+ // this was the reason if there is \f flag present in original doc then only other flags like
+ // \o \h \n used to come after RoundTrip.
+ // This test case is to verify even if there is no \f flag in original doc, \h flag is getting
+ // preserved after RT.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
+ // not to insert an empty paragraph before TOC.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText"_ostr, " TOC \\z \\o \"1-3\" \\u \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPreserveZfield)
+{
+ loadAndReload("preserve_Z_field_TOC.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText"_ostr, " TOC \\z \\f \\o \"1-3\" \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPreserveWfieldTOC)
+{
+ loadAndReload("PreserveWfieldTOC.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText"_ostr, " TOC \\z \\w \\f \\o \"1-3\" \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFieldFlagB)
+{
+ loadAndReload("TOC_field_b.docx");
+ // This test case is to verify \b flag.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
+ // not to insert an empty paragraph before TOC.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText"_ostr, " TOC \\b \"bookmark111\" \\o \"1-9\" \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPreserveXfieldTOC)
+{
+ loadAndReload("PreserveXfieldTOC.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText"_ostr, " TOC \\x \\f \\o \"1-3\" \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO77715)
+{
+ loadAndReload("FDO77715.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // tdf#153090 check that para style is preserved
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:instrText[1]"_ostr, " TOC \\c \\h \\t \"Block Header\" ");
+
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+ uno::Reference<text::XDocumentIndex> xTOC(xIndexes->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Block Header"), getProperty<OUString>(xTOC, "CreateFromParagraphStyle"));
+ // tdf#153090 check that update uses the style
+ xTOC->update();
+ OUString const tocContent(xTOC->getAnchor()->getString());
+ CPPUNIT_ASSERT(tocContent.startsWith("National Infrastructure Bank Aff/Neg Index"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTOCFlag_u)
+{
+ loadAndReload("testTOCFlag_u.docx");
+ // DOCX containing TOC should preserve code field '\u'.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
+ // not to insert an empty paragraph before TOC.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText"_ostr, " TOC \\z \\o \"1-9\" \\u \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo73596_RunInStyle)
+{
+ loadAndReload("fdo73596_RunInStyle.docx");
+ // INDEX should be preserved.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText[1]"_ostr, " INDEX \\e \"");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo73596_AlphaSeparator)
+{
+ loadAndReload("fdo73596_AlphaSeparator.docx");
+ // INDEX flag \h "A" should be preserved.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText[1]"_ostr, " INDEX \\h \"A\" \\e \"");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCaption1)
+{
+ loadAndReload("EquationAsScientificNumbering.docx");
+ // fdo#74431 : This test case is to verify the Captions are coming properly
+ // earlier it was coming as "SEQ "scientific"\*ROMAN now it is SEQ scientific\* ROMAN"
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:instrText"_ostr, " SEQ scientific \\* ROMAN ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCaption2)
+{
+ loadAndReload("EquationWithAboveAndBelowCaption.docx");
+ // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
+ // This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[5]/w:r[3]/w:instrText"_ostr, " SEQ Equation \\* ARABIC ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCaption3)
+{
+ loadAndReload("FigureAsLabelPicture.docx");
+ // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
+ // This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:instrText"_ostr, " SEQ picture \\* ARABIC ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCaption4)
+{
+ loadAndReload("TableWithAboveCaptions.docx");
+ // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
+ // This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:instrText"_ostr, " SEQ Table \\* ARABIC ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFooterContainHyperlink)
+{
+ loadAndReload("footer-contain-hyperlink.docx");
+ // Problem is that footer1.xml.rels contains the empty
+ // Target due to which the file get corrupted
+ // in MS Office 2007.
+ // Check for footer1.xml.rels file.
+ xmlDocUniquePtr pXmlRels = parseExport("word/_rels/footer2.xml.rels");
+ // Check the value of Target which is http://www.google.com/.
+ assertXPath(pXmlRels,"/rels:Relationships/rels:Relationship"_ostr,"Target"_ostr,"http://www.google.com/");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAlphabeticalIndex_MultipleColumns)
+{
+ loadAndReload("alphabeticalIndex_MultipleColumns.docx");
+ // Bug :: fdo#73596
+ /*
+ * Index with multiple columns was not imported correctly and
+ * hence not exported correctly...
+ * The column count is given by the \c switch.
+ * If the column count is explicitly specified,
+ * MS Office adds section breaks before and after the Index.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:instrText"_ostr, " INDEX \\c \"4\"\\e \"");
+
+ // check for section breaks after and before the Index Section
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type"_ostr,"val"_ostr,"continuous");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:type"_ostr,"val"_ostr,"continuous");
+ // check for "w:space" attribute for the columns in Section Properties
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:cols"_ostr,"space"_ostr,"720");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageref)
+{
+ loadAndReload("testPageref.docx");
+ // fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
+ // This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:hyperlink/w:r[3]/w:instrText"_ostr, "PAGEREF _Toc355095261 \\h");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAlphabeticalIndex_AutoColumn)
+{
+ loadAndReload("alphabeticalIndex_AutoColumn.docx");
+ // Bug :: fdo#73596
+ /*
+ * When the columns in Index are 0; i.e not specified by the
+ * "\c" switch, don't write back '\c "0"' or the section breaks
+ * before and after the Index Context
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText"_ostr, " INDEX \\e \"");
+
+ // check for section break doesn't appear for any paragraph
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:sectPr"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testIndexFieldFlagF)
+{
+ loadAndReload("IndexFieldFlagF.docx");
+ // This test case is to verify the Index field flag '\f' with some
+ // Specific Entry Type (ex. "Syn" in our case).
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // We check the Index field flag '\f'.
+ // Note: no syntax error any more (extra quotation mark between "Syn" and \e)
+ assertXPathContent(pXmlDoc, "/w:document[1]/w:body[1]/w:p[4]/w:r[2]/w:instrText[1]"_ostr, " INDEX \\c \"2\"\\f \"Syn\"\\e \"");
+ // XE entries lost their \f "Syn" before
+ assertXPathContent(pXmlDoc, "/w:document[1]/w:body[1]/w:p[17]/w:r[21]/w:instrText[1]"_ostr, " XE \"formatting\" \\f \"Syn\" ");
+ assertXPathContent(pXmlDoc, "/w:document[1]/w:body[1]/w:p[17]/w:r[29]/w:instrText[1]"_ostr, " XE \"choosing:aaaa\" \\f \"Syn\" ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBibliography)
+{
+ loadAndReload("FDO75133.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText"_ostr, " BIBLIOGRAPHY ");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartGallery"_ostr, "val"_ostr, "Bibliographies");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartUnique"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testGenericTextField)
+{
+ loadAndReload("Unsupportedtextfields.docx");
+ // fdo#75158 : This test case is to verify the unsupported textfields are exported properly.
+
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc,"/w:document/w:body/w:p[2]/w:r[2]/w:instrText"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
+ OUString contents = OUString::createFromAscii(reinterpret_cast<char*>((pXmlNode->children[0]).content));
+ CPPUNIT_ASSERT(contents.match(" PRINTDATE "));
+ xmlXPathFreeObject(pXmlObj);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test_FieldType)
+{
+ loadAndReload("99_Fields.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Checking for three field types (BIBLIOGRAPHY, BIDIOUTLINE, CITATION) in sequence
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:instrText"_ostr);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:sdt/w:sdtContent/w:r[2]/w:instrText"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCitation)
+{
+ loadAndReload("FDO74775.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtContent/w:r[2]/w:instrText"_ostr, " CITATION Kra06 \\l 1033 ");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtContent/w:r[4]/w:t"_ostr, "(Kramer & Chen, 2006)");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testHyperLinkTagEnded)
+{
+ loadAndReload("fdo76316.docx");
+ /* XML tag <w:hyperlink> was not getting closed when its inside another
+ * <w:hyperlink> tag.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[2]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[7]/w:tc[1]/w:tbl[1]/w:tr[2]/w:tc[6]/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:hyperlink[1]"_ostr,1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO76163 )
+{
+ loadAndReload("fdo76163.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ //docx file after RT is getting corrupted.
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink/w:r[10]/w:fldChar"_ostr, "fldCharType"_ostr, "end" );
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO78659)
+{
+ loadAndReload("fdo78659.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[3]/w:fldChar[1]"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFDO78654 )
+{
+ loadAndReload("fdo78654.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // In case of two "Hyperlink" tags in one paragraph and one of them
+ // contains "PAGEREF" field then field end tag was missing from hyperlink.
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:hyperlink[3]/w:r[5]/w:fldChar"_ostr, "fldCharType"_ostr, "end" );
+}
+
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78599)
+{
+ loadAndReload("fdo78599.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ //docx file after RT is getting corrupted.
+ assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink/w:r[6]/w:fldChar"_ostr, "fldCharType"_ostr, "end" );
+
+ // Check for automatic hyphenation
+ xmlDocUniquePtr pSettingsXml = parseExport("word/settings.xml");
+ // This failed as w:settings had no w:autoHyphenation child.
+ assertXPath(pSettingsXml, "/w:settings/w:autoHyphenation"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo78886)
+{
+ loadAndReload("fdo78886.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[2]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[2]/w:fldChar[1]"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo78910)
+{
+ loadAndReload("fdo78910.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // This is to ensure that the fld starts and ends inside a hyperlink...
+ assertXPath ( pXmlDoc, "//w:hyperlink[2]/w:r[1]/w:fldChar"_ostr, "fldCharType"_ostr, "begin" );
+ assertXPath ( pXmlDoc, "//w:hyperlink[2]/w:r[5]/w:fldChar"_ostr, "fldCharType"_ostr, "end" );
+}
+
+// FIXME: During this test a pure VML shape get converted to DML and crash at verifying.
+// CPPUNIT_TEST_FIXTURE(Test, testFDO78590)
+// {
+// loadAndReload("FDO78590.docx");
+// xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+//
+// // This is to ensure that the fld starts and ends inside a hyperlink...
+// assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:framePr", "w", "9851" );
+// assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:framePr", "h", "1669" );
+// }
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtCitationRun)
+{
+ loadAndReload("sdt-citation-run.docx");
+ // The problem was that the SDT was around the whole paragraph, not only around the citation field.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:t"_ostr, "Before sdt.");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:instrText"_ostr, " CITATION BBC11 \\l 1033 ");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:t"_ostr, "After sdt.");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testParagraphSdt)
+{
+ loadAndReload("paragraph-sdt.docx");
+ // The problem was that the SDT was around the run only, not the whole paragraph.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // The path to w:sdt contained a w:p.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:sdt"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdt2Run)
+{
+ loadAndReload("sdt-2-para.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // The problem was that <w:sdt> was closed after "first", not after "second", so the second assert failed.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r/w:t"_ostr, "first");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:r/w:t"_ostr, "second");
+ // Make sure the third paragraph is still outside <w:sdt>.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r/w:t"_ostr, "third");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, test2Id)
+{
+ loadAndReload("2-id.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // This was 2, but only one w:id is allowed.
+ assertXPath(pXmlDoc, "//w:sdtPr/w:id"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableStart2Sdt)
+{
+ loadAndReload("table-start-2-sdt.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // w:docPartGallery should be a child of <w:docPartObj>, make sure it's not a child of w:text.
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:text/w:docPartGallery"_ostr, 0);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testSdtDateDuplicate, "sdt-date-duplicate.docx")
+{
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Single <w:sdt> was exported as 2 <w:sdt> elements.
+ assertXPath(pXmlDoc, "//w:sdt"_ostr, 1);
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ uno::Reference<container::XEnumerationAccess> xParagraphsAccess(xCell, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParagraphs = xParagraphsAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphs->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
+ uno::Reference<beans::XPropertySet> xTextPortion(xPortions->nextElement(), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+ uno::Reference<container::XEnumerationAccess> xContentControlEnumAccess(xContentControl, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentControlEnum = xContentControlEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xTextPortionRange(xContentControlEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("4/26/2012"), xTextPortionRange->getString());
+ }
+ else
+ {
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
+
+ ::sw::mark::IDateFieldmark* pFieldmark
+ = dynamic_cast<::sw::mark::IDateFieldmark*>(*pMarkAccess->getAllMarksBegin());
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(ODF_FORMDATE, pFieldmark->GetFieldname());
+ CPPUNIT_ASSERT_EQUAL(OUString("4/26/2012"), pFieldmark->GetContent());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo81492)
+{
+ loadAndReload("fdo81492.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[6]/w:instrText"_ostr, "ADDIN EN.CITE.DATA");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testEditTime)
+{
+ loadAndReload("fdo81341.docx");
+ /* Issue was LO was not able to Import and Export EditTime in seconds format.
+ * It was supporting Time in "HH:MM" format. But if DOCX contains Time in seconds,
+ * then LO was not able to display time in "HH:MM:SS" format.
+ * While exporting LO was writing plain text instead of field entry.
+ */
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ //Ensure that EditTime is written inside w:fldChar in "HH:MM:SS" format.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:fldChar"_ostr, "fldCharType"_ostr, "begin");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[3]/w:fldChar"_ostr, "fldCharType"_ostr, "separate");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:t"_ostr, "00:05");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:fldChar"_ostr, "fldCharType"_ostr, "end");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFlyFieldmark)
+{
+ loadAndReload("fly_fieldmark.fodt");
+ // the problem was that the flys were written after the field start
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // run 1 contains 2 shapes, one was at-page, one was at-char
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent"_ostr, 2);
+ // run 2 contains the field start
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:fldChar"_ostr, "fldCharType"_ostr, "begin");
+ // run 3 contains the field instruction text
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:instrText"_ostr, " FORMTEXT ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFdo81945)
+{
+ loadAndReload("fdo81945.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "//w:sdt//w:sdt"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo82123)
+{
+ loadAndReload("fdo82123.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // make sure there is only one run inside first SDT after RT as in the Original file.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:p/w:sdt[1]/w:sdtContent/w:r/w:t"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:p/w:r/w:drawing"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtBeforeField)
+{
+ loadAndReload("sdt-before-field.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Make sure the field doesn't sneak inside the SDT: the SDT should contain only a single run (there were 6 ones).
+ assertXPath(pXmlDoc, "//w:p/w:sdt/w:sdtContent/w:r/w:t"_ostr, 1);
+ assertXPath(pXmlDoc, "//w:p/w:r/w:fldChar"_ostr, 3);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo81946)
+{
+ loadAndReload("fdo81946.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml");
+ // make sure AlternateContent should not present in sdt
+ assertXPath(pXmlDoc, "/w:hdr[1]/w:p[1]/w:sdt[1]/w:sdtContent[1]/w:r[2]/mc:AlternateContent[1]"_ostr,0);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testfdo82492)
+{
+ loadAndReload("fdo82492.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // make sure there is only one run inside first SDT after RT as in the Original file.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent/w:r/w:t"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtHeader)
+{
+ loadAndReload("sdt-header.docx");
+ // Problem was that w:sdt elements in headers were lost on import.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
+ // This was 0, w:sdt (and then w:date) was missing.
+ assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:date"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSdtCompanyMultipara)
+{
+ loadAndReload("sdt-company-multipara.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Here is just a simple text node, so there should be either one or zero paragraph
+ // (in this case sdt element is inside paragraph)
+ assertXPath(pXmlDoc, "//w:sdtContent/w:p"_ostr, 0);
+ assertXPath(pXmlDoc, "//w:sdtContent/w:r"_ostr, 2);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testFixedDateFields, "fixed-date-field.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<beans::XPropertySet> xField(xFields->nextElement(), uno::UNO_QUERY);
+
+ // Check fixed property was imported and date value was parsed correctly
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xField, "IsFixed"));
+ css::util::DateTime date = getProperty<css::util::DateTime>(xField, "DateTimeValue");
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(24), date.Day);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(7), date.Month);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2014), date.Year);
+
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Previously, fixed fields were exported as static text ("Date (fixed)")
+ // Check they are now exported correctly as fldChar with fldLock attribute
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:fldChar"_ostr, "fldLock"_ostr, "true");
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testToxmarkHyperlink)
+{
+ loadAndReload("toxmarkhyperlink.fodt");
+ // test that export doesn't assert with overlapping fields / hyperlink attr
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOO34469)
+{
+ loadAndReload("ooo34469-1.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]"_ostr, "anchor"_ostr, "2.9.2.Creating_New_files|outline");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testOO39845)
+{
+ loadAndReload("ooo39845-7.odt");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]"_ostr, "anchor"_ostr, "Figure4|graphic");
+}
+
+DECLARE_OOXMLEXPORT_TEST( testTdf85161, "tdf85161.docx" )
+{
+ CPPUNIT_ASSERT_EQUAL(OUString("Symbol"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(OUString(u'\x5e'),getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf66401)
+{
+ loadAndReload("tdf66401.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:rFonts"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:rFonts"_ostr, "ascii"_ostr, "Arial Black");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:sz"_ostr, "val"_ostr, "24");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[9]/w:rPr/w:rFonts"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[9]/w:rPr/w:rFonts"_ostr, "ascii"_ostr, "Arial Black");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[9]/w:rPr/w:sz"_ostr, "val"_ostr, "24");
+}
+
+DECLARE_OOXMLEXPORT_TEST( testDateFieldInShape, "date_field_in_shape.docx" )
+{
+ // This was crashed on export.
+ if (isExported())
+ {
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xShapeText = xShape->getText();
+ uno::Reference<beans::XPropertySet> xTextPortion(getRun(getParagraphOfText(1, xShapeText), 1), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+ uno::Reference<container::XEnumerationAccess> xContentControlEnumAccess(xContentControl, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentControlEnum = xContentControlEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xTextPortionRange(xContentControlEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Click here to enter a date."), xTextPortionRange->getString());
+ }
+ else
+ {
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
+
+ ::sw::mark::IDateFieldmark* pFieldmark
+ = dynamic_cast<::sw::mark::IDateFieldmark*>(*pMarkAccess->getAllMarksBegin());
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(ODF_FORMDATE, pFieldmark->GetFieldname());
+ CPPUNIT_ASSERT_EQUAL(OUString("Click here to enter a date."), pFieldmark->GetContent());
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST( testDateFieldAtEndOfParagraph, "date_field_at_end_of_paragraph.docx" )
+{
+ // Additional line end was added by import and it was crashed on export
+ if (isExported())
+ {
+ uno::Reference<beans::XPropertySet> xTextPortion(getRun(getParagraph(2), 1), uno::UNO_QUERY);
+ OUString aPortionType;
+ xTextPortion->getPropertyValue("TextPortionType") >>= aPortionType;
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ uno::Reference<text::XTextContent> xContentControl;
+ xTextPortion->getPropertyValue("ContentControl") >>= xContentControl;
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ bool bDate{};
+ xContentControlProps->getPropertyValue("Date") >>= bDate;
+ CPPUNIT_ASSERT(bDate);
+ uno::Reference<container::XEnumerationAccess> xContentControlEnumAccess(xContentControl, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentControlEnum = xContentControlEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xTextPortionRange(xContentControlEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Click here to enter a date."), xTextPortionRange->getString());
+ }
+ else
+ {
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
+
+ ::sw::mark::IDateFieldmark* pFieldmark
+ = dynamic_cast<::sw::mark::IDateFieldmark*>(*pMarkAccess->getAllMarksBegin());
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(ODF_FORMDATE, pFieldmark->GetFieldname());
+ CPPUNIT_ASSERT_EQUAL(OUString("Click here to enter a date."), pFieldmark->GetContent());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDropDownFieldEntryLimit)
+{
+ loadAndReload("tdf126792.odt" );
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // In MSO, there is a limit of 25 for the items in a drop-down form field.
+ // So we truncate the list of items to not exceed this limit.
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ ::sw::mark::IFieldmark* pFieldmark
+ = dynamic_cast<::sw::mark::IFieldmark*>(*pMarkAccess->getAllMarksBegin());
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(ODF_FORMDROPDOWN, pFieldmark->GetFieldname());
+
+ const sw::mark::IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
+ auto pListEntries = pParameters->find(ODF_FORMDROPDOWN_LISTENTRY);
+ CPPUNIT_ASSERT(bool(pListEntries != pParameters->end()));
+ css::uno::Sequence<OUString> vListEntries;
+ pListEntries->second >>= vListEntries;
+ if (!isExported())
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(26), vListEntries.getLength());
+ else
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(25), vListEntries.getLength());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf132185)
+{
+ loadAndReload("tdf132185.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/footer2.xml");
+ // Since the default (without xml:space attribute) is to ignore leading and trailing spaces,
+ // " PAGE \\* roman " will get imported as "PAGE \\* roman". This is also valid, and must be
+ // treated accordingly. "roman" was ignored before the fix, exporting only " PAGE ".
+ assertXPathContent(pXmlDoc, "/w:ftr/w:p/w:r[2]/w:instrText"_ostr, " PAGE \\* roman ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testConditionalText)
+{
+ loadAndReload("conditional-text.fodt");
+ // Load a document which has a conditional text field in it.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ std::u16string_view aExpected(u" IF 1 < 2 \"True\" \"- 'False' -\"");
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expression: xmlXPathNodeSetGetLength(pXmlNodes) > 0
+ // - In <...>, XPath '/w:document/w:body/w:p/w:r[2]/w:instrText' not found
+ // i.e. the field was lost on export.
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText"_ostr, OUString(aExpected));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testConditionalText2)
+{
+ loadAndReload("tdf114537_conditional-text2.doc");
+ // Load a document which has a conditional text field in it.
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ std::u16string_view aExpected(u" IF 1 = 1 \"test1\" \"test2\"");
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText"_ostr, OUString(aExpected));
+
+ getParagraph(1, "test1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testConditionalText3)
+{
+ loadAndReload("tdf125038_conditionalText3.docx");
+ // It is unclear what the purpose of all the conditional IF statements is,
+ // but the end result should not produce any output.
+ // Previously, the fields were being displayed as text
+ // instead of as building blocks for the IF field condition.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getParagraph(1)->getString().indexOf('2'));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf142464_ampm, "tdf142464_ampm.docx")
+{
+ css::uno::Reference<css::text::XTextFieldsSupplier> xTextFieldsSupplier(
+ mxComponent, css::uno::UNO_QUERY_THROW);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ auto xFields(xFieldsAccess->createEnumeration());
+ css::uno::Reference<css::text::XTextField> xField(xFields->nextElement(),
+ css::uno::UNO_QUERY_THROW);
+
+ // Without the fix in place, this would have failed with:
+ // - Expected: 12:32 PM
+ // - Actual : 12:32 a12/p12
+ CPPUNIT_ASSERT_EQUAL(OUString("12:32 PM"), xField->getPresentation(false));
+
+ if (isExported())
+ {
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Without the fix in place, this would have failed with:
+ // - Expected: DATE \@"H:mm\ AM/PM"
+ // - Actual : DATE \@"H:mm' a'M'/p'M"
+ // i.e., the AM/PM would be treated as literal 'a' and 'p' followed by a month code
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText"_ostr,
+ " DATE \\@\"H:mm\\ AM/PM\" ");
+ }
+}
+
+DECLARE_OOXMLEXPORT_TEST( testSdtDatePicker, "test_sdt_datepicker.docx" )
+{
+ // Check that roundtrip for date picker field does not lose essential data
+ if (!isExported())
+ return; // initial import, no further checks
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Placeholder is here
+ OUString sDocPart = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:placeholder/w:docPart"_ostr, "val"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("DefaultPlaceholder_-1854013437"), sDocPart);
+
+ // Ensure that we have data binding stuff
+ OUString sDBprefix = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding"_ostr, "prefixMappings"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("xmlns:ns0='http://schemas.microsoft.com/vsto/samples' "), sDBprefix);
+
+ OUString sDBxpath = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding"_ostr, "xpath"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]"), sDBxpath);
+
+ OUString sDBstoreid = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding"_ostr, "storeItemID"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}"), sDBstoreid);
+
+ OUString sColor = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w15:color"_ostr, "val"_ostr);
+ CPPUNIT_ASSERT_EQUAL(OUString("008000"), sColor);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentControlGrabBag)
+{
+ // Given a document with a <w:sdt> tag:
+ createSwDoc("content-control-grab-bag.docx");
+
+ // When exporting that document back to DOCX:
+ // Then make sure that completes without an assertion failure, which would mean not-well-formed
+ // output was produced:
+ save("Office Open XML Text");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentControlShape)
+{
+ // Given a document with a <w:sdt> tag:
+ createSwDoc("content-control-shape.docx");
+
+ // When exporting that document back to DOCX:
+ // Then make sure that completes without an assertion failure, which would mean not-well-formed
+ // output was produced, since the <w:sdt> was conditional but the </w:sdt> was unconditional:
+ save("Office Open XML Text");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf104823)
+{
+ // Test how we can roundtrip sdt plain text with databindings support
+ createSwDoc("tdf104823.docx");
+
+ // First paragraph: content from core properties
+ uno::Reference<text::XTextRange> xParagraph1 = getParagraph(1);
+ auto xContentControl1 = getProperty<uno::Reference<text::XText>>(getRun(xParagraph1, 2), "ContentControl");
+ // Check field value (it should be value from data source) and set new
+ CPPUNIT_ASSERT_EQUAL(OUString("True Core Property Value"), xContentControl1->getString());
+ xContentControl1->setString("New Core Property Value");
+
+ // Third paragraph: content from custom properties
+ uno::Reference<text::XTextRange> xParagraph3 = getParagraph(3);
+ auto xContentControl3 = getProperty<uno::Reference<text::XText>>(getRun(xParagraph3, 2), "ContentControl");
+ // Check field value (it should be value from data source) and set new
+ CPPUNIT_ASSERT_EQUAL(OUString("True Custom XML Value"), xContentControl3->getString());
+ xContentControl3->setString("New Custom XML Value");
+
+ // Second paragraph: content from extended properties
+ uno::Reference<text::XTextRange> xParagraph2 = getParagraph(2);
+ auto xContentControl2 = getProperty<uno::Reference<text::XText>>(getRun(xParagraph2, 2), "ContentControl");
+ // Check field value (it should be value from data source) and set new
+ CPPUNIT_ASSERT_EQUAL(OUString("True Extended Property Value"), xContentControl2->getString());
+ xContentControl2->setString("New Extended Property Value");
+
+ // Save and check saved data
+ save("Office Open XML Text");
+ xmlDocUniquePtr pXmlCustomPropsDoc = parseExport("customXml/item1.xml");
+ CPPUNIT_ASSERT(pXmlCustomPropsDoc);
+ // FIXME: strange it won't run simple /employees/employee/name xpath query. Does not like namespaces?
+ assertXPathContent(pXmlCustomPropsDoc, "//*/*[local-name()='name']"_ostr, "New Custom XML Value");
+
+ xmlDocUniquePtr pXmlAppPropsDoc = parseExport("docProps/app.xml");
+ CPPUNIT_ASSERT(pXmlAppPropsDoc);
+ // TODO: extended properties are not written yet
+ assertXPathContent(pXmlAppPropsDoc, "//*/*[local-name()='Company']"_ostr, "True Extended Property Value");
+
+ xmlDocUniquePtr pXmlCorePropsDoc = parseExport("docProps/core.xml");
+ CPPUNIT_ASSERT(pXmlCorePropsDoc);
+ // TODO: core properties are not written yet
+ assertXPathContent(pXmlCorePropsDoc, "/cp:coreProperties/dc:creator"_ostr, "True Core Property Value");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
new file mode 100644
index 0000000000..6d5fefb9e9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx
@@ -0,0 +1,226 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+#include <unotools/tempfile.hxx>
+#include <tools/urlobj.hxx>
+#include <officecfg/Office/Common.hxx>
+#include <o3tl/string_view.hxx>
+
+// This file contains tests to check relative/absolute hyperlinks handling
+
+#define USE_TEMP_DIR true
+#define DONT_MODIFY_LINK false
+
+#define USE_ABSOLUTE true
+#define USE_RELATIVE false
+
+// bAbsolute - decide if output link should be converted to absolute
+// bUseTempDir - decide if link should be modified to be placed in temp dir - for testing relative links
+#define DECLARE_LINKS_EXPORT_TEST(TestName, FileName, bAbsolute, bUseTempDir) \
+ class TestName : public Test \
+ { \
+ protected: \
+ virtual void postLoad(const char*) override \
+ { \
+ if (!bUseTempDir) \
+ return; \
+ \
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1); \
+ /* can be changed only after import */ \
+ uno::Reference<text::XTextRange> xText = getRun(xParagraph, 1); \
+ \
+ /* Get original link */ \
+ OUString sOriginalFileName = getProperty<OUString>(xText, "HyperLinkURL"); \
+ INetURLObject aOriginalURL(sOriginalFileName); \
+ CPPUNIT_ASSERT(!aOriginalURL.HasError()); \
+ OUString sFileName = aOriginalURL.GetLastName(); \
+ CPPUNIT_ASSERT(!sFileName.isEmpty()); \
+ \
+ /* Get temp path */ \
+ OUString sTempDir = utl::GetTempNameBaseDirectory(); \
+ \
+ /* Create & apply new URL */ \
+ OUString sOriginalFileInTempDir = sTempDir + sFileName; \
+ uno::Reference<beans::XPropertySet> xPropertySet(xText, css::uno::UNO_QUERY); \
+ xPropertySet->setPropertyValue("HyperLinkURL", css::uno::Any(sOriginalFileInTempDir)); \
+ } \
+ \
+ public: \
+ CPPUNIT_TEST_SUITE(TestName); \
+ CPPUNIT_TEST(Import_Export_Import); \
+ CPPUNIT_TEST_SUITE_END(); \
+ void Import_Export_Import() \
+ { \
+ auto xChanges = comphelper::ConfigurationChanges::create(); \
+ officecfg::Office::Common::Save::URL::FileSystem::set(!bAbsolute, xChanges); \
+ xChanges->commit(); \
+ executeLoadReloadVerify(FileName); \
+ } \
+ void verify() override; \
+ }; \
+ CPPUNIT_TEST_SUITE_REGISTRATION(TestName); \
+ void TestName::verify()
+
+// bAbsolute - decide if relative link should be converted to absolute on import
+#define DECLARE_LINKS_IMPORT_TEST(TestName, FileName, bAbsolute) \
+ class TestName : public Test \
+ { \
+ public: \
+ CPPUNIT_TEST_SUITE(TestName); \
+ CPPUNIT_TEST(Import); \
+ CPPUNIT_TEST_SUITE_END(); \
+ void Import() \
+ { \
+ auto xChanges = comphelper::ConfigurationChanges::create(); \
+ officecfg::Office::Common::Save::URL::FileSystem::set(!bAbsolute, xChanges); \
+ xChanges->commit(); \
+ executeImportTest(FileName); \
+ } \
+ void verify() override; \
+ }; \
+ CPPUNIT_TEST_SUITE_REGISTRATION(TestName); \
+ void TestName::verify()
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text")
+ {
+ }
+};
+
+/* IMPORT */
+
+DECLARE_LINKS_IMPORT_TEST(testRelativeToRelativeImport, "relative-link.docx", USE_RELATIVE)
+{
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ uno::Reference<text::XTextRange> xText = getRun(xParagraph, 1);
+ OUString sTarget = getProperty<OUString>(xText, "HyperLinkURL");
+ CPPUNIT_ASSERT(sTarget.startsWith("file:///"));
+ CPPUNIT_ASSERT(sTarget.endsWith("relative.docx"));
+}
+
+DECLARE_LINKS_IMPORT_TEST(testRelativeToAbsoluteImport, "relative-link.docx", USE_ABSOLUTE)
+{
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ uno::Reference<text::XTextRange> xText = getRun(xParagraph, 1);
+ OUString sTarget = getProperty<OUString>(xText, "HyperLinkURL");
+ CPPUNIT_ASSERT(sTarget.startsWith("file:///"));
+ CPPUNIT_ASSERT(sTarget.endsWith("relative.docx"));
+}
+
+DECLARE_LINKS_IMPORT_TEST(testAbsoluteToAbsoluteImport, "absolute-link.docx", USE_ABSOLUTE)
+{
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ uno::Reference<text::XTextRange> xText = getRun(xParagraph, 1);
+ // # should be encoded
+ CPPUNIT_ASSERT_EQUAL(OUString("file:///B:/Users/user/Desktop/a%23b/test.docx"),
+ getProperty<OUString>(xText, "HyperLinkURL"));
+}
+
+DECLARE_LINKS_IMPORT_TEST(testAbsoluteToRelativeImport, "absolute-link.docx", USE_RELATIVE)
+{
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ uno::Reference<text::XTextRange> xText = getRun(xParagraph, 1);
+ // when target file (B:\\...) & document with link (temp dir) are placed on different partitions, absolute path will be loaded
+ CPPUNIT_ASSERT_EQUAL(OUString("file:///B:/Users/user/Desktop/a%23b/test.docx"),
+ getProperty<OUString>(xText, "HyperLinkURL"));
+}
+
+DECLARE_LINKS_IMPORT_TEST(testTdf123627_import, "tdf123627.docx", USE_RELATIVE)
+{
+ uno::Reference<text::XTextRange> xText = getRun(getParagraph(1), 1);
+ OUString sTarget = getProperty<OUString>(xText, "HyperLinkURL");
+ CPPUNIT_ASSERT(sTarget.startsWith("file:///"));
+ CPPUNIT_ASSERT(sTarget.endsWith("New/test.docx"));
+}
+
+/* EXPORT */
+
+DECLARE_LINKS_EXPORT_TEST(testRelativeToRelativeExport, "relative-link.docx", USE_RELATIVE,
+ USE_TEMP_DIR)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']"_ostr,
+ "Target"_ostr, "relative.docx");
+}
+
+DECLARE_LINKS_EXPORT_TEST(testRelativeToAbsoluteExport, "relative-link.docx", USE_ABSOLUTE,
+ DONT_MODIFY_LINK)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+
+ OUString sTarget
+ = getXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[2]"_ostr, "Target"_ostr);
+ CPPUNIT_ASSERT(sTarget.startsWith("file:///"));
+ CPPUNIT_ASSERT(sTarget.endsWith("relative.docx"));
+}
+
+DECLARE_LINKS_EXPORT_TEST(testAbsoluteToRelativeExport, "absolute-link.docx", USE_RELATIVE,
+ USE_TEMP_DIR)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[2]"_ostr, "Target"_ostr,
+ "test.docx");
+}
+
+DECLARE_LINKS_EXPORT_TEST(testAbsoluteToAbsoluteExport, "absolute-link.docx", USE_ABSOLUTE,
+ DONT_MODIFY_LINK)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+
+ OUString sTarget
+ = getXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[2]"_ostr, "Target"_ostr);
+ CPPUNIT_ASSERT(sTarget.startsWith("file:///"));
+ CPPUNIT_ASSERT(sTarget.endsWith("test.docx"));
+}
+
+DECLARE_LINKS_EXPORT_TEST(testTdf123627_export, "tdf123627.docx", USE_RELATIVE, USE_TEMP_DIR)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']"_ostr,
+ "Target"_ostr, "test.docx");
+}
+
+DECLARE_LINKS_EXPORT_TEST(testTdf126590_export, "tdf126590.docx", USE_ABSOLUTE, DONT_MODIFY_LINK)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+ // in the original file: Target="file:///C:\TEMP\test.docx" => invalid file URI
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']"_ostr,
+ "Target"_ostr, "file:///C:/TEMP/test.docx");
+}
+
+DECLARE_LINKS_EXPORT_TEST(testTdf126768_export, "tdf126768.docx", USE_ABSOLUTE, DONT_MODIFY_LINK)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+ // in the original file: "file:///C:\\TEMP\\test.docx" => invalid file URI
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']"_ostr,
+ "Target"_ostr, "file:///C:/TEMP/test.docx");
+}
+
+DECLARE_LINKS_EXPORT_TEST(testNon_ascii_link_export, "non_ascii_link.docx", USE_ABSOLUTE,
+ DONT_MODIFY_LINK)
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/_rels/document.xml.rels");
+
+ assertXPath(pXmlDoc, "/rels:Relationships/rels:Relationship[@TargetMode='External']"_ostr,
+ "Target"_ostr,
+ INetURLObject::decode(u"file:///C:/TEMP/%C3%A9kezet.docx",
+ INetURLObject::DecodeMechanism::ToIUri,
+ RTL_TEXTENCODING_UTF8));
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx b/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
new file mode 100644
index 0000000000..aaf74e6afb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
@@ -0,0 +1,636 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+#include <o3tl/string_view.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, Test_TextEffects_GlowShadowReflection)
+{
+ loadAndReload("TextEffects_Glow_Shadow_Reflection.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow"_ostr, "rad"_ostr).match("63500"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow/w14:srgbClr"_ostr, "val"_ostr).match("00B0F0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow/w14:srgbClr/w14:alpha"_ostr, "val"_ostr).match("60000"));
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow"_ostr, "rad"_ostr).match("228600"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr"_ostr, "val"_ostr).match("accent6"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr/w14:alpha"_ostr, "val"_ostr).match("60000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr/w14:satMod"_ostr, "val"_ostr).match("175000"));
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "blurRad"_ostr).match("63500"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "dist"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "dir"_ostr).match("1800000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "sx"_ostr).match("100000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "sy"_ostr).match("-30000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "kx"_ostr).match("-800400"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "ky"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow"_ostr, "algn"_ostr).match("bl"));
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr"_ostr, "val"_ostr).match("accent3"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr/w14:alpha"_ostr, "val"_ostr).match("38000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr/w14:lumMod"_ostr, "val"_ostr).match("75000"));
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "blurRad"_ostr).match("190500"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "dist"_ostr).match("190500"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "dir"_ostr).match("3000000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "sx"_ostr).match("100000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "sy"_ostr).match("100000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "kx"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "ky"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow"_ostr, "algn"_ostr).match("ctr"));
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow/w14:srgbClr"_ostr, "val"_ostr).match("FF0000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow/w14:srgbClr/w14:alpha"_ostr, "val"_ostr).match("10000"));
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "blurRad"_ostr).match("6350"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "stA"_ostr).match("60000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "stPos"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "endA"_ostr).match("900"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "endPos"_ostr).match("60000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "dist"_ostr).match("60007"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "dir"_ostr).match("5400000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "fadeDir"_ostr).match("5400000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "sx"_ostr).match("100000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "sy"_ostr).match("-100000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "kx"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "ky"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection"_ostr, "algn"_ostr).match("bl"));
+
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "blurRad"_ostr).match("6350"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "stA"_ostr).match("55000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "stPos"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "endA"_ostr).match("300"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "endPos"_ostr).match("45500"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "dist"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "dir"_ostr).match("5400000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "fadeDir"_ostr).match("5400000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "sx"_ostr).match("100000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "sy"_ostr).match("-100000"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "kx"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "ky"_ostr).match("0"));
+ CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection"_ostr, "algn"_ostr).match("bl"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_TextEffects_TextOutline)
+{
+ loadAndReload("TextEffects_TextOutline.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Paragraph 1
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline"_ostr, "w"_ostr, "50800");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline"_ostr, "cap"_ostr, "rnd");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline"_ostr, "cmpd"_ostr, "dbl");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline"_ostr, "algn"_ostr, "ctr");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]"_ostr, "pos"_ostr, "70000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr"_ostr, "val"_ostr, "92D050");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr/w14:alpha"_ostr, "val"_ostr, "30000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr/w14:lumMod"_ostr, "val"_ostr, "75000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr/w14:lumOff"_ostr, "val"_ostr, "25000");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]"_ostr, "pos"_ostr, "30000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr"_ostr, "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:alpha"_ostr, "val"_ostr, "55000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod"_ostr, "val"_ostr, "40000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff"_ostr, "val"_ostr, "60000");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[3]"_ostr, "pos"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[3]/w14:srgbClr"_ostr, "val"_ostr, "0070C0");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[4]"_ostr, "pos"_ostr, "100000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[4]/w14:schemeClr"_ostr, "val"_ostr, "accent4");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:lin"_ostr, "ang"_ostr, "3600000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:lin"_ostr, "scaled"_ostr, "0");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash"_ostr, "val"_ostr, "dash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:miter"_ostr, "lim"_ostr, "0");
+
+ // Paragraph 2
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline"_ostr, "w"_ostr, "9525");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline"_ostr, "cap"_ostr, "rnd");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline"_ostr, "cmpd"_ostr, "sng");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline"_ostr, "algn"_ostr, "ctr");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:solidFill/w14:srgbClr"_ostr, "val"_ostr, "FF0000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash"_ostr, "val"_ostr, "solid");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:bevel"_ostr, 1);
+
+ // Paragraph 3
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline"_ostr, "w"_ostr, "9525");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline"_ostr, "cap"_ostr, "rnd");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline"_ostr, "cmpd"_ostr, "sng");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline"_ostr, "algn"_ostr, "ctr");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:noFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash"_ostr, "val"_ostr, "solid");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:bevel"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_TextEffects_TextFill)
+{
+ loadAndReload("TextEffects_TextFill.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // Paragraph 1 has no textFill
+
+ // Paragraph 2
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textFill/w14:noFill"_ostr, 1);
+
+ // Paragraph 3
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr"_ostr, "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:alpha"_ostr, "val"_ostr, "5000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:lumMod"_ostr, "val"_ostr, "40000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:lumOff"_ostr, "val"_ostr, "60000");
+
+ // Paragraph 4
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]"_ostr, "pos"_ostr, "0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr"_ostr, "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha"_ostr, "val"_ostr, "5000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod"_ostr, "val"_ostr, "67000");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]"_ostr, "pos"_ostr, "50000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]/w14:srgbClr"_ostr, "val"_ostr, "00B0F0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]/w14:srgbClr/w14:alpha"_ostr, "val"_ostr, "10000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]/w14:srgbClr/w14:lumMod"_ostr, "val"_ostr, "80000");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]"_ostr, "pos"_ostr, "100000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr"_ostr, "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:alpha"_ostr, "val"_ostr, "15000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod"_ostr, "val"_ostr, "60000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumOff"_ostr, "val"_ostr, "40000");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:lin"_ostr, "ang"_ostr, "16200000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:lin"_ostr, "scaled"_ostr, "0");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_TextEffects_Props3d_Ligatures_NumForm_NumSpacing)
+{
+ loadAndReload("TextEffects_Props3d_Ligatures_NumForm_NumSpacing.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Paragraph 1 - w14:props3d
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d"_ostr, "extrusionH"_ostr, "63500");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d"_ostr, "contourW"_ostr, "25400");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d"_ostr, "prstMaterial"_ostr, "softEdge");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT"_ostr, "w"_ostr, "38100");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT"_ostr, "h"_ostr, "38100");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT"_ostr, "prst"_ostr, "relaxedInset");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB"_ostr, "w"_ostr, "69850");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB"_ostr, "h"_ostr, "38100");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB"_ostr, "prst"_ostr, "cross");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr"_ostr, "val"_ostr, "accent2");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr/w14:lumMod"_ostr, "val"_ostr, "20000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr/w14:lumOff"_ostr, "val"_ostr, "80000");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:contourClr"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:contourClr/w14:srgbClr"_ostr, "val"_ostr, "92D050");
+
+ // Paragraph 2 - w14:ligatures
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:ligatures"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:ligatures"_ostr, "val"_ostr, "standard");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w14:ligatures"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w14:ligatures"_ostr, "val"_ostr, "standardContextual");
+
+ // Paragraph 3 - w14:numForm and w14:numSpacing
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numForm"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numForm"_ostr, "val"_ostr, "lining");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numSpacing"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numSpacing"_ostr, "val"_ostr, "tabular");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numForm"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numForm"_ostr, "val"_ostr, "oldStyle");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numSpacing"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numSpacing"_ostr, "val"_ostr, "proportional");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_TextEffects_StylisticSets_CntxtAlts)
+{
+ loadAndReload("TextEffects_StylisticSets_CntxtAlts.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ // Paragraph 1 - w14:stylisticSets
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:stylisticSets/w14:styleSet"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:stylisticSets/w14:styleSet"_ostr, "id"_ostr, "4");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w14:stylisticSets/w14:styleSet"_ostr, 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w14:stylisticSets/w14:styleSet"_ostr, "id"_ostr, "2");
+
+ // Paragraph 1 - w14:cntxtAlts
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:cntxtAlts"_ostr, 1);
+
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_McIgnorable)
+{
+ loadAndReload("TextEffects_StylisticSets_CntxtAlts.docx");
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ assertXPath(pXmlDocument, "/w:document"_ostr, "Ignorable"_ostr, "w14 wp14 w15");
+
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+
+ assertXPath(pXmlStyles, "/w:styles"_ostr, "Ignorable"_ostr, "w14");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_CompatSettingsForW14)
+{
+ loadAndReload("TextEffects_StylisticSets_CntxtAlts.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/settings.xml");
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting"_ostr, 5);
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "name"_ostr, "compatibilityMode");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "uri"_ostr, "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]"_ostr, "val"_ostr, "15"); // document was made with Word2013 -> 15
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]"_ostr, "name"_ostr, "overrideTableStyleFontSizeAndJustification");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]"_ostr, "uri"_ostr, "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]"_ostr, "val"_ostr, "1");
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]"_ostr, "name"_ostr, "enableOpenTypeFeatures");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]"_ostr, "uri"_ostr, "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]"_ostr, "val"_ostr, "1");
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]"_ostr, "name"_ostr, "doNotFlipMirrorIndents");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]"_ostr, "uri"_ostr, "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]"_ostr, "val"_ostr, "1");
+
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]"_ostr, "name"_ostr, "differentiateMultirowTableHeaders");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]"_ostr, "uri"_ostr, "http://schemas.microsoft.com/office/word");
+ assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]"_ostr, "val"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_TextEffects_Groupshapes)
+{
+ loadAndReload("TextEffects_Groupshapes.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ OString sPathToWGP = "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp"_ostr;
+
+ assertXPath(pXmlDoc, sPathToWGP + "/wps:wsp", 2);
+
+ OString sPathToShapeRunProperties = sPathToWGP + "/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr";
+
+ // Glow
+ OString sPathGlow = sPathToShapeRunProperties + "/w14:glow";
+ assertXPath(pXmlDoc, sPathGlow, 1);
+ assertXPath(pXmlDoc, sPathGlow, "rad"_ostr, "127000");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:srgbClr", "val"_ostr, "00B050");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:srgbClr/w14:alpha", "val"_ostr, "60000");
+
+ // Shadow
+ OString sPathShadow = sPathToShapeRunProperties + "/w14:shadow";
+ assertXPath(pXmlDoc, sPathShadow, 1);
+ assertXPath(pXmlDoc, sPathShadow, "blurRad"_ostr, "127000");
+ assertXPath(pXmlDoc, sPathShadow, "dist"_ostr, "787400");
+ assertXPath(pXmlDoc, sPathShadow, "dir"_ostr, "12720000");
+ assertXPath(pXmlDoc, sPathShadow, "sx"_ostr, "70000");
+ assertXPath(pXmlDoc, sPathShadow, "sy"_ostr, "70000");
+ assertXPath(pXmlDoc, sPathShadow, "kx"_ostr, "0");
+ assertXPath(pXmlDoc, sPathShadow, "ky"_ostr, "0");
+ assertXPath(pXmlDoc, sPathShadow, "algn"_ostr, "l");
+ assertXPath(pXmlDoc, sPathShadow+"/w14:srgbClr", "val"_ostr, "92D050");
+ assertXPath(pXmlDoc, sPathShadow+"/w14:srgbClr/w14:alpha", "val"_ostr, "40000");
+
+ // Reflection
+ OString sPathReflection = sPathToShapeRunProperties + "/w14:reflection";
+ assertXPath(pXmlDoc, sPathReflection, 1);
+ assertXPath(pXmlDoc, sPathReflection, "blurRad"_ostr, "139700");
+ assertXPath(pXmlDoc, sPathReflection, "stA"_ostr, "47000");
+ assertXPath(pXmlDoc, sPathReflection, "stPos"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "endA"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "endPos"_ostr, "85000");
+ assertXPath(pXmlDoc, sPathReflection, "dist"_ostr, "63500");
+ assertXPath(pXmlDoc, sPathReflection, "dir"_ostr, "5400000");
+ assertXPath(pXmlDoc, sPathReflection, "fadeDir"_ostr, "5400000");
+ assertXPath(pXmlDoc, sPathReflection, "sx"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathReflection, "sy"_ostr, "-100000");
+ assertXPath(pXmlDoc, sPathReflection, "kx"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "ky"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "algn"_ostr, "bl");
+
+ // TextOutline
+ OString sPathTextOutline = sPathToShapeRunProperties + "/w14:textOutline";
+ assertXPath(pXmlDoc, sPathTextOutline, 1);
+ assertXPath(pXmlDoc, sPathTextOutline, "w"_ostr, "25400");
+ assertXPath(pXmlDoc, sPathTextOutline, "cap"_ostr, "rnd");
+ assertXPath(pXmlDoc, sPathTextOutline, "cmpd"_ostr, "sng");
+ assertXPath(pXmlDoc, sPathTextOutline, "algn"_ostr, "ctr");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr", "val"_ostr, "accent2");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:alpha", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:lumMod", "val"_ostr, "75000");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:prstDash", "val"_ostr, "solid");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:round", 1);
+
+ // TextFill
+ OString sPathTextFill = sPathToShapeRunProperties + "/w14:textFill";
+ assertXPath(pXmlDoc, sPathTextFill, 1);
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]", "pos"_ostr, "0");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr", "val"_ostr, "accent4");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]", "pos"_ostr, "41000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr", "val"_ostr, "accent6");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]", "pos"_ostr, "87000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr", "val"_ostr, "accent5");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumOff", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:lin", "ang"_ostr, "5400000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:lin", "scaled"_ostr, "0");
+
+ // Props3D
+ OString sPathProps3D = sPathToShapeRunProperties + "/w14:props3d";
+ assertXPath(pXmlDoc, sPathProps3D, 1);
+ assertXPath(pXmlDoc, sPathProps3D, "extrusionH"_ostr, "63500");
+ assertXPath(pXmlDoc, sPathProps3D, "contourW"_ostr, "12700");
+ assertXPath(pXmlDoc, sPathProps3D, "prstMaterial"_ostr, "warmMatte");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "w"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "h"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "prst"_ostr, "circle");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr", "val"_ostr, "accent2");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:contourClr/w14:schemeClr", "val"_ostr, "accent4");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:contourClr/w14:schemeClr/w14:lumMod", "val"_ostr, "75000");
+
+ // Ligatures
+ OString sPathLigatures = sPathToShapeRunProperties + "/w14:ligatures";
+ assertXPath(pXmlDoc, sPathLigatures, 1);
+ assertXPath(pXmlDoc, sPathLigatures, "val"_ostr, "standard");
+
+ // NumForm
+ OString sPathNumForm = sPathToShapeRunProperties + "/w14:numForm";
+ assertXPath(pXmlDoc, sPathNumForm, 1);
+ assertXPath(pXmlDoc, sPathNumForm, "val"_ostr, "oldStyle");
+
+ // NumSpacing
+ OString sPathNumSpacing = sPathToShapeRunProperties + "/w14:numSpacing";
+ assertXPath(pXmlDoc, sPathNumSpacing, 1);
+ assertXPath(pXmlDoc, sPathNumSpacing, "val"_ostr, "tabular");
+
+ // StylisticSets
+ OString sPathStylisticSets = sPathToShapeRunProperties + "/w14:stylisticSets";
+ assertXPath(pXmlDoc, sPathStylisticSets, 1);
+ assertXPath(pXmlDoc, sPathStylisticSets+"/w14:styleSet", "id"_ostr, "1");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_TextEffects_InStyleXml)
+{
+ loadAndReload("TextEffects_InStyle.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
+
+ OString sPathToCharacterStyle = "/w:styles/w:style[3]"_ostr;
+
+ assertXPath(pXmlDoc, sPathToCharacterStyle, "type"_ostr, "character");
+ assertXPath(pXmlDoc, sPathToCharacterStyle, "styleId"_ostr, "TextEffectsStyleChar");
+ assertXPath(pXmlDoc, sPathToCharacterStyle, "customStyle"_ostr, "1");
+
+ {
+ OString sPathToRun = sPathToCharacterStyle + "/w:rPr";
+
+ // Glow
+ OString sPathGlow = sPathToRun + "/w14:glow";
+ assertXPath(pXmlDoc, sPathGlow, "rad"_ostr, "63500");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:schemeClr", "val"_ostr, "accent2");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:schemeClr/w14:alpha", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:schemeClr/w14:satMod", "val"_ostr, "175000");
+
+ // Shadow
+ OString sPathShadow = sPathToRun + "/w14:shadow";
+ assertXPath(pXmlDoc, sPathShadow, "blurRad"_ostr, "50800");
+ assertXPath(pXmlDoc, sPathShadow, "dist"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathShadow, "dir"_ostr, "16200000");
+ assertXPath(pXmlDoc, sPathShadow, "sx"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathShadow, "sy"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathShadow, "kx"_ostr, "0");
+ assertXPath(pXmlDoc, sPathShadow, "ky"_ostr, "0");
+ assertXPath(pXmlDoc, sPathShadow, "algn"_ostr, "b");
+ assertXPath(pXmlDoc, sPathShadow+"/w14:srgbClr", "val"_ostr, "000000");
+ assertXPath(pXmlDoc, sPathShadow+"/w14:srgbClr/w14:alpha", "val"_ostr, "60000");
+
+ // Reflection
+ OString sPathReflection = sPathToRun + "/w14:reflection";
+ assertXPath(pXmlDoc, sPathReflection, "blurRad"_ostr, "6350");
+ assertXPath(pXmlDoc, sPathReflection, "stA"_ostr, "50000");
+ assertXPath(pXmlDoc, sPathReflection, "stPos"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "endA"_ostr, "300");
+ assertXPath(pXmlDoc, sPathReflection, "endPos"_ostr, "50000");
+ assertXPath(pXmlDoc, sPathReflection, "dist"_ostr, "29997");
+ assertXPath(pXmlDoc, sPathReflection, "dir"_ostr, "5400000");
+ assertXPath(pXmlDoc, sPathReflection, "fadeDir"_ostr, "5400000");
+ assertXPath(pXmlDoc, sPathReflection, "sx"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathReflection, "sy"_ostr, "-100000");
+ assertXPath(pXmlDoc, sPathReflection, "kx"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "ky"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "algn"_ostr, "bl");
+
+ // TextOutline
+ OString sPathTextOutline = sPathToRun + "/w14:textOutline";
+ assertXPath(pXmlDoc, sPathTextOutline, "w"_ostr, "25400");
+ assertXPath(pXmlDoc, sPathTextOutline, "cap"_ostr, "rnd");
+ assertXPath(pXmlDoc, sPathTextOutline, "cmpd"_ostr, "sng");
+ assertXPath(pXmlDoc, sPathTextOutline, "algn"_ostr, "ctr");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:alpha", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:lumMod", "val"_ostr, "75000");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:prstDash", "val"_ostr, "solid");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:bevel", 1);
+
+ // TextFill
+ OString sPathTextFill = sPathToRun + "/w14:textFill";
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]", "pos"_ostr, "0");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha", "val"_ostr, "10000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumOff", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]", "pos"_ostr, "46000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod", "val"_ostr, "95000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff", "val"_ostr, "5000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]", "pos"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path", "path"_ostr, "circle");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "b"_ostr, "-30000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "r"_ostr, "50000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "t"_ostr, "130000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "l"_ostr, "50000");
+
+ // Props3D
+ OString sPathProps3D = sPathToRun + "/w14:props3d";
+ assertXPath(pXmlDoc, sPathProps3D, "extrusionH"_ostr, "57150");
+ assertXPath(pXmlDoc, sPathProps3D, "contourW"_ostr, "12700");
+ assertXPath(pXmlDoc, sPathProps3D, "prstMaterial"_ostr, "metal");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "w"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "h"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "prst"_ostr, "angle");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelB", "w"_ostr, "69850");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelB", "h"_ostr, "69850");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelB", "prst"_ostr, "divot");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val"_ostr, "20000");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val"_ostr, "80000");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:contourClr/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:contourClr/w14:schemeClr/w14:lumMod", "val"_ostr, "75000");
+
+ // Ligatures
+ OString sPathLigatures = sPathToRun + "/w14:ligatures";
+ assertXPath(pXmlDoc, sPathLigatures, "val"_ostr, "standard");
+
+ // NumForm
+ OString sPathNumForm = sPathToRun + "/w14:numForm";
+ assertXPath(pXmlDoc, sPathNumForm, "val"_ostr, "lining");
+
+ // NumSpacing
+ OString sPathNumSpacing = sPathToRun + "/w14:numSpacing";
+ assertXPath(pXmlDoc, sPathNumSpacing, "val"_ostr, "proportional");
+
+ // StylisticSets
+ OString sPathStylisticSets = sPathToRun + "/w14:stylisticSets";
+ assertXPath(pXmlDoc, sPathStylisticSets+"/w14:styleSet", "id"_ostr, "1");
+ }
+
+ OString sPathToParagraphStyle = "/w:styles/w:style[9]"_ostr;
+
+ assertXPath(pXmlDoc, sPathToParagraphStyle, "type"_ostr, "paragraph");
+ assertXPath(pXmlDoc, sPathToParagraphStyle, "styleId"_ostr, "TextEffectsStyle");
+ assertXPath(pXmlDoc, sPathToParagraphStyle, "customStyle"_ostr, "1");
+
+ {
+ OString sPathToRun = sPathToParagraphStyle + "/w:rPr";
+
+ // Glow
+ OString sPathGlow = sPathToRun + "/w14:glow";
+ assertXPath(pXmlDoc, sPathGlow, "rad"_ostr, "63500");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:schemeClr", "val"_ostr, "accent2");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:schemeClr/w14:alpha", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathGlow+"/w14:schemeClr/w14:satMod", "val"_ostr, "175000");
+
+ // Shadow
+ OString sPathShadow = sPathToRun + "/w14:shadow";
+ assertXPath(pXmlDoc, sPathShadow, "blurRad"_ostr, "50800");
+ assertXPath(pXmlDoc, sPathShadow, "dist"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathShadow, "dir"_ostr, "16200000");
+ assertXPath(pXmlDoc, sPathShadow, "sx"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathShadow, "sy"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathShadow, "kx"_ostr, "0");
+ assertXPath(pXmlDoc, sPathShadow, "ky"_ostr, "0");
+ assertXPath(pXmlDoc, sPathShadow, "algn"_ostr, "b");
+ assertXPath(pXmlDoc, sPathShadow+"/w14:srgbClr", "val"_ostr, "000000");
+ assertXPath(pXmlDoc, sPathShadow+"/w14:srgbClr/w14:alpha", "val"_ostr, "60000");
+
+ // Reflection
+ OString sPathReflection = sPathToRun + "/w14:reflection";
+ assertXPath(pXmlDoc, sPathReflection, "blurRad"_ostr, "6350");
+ assertXPath(pXmlDoc, sPathReflection, "stA"_ostr, "50000");
+ assertXPath(pXmlDoc, sPathReflection, "stPos"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "endA"_ostr, "300");
+ assertXPath(pXmlDoc, sPathReflection, "endPos"_ostr, "50000");
+ assertXPath(pXmlDoc, sPathReflection, "dist"_ostr, "29997");
+ assertXPath(pXmlDoc, sPathReflection, "dir"_ostr, "5400000");
+ assertXPath(pXmlDoc, sPathReflection, "fadeDir"_ostr, "5400000");
+ assertXPath(pXmlDoc, sPathReflection, "sx"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathReflection, "sy"_ostr, "-100000");
+ assertXPath(pXmlDoc, sPathReflection, "kx"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "ky"_ostr, "0");
+ assertXPath(pXmlDoc, sPathReflection, "algn"_ostr, "bl");
+
+ // TextOutline
+ OString sPathTextOutline = sPathToRun + "/w14:textOutline";
+ assertXPath(pXmlDoc, sPathTextOutline, "w"_ostr, "25400");
+ assertXPath(pXmlDoc, sPathTextOutline, "cap"_ostr, "rnd");
+ assertXPath(pXmlDoc, sPathTextOutline, "cmpd"_ostr, "sng");
+ assertXPath(pXmlDoc, sPathTextOutline, "algn"_ostr, "ctr");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:alpha", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:lumMod", "val"_ostr, "75000");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:prstDash", "val"_ostr, "solid");
+ assertXPath(pXmlDoc, sPathTextOutline+"/w14:bevel", 1);
+
+ // TextFill
+ OString sPathTextFill = sPathToRun + "/w14:textFill";
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]", "pos"_ostr, "0");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha", "val"_ostr, "10000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod", "val"_ostr, "40000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumOff", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]", "pos"_ostr, "46000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod", "val"_ostr, "95000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff", "val"_ostr, "5000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]", "pos"_ostr, "100000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod", "val"_ostr, "60000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path", "path"_ostr, "circle");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "b"_ostr, "-30000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "r"_ostr, "50000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "t"_ostr, "130000");
+ assertXPath(pXmlDoc, sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect", "l"_ostr, "50000");
+
+ // Props3D
+ OString sPathProps3D = sPathToRun + "/w14:props3d";
+ assertXPath(pXmlDoc, sPathProps3D, "extrusionH"_ostr, "57150");
+ assertXPath(pXmlDoc, sPathProps3D, "contourW"_ostr, "12700");
+ assertXPath(pXmlDoc, sPathProps3D, "prstMaterial"_ostr, "metal");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "w"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "h"_ostr, "38100");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelT", "prst"_ostr, "angle");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelB", "w"_ostr, "69850");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelB", "h"_ostr, "69850");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:bevelB", "prst"_ostr, "divot");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val"_ostr, "20000");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val"_ostr, "80000");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:contourClr/w14:schemeClr", "val"_ostr, "accent1");
+ assertXPath(pXmlDoc, sPathProps3D+"/w14:contourClr/w14:schemeClr/w14:lumMod", "val"_ostr, "75000");
+
+ // Ligatures
+ OString sPathLigatures = sPathToRun + "/w14:ligatures";
+ assertXPath(pXmlDoc, sPathLigatures, "val"_ostr, "standard");
+
+ // NumForm
+ OString sPathNumForm = sPathToRun + "/w14:numForm";
+ assertXPath(pXmlDoc, sPathNumForm, "val"_ostr, "lining");
+
+ // NumSpacing
+ OString sPathNumSpacing = sPathToRun + "/w14:numSpacing";
+ assertXPath(pXmlDoc, sPathNumSpacing, "val"_ostr, "proportional");
+
+ // StylisticSets
+ OString sPathStylisticSets = sPathToRun + "/w14:stylisticSets";
+ assertXPath(pXmlDoc, sPathStylisticSets+"/w14:styleSet", "id"_ostr, "1");
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, Test_no_tag_if_no_fill)
+{
+ loadAndReload("tdf112103_tablebgnofill.docx");
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:shd"_ostr, 0);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */