summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/uiwriter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/uiwriter')
-rw-r--r--sw/qa/extras/uiwriter/data/AsCharTxBxTest.docxbin0 -> 19888 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/AtPageTextBoxCrash.odtbin0 -> 9880 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/DUMMY.odmbin0 -> 8336 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/DUMMY1.odtbin0 -> 8473 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/HiddenSection.odtbin0 -> 8378 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docxbin0 -> 14629 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odtbin0 -> 8629 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odtbin0 -> 8628 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/TC-table-DnD-move.docxbin0 -> 12977 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/TC-table-converttotable.docxbin0 -> 14913 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/TC-table-del-add.docxbin0 -> 13681 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/TC-table-rowadd.docxbin0 -> 13050 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/autotext-dotm.dotmbin0 -> 19456 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/autotext-empty.dotxbin0 -> 11390 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/autotext-gallery.dotxbin0 -> 18550 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/autotext-multiple.dotxbin0 -> 18470 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/collapsed_bookmark.odtbin0 -> 8199 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/commented-word.odtbin0 -> 9953 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/cp1000071.odtbin0 -> 9268 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/cp1000115.fodt208
-rw-r--r--sw/qa/extras/uiwriter/data/cross_reference_demo_bmk.odtbin0 -> 8443 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/datasource.odsbin0 -> 9596 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/demo91.fodt156
-rw-r--r--sw/qa/extras/uiwriter/data/draw-anchor-undo.odtbin0 -> 9823 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo112025-insert.docxbin0 -> 4090 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo112025.odtbin0 -> 8836 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo114306.odtbin0 -> 17107 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo114306_2.odtbin0 -> 38424 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo69893.odtbin0 -> 7178 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo70807.odtbin0 -> 22693 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo72942-insert.docxbin0 -> 11830 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo72942.docxbin0 -> 4980 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo75110.odtbin0 -> 13169 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo75898.odtbin0 -> 9446 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo82191.odtbin0 -> 10888 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo85554.odtbin0 -> 10091 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/fdo87448.odtbin0 -> 9989 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/floating-table-position.docxbin0 -> 13236 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/floating_table/small_floating_table.odtbin0 -> 8977 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.docbin0 -> 69120 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.docxbin0 -> 14282 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.odtbin0 -> 9331 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/floating_table/unfloatable_small_floating_table.docxbin0 -> 13381 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/hash#path/calc-data-source.odsbin0 -> 16055 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/hash#path/embedded-data-source.odtbin0 -> 9554 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/hello-world.pdfbin0 -> 6961 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/i95698.odtbin0 -> 10770 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/image-comment-at-char.odtbin0 -> 9985 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/image-comment.odtbin0 -> 9847 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/image.odtbin0 -> 9569 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/lines-in-section-in-table.odtbin0 -> 9396 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/lorem.fodt14
-rw-r--r--sw/qa/extras/uiwriter/data/merge-change1.odtbin0 -> 12057 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/merge-change2.odtbin0 -> 12300 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/num-parent-style.docxbin0 -> 14002 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/ofz18563.docxbin0 -> 7102 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/ole-save-while-edit.odtbin0 -> 14547 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/ole2.pngbin0 -> 766 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/paragraph-of-text-range.odtbin0 -> 8878 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/redline-autocorrect.fodt24
-rw-r--r--sw/qa/extras/uiwriter/data/redline-autocorrect2.fodt24
-rw-r--r--sw/qa/extras/uiwriter/data/redline-para-join.docxbin0 -> 13090 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/redlineFrame.fodt81
-rw-r--r--sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_inside.fodt73
-rw-r--r--sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_outside.fodt73
-rw-r--r--sw/qa/extras/uiwriter/data/redline_fly_at_para_one_paragraph.odtbin0 -> 9251 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_2nd_paragraph.fodt222
-rw-r--r--sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_end_inside.fodt228
-rw-r--r--sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_start_outside.fodt229
-rw-r--r--sw/qa/extras/uiwriter/data/rhbz1810732.docxbin0 -> 12107 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/rhbz739252-3.odtbin0 -> 20869 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/shape-page-move.odtbin0 -> 10137 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/shape-textbox-autosize.odtbin0 -> 12356 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odtbin0 -> 12049 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/shape-textbox.odtbin0 -> 10689 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/simplefooter.docxbin0 -> 18174 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/split-section-in-nested-table.fodt154
-rw-r--r--sw/qa/extras/uiwriter/data/table-in-sect.odtbin0 -> 11744 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf100018-1.odtbin0 -> 18795 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf100691.fodt230
-rw-r--r--sw/qa/extras/uiwriter/data/tdf101534.fodt28
-rw-r--r--sw/qa/extras/uiwriter/data/tdf103978_backgroundTextShape.docxbin0 -> 26058 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf104032.odtbin0 -> 8967 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf104425.odtbin0 -> 9459 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf104440.odtbin0 -> 8807 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf104492.docxbin0 -> 61554 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf104649.docxbin0 -> 75971 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf104814.docxbin0 -> 12830 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf105330.odtbin0 -> 8970 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf105413.fodt38
-rw-r--r--sw/qa/extras/uiwriter/data/tdf105417.odtbin0 -> 9238 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf105625.fodt9
-rw-r--r--sw/qa/extras/uiwriter/data/tdf106701_tabOverMarginAutotab.docbin0 -> 21504 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf106736-grid.odtbin0 -> 11498 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf106843.docxbin0 -> 13936 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf107025.odtbin0 -> 8337 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf107362.odtbin0 -> 10905 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf107893.odtbin0 -> 9133 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf107975.odtbin0 -> 10312 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf108124.odtbin0 -> 21575 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf108524.odtbin0 -> 9053 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf108687_tabstop.odtbin0 -> 12847 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf112109.fodt170
-rw-r--r--sw/qa/extras/uiwriter/data/tdf112160.fodt125
-rw-r--r--sw/qa/extras/uiwriter/data/tdf112342.docxbin0 -> 19601 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf112448.odtbin0 -> 10574 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf112741.fodt405
-rw-r--r--sw/qa/extras/uiwriter/data/tdf112860.fodt1394
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113153.fodt677
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113287.fodt291
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113445.fodt348
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113481-IVS.odtbin0 -> 9571 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113520.fodt292
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113686.fodt278
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113790.docxbin0 -> 5155 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odtbin0 -> 8742 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odtbin0 -> 9349 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odtbin0 -> 8886 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odtbin0 -> 7617 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odtbin0 -> 8518 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf114536.odtbin0 -> 13623 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf115065.odtbin0 -> 9972 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf115815.odtbin0 -> 9809 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf116403-considerborders.odtbin0 -> 9284 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf116789.fodt27
-rw-r--r--sw/qa/extras/uiwriter/data/tdf117225.odtbin0 -> 11015 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf117923.docxbin0 -> 21227 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf118311.fodt19
-rw-r--r--sw/qa/extras/uiwriter/data/tdf118699.docxbin0 -> 21417 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf119019.docxbin0 -> 13665 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf120336.docxbin0 -> 21892 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf120338.docxbin0 -> 14898 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf121546.odtbin0 -> 10044 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf122942.odtbin0 -> 9864 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf123102.odtbin0 -> 13674 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf123285.odtbin0 -> 11762 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf123786.fodt14
-rw-r--r--sw/qa/extras/uiwriter/data/tdf124397.docxbin0 -> 29518 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf124722.rtf873
-rw-r--r--sw/qa/extras/uiwriter/data/tdf124904.fodt40
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125151_protected.fodt11
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125151_protectedB.fodt14
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125261.odtbin0 -> 8900 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125310.fodt23
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125310b.fodt24
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125881.docxbin0 -> 34448 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125916.docxbin0 -> 40570 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126206.docxbin0 -> 12509 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126340.odtbin0 -> 9910 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126504.odtbin0 -> 9266 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126626.docxbin0 -> 16513 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126784_distributeSelectedColumns.odtbin0 -> 21302 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf127652.odtbin0 -> 26963 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128335.odtbin0 -> 10391 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128375.docxbin0 -> 6296 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128603.odtbin0 -> 10391 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128739.docxbin0 -> 4375 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128782.odtbin0 -> 8817 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128860.fodt14
-rw-r--r--sw/qa/extras/uiwriter/data/tdf129270.odtbin0 -> 9301 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf129382.docxbin0 -> 112383 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf129655-vtextbox.odtbin0 -> 9958 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf129805.docxbin0 -> 20783 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130094.fodt177
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130680.odtbin0 -> 97412 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130685.odtbin0 -> 24714 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130746.odtbin0 -> 9378 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130805.odtbin0 -> 9392 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf131684.docxbin0 -> 6506 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf131963.docxbin0 -> 34251 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132160.odtbin0 -> 9501 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132187.odtbin0 -> 10580 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132236.odtbin0 -> 10140 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132321.odtbin0 -> 9045 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132420.odtbin0 -> 11766 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132596.docxbin0 -> 11062 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132597.odtbin0 -> 132875 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132637_protectTrackChanges.docbin0 -> 26624 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132725.odtbin0 -> 73108 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132744.odtbin0 -> 13424 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132911.odtbin0 -> 10980 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132944.odtbin0 -> 9682 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133477.fodt21
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133490.odtbin0 -> 9606 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133524.fodt14
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133524_ro.fodt14
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133589.fodt19
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133967.odtbin0 -> 16689 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133982.docxbin0 -> 11705 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133990.odtbin0 -> 17859 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134021.docxbin0 -> 23096 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134227.docxbin0 -> 19455 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134250.fodt86
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134252.fodt95
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134253.odtbin0 -> 46144 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134404.odtbin0 -> 9928 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134436.fodt83
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134626.odtbin0 -> 9136 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134931.odtbin0 -> 9962 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134965.odtbin0 -> 45482 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135056.odtbin0 -> 19293 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135061.odtbin0 -> 10767 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135412.docxbin0 -> 22923 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135623.docxbin0 -> 25768 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135661.odtbin0 -> 10800 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135662.odtbin0 -> 13627 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135733.odtbin0 -> 11211 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf136385.odtbin0 -> 8759 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf136452.fodt80
-rw-r--r--sw/qa/extras/uiwriter/data/tdf136453.fodt66
-rw-r--r--sw/qa/extras/uiwriter/data/tdf136715.odtbin0 -> 11499 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf136778.docxbin0 -> 11761 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf137964.odtbin0 -> 9332 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf138130.docxbin0 -> 8977 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf138482.docxbin0 -> 18955 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf139127.fodt45
-rw-r--r--sw/qa/extras/uiwriter/data/tdf139638.odtbin0 -> 14273 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf139737.fodt306
-rw-r--r--sw/qa/extras/uiwriter/data/tdf139843.odtbin0 -> 38984 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf140828.docxbin0 -> 5393 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf140975.docxbin0 -> 5124 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf141175.odtbin0 -> 9574 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf142130.fodt37
-rw-r--r--sw/qa/extras/uiwriter/data/tdf142157.odtbin0 -> 10242 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf142196.fodt30
-rw-r--r--sw/qa/extras/uiwriter/data/tdf142700.fodt40
-rw-r--r--sw/qa/extras/uiwriter/data/tdf142715.odtbin0 -> 11275 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf143176.fodt20
-rw-r--r--sw/qa/extras/uiwriter/data/tdf143244.odtbin0 -> 9831 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf143760_ContourToWrapOff.docxbin0 -> 19612 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf143904.odtbin0 -> 9763 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf144058.fodt134
-rw-r--r--sw/qa/extras/uiwriter/data/tdf144317.odtbin0 -> 15696 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf144748.fodt82
-rw-r--r--sw/qa/extras/uiwriter/data/tdf144840.odtbin0 -> 9334 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf145091.docxbin0 -> 4753 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf145207.odtbin0 -> 14033 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf145311.fodt39
-rw-r--r--sw/qa/extras/uiwriter/data/tdf145321.odtbin0 -> 28467 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf145621.odtbin0 -> 9238 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf145731.odtbin0 -> 11459 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf146449.odtbin0 -> 21250 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf147006.rtf24
-rw-r--r--sw/qa/extras/uiwriter/data/tdf147126.docxbin0 -> 39793 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf147507.fodt77
-rw-r--r--sw/qa/extras/uiwriter/data/tdf147723.docxbin0 -> 22072 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf148799.docxbin0 -> 21690 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf148849.fodt53
-rw-r--r--sw/qa/extras/uiwriter/data/tdf149089.odtbin0 -> 90383 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf149550.docxbin0 -> 29727 bytes
-rwxr-xr-xsw/qa/extras/uiwriter/data/tdf151462.odtbin0 -> 17719 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf151993.docxbin0 -> 11913 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf153819.fodt174
-rw-r--r--sw/qa/extras/uiwriter/data/tdf34957.odtbin0 -> 19449 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf35021_tabOverMarginDemo.docbin0 -> 11264 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf38394.fodt52
-rw-r--r--sw/qa/extras/uiwriter/data/tdf39721.fodt42
-rw-r--r--sw/qa/extras/uiwriter/data/tdf39828.fodt57
-rw-r--r--sw/qa/extras/uiwriter/data/tdf45525.odtbin0 -> 11985 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf47471_paraStyleBackground.odtbin0 -> 13816 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf50447.fodt26
-rw-r--r--sw/qa/extras/uiwriter/data/tdf52391.fodt54
-rw-r--r--sw/qa/extras/uiwriter/data/tdf54819.fodt9
-rw-r--r--sw/qa/extras/uiwriter/data/tdf54819b.odtbin0 -> 17538 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf58604.odtbin0 -> 9780 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf61154.fodt132
-rw-r--r--sw/qa/extras/uiwriter/data/tdf64242_optimizeTable.odtbin0 -> 11060 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf66405.docxbin0 -> 13857 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf76636.docbin0 -> 13824 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf76817.docxbin0 -> 18584 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf76817.fodt77
-rw-r--r--sw/qa/extras/uiwriter/data/tdf77014.odtbin0 -> 8161 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf78727.docxbin0 -> 15004 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf83260-1.odtbin0 -> 9422 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf83798.odtbin0 -> 9423 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf84695-tab.odtbin0 -> 9833 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf84695.odtbin0 -> 9769 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf86639.rtf3
-rw-r--r--sw/qa/extras/uiwriter/data/tdf87922.odtbin0 -> 8866 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf88453-table.odtbin0 -> 27182 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf88453.odtbin0 -> 21235 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf89720.odtbin0 -> 11283 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf89954.odtbin0 -> 10022 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf90003.odtbin0 -> 8515 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf90069.docxbin0 -> 4737 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf90362.fodt12
-rw-r--r--sw/qa/extras/uiwriter/data/tdf90883.odtbin0 -> 8759 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf91292_paraBackground.docxbin0 -> 4262 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf91801.fodt21
-rw-r--r--sw/qa/extras/uiwriter/data/tdf92648.docxbin0 -> 70406 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf95699.odtbin0 -> 8925 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf96943.odtbin0 -> 8797 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf97601.odtbin0 -> 14942 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf98987.docxbin0 -> 19509 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf99004.docxbin0 -> 18435 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf99689.odtbin0 -> 15771 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf99689_figures.odtbin0 -> 466344 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf99689_tables.odtbin0 -> 11267 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/testFontEmbedding.odtbin0 -> 8830 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/testInconsistentBookmark.ottbin0 -> 10488 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/test_anchor_as_character.odtbin0 -> 10284 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/textfield-getanchor-gettext-in-footer.odtbin0 -> 8966 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/threadedException.fodt530
-rw-r--r--sw/qa/extras/uiwriter/data/try2.fodt66
-rw-r--r--sw/qa/extras/uiwriter/data/txbx_crash.odtbin0 -> 9369 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/udindex3.odtbin0 -> 11068 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/unicodeAltX.odtbin0 -> 19978 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/uno-cycle.odtbin0 -> 9118 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/variable-field-table-row-split-header.fodt270
-rw-r--r--sw/qa/extras/uiwriter/data/watermark-position.odtbin0 -> 8769 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/watermark.docxbin0 -> 18768 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx1754
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx3235
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx4523
-rw-r--r--sw/qa/extras/uiwriter/uiwriter4.cxx2242
-rw-r--r--sw/qa/extras/uiwriter/uiwriter5.cxx2992
-rw-r--r--sw/qa/extras/uiwriter/uiwriter6.cxx2352
-rw-r--r--sw/qa/extras/uiwriter/uiwriter7.cxx2818
318 files changed, 29813 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/AsCharTxBxTest.docx b/sw/qa/extras/uiwriter/data/AsCharTxBxTest.docx
new file mode 100644
index 000000000..7603b80d2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/AsCharTxBxTest.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/AtPageTextBoxCrash.odt b/sw/qa/extras/uiwriter/data/AtPageTextBoxCrash.odt
new file mode 100644
index 000000000..20e58dfc0
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/AtPageTextBoxCrash.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/DUMMY.odm b/sw/qa/extras/uiwriter/data/DUMMY.odm
new file mode 100644
index 000000000..6c6713604
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/DUMMY.odm
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/DUMMY1.odt b/sw/qa/extras/uiwriter/data/DUMMY1.odt
new file mode 100644
index 000000000..127b4a7c6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/DUMMY1.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/HiddenSection.odt b/sw/qa/extras/uiwriter/data/HiddenSection.odt
new file mode 100644
index 000000000..8358cbc99
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/HiddenSection.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docx b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docx
new file mode 100644
index 000000000..d72725c88
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odt b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odt
new file mode 100644
index 000000000..bd0abdc4d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odt b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odt
new file mode 100644
index 000000000..407fdf468
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/TC-table-DnD-move.docx b/sw/qa/extras/uiwriter/data/TC-table-DnD-move.docx
new file mode 100644
index 000000000..f231d6f84
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/TC-table-DnD-move.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/TC-table-converttotable.docx b/sw/qa/extras/uiwriter/data/TC-table-converttotable.docx
new file mode 100644
index 000000000..9af615ba8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/TC-table-converttotable.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/TC-table-del-add.docx b/sw/qa/extras/uiwriter/data/TC-table-del-add.docx
new file mode 100644
index 000000000..841e63f0d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/TC-table-del-add.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/TC-table-rowadd.docx b/sw/qa/extras/uiwriter/data/TC-table-rowadd.docx
new file mode 100644
index 000000000..b654b9590
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/TC-table-rowadd.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/autotext-dotm.dotm b/sw/qa/extras/uiwriter/data/autotext-dotm.dotm
new file mode 100644
index 000000000..4909296d2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/autotext-dotm.dotm
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/autotext-empty.dotx b/sw/qa/extras/uiwriter/data/autotext-empty.dotx
new file mode 100644
index 000000000..0d9f51dc2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/autotext-empty.dotx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/autotext-gallery.dotx b/sw/qa/extras/uiwriter/data/autotext-gallery.dotx
new file mode 100644
index 000000000..827ec60c2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/autotext-gallery.dotx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/autotext-multiple.dotx b/sw/qa/extras/uiwriter/data/autotext-multiple.dotx
new file mode 100644
index 000000000..83b083992
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/autotext-multiple.dotx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/collapsed_bookmark.odt b/sw/qa/extras/uiwriter/data/collapsed_bookmark.odt
new file mode 100644
index 000000000..66cc65dd1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/collapsed_bookmark.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/commented-word.odt b/sw/qa/extras/uiwriter/data/commented-word.odt
new file mode 100644
index 000000000..ab423faa2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/commented-word.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/cp1000071.odt b/sw/qa/extras/uiwriter/data/cp1000071.odt
new file mode 100644
index 000000000..109e39986
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/cp1000071.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/cp1000115.fodt b/sw/qa/extras/uiwriter/data/cp1000115.fodt
new file mode 100644
index 000000000..55227ff56
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/cp1000115.fodt
@@ -0,0 +1,208 @@
+<?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 Hindi" svg:font-family="&apos;Lohit Hindi&apos;, &apos;Times New Roman&apos;"/>
+ <style:font-face style:name="Liberation Serif1" svg:font-family="&apos;Liberation Serif&apos;, &apos;Times New Roman&apos;" style:font-family-generic="roman"/>
+ <style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Droid Sans Fallback" svg:font-family="&apos;Droid Sans Fallback&apos;, &apos;Times New Roman&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" 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="Tahoma" svg:font-family="Tahoma" 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="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Tahoma" 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: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="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Tahoma" 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"/>
+ </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: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="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="Tahoma" style:font-family-asian="Tahoma" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&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" loext:contextual-spacing="false" fo:line-height="120%"/>
+ </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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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" loext: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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss" 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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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:paragraph-properties fo:margin-top="0.101cm" fo:margin-bottom="0.101cm" loext:contextual-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties fo:font-size="10pt" fo:font-weight="normal" 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="Standard_20__28_user_29_" style:display-name="Standard (user)" style:family="paragraph">
+ <style:paragraph-properties fo:orphans="0" fo:widows="0" fo:hyphenation-ladder-count="no-limit" style:vertical-align="baseline"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif1" fo:font-family="&apos;Liberation Serif&apos;, &apos;Times New Roman&apos;" style:font-family-generic="roman" fo:font-size="12pt" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-family-asian="&apos;Droid Sans Fallback&apos;, &apos;Times New Roman&apos;" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:font-name-complex="Lohit Hindi" style:font-family-complex="&apos;Lohit Hindi&apos;, &apos;Times New Roman&apos;" 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:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard_20__28_user_29_" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabel1" style:family="table">
+ <style:table-properties style:width="17.713cm" fo:margin-left="0cm" fo:break-before="page" table:align="left"/>
+ </style:style>
+ <style:style style:name="Tabel1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.885cm"/>
+ </style:style>
+ <style:style style:name="Tabel1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.828cm"/>
+ </style:style>
+ <style:style style:name="Tabel1.1" style:family="table-row">
+ <style:table-row-properties style:min-row-height="0.002cm"/>
+ </style:style>
+ <style:style style:name="Tabel1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.4cm" fo:padding-top="0.101cm" fo:padding-bottom="0.101cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Tabel1.B1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent" fo:padding-left="0.101cm" fo:padding-right="0.4cm" fo:padding-top="0.101cm" fo:padding-bottom="0.101cm" fo:border="none">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Tabel2" style:family="table">
+ <style:table-properties style:width="8.327cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Tabel2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.432cm" style:rel-column-width="19138*"/>
+ </style:style>
+ <style:style style:name="Tabel2.B" style:family="table-column">
+ <style:table-column-properties style:column-width="5.895cm" style:rel-column-width="46397*"/>
+ </style:style>
+ <style:style style:name="Tabel2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Tabel2.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Tabel3" style:family="table">
+ <style:table-properties style:width="8.327cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Tabel3.A" style:family="table-column">
+ <style:table-column-properties style:column-width="1.697cm" style:rel-column-width="13354*"/>
+ </style:style>
+ <style:style style:name="Tabel3.B" style:family="table-column">
+ <style:table-column-properties style:column-width="2.464cm" style:rel-column-width="19392*"/>
+ </style:style>
+ <style:style style:name="Tabel3.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.69cm" style:rel-column-width="21169*"/>
+ </style:style>
+ <style:style style:name="Tabel3.D" style:family="table-column">
+ <style:table-column-properties style:column-width="1.476cm" style:rel-column-width="11620*"/>
+ </style:style>
+ <style:style style:name="Tabel3.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Tabel3.D1" 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="Standard">
+ <style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" fo:font-weight="bold" officeooo:paragraph-rsid="00168480" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties fo:font-size="8pt" officeooo:paragraph-rsid="00168480" fo:background-color="transparent" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:paragraph-rsid="00168480"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties fo:font-size="8pt" fo:font-weight="bold" officeooo:paragraph-rsid="00168480" style:font-size-asian="8pt" style:font-weight-asian="bold" style:font-size-complex="8pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Heading_20_3">
+ <style:text-properties fo:font-size="10pt" fo:font-weight="normal" officeooo:paragraph-rsid="00168480" fo:background-color="transparent" style:font-size-asian="10pt" style:font-weight-asian="normal" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Heading_20_3">
+ <style:text-properties officeooo:paragraph-rsid="00168480"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="9.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="1.3cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text: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-decls>
+ <table:table table:name="Tabel1" table:style-name="Tabel1">
+ <table:table-column table:style-name="Tabel1.A"/>
+ <table:table-column table:style-name="Tabel1.B"/>
+ <table:table-row table:style-name="Tabel1.1">
+ <table:table-cell table:style-name="Tabel1.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Start.</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel1.B1" office:value-type="string">
+ <table:table table:name="Tabel2" table:style-name="Tabel2">
+ <table:table-column table:style-name="Tabel2.A"/>
+ <table:table-column table:style-name="Tabel2.B"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabel2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">First table.</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel2.B1" office:value-type="string">
+ <text:p text:style-name="Standard"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:h text:style-name="Heading_20_3" text:outline-level="3">one point one<text:line-break/></text:h>
+ <text:h text:style-name="Heading_20_3" text:outline-level="3">two point one<text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:soft-page-break/></text:h>
+ <table:table table:name="Tabel3" table:style-name="Tabel3">
+ <table:table-column table:style-name="Tabel3.A"/>
+ <table:table-column table:style-name="Tabel3.B"/>
+ <table:table-column table:style-name="Tabel3.C"/>
+ <table:table-column table:style-name="Tabel3.D"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabel3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents">2nd</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel3.D1" 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">End.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P1"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/cross_reference_demo_bmk.odt b/sw/qa/extras/uiwriter/data/cross_reference_demo_bmk.odt
new file mode 100644
index 000000000..df8d95f91
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/cross_reference_demo_bmk.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/datasource.ods b/sw/qa/extras/uiwriter/data/datasource.ods
new file mode 100644
index 000000000..81d784406
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/datasource.ods
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/demo91.fodt b/sw/qa/extras/uiwriter/data/demo91.fodt
new file mode 100644
index 000000000..de27c587a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/demo91.fodt
@@ -0,0 +1,156 @@
+<?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:creation-date>2022-06-16T15:27:43.487415219</meta:creation-date><meta:editing-duration>PT29M</meta:editing-duration><meta:editing-cycles>32</meta:editing-cycles><meta:generator>LibreOfficeDev/7.6.0.0.alpha0$Linux_X86_64 LibreOffice_project/fc6bd4f18ea90f789a1425e2c830f4b42457012e</meta:generator><dc:date>2022-06-22T20:18:58.711000000</dc:date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="5" meta:word-count="11" meta:character-count="52" meta:non-whitespace-character-count="44"/></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Arial Unicode MS1" svg:font-family="'Arial Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Songti SC" svg:font-family="'Songti SC'" 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: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%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="nl" fo:country="NL" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" 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="nl" fo:country="NL" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" 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: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="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="_5f__5f_XXX_5f__5f__5f_invalid" style:display-name="__XXX___invalid" style:family="text"/>
+ <style:style style:name="Line_20_numbering" style:display-name="Line numbering" style:family="text"/>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%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: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:style-name="Line_20_numbering" 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="Standard">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:text-properties fo:background-color="#ffff00"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#fc5c00"/>
+ </style:style>
+ <style:style style:name="P7" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#ffd74c"/>
+ </style:style>
+ <style:style style:name="T3" style:family="text">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="T4" style:family="text">
+ <style:text-properties/>
+ </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="2.335cm" fo:min-width="3.805cm" 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:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#fc5c00" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="2.335cm" fo:min-width="3.805cm" 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:style>
+ <style:style style:name="gr3" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#ffd74c" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="2.335cm" fo:min-width="3.805cm" 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:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P1"/>
+ <text:p text:style-name="P4"><draw:custom-shape text:anchor-type="paragraph" draw:z-index="0" draw:name="Shape 2" draw:style-name="gr3" draw:text-style-name="P7" svg:width="3.805cm" svg:height="2.336cm" svg:x="7.482cm" svg:y="4.052cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape><draw:custom-shape text:anchor-type="char" draw:z-index="1" draw:name="Shape 3" draw:style-name="gr2" draw:text-style-name="P6" svg:width="3.805cm" svg:height="2.336cm" svg:x="11.382cm" svg:y="4.062cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape><text:span text:style-name="T4">yellow</text:span><draw:custom-shape text:anchor-type="char" draw:z-index="2" draw:name="Shape 4" draw:style-name="gr1" svg:width="3.805cm" svg:height="2.336cm" svg:x="3.554cm" svg:y="4.041cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape> <text:span text:style-name="T4">at end</text:span><text:span text:style-name="T3">orange</text:span><draw:custom-shape text:anchor-type="char" draw:z-index="4" draw:name="Shape 4" draw:style-name="gr2" draw:text-style-name="P6" svg:width="3.805cm" svg:height="2.336cm" svg:x="15.187cm" svg:y="4.062cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/draw-anchor-undo.odt b/sw/qa/extras/uiwriter/data/draw-anchor-undo.odt
new file mode 100644
index 000000000..370799cd4
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/draw-anchor-undo.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo112025-insert.docx b/sw/qa/extras/uiwriter/data/fdo112025-insert.docx
new file mode 100644
index 000000000..f915806e4
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo112025-insert.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo112025.odt b/sw/qa/extras/uiwriter/data/fdo112025.odt
new file mode 100644
index 000000000..6d2037018
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo112025.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo114306.odt b/sw/qa/extras/uiwriter/data/fdo114306.odt
new file mode 100644
index 000000000..5a7d2f9ca
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo114306.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo114306_2.odt b/sw/qa/extras/uiwriter/data/fdo114306_2.odt
new file mode 100644
index 000000000..b4bebc58a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo114306_2.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo69893.odt b/sw/qa/extras/uiwriter/data/fdo69893.odt
new file mode 100644
index 000000000..a2f7aa769
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo69893.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo70807.odt b/sw/qa/extras/uiwriter/data/fdo70807.odt
new file mode 100644
index 000000000..c22e24fa8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo70807.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo72942-insert.docx b/sw/qa/extras/uiwriter/data/fdo72942-insert.docx
new file mode 100644
index 000000000..fb1f80c4a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo72942-insert.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo72942.docx b/sw/qa/extras/uiwriter/data/fdo72942.docx
new file mode 100644
index 000000000..0906ec464
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo72942.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo75110.odt b/sw/qa/extras/uiwriter/data/fdo75110.odt
new file mode 100644
index 000000000..f4c2f2bb6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo75110.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo75898.odt b/sw/qa/extras/uiwriter/data/fdo75898.odt
new file mode 100644
index 000000000..81a506252
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo75898.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo82191.odt b/sw/qa/extras/uiwriter/data/fdo82191.odt
new file mode 100644
index 000000000..e34105834
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo82191.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo85554.odt b/sw/qa/extras/uiwriter/data/fdo85554.odt
new file mode 100644
index 000000000..9c30b8d0f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo85554.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/fdo87448.odt b/sw/qa/extras/uiwriter/data/fdo87448.odt
new file mode 100644
index 000000000..3618dcd96
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo87448.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/floating-table-position.docx b/sw/qa/extras/uiwriter/data/floating-table-position.docx
new file mode 100644
index 000000000..de7a467aa
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/floating-table-position.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/floating_table/small_floating_table.odt b/sw/qa/extras/uiwriter/data/floating_table/small_floating_table.odt
new file mode 100644
index 000000000..6b77569f2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/floating_table/small_floating_table.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.doc b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.doc
new file mode 100644
index 000000000..e5247f159
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.doc
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.docx b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.docx
new file mode 100644
index 000000000..cef1f7bf6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.odt b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.odt
new file mode 100644
index 000000000..eb2534ba4
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_floating_table.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/floating_table/unfloatable_small_floating_table.docx b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_small_floating_table.docx
new file mode 100644
index 000000000..d51056af1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/floating_table/unfloatable_small_floating_table.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/hash#path/calc-data-source.ods b/sw/qa/extras/uiwriter/data/hash#path/calc-data-source.ods
new file mode 100644
index 000000000..0dec1df7d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/hash#path/calc-data-source.ods
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/hash#path/embedded-data-source.odt b/sw/qa/extras/uiwriter/data/hash#path/embedded-data-source.odt
new file mode 100644
index 000000000..2eb54c5fb
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/hash#path/embedded-data-source.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/hello-world.pdf b/sw/qa/extras/uiwriter/data/hello-world.pdf
new file mode 100644
index 000000000..ae2fa81b9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/hello-world.pdf
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/i95698.odt b/sw/qa/extras/uiwriter/data/i95698.odt
new file mode 100644
index 000000000..9fe3ec207
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/i95698.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/image-comment-at-char.odt b/sw/qa/extras/uiwriter/data/image-comment-at-char.odt
new file mode 100644
index 000000000..ac6a06780
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/image-comment-at-char.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/image-comment.odt b/sw/qa/extras/uiwriter/data/image-comment.odt
new file mode 100644
index 000000000..4f0a520bc
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/image-comment.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/image.odt b/sw/qa/extras/uiwriter/data/image.odt
new file mode 100644
index 000000000..195f8836c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/image.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/lines-in-section-in-table.odt b/sw/qa/extras/uiwriter/data/lines-in-section-in-table.odt
new file mode 100644
index 000000000..4f0abd6e5
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/lines-in-section-in-table.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/lorem.fodt b/sw/qa/extras/uiwriter/data/lorem.fodt
new file mode 100644
index 000000000..1996ef8de
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/lorem.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:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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>
+ <text:p>Lorem ipsum...</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/merge-change1.odt b/sw/qa/extras/uiwriter/data/merge-change1.odt
new file mode 100644
index 000000000..02bd488a1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/merge-change1.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/merge-change2.odt b/sw/qa/extras/uiwriter/data/merge-change2.odt
new file mode 100644
index 000000000..3644f8149
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/merge-change2.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/num-parent-style.docx b/sw/qa/extras/uiwriter/data/num-parent-style.docx
new file mode 100644
index 000000000..4b8c657af
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/num-parent-style.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/ofz18563.docx b/sw/qa/extras/uiwriter/data/ofz18563.docx
new file mode 100644
index 000000000..6733db44a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/ofz18563.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt b/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt
new file mode 100644
index 000000000..33a2284dd
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/ole2.png b/sw/qa/extras/uiwriter/data/ole2.png
new file mode 100644
index 000000000..fdad35484
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/ole2.png
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/paragraph-of-text-range.odt b/sw/qa/extras/uiwriter/data/paragraph-of-text-range.odt
new file mode 100644
index 000000000..52cdb0be1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/paragraph-of-text-range.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/redline-autocorrect.fodt b/sw/qa/extras/uiwriter/data/redline-autocorrect.fodt
new file mode 100644
index 000000000..ce874d299
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redline-autocorrect.fodt
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94099223789984" text:id="ct94099223789984">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>NL</dc:creator>
+ <dc:date>2020-11-03T19:19:05</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="P1"><text:change-start text:change-id="ct94099223789984"/>t<text:change-end text:change-id="ct94099223789984"/>s</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/redline-autocorrect2.fodt b/sw/qa/extras/uiwriter/data/redline-autocorrect2.fodt
new file mode 100644
index 000000000..4d65c5f46
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redline-autocorrect2.fodt
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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="GB"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94099223789984" text:id="ct94099223789984">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2020-11-03T19:19:05</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="P1">Lorem<text:change-start text:change-id="ct94099223789984"/>,<text:change-end text:change-id="ct94099223789984"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/redline-para-join.docx b/sw/qa/extras/uiwriter/data/redline-para-join.docx
new file mode 100644
index 000000000..c1ed90f80
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redline-para-join.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/redlineFrame.fodt b/sw/qa/extras/uiwriter/data/redlineFrame.fodt
new file mode 100644
index 000000000..31c5f50bd
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redlineFrame.fodt
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>ms </meta:initial-creator><meta:creation-date>2015-08-24T21:49:45.305718699</meta:creation-date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/><meta:generator>LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Regular" svg:font-family="&apos;Source Han Sans CN Regular&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+
+ <text:tracked-changes>
+ <text:changed-region xml:id="ct52929984" text:id="ct52929984">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>ms </dc:creator>
+ <dc:date>2015-09-10T15:36:00</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct58510944" text:id="ct58510944">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>ms </dc:creator>
+ <dc:date>2015-09-10T15:36:00</dc:date>
+ </office:change-info>
+ <text:p text:style-name="P1"/>
+ <text:p text:style-name="P1">Removed text</text:p>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="char" svg:width="2cm" draw:z-index="0"><draw:text-box fo:min-height="0.499cm"><text:p text:style-name="Frame_20_contents"/></draw:text-box></draw:frame><text:change-start text:change-id="ct52929984"/>Added text<text:change-end text:change-id="ct52929984"/><text:change text:change-id="ct58510944"/></text:p>
+
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_inside.fodt b/sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_inside.fodt
new file mode 100644
index 000000000..6048b32bd
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_inside.fodt
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>ms </meta:initial-creator><meta:creation-date>2015-08-24T21:49:45.305718699</meta:creation-date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/><meta:generator>LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Regular" svg:font-family="&apos;Source Han Sans CN Regular&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+
+ <text:tracked-changes>
+ <text:changed-region xml:id="ct58510944" text:id="ct58510944">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>ms </dc:creator>
+ <dc:date>2015-09-10T15:36:00</dc:date>
+ </office:change-info>
+ <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="char" svg:width="2cm" draw:z-index="0"><draw:text-box fo:min-height="0.499cm"><text:p text:style-name="Frame_20_contents"/></draw:text-box></draw:frame></text:p>
+ <text:p text:style-name="P1">Removed text</text:p>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="P1">foo<text:change text:change-id="ct58510944"/></text:p>
+
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_outside.fodt b/sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_outside.fodt
new file mode 100644
index 000000000..d838406c6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redlineFrame_at_char_start_outside.fodt
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>ms </meta:initial-creator><meta:creation-date>2015-08-24T21:49:45.305718699</meta:creation-date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/><meta:generator>LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Regular" svg:font-family="&apos;Source Han Sans CN Regular&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+
+ <text:tracked-changes>
+ <text:changed-region xml:id="ct58510944" text:id="ct58510944">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>ms </dc:creator>
+ <dc:date>2015-09-10T15:36:00</dc:date>
+ </office:change-info>
+ <text:p text:style-name="P1"/>
+ <text:p text:style-name="P1">Removed text</text:p>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="P1">foo<draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="char" svg:width="2cm" draw:z-index="0"><draw:text-box fo:min-height="0.499cm"><text:p text:style-name="Frame_20_contents"/></draw:text-box></draw:frame><text:change text:change-id="ct58510944"/></text:p>
+
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/redline_fly_at_para_one_paragraph.odt b/sw/qa/extras/uiwriter/data/redline_fly_at_para_one_paragraph.odt
new file mode 100644
index 000000000..a4b41e4ec
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redline_fly_at_para_one_paragraph.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_2nd_paragraph.fodt b/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_2nd_paragraph.fodt
new file mode 100644
index 000000000..230159513
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_2nd_paragraph.fodt
@@ -0,0 +1,222 @@
+<?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="Wingdings" svg:font-family="Wingdings" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Symbol" svg:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Scala-Regular" svg:font-family="Scala-Regular"/>
+ <style:font-face style:name="ScalaPro-Regular" svg:font-family="ScalaPro-Regular"/>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
+ <style:font-face style:name="Courier New" svg:font-family="&apos;Courier New&apos;" style:font-family-generic="modern"/>
+ <style:font-face style:name="ScalaPro-Bold" svg:font-family="ScalaPro-Bold" style:font-family-generic="roman"/>
+ <style:font-face style:name="Arial4" svg:font-family="Arial, Arial" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial2" svg:font-family="Arial" style:font-adornments="Fett" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial3" svg:font-family="Arial" style:font-adornments="Standard" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="DejaVu Sans" svg:font-family="&apos;DejaVu Sans&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="#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: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="11pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu 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: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="11pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu 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"/>
+ </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="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.212cm" loext:contextual-spacing="false"/>
+ </style:style>
+ <style:style style:name="RGUgliederung" style:family="paragraph" style:parent-style-name="Standard" style:list-style-name="WW8Num6">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.529cm" loext:contextual-spacing="false" style:line-height-at-least="0.529cm" fo:text-indent="0cm" style:auto-text-indent="false" style:text-autospace="none" style:punctuation-wrap="simple" style:vertical-align="baseline">
+ <style:tab-stops>
+ <style:tab-stop style:position="0.751cm"/>
+ <style:tab-stop style:position="16.277cm"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ <style:text-properties style:font-size-complex="10pt"/>
+ </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" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
+ </style:style>
+ <style:style style:name="WW8Num6z1" style:family="text">
+ <style:text-properties style:font-name="Courier New" fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern"/>
+ </style:style>
+ <style:style style:name="WW8Num6z0" style:family="text">
+ <style:text-properties style:font-name="Wingdings" fo:font-family="Wingdings" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ </style:style>
+ <style:style style:name="WW8Num6z3" style:family="text">
+ <style:text-properties style:font-name="Symbol" fo:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ </style:style>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <text:list-style style:name="WW8Num6" text:consecutive-numbering="true">
+ <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+ <style:list-level-properties text:space-before="0.635cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="2" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="1.905cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="3" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="3.175cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="4" text:style-name="WW8Num6z3" text:bullet-char="ï‚·">
+ <style:list-level-properties text:space-before="4.445cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="5" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="5.715cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="6" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="6.985cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="7" text:style-name="WW8Num6z3" text:bullet-char="ï‚·">
+ <style:list-level-properties text:space-before="8.255cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="8" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="9.525cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="9" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="10.795cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-number text:level="10" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="6.35cm" text:min-label-width="0.635cm"/>
+ </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="RGUgliederung" style:list-style-name="WW8Num6">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial1" fo:font-size="11pt" fo:font-weight="normal" officeooo:rsid="0036e634" officeooo:paragraph-rsid="002d5bb4" style:font-name-asian="Scala-Regular" style:font-size-asian="11pt" style:font-weight-asian="normal" style:font-name-complex="Scala-Regular" style:font-size-complex="11pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial2" fo:font-size="11pt" fo:font-weight="normal" officeooo:rsid="0036e634" officeooo:paragraph-rsid="002d5bb4" style:font-name-asian="Scala-Regular" style:font-size-asian="11pt" style:font-weight-asian="normal" style:font-name-complex="Scala-Regular" style:font-size-complex="11pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:color="#231f20" style:font-name="Arial3" fo:font-size="10pt" fo:font-style="normal" fo:font-weight="normal" style:font-name-asian="ScalaPro-Regular" style:font-size-asian="10pt" style:font-name-complex="ScalaPro-Regular" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties fo:color="#231f20" style:font-name="Arial3" fo:font-size="10pt" fo:font-style="normal" fo:font-weight="normal" style:font-name-asian="ScalaPro-Bold" style:font-size-asian="10pt" style:font-name-complex="ScalaPro-Bold" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="T3" style:family="text">
+ <style:text-properties style:font-name="Arial1" fo:font-size="11pt" style:text-underline-style="none" fo:font-weight="bold" style:font-name-asian="ScalaPro-Regular" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-name-complex="ScalaPro-Regular" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T4" style:family="text">
+ <style:text-properties style:font-name="Arial1" fo:font-size="11pt" style:text-underline-style="none" fo:font-weight="bold" style:font-name-asian="Arial4" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-name-complex="Arial1" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T5" style:family="text">
+ <style:text-properties style:font-name="Arial2" style:font-name-asian="ScalaPro-Regular" style:font-name-complex="ScalaPro-Regular"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" 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="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes>
+ <text:changed-region xml:id="ct121341168" text:id="ct121341168">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2019-12-04T18:05:04</dc:date>
+ </office:change-info>
+ <text:p text:style-name="P1">x</text:p>
+ <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="paragraph" svg:width="0.67cm" svg:height="0.67cm" draw:z-index="0"><draw:image loext:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAHoAAAAlCAYAAACNgf3GAAAACXBIWXMAAA66AAAOoQG8if1I
+ AAAG5klEQVR4nO1bbUwURxguFkqDZ7iKkIK0IiHBYjVcUzwRkQiFShPaBk21NhICP2wLBUlo
+ +PComMJRBU6OAyR3FUgjFmnAClEIBpXwlYoGQ0NV1BqhBAuRgtUaUKDz/LiErHt7H7PHbdZ7
+ EkLYOebdvWfemfd5ZtZxYWHhFTvED0db34AdSwM70VbAwMBA2MjIiL+t4q9du/b3gICA3sXX
+ 7ETzjOvXr4dnZWW1PH/+/DVbxF+9evUdtVq9hXnd6kSTGsCB/CwjmLN2LFvj3r17G3Jzcxtt
+ RbKrq+uEUqmMxm9mm1WJHhsb89VqtYU5OTmfWTOOEDAxMeF98ODB80+ePHG1RXxnZ+f/8vLy
+ Yry8vO6wtVuFaGTwmTNnUqqrq/M2bdp0XuzZDHJBMsi2RXx8vyT+5+vWrfvN0Gd4J3p4ePid
+ oqKiqhs3bmzG33K5/BzfMYQETNOHDx9uxLRtq3vYv39/enBwcBPXZ3gjem5uzrGuri6ztrZW
+ 8ezZM2dcc3BwWCAZ3cJXDKEB9QcGdX9/fzhbe0RERG1ycvI3tHGqqqrym5ubv2Jri4mJOR4b
+ G1tirA9eiL59+/Z7xcXFJ+7evRu4+Lqfn1+/VCod5yOGEEEIULa3t3/B1iaTyS6mp6cnODo6
+ ztLEuHDhQpwhkpHFpg4kKqJnZ2dfP3ny5Hf19fXfIqOZ7WKetvHlYwZja4OOPXToUCwtyZBq
+ KpVKx9aG9Rjrsqn1j8VEDw4OhiCLuYwBFGKW9i9k9Pb2flxWVqZha3N3d/8rPz//o+XLl0/T
+ xOCSatDKqLBRaZvan9lEP336VIIpq6mpKWl+fn6Zoc+tWLFi0t/fv8/c/oWOmzdvygmRP5Nn
+ f5XZBnJBMsimicEl1bi0MhfMIvratWuRJSUl2gcPHvgY+2xQUFCr2GQVFIVCoWiemZlxYbZh
+ miYZGItpmyYGl1QzppW5YBLRjx8/llZWVqra2triUWma8j9iW5/xxWdmZrZNT0+7M9swoEnb
+ vsDAwIs0MbikmilamQtGie7u7v5Uo9GUP3z40Mucjnt6ej6BuW/JTQkReBZDhggq37CwsHqa
+ /o1JNcQwppW5YJDoqakpj/Ly8tLLly/vtqTjjo4O0duewJ49e36AlqXth0uq8RGDlWgErKio
+ UD969MiNpnOxA4ZIQkJCNm0/XFKNrxgvEI11uLCwsJq2Y7FDIpFMpaamfgn3j6af+/fvBxiS
+ apBRMF1oYwAvEB0VFVUjlUr/VqvVlePj42/TBhArUKDiO8rIyNhHQ8SaNWv+wLR89uzZZGbb
+ 6OioX0tLSyIfSwPr1A1/WqfTvUvWjQJMK1x6+WUGljiimUcSExOzaPpJSkpKIQPnDbY1Gtm+
+ atWqUZpCDDBYjLm4uPxLKr3k7du3n1KpVD9CQ5rTMR4epgnNzQkJyDg22YO11cPDY5gm6zAj
+ YIqenJz0ZFbdMGZg0Bw5ciRq/fr13ZbGMCqvSOc9REPLsCt1+vTpDKL1nEzpGA8fHh5+ytIb
+ Expg55I1uZdNYiHrsHkTGhraYGn/MFzgj6elpXUyBxQMGqKhzx07dizUUkPGJMPEyclpJj4+
+ Pmfbtm2/wN8eGhp639j/9PX17RAT0bA1jx49GnHgwIEupmmCrFMqlacKCgqiaUwTvYXKNqD0
+ jhmpC4ItsVjNskB9fX0HNBrN5sbGxtSamprv2axAPa5evfohTpqQaWne3JsSKry9vYdgQZJp
+ 9iLz2eFqYROCJusAkEgGzQ4S4xJzQOk9cMQwd9PE7E0NWHG7du1ShYSE/EoC6gw5OTBcbt26
+ FWSpZSdU6LcHQSpzY4M26/Tw8fEZNDSgMK3DJsXGhjnboBZvU3p6ev5JCoQPWltbE7RabRHk
+ BvMzV65ciRYb0YB+w7+0tLSC2UaTdYvBNaCQXFgqFArFbqvvRwOoFqOjo0/I5fLzZEov6+rq
+ il3cjnU6Li4ulyaGUIEqGz4Dm6NladYxwTWgOjs7d6IITElJ+dqUvng5SrRy5coxUjHuBNHY
+ ACEy4U1cJ0VbEKZwsR4ngjVJMvgtNv2LrMMmBe2ZMSJv6zBw2I4T4RrUDbxwY/3wegp069at
+ jaTqvETkWDGsVBgtyOrIyMif+IwjFHDpXwADwNBGBV/AZghMG3jiXJ/j/bivRCL5Bw+PwGSd
+ 0qL6FivRAJf+XQrotzfd3NzGuKSd1d7UkMlk7TqdbkNDQ0MaboYPY16o4NK/SwFIO5x8IYSH
+ Gyp+rfpKDo6+7N27N9+aMYQC/aFAZLYtXsuBDAPZpHDbwnbUyP42JY+AUYJzY7Z6mxIGS3Z2
+ dgvepmQeHrQTzTOwTmIDwpbvR2N70070EmDjxo0d+LH1fSyGneiXBP8DiC6/s246dP8AAAAA
+ SUVORK5CYII=
+ </office:binary-data>
+ </draw:image></draw:frame>x</text:p>
+ <text:p text:style-name="P1"/>
+ </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">x<text:change text:change-id="ct121341168"/></text:p>
+ <text:p text:style-name="P1"></text:p>
+ </office:text>
+ </office:body>
+</office:document>
+
diff --git a/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_end_inside.fodt b/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_end_inside.fodt
new file mode 100644
index 000000000..def1a177c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_end_inside.fodt
@@ -0,0 +1,228 @@
+<?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="Wingdings" svg:font-family="Wingdings" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Symbol" svg:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Scala-Regular" svg:font-family="Scala-Regular"/>
+ <style:font-face style:name="ScalaPro-Regular" svg:font-family="ScalaPro-Regular"/>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
+ <style:font-face style:name="Courier New" svg:font-family="&apos;Courier New&apos;" style:font-family-generic="modern"/>
+ <style:font-face style:name="ScalaPro-Bold" svg:font-family="ScalaPro-Bold" style:font-family-generic="roman"/>
+ <style:font-face style:name="Arial4" svg:font-family="Arial, Arial" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial2" svg:font-family="Arial" style:font-adornments="Fett" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial3" svg:font-family="Arial" style:font-adornments="Standard" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="DejaVu Sans" svg:font-family="&apos;DejaVu Sans&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="#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: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="11pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu 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: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="11pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu 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"/>
+ </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="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.212cm" loext:contextual-spacing="false"/>
+ </style:style>
+ <style:style style:name="RGUgliederung" style:family="paragraph" style:parent-style-name="Standard" style:list-style-name="WW8Num6">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.529cm" loext:contextual-spacing="false" style:line-height-at-least="0.529cm" fo:text-indent="0cm" style:auto-text-indent="false" style:text-autospace="none" style:punctuation-wrap="simple" style:vertical-align="baseline">
+ <style:tab-stops>
+ <style:tab-stop style:position="0.751cm"/>
+ <style:tab-stop style:position="16.277cm"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ <style:text-properties style:font-size-complex="10pt"/>
+ </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" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
+ </style:style>
+ <style:style style:name="WW8Num6z1" style:family="text">
+ <style:text-properties style:font-name="Courier New" fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern"/>
+ </style:style>
+ <style:style style:name="WW8Num6z0" style:family="text">
+ <style:text-properties style:font-name="Wingdings" fo:font-family="Wingdings" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ </style:style>
+ <style:style style:name="WW8Num6z3" style:family="text">
+ <style:text-properties style:font-name="Symbol" fo:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ </style:style>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <text:list-style style:name="WW8Num6" text:consecutive-numbering="true">
+ <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+ <style:list-level-properties text:space-before="0.635cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="2" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="1.905cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="3" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="3.175cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="4" text:style-name="WW8Num6z3" text:bullet-char="ï‚·">
+ <style:list-level-properties text:space-before="4.445cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="5" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="5.715cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="6" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="6.985cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="7" text:style-name="WW8Num6z3" text:bullet-char="ï‚·">
+ <style:list-level-properties text:space-before="8.255cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="8" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="9.525cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="9" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="10.795cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-number text:level="10" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="6.35cm" text:min-label-width="0.635cm"/>
+ </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="RGUgliederung" style:list-style-name="WW8Num6">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial1" fo:font-size="11pt" fo:font-weight="normal" officeooo:rsid="0036e634" officeooo:paragraph-rsid="002d5bb4" style:font-name-asian="Scala-Regular" style:font-size-asian="11pt" style:font-weight-asian="normal" style:font-name-complex="Scala-Regular" style:font-size-complex="11pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial2" fo:font-size="11pt" fo:font-weight="normal" officeooo:rsid="0036e634" officeooo:paragraph-rsid="002d5bb4" style:font-name-asian="Scala-Regular" style:font-size-asian="11pt" style:font-weight-asian="normal" style:font-name-complex="Scala-Regular" style:font-size-complex="11pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:color="#231f20" style:font-name="Arial3" fo:font-size="10pt" fo:font-style="normal" fo:font-weight="normal" style:font-name-asian="ScalaPro-Regular" style:font-size-asian="10pt" style:font-name-complex="ScalaPro-Regular" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties fo:color="#231f20" style:font-name="Arial3" fo:font-size="10pt" fo:font-style="normal" fo:font-weight="normal" style:font-name-asian="ScalaPro-Bold" style:font-size-asian="10pt" style:font-name-complex="ScalaPro-Bold" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="T3" style:family="text">
+ <style:text-properties style:font-name="Arial1" fo:font-size="11pt" style:text-underline-style="none" fo:font-weight="bold" style:font-name-asian="ScalaPro-Regular" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-name-complex="ScalaPro-Regular" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T4" style:family="text">
+ <style:text-properties style:font-name="Arial1" fo:font-size="11pt" style:text-underline-style="none" fo:font-weight="bold" style:font-name-asian="Arial4" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-name-complex="Arial1" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T5" style:family="text">
+ <style:text-properties style:font-name="Arial2" style:font-name-asian="ScalaPro-Regular" style:font-name-complex="ScalaPro-Regular"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" 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="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct59910784" text:id="ct59910784">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unbekannter Autor</dc:creator>
+ <dc:date>2017-01-25T11:43:00</dc:date>
+ </office:change-info>
+ <text:list xml:id="list3808086239" text:style-name="WW8Num6">
+ <text:list-item>
+ <text:p text:style-name="P1"><text:span text:style-name="T1">:</text:span></text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1"><text:span text:style-name="T2">Gem</text:span><text:span text:style-name="T3"> </text:span></text:p>
+ </text:list-item>
+ </text:list>
+ <text:p text:style-name="P2"><draw:frame draw:style-name="fr1" draw:name="Grafik1" text:anchor-type="paragraph" svg:width="16.032cm" svg:height="8.865cm" draw:z-index="1"><draw:image loext:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAHoAAAAlCAYAAACNgf3GAAAACXBIWXMAAA66AAAOoQG8if1I
+ AAAG5klEQVR4nO1bbUwURxguFkqDZ7iKkIK0IiHBYjVcUzwRkQiFShPaBk21NhICP2wLBUlo
+ +PComMJRBU6OAyR3FUgjFmnAClEIBpXwlYoGQ0NV1BqhBAuRgtUaUKDz/LiErHt7H7PHbdZ7
+ EkLYOebdvWfemfd5ZtZxYWHhFTvED0db34AdSwM70VbAwMBA2MjIiL+t4q9du/b3gICA3sXX
+ 7ETzjOvXr4dnZWW1PH/+/DVbxF+9evUdtVq9hXnd6kSTGsCB/CwjmLN2LFvj3r17G3Jzcxtt
+ RbKrq+uEUqmMxm9mm1WJHhsb89VqtYU5OTmfWTOOEDAxMeF98ODB80+ePHG1RXxnZ+f/8vLy
+ Yry8vO6wtVuFaGTwmTNnUqqrq/M2bdp0XuzZDHJBMsi2RXx8vyT+5+vWrfvN0Gd4J3p4ePid
+ oqKiqhs3bmzG33K5/BzfMYQETNOHDx9uxLRtq3vYv39/enBwcBPXZ3gjem5uzrGuri6ztrZW
+ 8ezZM2dcc3BwWCAZ3cJXDKEB9QcGdX9/fzhbe0RERG1ycvI3tHGqqqrym5ubv2Jri4mJOR4b
+ G1tirA9eiL59+/Z7xcXFJ+7evRu4+Lqfn1+/VCod5yOGEEEIULa3t3/B1iaTyS6mp6cnODo6
+ ztLEuHDhQpwhkpHFpg4kKqJnZ2dfP3ny5Hf19fXfIqOZ7WKetvHlYwZja4OOPXToUCwtyZBq
+ KpVKx9aG9Rjrsqn1j8VEDw4OhiCLuYwBFGKW9i9k9Pb2flxWVqZha3N3d/8rPz//o+XLl0/T
+ xOCSatDKqLBRaZvan9lEP336VIIpq6mpKWl+fn6Zoc+tWLFi0t/fv8/c/oWOmzdvygmRP5Nn
+ f5XZBnJBMsimicEl1bi0MhfMIvratWuRJSUl2gcPHvgY+2xQUFCr2GQVFIVCoWiemZlxYbZh
+ miYZGItpmyYGl1QzppW5YBLRjx8/llZWVqra2triUWma8j9iW5/xxWdmZrZNT0+7M9swoEnb
+ vsDAwIs0MbikmilamQtGie7u7v5Uo9GUP3z40Mucjnt6ej6BuW/JTQkReBZDhggq37CwsHqa
+ /o1JNcQwppW5YJDoqakpj/Ly8tLLly/vtqTjjo4O0duewJ49e36AlqXth0uq8RGDlWgErKio
+ UD969MiNpnOxA4ZIQkJCNm0/XFKNrxgvEI11uLCwsJq2Y7FDIpFMpaamfgn3j6af+/fvBxiS
+ apBRMF1oYwAvEB0VFVUjlUr/VqvVlePj42/TBhArUKDiO8rIyNhHQ8SaNWv+wLR89uzZZGbb
+ 6OioX0tLSyIfSwPr1A1/WqfTvUvWjQJMK1x6+WUGljiimUcSExOzaPpJSkpKIQPnDbY1Gtm+
+ atWqUZpCDDBYjLm4uPxLKr3k7du3n1KpVD9CQ5rTMR4epgnNzQkJyDg22YO11cPDY5gm6zAj
+ YIqenJz0ZFbdMGZg0Bw5ciRq/fr13ZbGMCqvSOc9REPLsCt1+vTpDKL1nEzpGA8fHh5+ytIb
+ Expg55I1uZdNYiHrsHkTGhraYGn/MFzgj6elpXUyBxQMGqKhzx07dizUUkPGJMPEyclpJj4+
+ Pmfbtm2/wN8eGhp639j/9PX17RAT0bA1jx49GnHgwIEupmmCrFMqlacKCgqiaUwTvYXKNqD0
+ jhmpC4ItsVjNskB9fX0HNBrN5sbGxtSamprv2axAPa5evfohTpqQaWne3JsSKry9vYdgQZJp
+ 9iLz2eFqYROCJusAkEgGzQ4S4xJzQOk9cMQwd9PE7E0NWHG7du1ShYSE/EoC6gw5OTBcbt26
+ FWSpZSdU6LcHQSpzY4M26/Tw8fEZNDSgMK3DJsXGhjnboBZvU3p6ev5JCoQPWltbE7RabRHk
+ BvMzV65ciRYb0YB+w7+0tLSC2UaTdYvBNaCQXFgqFArFbqvvRwOoFqOjo0/I5fLzZEov6+rq
+ il3cjnU6Li4ulyaGUIEqGz4Dm6NladYxwTWgOjs7d6IITElJ+dqUvng5SrRy5coxUjHuBNHY
+ ACEy4U1cJ0VbEKZwsR4ngjVJMvgtNv2LrMMmBe2ZMSJv6zBw2I4T4RrUDbxwY/3wegp069at
+ jaTqvETkWDGsVBgtyOrIyMif+IwjFHDpXwADwNBGBV/AZghMG3jiXJ/j/bivRCL5Bw+PwGSd
+ 0qL6FivRAJf+XQrotzfd3NzGuKSd1d7UkMlk7TqdbkNDQ0MaboYPY16o4NK/SwFIO5x8IYSH
+ Gyp+rfpKDo6+7N27N9+aMYQC/aFAZLYtXsuBDAPZpHDbwnbUyP42JY+AUYJzY7Z6mxIGS3Z2
+ dgvepmQeHrQTzTOwTmIDwpbvR2N70070EmDjxo0d+LH1fSyGneiXBP8DiC6/s246dP8AAAAA
+ SUVORK5CYII=
+ </office:binary-data>
+ </draw:image>
+ </draw:frame>In</text:p>
+ </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="P5">k</text:p>
+ <text:p text:style-name="P6"><text:s text:c="2"/><text:span text:style-name="T1">D</text:span> <text:change text:change-id="ct59910784"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_start_outside.fodt b/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_start_outside.fodt
new file mode 100644
index 000000000..0f2803eee
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/redline_fly_duplication_at_para_start_outside.fodt
@@ -0,0 +1,229 @@
+<?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="Wingdings" svg:font-family="Wingdings" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Symbol" svg:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Scala-Regular" svg:font-family="Scala-Regular"/>
+ <style:font-face style:name="ScalaPro-Regular" svg:font-family="ScalaPro-Regular"/>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/>
+ <style:font-face style:name="Courier New" svg:font-family="&apos;Courier New&apos;" style:font-family-generic="modern"/>
+ <style:font-face style:name="ScalaPro-Bold" svg:font-family="ScalaPro-Bold" style:font-family-generic="roman"/>
+ <style:font-face style:name="Arial4" svg:font-family="Arial, Arial" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial2" svg:font-family="Arial" style:font-adornments="Fett" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial3" svg:font-family="Arial" style:font-adornments="Standard" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="DejaVu Sans" svg:font-family="&apos;DejaVu Sans&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="#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: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="11pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu 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: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="11pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="DejaVu 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"/>
+ </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="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.212cm" loext:contextual-spacing="false"/>
+ </style:style>
+ <style:style style:name="RGUgliederung" style:family="paragraph" style:parent-style-name="Standard" style:list-style-name="WW8Num6">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.529cm" loext:contextual-spacing="false" style:line-height-at-least="0.529cm" fo:text-indent="0cm" style:auto-text-indent="false" style:text-autospace="none" style:punctuation-wrap="simple" style:vertical-align="baseline">
+ <style:tab-stops>
+ <style:tab-stop style:position="0.751cm"/>
+ <style:tab-stop style:position="16.277cm"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ <style:text-properties style:font-size-complex="10pt"/>
+ </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" fo:font-size="9pt" style:font-name-asian="StarSymbol" style:font-family-asian="StarSymbol" style:font-size-asian="9pt" style:font-name-complex="StarSymbol" style:font-family-complex="StarSymbol" style:font-size-complex="9pt"/>
+ </style:style>
+ <style:style style:name="WW8Num6z1" style:family="text">
+ <style:text-properties style:font-name="Courier New" fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern"/>
+ </style:style>
+ <style:style style:name="WW8Num6z0" style:family="text">
+ <style:text-properties style:font-name="Wingdings" fo:font-family="Wingdings" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ </style:style>
+ <style:style style:name="WW8Num6z3" style:family="text">
+ <style:text-properties style:font-name="Symbol" fo:font-family="Symbol" style:font-family-generic="roman" style:font-pitch="variable" style:font-charset="x-symbol"/>
+ </style:style>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <text:list-style style:name="WW8Num6" text:consecutive-numbering="true">
+ <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+ <style:list-level-properties text:space-before="0.635cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="2" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="1.905cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="3" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="3.175cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="4" text:style-name="WW8Num6z3" text:bullet-char="ï‚·">
+ <style:list-level-properties text:space-before="4.445cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="5" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="5.715cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="6" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="6.985cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="7" text:style-name="WW8Num6z3" text:bullet-char="ï‚·">
+ <style:list-level-properties text:space-before="8.255cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Symbol"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="8" text:style-name="WW8Num6z1" text:bullet-char="o">
+ <style:list-level-properties text:space-before="9.525cm" text:min-label-width="0.635cm"/>
+ <style:text-properties fo:font-family="&apos;Courier New&apos;" style:font-family-generic="modern" style:font-pitch="fixed"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="9" text:style-name="WW8Num6z0" text:bullet-char="">
+ <style:list-level-properties text:space-before="10.795cm" text:min-label-width="0.635cm"/>
+ <style:text-properties style:font-name="Wingdings"/>
+ </text:list-level-style-bullet>
+ <text:list-level-style-number text:level="10" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="6.35cm" text:min-label-width="0.635cm"/>
+ </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="RGUgliederung" style:list-style-name="WW8Num6">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial1" fo:font-size="11pt" fo:font-weight="normal" officeooo:rsid="0036e634" officeooo:paragraph-rsid="002d5bb4" style:font-name-asian="Scala-Regular" style:font-size-asian="11pt" style:font-weight-asian="normal" style:font-name-complex="Scala-Regular" style:font-size-complex="11pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial2" fo:font-size="11pt" fo:font-weight="normal" officeooo:rsid="0036e634" officeooo:paragraph-rsid="002d5bb4" style:font-name-asian="Scala-Regular" style:font-size-asian="11pt" style:font-weight-asian="normal" style:font-name-complex="Scala-Regular" style:font-size-complex="11pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="RGUgliederung" style:list-style-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.229cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:color="#000000"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:color="#231f20" style:font-name="Arial3" fo:font-size="10pt" fo:font-style="normal" fo:font-weight="normal" style:font-name-asian="ScalaPro-Regular" style:font-size-asian="10pt" style:font-name-complex="ScalaPro-Regular" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties fo:color="#231f20" style:font-name="Arial3" fo:font-size="10pt" fo:font-style="normal" fo:font-weight="normal" style:font-name-asian="ScalaPro-Bold" style:font-size-asian="10pt" style:font-name-complex="ScalaPro-Bold" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="T3" style:family="text">
+ <style:text-properties style:font-name="Arial1" fo:font-size="11pt" style:text-underline-style="none" fo:font-weight="bold" style:font-name-asian="ScalaPro-Regular" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-name-complex="ScalaPro-Regular" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T4" style:family="text">
+ <style:text-properties style:font-name="Arial1" fo:font-size="11pt" style:text-underline-style="none" fo:font-weight="bold" style:font-name-asian="Arial4" style:font-size-asian="11pt" style:font-weight-asian="bold" style:font-name-complex="Arial1" style:font-size-complex="11pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T5" style:family="text">
+ <style:text-properties style:font-name="Arial2" style:font-name-asian="ScalaPro-Regular" style:font-name-complex="ScalaPro-Regular"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" 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="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct59910784" text:id="ct59910784">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unbekannter Autor</dc:creator>
+ <dc:date>2017-01-25T11:43:00</dc:date>
+ </office:change-info>
+ <text:list xml:id="list3808086239" text:style-name="WW8Num6">
+ <text:list-item>
+ <text:p text:style-name="P1"><text:span text:style-name="T1">:</text:span></text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1"><text:span text:style-name="T2">Gem</text:span><text:span text:style-name="T3"> </text:span></text:p>
+ </text:list-item>
+ </text:list>
+ <text:p text:style-name="P2">In</text:p>
+ </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="P5">k</text:p>
+ <text:p text:style-name="P6"><draw:frame draw:style-name="fr1" draw:name="Grafik1" text:anchor-type="paragraph" svg:width="16.032cm" svg:height="8.865cm" draw:z-index="1">
+ <draw:image loext:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAHoAAAAlCAYAAACNgf3GAAAACXBIWXMAAA66AAAOoQG8if1I
+ AAAG5klEQVR4nO1bbUwURxguFkqDZ7iKkIK0IiHBYjVcUzwRkQiFShPaBk21NhICP2wLBUlo
+ +PComMJRBU6OAyR3FUgjFmnAClEIBpXwlYoGQ0NV1BqhBAuRgtUaUKDz/LiErHt7H7PHbdZ7
+ EkLYOebdvWfemfd5ZtZxYWHhFTvED0db34AdSwM70VbAwMBA2MjIiL+t4q9du/b3gICA3sXX
+ 7ETzjOvXr4dnZWW1PH/+/DVbxF+9evUdtVq9hXnd6kSTGsCB/CwjmLN2LFvj3r17G3Jzcxtt
+ RbKrq+uEUqmMxm9mm1WJHhsb89VqtYU5OTmfWTOOEDAxMeF98ODB80+ePHG1RXxnZ+f/8vLy
+ Yry8vO6wtVuFaGTwmTNnUqqrq/M2bdp0XuzZDHJBMsi2RXx8vyT+5+vWrfvN0Gd4J3p4ePid
+ oqKiqhs3bmzG33K5/BzfMYQETNOHDx9uxLRtq3vYv39/enBwcBPXZ3gjem5uzrGuri6ztrZW
+ 8ezZM2dcc3BwWCAZ3cJXDKEB9QcGdX9/fzhbe0RERG1ycvI3tHGqqqrym5ubv2Jri4mJOR4b
+ G1tirA9eiL59+/Z7xcXFJ+7evRu4+Lqfn1+/VCod5yOGEEEIULa3t3/B1iaTyS6mp6cnODo6
+ ztLEuHDhQpwhkpHFpg4kKqJnZ2dfP3ny5Hf19fXfIqOZ7WKetvHlYwZja4OOPXToUCwtyZBq
+ KpVKx9aG9Rjrsqn1j8VEDw4OhiCLuYwBFGKW9i9k9Pb2flxWVqZha3N3d/8rPz//o+XLl0/T
+ xOCSatDKqLBRaZvan9lEP336VIIpq6mpKWl+fn6Zoc+tWLFi0t/fv8/c/oWOmzdvygmRP5Nn
+ f5XZBnJBMsimicEl1bi0MhfMIvratWuRJSUl2gcPHvgY+2xQUFCr2GQVFIVCoWiemZlxYbZh
+ miYZGItpmyYGl1QzppW5YBLRjx8/llZWVqra2triUWma8j9iW5/xxWdmZrZNT0+7M9swoEnb
+ vsDAwIs0MbikmilamQtGie7u7v5Uo9GUP3z40Mucjnt6ej6BuW/JTQkReBZDhggq37CwsHqa
+ /o1JNcQwppW5YJDoqakpj/Ly8tLLly/vtqTjjo4O0duewJ49e36AlqXth0uq8RGDlWgErKio
+ UD969MiNpnOxA4ZIQkJCNm0/XFKNrxgvEI11uLCwsJq2Y7FDIpFMpaamfgn3j6af+/fvBxiS
+ apBRMF1oYwAvEB0VFVUjlUr/VqvVlePj42/TBhArUKDiO8rIyNhHQ8SaNWv+wLR89uzZZGbb
+ 6OioX0tLSyIfSwPr1A1/WqfTvUvWjQJMK1x6+WUGljiimUcSExOzaPpJSkpKIQPnDbY1Gtm+
+ atWqUZpCDDBYjLm4uPxLKr3k7du3n1KpVD9CQ5rTMR4epgnNzQkJyDg22YO11cPDY5gm6zAj
+ YIqenJz0ZFbdMGZg0Bw5ciRq/fr13ZbGMCqvSOc9REPLsCt1+vTpDKL1nEzpGA8fHh5+ytIb
+ Expg55I1uZdNYiHrsHkTGhraYGn/MFzgj6elpXUyBxQMGqKhzx07dizUUkPGJMPEyclpJj4+
+ Pmfbtm2/wN8eGhp639j/9PX17RAT0bA1jx49GnHgwIEupmmCrFMqlacKCgqiaUwTvYXKNqD0
+ jhmpC4ItsVjNskB9fX0HNBrN5sbGxtSamprv2axAPa5evfohTpqQaWne3JsSKry9vYdgQZJp
+ 9iLz2eFqYROCJusAkEgGzQ4S4xJzQOk9cMQwd9PE7E0NWHG7du1ShYSE/EoC6gw5OTBcbt26
+ FWSpZSdU6LcHQSpzY4M26/Tw8fEZNDSgMK3DJsXGhjnboBZvU3p6ev5JCoQPWltbE7RabRHk
+ BvMzV65ciRYb0YB+w7+0tLSC2UaTdYvBNaCQXFgqFArFbqvvRwOoFqOjo0/I5fLzZEov6+rq
+ il3cjnU6Li4ulyaGUIEqGz4Dm6NladYxwTWgOjs7d6IITElJ+dqUvng5SrRy5coxUjHuBNHY
+ ACEy4U1cJ0VbEKZwsR4ngjVJMvgtNv2LrMMmBe2ZMSJv6zBw2I4T4RrUDbxwY/3wegp069at
+ jaTqvETkWDGsVBgtyOrIyMif+IwjFHDpXwADwNBGBV/AZghMG3jiXJ/j/bivRCL5Bw+PwGSd
+ 0qL6FivRAJf+XQrotzfd3NzGuKSd1d7UkMlk7TqdbkNDQ0MaboYPY16o4NK/SwFIO5x8IYSH
+ Gyp+rfpKDo6+7N27N9+aMYQC/aFAZLYtXsuBDAPZpHDbwnbUyP42JY+AUYJzY7Z6mxIGS3Z2
+ dgvepmQeHrQTzTOwTmIDwpbvR2N70070EmDjxo0d+LH1fSyGneiXBP8DiC6/s246dP8AAAAA
+ SUVORK5CYII=
+ </office:binary-data>
+ </draw:image>
+ </draw:frame><text:s text:c="2"/><text:span text:style-name="T1">D</text:span> <text:change text:change-id="ct59910784"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/rhbz1810732.docx b/sw/qa/extras/uiwriter/data/rhbz1810732.docx
new file mode 100644
index 000000000..2bf1d574d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/rhbz1810732.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/rhbz739252-3.odt b/sw/qa/extras/uiwriter/data/rhbz739252-3.odt
new file mode 100644
index 000000000..e457c035b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/rhbz739252-3.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/shape-page-move.odt b/sw/qa/extras/uiwriter/data/shape-page-move.odt
new file mode 100644
index 000000000..80672b244
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/shape-page-move.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/shape-textbox-autosize.odt b/sw/qa/extras/uiwriter/data/shape-textbox-autosize.odt
new file mode 100644
index 000000000..1d2c86671
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/shape-textbox-autosize.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odt b/sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odt
new file mode 100644
index 000000000..f5fabcfe8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/shape-textbox-vertadjust.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/shape-textbox.odt b/sw/qa/extras/uiwriter/data/shape-textbox.odt
new file mode 100644
index 000000000..5f278af35
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/shape-textbox.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/simplefooter.docx b/sw/qa/extras/uiwriter/data/simplefooter.docx
new file mode 100644
index 000000000..006c85ab7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/simplefooter.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/split-section-in-nested-table.fodt b/sw/qa/extras/uiwriter/data/split-section-in-nested-table.fodt
new file mode 100644
index 000000000..52d4f6474
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/split-section-in-nested-table.fodt
@@ -0,0 +1,154 @@
+<?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: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" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="AR PL SungtiL GB" 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" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="AR PL SungtiL GB" 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"/>
+ </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: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="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="AR PL SungtiL GB" style:font-family-asian="&apos;AR PL SungtiL GB&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&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" loext:contextual-spacing="false" fo:line-height="120%"/>
+ </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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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" loext: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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss" 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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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>
+ <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="Table1" style:family="table">
+ <style:table-properties style:width="17.59cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32768*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="8.599cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="4.299cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table2.B" style:family="table-column">
+ <style:table-column-properties style:column-width="4.3cm" style:rel-column-width="32768*"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.B1" 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="Standard">
+ <style:text-properties officeooo:rsid="00026875" officeooo:paragraph-rsid="00026875"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="0008b999" officeooo:paragraph-rsid="0008b999"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="0008b999" officeooo:paragraph-rsid="000a9ee7"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="000bc254" officeooo:paragraph-rsid="000bc254"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties officeooo:rsid="000bc254"/>
+ </style:style>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties officeooo:rsid="000e3a11"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="8.64cm" 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:use-soft-page-breaks="true">
+ <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-decls>
+ <text:p text:style-name="P1">Before table.</text:p>
+ <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="P2">Before inner table.</text:p>
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-column table:style-name="Table2.B"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="P2">Before section.</text:p>
+ <text:section text:style-name="Sect1" text:name="Section2">
+ <text:p text:style-name="P3">In section. He heard quiet steps behind him. That didn&apos;t bode well. Who could be following him this late <text:soft-page-break/>at night and in this deadbeat part of town?</text:p>
+ </text:section>
+ <text:p text:style-name="P2">After section.</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.B1" office:value-type="string">
+ <text:p text:style-name="P2"><text:span text:style-name="T1">Table2:</text:span>B1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P2">After inner table.</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B1" office:value-type="string">
+ <text:p text:style-name="P4">Table<text:span text:style-name="T2">1</text:span>:B1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P1">After table.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/table-in-sect.odt b/sw/qa/extras/uiwriter/data/table-in-sect.odt
new file mode 100644
index 000000000..f439edef9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/table-in-sect.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf100018-1.odt b/sw/qa/extras/uiwriter/data/tdf100018-1.odt
new file mode 100644
index 000000000..5cd36efce
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf100018-1.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf100691.fodt b/sw/qa/extras/uiwriter/data/tdf100691.fodt
new file mode 100644
index 000000000..6488f0b40
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf100691.fodt
@@ -0,0 +1,230 @@
+<?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: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:dom="http://www.w3.org/2001/xml-events" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><dc:date>2020-12-04T11:52:59.211331599</dc:date><meta:editing-duration>PT29S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="3" meta:word-count="7" meta:character-count="34" meta:non-whitespace-character-count="30"/><meta:generator>LibreOfficeDev/7.2.0.0.alpha0$Linux_X86_64 LibreOffice_project/e3e68283a0a3457df3501428f8c1310077a7d9b8</meta:generator></office:meta>
+ <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="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss"/>
+ </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 Sans" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Liberation Sans" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Liberation 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: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 Sans" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Liberation Sans" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Liberation 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"/>
+ <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" fo:font-size="14pt" style:font-name-asian="Liberation Sans" style:font-family-asian="&apos;Liberation Sans&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Liberation Sans" style:font-family-complex="&apos;Liberation Sans&apos;" style:font-family-generic-complex="swiss" 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-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-size-asian="12pt" style:font-name-complex="Liberation Sans" style:font-family-complex="&apos;Liberation Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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 style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Liberation Sans" style:font-family-complex="&apos;Liberation Sans&apos;" style:font-family-generic-complex="swiss" 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-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-size-asian="12pt" style:font-name-complex="Liberation Sans" style:font-family-complex="&apos;Liberation Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <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: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:parent-style-name="Standard" style:list-style-name=""/>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties text:display="none"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="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: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:table-of-content text:style-name="Sect1" text:protected="true" text:name="Table of Contents1">
+ <text:table-of-content-source text:outline-level="10">
+ <text:index-title-template text:style-name="Contents_20_Heading">Table of Contents</text:index-title-template>
+ <text:table-of-content-entry-template text:outline-level="1" text:style-name="Contents_20_1">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="2" text:style-name="Contents_20_2">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="3" text:style-name="Contents_20_3">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="4" text:style-name="Contents_20_4">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="5" text:style-name="Contents_20_5">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="6" text:style-name="Contents_20_6">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="7" text:style-name="Contents_20_7">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="8" text:style-name="Contents_20_8">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="9" text:style-name="Contents_20_9">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="10" text:style-name="Contents_20_10">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ </text:table-of-content-source>
+ <text:index-body>
+ <text:index-title text:style-name="Sect1" text:name="Table of Contents1_Head">
+ <text:p text:style-name="Standard">Table of Contents</text:p>
+ </text:index-title>
+ <text:p text:style-name="Standard">Text Hidden<text:tab/>1</text:p>
+ </text:index-body>
+ </text:table-of-content>
+ <text:h text:style-name="P1" text:outline-level="1"><text:bookmark-start text:name="__RefHeading__5574_1973640051"/>Text<text:span text:style-name="T1"> Hidden</text:span><text:bookmark-end text:name="__RefHeading__5574_1973640051"/></text:h>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf101534.fodt b/sw/qa/extras/uiwriter/data/tdf101534.fodt
new file mode 100644
index 000000000..e1db2f08e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf101534.fodt
@@ -0,0 +1,28 @@
+<?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:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <text:list-style style:name="MyList">
+ <text:list-level-style-number text:level="1" style:num-format="1" text:display-levels="1">
+ <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="0.635cm" fo:text-indent="1.27cm" fo:margin-left="-1.27cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ </text:list-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph">
+ <style:paragraph-properties fo:margin-left="0cm"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p>Lorem ipsum dolor sit amet.</text:p>
+ <text:list text:style-name="MyList">
+ <text:list-item>
+ <text:p text:style-name="P1">Quo dolor dolore ea, vis te dicunt evertitur. Quo idque nostrud referrentur at, saperet volumus sententiae ut pro.</text:p>
+ </text:list-item>
+ </text:list>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf103978_backgroundTextShape.docx b/sw/qa/extras/uiwriter/data/tdf103978_backgroundTextShape.docx
new file mode 100644
index 000000000..b99b65e47
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf103978_backgroundTextShape.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf104032.odt b/sw/qa/extras/uiwriter/data/tdf104032.odt
new file mode 100644
index 000000000..535e8cec7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf104032.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf104425.odt b/sw/qa/extras/uiwriter/data/tdf104425.odt
new file mode 100644
index 000000000..8bbf26549
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf104425.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf104440.odt b/sw/qa/extras/uiwriter/data/tdf104440.odt
new file mode 100644
index 000000000..b226bb55d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf104440.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf104492.docx b/sw/qa/extras/uiwriter/data/tdf104492.docx
new file mode 100644
index 000000000..a5a7af367
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf104492.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf104649.docx b/sw/qa/extras/uiwriter/data/tdf104649.docx
new file mode 100644
index 000000000..7b1e4fd3c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf104649.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf104814.docx b/sw/qa/extras/uiwriter/data/tdf104814.docx
new file mode 100644
index 000000000..1f1c524a8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf104814.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf105330.odt b/sw/qa/extras/uiwriter/data/tdf105330.odt
new file mode 100644
index 000000000..bb1a088c3
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf105330.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf105413.fodt b/sw/qa/extras/uiwriter/data/tdf105413.fodt
new file mode 100644
index 000000000..f27ee904d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf105413.fodt
@@ -0,0 +1,38 @@
+<?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: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/uiwriter/data/tdf105417.odt b/sw/qa/extras/uiwriter/data/tdf105417.odt
new file mode 100644
index 000000000..d594d2a5a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf105417.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf105625.fodt b/sw/qa/extras/uiwriter/data/tdf105625.fodt
new file mode 100644
index 000000000..9a1d573d0
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf105625.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: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:body>
+ <office:text>
+ <text:p><field:fieldmark field:type="vnd.oasis.opendocument.field.FORMCHECKBOX"/></text:p>
+ <text:p><field:fieldmark-start field:type="vnd.oasis.opendocument.field.FORMTEXT"/>Field<field:fieldmark-end/></text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf106701_tabOverMarginAutotab.doc b/sw/qa/extras/uiwriter/data/tdf106701_tabOverMarginAutotab.doc
new file mode 100644
index 000000000..438a8cb79
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf106701_tabOverMarginAutotab.doc
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf106736-grid.odt b/sw/qa/extras/uiwriter/data/tdf106736-grid.odt
new file mode 100644
index 000000000..45d5f40da
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf106736-grid.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf106843.docx b/sw/qa/extras/uiwriter/data/tdf106843.docx
new file mode 100644
index 000000000..339ebd594
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf106843.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf107025.odt b/sw/qa/extras/uiwriter/data/tdf107025.odt
new file mode 100644
index 000000000..e5422aed3
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf107025.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf107362.odt b/sw/qa/extras/uiwriter/data/tdf107362.odt
new file mode 100644
index 000000000..9f7e5cbfb
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf107362.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf107893.odt b/sw/qa/extras/uiwriter/data/tdf107893.odt
new file mode 100644
index 000000000..9c24eccfa
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf107893.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf107975.odt b/sw/qa/extras/uiwriter/data/tdf107975.odt
new file mode 100644
index 000000000..afcab1814
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf107975.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf108124.odt b/sw/qa/extras/uiwriter/data/tdf108124.odt
new file mode 100644
index 000000000..af0260928
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf108124.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf108524.odt b/sw/qa/extras/uiwriter/data/tdf108524.odt
new file mode 100644
index 000000000..d8978b269
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf108524.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf108687_tabstop.odt b/sw/qa/extras/uiwriter/data/tdf108687_tabstop.odt
new file mode 100644
index 000000000..caabc4987
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf108687_tabstop.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf112109.fodt b/sw/qa/extras/uiwriter/data/tdf112109.fodt
new file mode 100644
index 000000000..507873fc9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112109.fodt
@@ -0,0 +1,170 @@
+<?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="OpenSymbol" svg:font-family="OpenSymbol"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="Liberation Sans" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="AR PL SungtiL GB" svg:font-family="&apos;AR PL SungtiL GB&apos;" style:font-family-generic="system" 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="MS Mincho" svg:font-family="&apos;MS Mincho&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:line-height="0.559cm" fo:text-align="justify" style:justify-single-word="false" 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 Sans" fo:font-size="10pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="AR PL SungtiL GB" 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"/>
+ </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:language="en" fo:country="GB"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+ </style:style>
+ <style:style style:name="Table2.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+ </style:style>
+ <style:style style:name="Table2.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+ </style:style>
+ <style:style style:name="Table2.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+ </style:style>
+ <style:style style:name="Table2.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm"/>
+ </style:style>
+ <style:style style:name="Table2.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm"/>
+ </style:style>
+ <style:style style:name="Table2.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm"/>
+ </style:style>
+ <style:style style:name="Table2.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:master-page-name="PG_5f_Default">
+ <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="9.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" 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="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:p text:style-name="P1"/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p>Table1.A1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-column table:style-name="Table2.B"/>
+ <table:table-column table:style-name="Table2.C"/>
+ <table:table-column table:style-name="Table2.D"/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:name="Section1">
+ <text:p>Table2.A1, para 1</text:p>
+ <text:p>Table2.A1, para 2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:name="Section2">
+ <text:p>Table2.B1</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:name="Section3">
+ <text:p>Table2.C1</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+ <text:section text:name="Section4">
+ <text:p>Table2.D1</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A2" office:value-type="string">
+ <text:section text:name="Section5">
+ <text:p>Table2.A2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A2" office:value-type="string">
+ <text:section text:name="Section6">
+ <text:p>Table2.B2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A2" office:value-type="string">
+ <text:section text:name="Section7">
+ <text:p>Table2.C2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D2" office:value-type="string">
+ <text:section text:name="Section8">
+ <text:p>Table2.D2</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf112160.fodt b/sw/qa/extras/uiwriter/data/tdf112160.fodt
new file mode 100644
index 000000000..d02352e4d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112160.fodt
@@ -0,0 +1,125 @@
+<?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="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" 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="en" fo:country="US" style:letter-kerning="true" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+ </style:style>
+ <style:style style:name="Table1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+ </style:style>
+ <style:style style:name="Table1.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+ </style:style>
+ <style:style style:name="Table1.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:master-page-name="PG_5f_Default">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:page-layout style:name="pm3">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="8.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" 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="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:p text:style-name="P1"/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <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-column table:style-name="Table1.C"/>
+ <table:table-column table:style-name="Table1.D"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:section text:name="Sect1">
+ <text:p>Table1.A1</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:section text:name="Sect2">
+ <text:p>Table1.B1</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:section text:name="Sect3">
+ <text:p>Table1.C1</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.D1" office:value-type="string">
+ <text:section text:name="Sect4">
+ <text:p>Table1.D1</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:section text:name="Sect5">
+ <text:p>Table1.A2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:section text:name="Sect6">
+ <text:p>Table1.B2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:section text:name="Sect7">
+ <text:p>Table1.C2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.D2" office:value-type="string">
+ <text:section text:name="Sect8">
+ <text:p>Table1.D2</text:p>
+ </text:section>
+ </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/uiwriter/data/tdf112342.docx b/sw/qa/extras/uiwriter/data/tdf112342.docx
new file mode 100644
index 000000000..ab4c7ee07
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112342.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf112448.odt b/sw/qa/extras/uiwriter/data/tdf112448.odt
new file mode 100644
index 000000000..ffb1ef6b6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112448.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf112741.fodt b/sw/qa/extras/uiwriter/data/tdf112741.fodt
new file mode 100644
index 000000000..b769dcdea
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112741.fodt
@@ -0,0 +1,405 @@
+<?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: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">48553</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">21856</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">5336</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3381</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">48551</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">21855</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">0</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="AnchoredTextOverflowLegacy" 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="PrintProspect" 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="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintPaperFromSetup" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" 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="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" 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="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" 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="PrinterName" config:type="string"/>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" 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="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 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="InvertBorderSpacing" 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="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">32251</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</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="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="PrintDrawings" 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="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">32251</config:config-item>
+ <config:config-item config:name="StylesNoDefault" 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="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string">Table1</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</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="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
+ <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="AR PL SungtiL GB" svg:font-family="&apos;AR PL SungtiL GB&apos;" style:font-family-generic="system" 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"/>
+ </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" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="AR PL SungtiL GB" 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" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="AR PL SungtiL GB" 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"/>
+ </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: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="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="AR PL SungtiL GB" style:font-family-asian="&apos;AR PL SungtiL GB&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&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" loext:contextual-spacing="false" fo:line-height="120%"/>
+ </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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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" loext: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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss" 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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.795cm" style:type="center"/>
+ <style:tab-stop style:position="17.59cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </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>
+ <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: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="Table1" style:family="table">
+ <style:table-properties style:width="17.59cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="17.59cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.795cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="17.59cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="17.59cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table2.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="Table3" style:family="table">
+ <style:table-properties style:width="17.395cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table3.A" style:family="table-column">
+ <style:table-column-properties style:column-width="4.35cm" style:rel-column-width="16383*"/>
+ </style:style>
+ <style:style style:name="Table3.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table3.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table3.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table3.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="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="00007dfb" officeooo:paragraph-rsid="00007dfb"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="10.94cm" 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:header-footer-properties fo:min-height="0cm" fo:margin-top="0.499cm"/>
+ </style:footer-style>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ <style:footer>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
+ <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>
+ <text:p text:style-name="Footer"/>
+ </style:footer>
+ </style:master-page>
+ </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-decls>
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <table:table table:name="Table3" table:style-name="Table3">
+ <table:table-column table:style-name="Table3.A" table:number-columns-repeated="4"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.D1" 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="Table3.A2" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="P1">asdf001</text:p>
+ <text:p text:style-name="P1">asdf002</text:p>
+ <text:p text:style-name="P1">asdf003</text:p>
+ <text:p text:style-name="P1">asdf004</text:p>
+ <text:p text:style-name="P1">asdf005</text:p>
+ <text:p text:style-name="P1">asdf006</text:p>
+ <text:p text:style-name="P1">asdf007</text:p>
+ <text:p text:style-name="P1">asdf008</text:p>
+ <text:p text:style-name="P1">asdf009</text:p>
+ <text:p text:style-name="P1">asdf010</text:p>
+ <text:p text:style-name="P1">asdf011</text:p>
+ <text:p text:style-name="P1">asdf012</text:p>
+ <text:p text:style-name="P1">asdf013</text:p>
+ <text:p text:style-name="P1">asdf014</text:p>
+ <text:p text:style-name="P1">asdf015</text:p>
+ <text:p text:style-name="P1">asdf016</text:p>
+ <text:p text:style-name="P1">asdf017</text:p>
+ <text:p text:style-name="P1">asdf018</text:p>
+ <text:p text:style-name="P1">asdf019</text:p>
+ <text:p text:style-name="P1">asdf020</text:p>
+ <text:p text:style-name="P1">asdf021</text:p>
+ <text:p text:style-name="P1">asdf022</text:p>
+ <text:p text:style-name="P1">asdf023</text:p>
+ <text:p text:style-name="P1">asdf024</text:p>
+ <text:p text:style-name="P1">asdf025</text:p>
+ <text:p text:style-name="P1">asdf026</text:p>
+ <text:p text:style-name="P1">asdf027</text:p>
+ <text:p text:style-name="P1">asdf028</text:p>
+ <text:p text:style-name="P1">asdf029</text:p>
+ <text:p text:style-name="P1">asdf030</text:p>
+ <text:p text:style-name="P1">asdf031</text:p>
+ <text:p text:style-name="P1">asdf032</text:p>
+ <text:p text:style-name="P1">asdf033</text:p>
+ </text:section>
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.D2" 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="Table_20_Contents"/>
+ </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/uiwriter/data/tdf112860.fodt b/sw/qa/extras/uiwriter/data/tdf112860.fodt
new file mode 100644
index 000000000..845c55ae8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf112860.fodt
@@ -0,0 +1,1394 @@
+<?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: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">59761</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">30542</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">22682</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3567</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">59759</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">30540</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">0</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">70</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" 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="PrintProspect" 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="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintPaperFromSetup" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" 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="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" 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="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" 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="PrinterName" config:type="string"/>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" 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="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 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="InvertBorderSpacing" 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="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">279286</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" 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="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</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="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AllowPaddingWithoutBorders" 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="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" 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="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="PrintDrawings" 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="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</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="OpenSymbol" svg:font-family="OpenSymbol"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Tahoma2" svg:font-family="Tahoma" style:font-family-generic="system"/>
+ <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="Arial1" svg:font-family="Arial" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="MS Mincho" svg:font-family="&apos;MS Mincho&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" 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="#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="true"/>
+ <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="Times New Roman" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" 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="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </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="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="MS Mincho" style:font-family-asian="&apos;MS Mincho&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma2" style:font-family-complex="Tahoma" style:font-family-generic-complex="system" 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:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </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" loext: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="Tahoma1" style:font-family-complex="Tahoma" 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-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.5cm" style:type="center"/>
+ <style:tab-stop style:position="17cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P_5f_Clause_20_Header" style:display-name="P_Clause Header" style:family="paragraph" style:parent-style-name="P_5f_Heading" style:master-page-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-align="start" style:justify-single-word="false" style:page-number="auto"/>
+ <style:text-properties fo:color="#077b99"/>
+ </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="Illustration" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+ <style:style style:name="P_5f_Heading" style:display-name="P_Heading" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.21cm" fo:margin-bottom="0.21cm" loext:contextual-spacing="false" fo:line-height="100%" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#077b99" fo:font-size="14pt" fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_6pt_20_Arabic" style:display-name="P_Default_6pt Arabic" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt_20_centered" style:master-page-name="">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" style:shadow="none" style:writing-mode="rl-tb"/>
+ <style:text-properties style:font-size-asian="6pt" style:font-name-complex="Arial1" style:font-family-complex="Arial" style:font-style-name-complex="Regular" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="6pt" style:language-complex="ar" style:country-complex="AE"/>
+ </style:style>
+ <style:style style:name="Frame_20_contents" style:display-name="Frame contents" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="extra"/>
+ <style:style style:name="_5f_P_5f_Default_5f_10pt" style:display-name="_P_Default_10pt" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:line-height="0.559cm" fo:text-align="justify" style:justify-single-word="false"/>
+ <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10pt"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_10pt_5f_left" style:display-name="P_Default_10pt_left" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P_5f_Terms_20_and_20_Conditions_20_Heading_20__28_center_29_" style:display-name="P_Terms and Conditions Heading (center)" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false" style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+ <style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+ <style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_6pt" style:display-name="P_Default_6pt" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:text-properties fo:font-size="6pt"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_8pt" style:display-name="P_Default_8pt" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:paragraph-properties fo:line-height="0.42cm"/>
+ <style:text-properties fo:font-size="8pt"/>
+ </style:style>
+ <style:style style:name="Sender" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.106cm" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="P_5f_Terms_20_and_20_Conditions" style:display-name="P_Terms and Conditions" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt"/>
+ <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.498cm" style:type="center"/>
+ <style:tab-stop style:position="16.999cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P_5f_Document_20_Header_20__28_left_29_" style:display-name="P_Document Header (left)" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:text-properties fo:font-variant="normal" fo:text-transform="none" fo:color="#000000" fo:font-size="8pt"/>
+ </style:style>
+ <style:style style:name="P_5f_Subheading" style:display-name="P_Subheading" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <loext:graphic-properties draw:fill="none" draw:fill-color="#99ccff"/>
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" fo:background-color="transparent">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_6pt_20_centered" style:display-name="P_Default_6pt centered" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P_5f_Document_20_Header_20__28_right_29_" style:display-name="P_Document Header (right)" style:family="paragraph" style:parent-style-name="P_5f_Document_20_Header_20__28_left_29_">
+ <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="Endnote_20_Symbol" style:display-name="Endnote Symbol" style:family="text"/>
+ <style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
+ <style:text-properties style:font-name="OpenSymbol" fo:font-family="OpenSymbol" style:font-name-asian="OpenSymbol" style:font-family-asian="OpenSymbol" style:font-name-complex="OpenSymbol" style:font-family-complex="OpenSymbol"/>
+ </style:style>
+ <style:style style:name="C_5f_Underlined" style:display-name="C_Underlined" style:family="text">
+ <style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="C_5f_White" style:display-name="C_White" style:family="text">
+ <style:text-properties fo:color="#ffffff"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Footnote_20_Symbol" style:display-name="Footnote Symbol" style:family="text"/>
+ <style:style style:name="C_5f_TODO" style:display-name="C_TODO" style:family="text">
+ <style:text-properties fo:color="#ff0000"/>
+ </style:style>
+ <style:style style:name="C_5f_Bold" style:display-name="C_Bold" style:family="text">
+ <style:text-properties fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="C_5f_Capitals" style:display-name="C_Capitals" style:family="text">
+ <style:text-properties fo:text-transform="uppercase"/>
+ </style:style>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/>
+ <text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol" text:master-page-name="Endnote" style:num-format="1" 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="Table29" style:family="table">
+ <style:table-properties style:width="16.674cm" fo:margin-left="0cm" fo:margin-right="-0.012cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table29.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.597cm" style:rel-column-width="29862*"/>
+ </style:style>
+ <style:style style:name="Table29.B" style:family="table-column">
+ <style:table-column-properties style:column-width="9.077cm" style:rel-column-width="35673*"/>
+ </style:style>
+ <style:style style:name="Table29.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="16.662cm" fo:margin-left="0cm" fo:margin-right="0cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.122cm" style:rel-column-width="8343*"/>
+ </style:style>
+ <style:style style:name="Table1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="6.154cm" style:rel-column-width="24206*"/>
+ </style:style>
+ <style:style style:name="Table1.C" style:family="table-column">
+ <style:table-column-properties style:column-width="8.386cm" style:rel-column-width="32986*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.101cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="0.05pt solid #000000" fo:border-bottom="none"/>
+ </style:style>
+ <style:style style:name="Table1.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="none" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="none"/>
+ </style:style>
+ <style:style style:name="Table1.C2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="0.05pt solid #000000" fo:border-bottom="none"/>
+ </style:style>
+ <style:style style:name="Table1.A3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="none"/>
+ </style:style>
+ <style:style style:name="Table1.B3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table1.C3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="none"/>
+ </style:style>
+ <style:style style:name="Table1.A4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.C4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.101cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table3" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table3.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table3.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table3.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table3.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table4" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table4.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table4.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table4.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table4.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table5" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table5.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table5.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table5.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table5.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table6" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table6.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table6.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table6.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table6.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table7" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table7.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table7.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table7.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table7.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table8" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table8.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table8.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table8.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table8.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table9" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table9.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table9.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table9.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table9.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table10" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table10.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.273cm" style:rel-column-width="32536*"/>
+ </style:style>
+ <style:style style:name="Table10.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.389cm" style:rel-column-width="32999*"/>
+ </style:style>
+ <style:style style:name="Table10.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table10.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table10.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table10.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table11" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table11.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table11.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table11.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="0.05pt solid #000000" fo:border-bottom="none">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table12" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table12.A" style:family="table-column">
+ <style:table-column-properties style:column-width="3.625cm" style:rel-column-width="14258*"/>
+ </style:style>
+ <style:style style:name="Table12.B" style:family="table-column">
+ <style:table-column-properties style:column-width="13.037cm" style:rel-column-width="51277*"/>
+ </style:style>
+ <style:style style:name="Table12.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table12.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table13" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table13.A" style:family="table-column">
+ <style:table-column-properties style:column-width="3.627cm" style:rel-column-width="14265*"/>
+ </style:style>
+ <style:style style:name="Table13.B" style:family="table-column">
+ <style:table-column-properties style:column-width="13.035cm" style:rel-column-width="51270*"/>
+ </style:style>
+ <style:style style:name="Table13.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table13.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table14" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table14.A" style:family="table-column">
+ <style:table-column-properties style:column-width="3.625cm" style:rel-column-width="14258*"/>
+ </style:style>
+ <style:style style:name="Table14.B" style:family="table-column">
+ <style:table-column-properties style:column-width="13.037cm" style:rel-column-width="51277*"/>
+ </style:style>
+ <style:style style:name="Table14.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent" fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table14.B1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table15" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table15.A" style:family="table-column">
+ <style:table-column-properties style:column-width="3.627cm" style:rel-column-width="14265*"/>
+ </style:style>
+ <style:style style:name="Table15.B" style:family="table-column">
+ <style:table-column-properties style:column-width="13.035cm" style:rel-column-width="51270*"/>
+ </style:style>
+ <style:style style:name="Table15.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table15.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table16" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table16.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table16.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table16.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border-left="1pt solid #000000" fo:border-right="1pt solid #000000" fo:border-top="1pt solid #000000" fo:border-bottom="none">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table16.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table16.A4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table17" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0.005cm" fo:margin-right="0.034cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table17.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.623cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table17.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table18" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table18.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+ </style:style>
+ <style:style style:name="Table18.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+ </style:style>
+ <style:style style:name="Table18.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+ </style:style>
+ <style:style style:name="Table18.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+ </style:style>
+ <style:style style:name="Table18.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table18.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table18.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table18.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table18.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table19" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0.005cm" fo:margin-right="0.034cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table19.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.623cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table19.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table20" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table20.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+ </style:style>
+ <style:style style:name="Table20.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+ </style:style>
+ <style:style style:name="Table20.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+ </style:style>
+ <style:style style:name="Table20.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+ </style:style>
+ <style:style style:name="Table20.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table20.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table20.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table20.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table20.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table21.A" style:family="table-column">
+ <style:table-column-properties style:column-width="3.078cm" style:rel-column-width="12110*"/>
+ </style:style>
+ <style:style style:name="Table21.B" style:family="table-column">
+ <style:table-column-properties style:column-width="13.584cm" style:rel-column-width="53425*"/>
+ </style:style>
+ <style:style style:name="Table21.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table21.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.A3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.B3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.A4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.B4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.A5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.B5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.A6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table21.B6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table22.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.925cm" style:rel-column-width="11505*"/>
+ </style:style>
+ <style:style style:name="Table22.B" style:family="table-column">
+ <style:table-column-properties style:column-width="1.813cm" style:rel-column-width="7132*"/>
+ </style:style>
+ <style:style style:name="Table22.C" style:family="table-column">
+ <style:table-column-properties style:column-width="11.924cm" style:rel-column-width="46898*"/>
+ </style:style>
+ <style:style style:name="Table22.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table22.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.C2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.A3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.B3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.C3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.A4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.B4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.C4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.A5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.B5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.C5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.A6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.B6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.C6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.A7" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.B7" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table22.C7" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table23" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table23.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table23.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table24" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table24.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.926cm" style:rel-column-width="11511*"/>
+ </style:style>
+ <style:style style:name="Table24.B" style:family="table-column">
+ <style:table-column-properties style:column-width="13.735cm" style:rel-column-width="54024*"/>
+ </style:style>
+ <style:style style:name="Table24.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table24.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table25" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table25.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.926cm" style:rel-column-width="11511*"/>
+ </style:style>
+ <style:style style:name="Table25.B" style:family="table-column">
+ <style:table-column-properties style:column-width="13.735cm" style:rel-column-width="54024*"/>
+ </style:style>
+ <style:style style:name="Table25.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table25.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table26" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table26.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table26.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table26.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table27.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.237cm" style:rel-column-width="8798*"/>
+ </style:style>
+ <style:style style:name="Table27.B" style:family="table-column">
+ <style:table-column-properties style:column-width="6.089cm" style:rel-column-width="23948*"/>
+ </style:style>
+ <style:style style:name="Table27.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.235cm" style:rel-column-width="8791*"/>
+ </style:style>
+ <style:style style:name="Table27.D" style:family="table-column">
+ <style:table-column-properties style:column-width="6.101cm" style:rel-column-width="23998*"/>
+ </style:style>
+ <style:style style:name="Table27.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table27.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.C2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.A3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.B3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.C3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.D3" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.A4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.B4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.C4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.D4" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.A5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.B5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.C5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.D5" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.A6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.B6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.C6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table27.D6" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table28" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table28.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.235cm" style:rel-column-width="8791*"/>
+ </style:style>
+ <style:style style:name="Table28.B" style:family="table-column">
+ <style:table-column-properties style:column-width="6.087cm" style:rel-column-width="23941*"/>
+ </style:style>
+ <style:style style:name="Table28.D" style:family="table-column">
+ <style:table-column-properties style:column-width="6.105cm" style:rel-column-width="24012*"/>
+ </style:style>
+ <style:style style:name="Table28.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="Table28.C1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="none"/>
+ </style:style>
+ <style:style style:name="Table28.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table28.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table28.C2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table29" style:family="table">
+ <style:table-properties style:width="16.674cm" fo:margin-left="0cm" fo:margin-right="-0.012cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table29.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.597cm" style:rel-column-width="29862*"/>
+ </style:style>
+ <style:style style:name="Table29.B" style:family="table-column">
+ <style:table-column-properties style:column-width="9.077cm" style:rel-column-width="35673*"/>
+ </style:style>
+ <style:style style:name="Table29.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="P_5f_Heading">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_10pt_5f_left">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt_20_centered">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="P7" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="PG_5f_Default">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="transparent" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect2" style:family="section">
+ <style:section-properties fo:background-color="#df3c56" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect3" style:family="section">
+ <style:section-properties fo:background-color="#f2f9fb" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect4" style:family="section">
+ <style:section-properties fo:background-color="#f8f3fc" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <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: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>
+ <style:page-layout style:name="pm3">
+ <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="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" 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:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm" style:dynamic-spacing="false"/>
+ </style:footer-style>
+ </style:page-layout>
+ <number:number-style style:name="N10003" number:language="en" number:country="GB">
+ <number:number number:decimal-places="0" loext:min-decimal-places="0" number:min-integer-digits="1" number:grouping="true"/>
+ </number:number-style>
+ <number:number-style style:name="N10004" number:language="en" number:country="GB">
+ <number:number number:decimal-places="2" loext:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
+ </number:number-style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="Endnote" style:page-layout-name="pm2"/>
+ <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3">
+ <style:footer>
+ <table:table table:name="Table29" table:style-name="Table29">
+ <table:table-column table:style-name="Table29.A"/>
+ <table:table-column table:style-name="Table29.B"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table29.A1" office:value-type="string">
+ <text:p/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table29.A1" office:value-type="string">
+ <text:p/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </style:footer>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <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-decls>
+ <text:p text:style-name="P7"/>
+ <text:p text:style-name="P1"></text:p>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/></text:p>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <table:table table:name="Table16" table:style-name="Table16">
+ <table:table-column table:style-name="Table16.A"/>
+ <table:table-row table:style-name="Table16.1">
+ <table:table-cell table:style-name="Table16.A1" office:value-type="string">
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table16.1">
+ <table:table-cell table:style-name="Table16.A4" office:value-type="string">
+ <table:table table:name="Table18" table:style-name="Table18">
+ <table:table-column table:style-name="Table18.A"/>
+ <table:table-column table:style-name="Table18.B"/>
+ <table:table-column table:style-name="Table18.C"/>
+ <table:table-column table:style-name="Table18.D"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A1" table:number-columns-spanned="3" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_10pt_5f_left"></text:p>
+ </table:table-cell>
+ <table:covered-table-cell/>
+ <table:covered-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="_5f_P_5f_Default_5f_10pt"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_10pt_5f_left"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.C2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_10pt_5f_left"></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A3" office:value-type="string">
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B3" office:value-type="string">
+ <text:p text:style-name="P4"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.C3" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_10pt_5f_left"></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A4" office:value-type="string">
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt">A</text:p>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt">A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B4" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_10pt_5f_left"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.C4" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_10pt_5f_left"></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.B1" office:value-type="string">
+ <text:p></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table4.A1" office:value-type="string">
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table4.B1" office:value-type="string">
+ <text:p></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table5.A1" office:value-type="string">
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table5.B1" office:value-type="string">
+ <text:p text:style-name="P2"></text:p>
+ <text:p text:style-name="P2"></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table6.A1" office:value-type="string">
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table6.B1" office:value-type="string">
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"></text:p>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A1" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa01 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A1" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A1" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa02 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa03 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa04 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa05 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa06 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa07 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa08 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa09 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa10 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa11 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa12 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa13 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa14 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:section text:style-name="Sect3" text:name="Section3">
+ <text:p text:style-name="P_5f_Default_5f_6pt"><text:span text:style-name="T1">Aaaaaaaaaa15 Bbbbbbb cc </text:span><text:span text:style-name="T1">Ddddddd</text:span></text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p>B</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section2">
+ <text:p>C</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:section text:style-name="Sect3" text:name="Section4">
+ <text:p>D</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table18.1">
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ <text:p>A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>B</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.A2" office:value-type="string">
+ <text:p>C</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table18.D2" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf113153.fodt b/sw/qa/extras/uiwriter/data/tdf113153.fodt
new file mode 100644
index 000000000..5661f4ca0
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113153.fodt
@@ -0,0 +1,677 @@
+<?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:document-statistic meta:table-count="3" meta:image-count="0" meta:object-count="0" meta:page-count="3" meta:paragraph-count="46" meta:word-count="49" meta:character-count="68" meta:non-whitespace-character-count="65"/><meta:generator>LibreOfficeDev/5.2.5.1$Linux_X86_64 LibreOffice_project/1d78847be47e76f7fda105d8b497db1c9f60e3a7</meta:generator></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">70758</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">32583</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">5916</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">901</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">70757</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">32581</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">0</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">70</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" 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="PrintProspect" 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="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintPaperFromSetup" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" 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="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" 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="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" 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="PrinterName" config:type="string"/>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" 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="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 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="InvertBorderSpacing" 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="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">374081</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" 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="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</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="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" 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="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="PrintDrawings" 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="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+ <config:config-item config:name="StylesNoDefault" 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="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</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="OpenSymbol" svg:font-family="OpenSymbol"/>
+ <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="Liberation Sans" 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="true"/>
+ <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="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Liberation Sans Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Liberation Sans Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" 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="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </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="Liberation Sans" fo:font-family="Liberation Sans" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="MS Mincho" style:font-family-asian="&apos;MS Mincho&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma2" style:font-family-complex="Tahoma" style:font-family-generic-complex="system" 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:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </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" loext: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="Tahoma1" style:font-family-complex="Tahoma" 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-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.5cm" style:type="center"/>
+ <style:tab-stop style:position="17cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P_5f_Clause_20_Header" style:display-name="P_Clause Header" style:family="paragraph" style:parent-style-name="P_5f_Heading" style:master-page-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-align="start" style:justify-single-word="false" style:page-number="auto"/>
+ <style:text-properties fo:color="#077b99"/>
+ </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="Illustration" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+ <style:style style:name="P_5f_Heading" style:display-name="P_Heading" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.21cm" fo:margin-bottom="0.21cm" loext:contextual-spacing="false" fo:line-height="100%" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <style:text-properties fo:color="#077b99" fo:font-size="14pt" fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_6pt_20_Arabic" style:display-name="P_Default_6pt Arabic" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt_20_centered" style:master-page-name="">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" style:shadow="none" style:writing-mode="rl-tb"/>
+ <style:text-properties style:font-size-asian="6pt" style:font-name-complex="Liberation Sans1" style:font-family-complex="Liberation Sans" style:font-style-name-complex="Regular" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="6pt" style:language-complex="ar" style:country-complex="AE"/>
+ </style:style>
+ <style:style style:name="Frame_20_contents" style:display-name="Frame contents" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="extra"/>
+ <style:style style:name="_5f_P_5f_Default_5f_10pt" style:display-name="_P_Default_10pt" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:line-height="0.559cm" fo:text-align="justify" style:justify-single-word="false"/>
+ <style:text-properties style:font-name="Liberation Sans1" fo:font-family="Liberation Sans" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10pt"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_10pt_5f_left" style:display-name="P_Default_10pt_left" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P_5f_Terms_20_and_20_Conditions_20_Heading_20__28_center_29_" style:display-name="P_Terms and Conditions Heading (center)" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false" style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+ <style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+ <style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_6pt" style:display-name="P_Default_6pt" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:text-properties fo:font-size="6pt"/>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_8pt" style:display-name="P_Default_8pt" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:paragraph-properties fo:line-height="0.42cm"/>
+ <style:text-properties fo:font-size="8pt"/>
+ </style:style>
+ <style:style style:name="Sender" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.106cm" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="P_5f_Terms_20_and_20_Conditions" style:display-name="P_Terms and Conditions" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt"/>
+ <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.498cm" style:type="center"/>
+ <style:tab-stop style:position="16.999cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P_5f_Document_20_Header_20__28_left_29_" style:display-name="P_Document Header (left)" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <style:text-properties fo:font-variant="normal" fo:text-transform="none" fo:color="#000000" fo:font-size="8pt"/>
+ </style:style>
+ <style:style style:name="P_5f_Subheading" style:display-name="P_Subheading" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+ <loext:graphic-properties draw:fill="none" draw:fill-color="#99ccff"/>
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" fo:background-color="transparent">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P_5f_Default_5f_6pt_20_centered" style:display-name="P_Default_6pt centered" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P_5f_Document_20_Header_20__28_right_29_" style:display-name="P_Document Header (right)" style:family="paragraph" style:parent-style-name="P_5f_Document_20_Header_20__28_left_29_">
+ <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="Endnote_20_Symbol" style:display-name="Endnote Symbol" style:family="text"/>
+ <style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
+ <style:text-properties style:font-name="OpenSymbol" fo:font-family="OpenSymbol" style:font-name-asian="OpenSymbol" style:font-family-asian="OpenSymbol" style:font-name-complex="OpenSymbol" style:font-family-complex="OpenSymbol"/>
+ </style:style>
+ <style:style style:name="C_5f_Underlined" style:display-name="C_Underlined" style:family="text">
+ <style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="C_5f_White" style:display-name="C_White" style:family="text">
+ <style:text-properties fo:color="#ffffff"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Footnote_20_Symbol" style:display-name="Footnote Symbol" style:family="text"/>
+ <style:style style:name="C_5f_TODO" style:display-name="C_TODO" style:family="text">
+ <style:text-properties fo:color="#ff0000"/>
+ </style:style>
+ <style:style style:name="C_5f_Bold" style:display-name="C_Bold" style:family="text">
+ <style:text-properties fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="C_5f_Capitals" style:display-name="C_Capitals" style:family="text">
+ <style:text-properties fo:text-transform="uppercase"/>
+ </style:style>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <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" text:list-tab-stop-position="0.762cm" fo:text-indent="-0.762cm" fo:margin-left="0.762cm"/>
+ </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" text:list-tab-stop-position="1.016cm" fo:text-indent="-1.016cm" fo:margin-left="1.016cm"/>
+ </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" text:list-tab-stop-position="1.27cm" fo:text-indent="-1.27cm" fo:margin-left="1.27cm"/>
+ </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" text:list-tab-stop-position="1.524cm" fo:text-indent="-1.524cm" fo:margin-left="1.524cm"/>
+ </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" text:list-tab-stop-position="1.778cm" fo:text-indent="-1.778cm" fo:margin-left="1.778cm"/>
+ </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" text:list-tab-stop-position="2.032cm" fo:text-indent="-2.032cm" fo:margin-left="2.032cm"/>
+ </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" text:list-tab-stop-position="2.286cm" fo:text-indent="-2.286cm" fo:margin-left="2.286cm"/>
+ </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" text:list-tab-stop-position="2.54cm" fo:text-indent="-2.54cm" fo:margin-left="2.54cm"/>
+ </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" text:list-tab-stop-position="2.794cm" fo:text-indent="-2.794cm" fo:margin-left="2.794cm"/>
+ </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" text:list-tab-stop-position="3.048cm" fo:text-indent="-3.048cm" fo:margin-left="3.048cm"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:list-style style:name="L_5f_Numbering" style:display-name="L_Numbering">
+ <text:list-level-style-number 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" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="1">
+ <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.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="1" text:display-levels="2">
+ <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.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-prefix="(" style:num-suffix=")" style:num-format="a">
+ <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.499cm" fo:text-indent="-1cm" fo:margin-left="2.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <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="2.499cm" fo:text-indent="-1cm" fo:margin-left="3.5cm"/>
+ </style:list-level-properties>
+ <style:text-properties style:font-name="Tahoma"/>
+ </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="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </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="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </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="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </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="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </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="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ </text:list-style>
+ <text:list-style style:name="L_5f_Numbering_20_for_20_dual_20_language" style:display-name="L_Numbering for dual language">
+ <text:list-level-style-number 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:list-level-style-number>
+ <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="1">
+ <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.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="1" text:display-levels="2">
+ <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.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-prefix="(" style:num-suffix=")" style:num-format="a">
+ <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.499cm" fo:text-indent="-1cm" fo:margin-left="2.499cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <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="2.499cm" fo:text-indent="-1cm" fo:margin-left="3.5cm"/>
+ </style:list-level-properties>
+ </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>
+ </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>
+ </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>
+ </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>
+ </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>
+ </text:list-level-style-bullet>
+ </text:list-style>
+ <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/>
+ <text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol" text:master-page-name="Endnote" style:num-format="1" 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="Table29" style:family="table">
+ <style:table-properties style:width="16.674cm" fo:margin-left="0cm" fo:margin-right="-0.012cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table29.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.597cm" style:rel-column-width="29862*"/>
+ </style:style>
+ <style:style style:name="Table29.B" style:family="table-column">
+ <style:table-column-properties style:column-width="9.077cm" style:rel-column-width="35673*"/>
+ </style:style>
+ <style:style style:name="Table29.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table29" style:family="table">
+ <style:table-properties style:width="16.674cm" fo:margin-left="0cm" fo:margin-right="-0.012cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table29.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.597cm" style:rel-column-width="29862*"/>
+ </style:style>
+ <style:style style:name="Table29.B" style:family="table-column">
+ <style:table-column-properties style:column-width="9.077cm" style:rel-column-width="35673*"/>
+ </style:style>
+ <style:style style:name="Table29.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table16" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table16.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table16.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="always"/>
+ </style:style>
+ <style:style style:name="Table16.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border-left="1pt solid #000000" fo:border-right="1pt solid #000000" fo:border-top="1pt solid #000000" fo:border-bottom="none">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table16.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table20" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table20.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+ </style:style>
+ <style:style style:name="Table20.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+ </style:style>
+ <style:style style:name="Table20.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+ </style:style>
+ <style:style style:name="Table20.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+ </style:style>
+ <style:style style:name="Table20.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table20.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table20.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table20.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table20.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt_20_centered">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="PG_5f_Default">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="#f2f9fb" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect2" style:family="section">
+ <style:section-properties fo:background-color="transparent" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <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: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>
+ <style:page-layout style:name="pm3">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="15.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" 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:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm" style:dynamic-spacing="false"/>
+ </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="Endnote" style:page-layout-name="pm2"/>
+ <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3">
+ <style:footer>
+ <table:table table:name="Table29" table:style-name="Table29">
+ <table:table-column table:style-name="Table29.A"/>
+ <table:table-column table:style-name="Table29.B"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table29.A1" office:value-type="string">
+ <text:p text:style-name="Standard"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table29.A1" office:value-type="string">
+ <text:p text:style-name="Standard"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Footer"/>
+ </style:footer>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <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-decls>
+ <text:p text:style-name="P3"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+ <table:table table:name="Table16" table:style-name="Table16">
+ <table:table-column table:style-name="Table16.A"/>
+ <table:table-row table:style-name="Table16.1">
+ <table:table-cell table:style-name="Table16.A1" office:value-type="string">
+ <text:p text:style-name="Standard">row before nested table</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table16.1">
+ <table:table-cell table:style-name="Table16.A2" office:value-type="string">
+ <table:table table:name="Table20" table:style-name="Table20">
+ <table:table-column table:style-name="Table20.A"/>
+ <table:table-column table:style-name="Table20.B"/>
+ <table:table-column table:style-name="Table20.C"/>
+ <table:table-column table:style-name="Table20.D"/>
+ <table:table-row table:style-name="Table20.1">
+ <table:table-cell table:style-name="Table20.A1" office:value-type="string">
+ <text:p text:style-name="Standard">T20:A1-01</text:p>
+ <text:p text:style-name="Standard">T20:A1-02</text:p>
+ <text:p text:style-name="Standard">T20:A1-03</text:p>
+ <text:p text:style-name="Standard">T20:A1-04</text:p>
+ <text:p text:style-name="Standard">T20:A1-05</text:p>
+ <text:p text:style-name="Standard">T20:A1-06</text:p>
+ <text:p text:style-name="Standard">T20:A1-07</text:p>
+ <text:p text:style-name="Standard">T20:A1-08</text:p>
+ <text:p text:style-name="Standard">T20:A1-09</text:p>
+ <text:p text:style-name="Standard">T20:A1-10</text:p>
+ <text:p text:style-name="Standard">T20:A1-11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table20.A1" office:value-type="string">
+ <text:p text:style-name="Standard">T20:B1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table20.A1" office:value-type="string">
+ <text:p text:style-name="Standard">T20:C1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table20.D1" office:value-type="string">
+ <text:p text:style-name="Standard">T20:D1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table20.1">
+ <table:table-cell table:style-name="Table20.A2" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="Standard">T20:A2-01</text:p>
+ <text:p text:style-name="Standard">T20:A2-02</text:p>
+ <text:p text:style-name="Standard">T20:A2-03</text:p>
+ <text:p text:style-name="Standard">T20:A2-04</text:p>
+ <text:p text:style-name="Standard">T20:A2-05</text:p>
+ <text:p text:style-name="Standard">T20:A2-06</text:p>
+ <text:p text:style-name="Standard">T20:A2-07</text:p>
+ <text:p text:style-name="Standard">T20:A2-08</text:p>
+ <text:p text:style-name="Standard">T20:A2-09</text:p>
+ <text:p text:style-name="Standard">T20:A2-10</text:p>
+ <text:p text:style-name="Standard">T20:A2-11</text:p>
+ <text:p text:style-name="Standard">T20:A2-12</text:p>
+ <text:p text:style-name="Standard">T20:A2-13</text:p>
+ <text:p text:style-name="Standard">T20:A2-14</text:p>
+ <text:p text:style-name="Standard">T20:A2-15</text:p>
+ <text:p text:style-name="Standard">T20:A2-16</text:p>
+ <text:p text:style-name="Standard">T20:A2-17</text:p>
+ <text:p text:style-name="Standard">T20:A2-18</text:p>
+ <text:p text:style-name="Standard">T20:A2-19</text:p>
+ <text:p text:style-name="Standard">T20:A2-20</text:p>
+ <text:p text:style-name="Standard">T20:A2-21</text:p>
+ <text:p text:style-name="Standard">T20:A2-22</text:p>
+ <text:p text:style-name="Standard">T20:A2-23</text:p>
+ <text:p text:style-name="Standard">T20:A2-24</text:p>
+ <text:p text:style-name="Standard">T20:A2-25</text:p>
+ <text:p text:style-name="Standard">T20:A2-26</text:p>
+ <text:p text:style-name="Standard">T20:A2-27</text:p>
+ <text:p text:style-name="Standard">T20:A2-28</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table20.A2" office:value-type="string">
+ <text:section text:style-name="Sect2" text:name="Section2">
+ <text:p text:style-name="Standard">T20:B2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table20.A2" office:value-type="string">
+ <text:section text:style-name="Sect2" text:name="Section3">
+ <text:p text:style-name="Standard">T20:C2</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table20.D2" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section4">
+ <text:p text:style-name="P1">T20:D2</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"><text:soft-page-break/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf113287.fodt b/sw/qa/extras/uiwriter/data/tdf113287.fodt
new file mode 100644
index 000000000..041984e17
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113287.fodt
@@ -0,0 +1,291 @@
+<?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:generator>LibreOfficeDev/6.0.0.0.alpha0$Linux_X86_64 LibreOffice_project/9916abc7ca68d597ef260ea61a056b7360f70665</meta:generator>
+ <dc:date>2017-10-19T13:48:19.569869895</dc:date>
+ <meta:editing-duration>PT1M55S</meta:editing-duration>
+ <meta:editing-cycles>4</meta:editing-cycles>
+ <meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="2" meta:paragraph-count="22" meta:word-count="26" meta:character-count="215" meta:non-whitespace-character-count="210"/>
+ </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">30535</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">20851</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">8050</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">901</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">30533</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">20849</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">0</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="AnchoredTextOverflowLegacy" 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="PrintProspect" 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="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintPaperFromSetup" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" 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="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" 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="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" 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="PrinterName" config:type="string"/>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" 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="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 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="InvertBorderSpacing" 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="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">473003</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" 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="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</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="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" 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="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="PrintDrawings" 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="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+ <config:config-item config:name="StylesNoDefault" 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="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</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="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" 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="true"/>
+ <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="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" 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="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/>
+ <text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol" text:master-page-name="Endnote" style:num-format="1" 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="Table1" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+ </style:style>
+ <style:style style:name="Table1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+ </style:style>
+ <style:style style:name="Table1.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+ </style:style>
+ <style:style style:name="Table1.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="PG_5f_Default">
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties>
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <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: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>
+ <style:page-layout style:name="pm3">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="6.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" 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:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm" style:dynamic-spacing="false"/>
+ </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="Endnote" style:page-layout-name="pm2"/>
+ <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <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-decls>
+ <text:p text:style-name="P1">Start</text:p>
+ <text:p>P02</text:p>
+ <text:p>P03</text:p>
+ <text:p>P04</text:p>
+ <text:p>P05</text:p>
+ <text:p>P06</text:p>
+ <text:p>P07</text:p>
+ <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-column table:style-name="Table1.C"/>
+ <table:table-column table:style-name="Table1.D"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p>Table1:A1-P01</text:p>
+ <text:p>Table1:A1-P02</text:p>
+ <text:p>Table1:A1-P03</text:p>
+ <text:p>Table1:A1-P04</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p>Table1:B1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p>Table1:C1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.D1" office:value-type="string">
+ <text:p>Table1:D1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p>Table1:A2-P01</text:p>
+ <text:p>Table1:A2-P02</text:p>
+ <text:p>Table1:A2-P03</text:p>
+ <text:p>Table1:A2-P04</text:p>
+ <text:p>Table1:A2-P05</text:p>
+ <text:p>Table1:A2-P06</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p>Table1:B2</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p>Table1:C2</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.D2" office:value-type="string">
+ <text:p>Table1:D2</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p>End</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf113445.fodt b/sw/qa/extras/uiwriter/data/tdf113445.fodt
new file mode 100644
index 000000000..b6c3de4bd
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113445.fodt
@@ -0,0 +1,348 @@
+<?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:generator>LibreOfficeDev/6.0.0.0.alpha1$Linux_X86_64 LibreOffice_project/54a0f24d1650637efb4557c0f72a9978bc9acc96</meta:generator>
+ <meta:creation-date>2014-11-10T09:45:40.73</meta:creation-date>
+ <dc:date>2017-10-02T14:36:23</dc:date>
+ <meta:editing-cycles>4</meta:editing-cycles>
+ <meta:editing-duration>PT1.570S</meta:editing-duration>
+ <meta:document-statistic meta:character-count="15144" meta:image-count="1" meta:non-whitespace-character-count="12952" meta:object-count="0" meta:page-count="6" meta:paragraph-count="498" meta:table-count="28" meta:word-count="2586"/>
+ </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">45563</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">12305</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">4069</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">901</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">45561</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">12303</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">0</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="AnchoredTextOverflowLegacy" 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="PrintProspect" 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="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintPaperFromSetup" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" 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="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" 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="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" 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="PrinterName" config:type="string"/>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" 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="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 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="InvertBorderSpacing" 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="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">353015</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" 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="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</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="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" 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="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="PrintDrawings" 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="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+ <config:config-item config:name="StylesNoDefault" 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="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</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="OpenSymbol" svg:font-family="OpenSymbol"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Tahoma2" svg:font-family="Tahoma" style:font-family-generic="system"/>
+ <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="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="MS Mincho" svg:font-family="&apos;MS Mincho&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" 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="#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="true"/>
+ <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="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" 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="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+ </style:style>
+ <style:style style:name="Table2.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+ </style:style>
+ <style:style style:name="Table2.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+ </style:style>
+ <style:style style:name="Table2.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+ </style:style>
+ <style:style style:name="Table2.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="PG_5f_Default">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="#f2f9fb" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm3">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="7.001cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" 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="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <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-decls>
+ <text:p text:style-name="P1"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-column table:style-name="Table2.B"/>
+ <table:table-column table:style-name="Table2.C"/>
+ <table:table-column table:style-name="Table2.D"/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:A1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:B1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:C1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:D1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:A2</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:B2</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:C2</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:D2</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="Standard"><text:soft-page-break/>Table2:A3</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section2">
+ <text:p text:style-name="Standard">Table2:B3</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section3">
+ <text:p text:style-name="Standard">Table2:C3</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section4">
+ <text:p text:style-name="Standard">Table2:D3</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section5">
+ <text:p text:style-name="Standard">Table2:A4</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section6">
+ <text:p text:style-name="Standard">Table2:B4</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section7">
+ <text:p text:style-name="Standard">Table2:C4</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section8">
+ <text:p text:style-name="Standard">Table2:D4</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section9">
+ <text:p text:style-name="Standard">Table2:A5</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section10">
+ <text:p text:style-name="Standard">Table2:B5</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section11">
+ <text:p text:style-name="Standard">Table2:C5</text:p>
+ </text:section>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section12">
+ <text:p text:style-name="Standard">Table2:D5</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ </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/uiwriter/data/tdf113481-IVS.odt b/sw/qa/extras/uiwriter/data/tdf113481-IVS.odt
new file mode 100644
index 000000000..1d4a13929
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113481-IVS.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113520.fodt b/sw/qa/extras/uiwriter/data/tdf113520.fodt
new file mode 100644
index 000000000..e82f98cb6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113520.fodt
@@ -0,0 +1,292 @@
+<?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:generator>LibreOfficeDev/6.0.0.0.alpha1$Linux_X86_64 LibreOffice_project/10dd4c228fd4b01fea4b85bbe6d79536cefc9671</meta:generator>
+ <meta:creation-date>2014-11-10T09:45:40.73</meta:creation-date>
+ <dc:date>2017-10-26T12:28:06.120632908</dc:date>
+ <meta:editing-cycles>6</meta:editing-cycles>
+ <meta:editing-duration>PT2M38S</meta:editing-duration>
+ <dc:creator>Miklos Vajna</dc:creator>
+ <meta:document-statistic meta:character-count="9401" meta:image-count="1" meta:non-whitespace-character-count="8229" meta:object-count="0" meta:page-count="7" meta:paragraph-count="289" meta:table-count="28" meta:word-count="1397"/>
+ </office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <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="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="AnchoredTextOverflowLegacy" 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="PrintProspect" 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="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintPaperFromSetup" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" 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="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" 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="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" 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="PrinterName" config:type="string"/>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" 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="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 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="InvertBorderSpacing" 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="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">508478</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" 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="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</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="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" 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="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="PrintDrawings" 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="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+ <config:config-item config:name="StylesNoDefault" 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="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</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="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
+ <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="AR PL SungtiL GB" svg:font-family="&apos;AR PL SungtiL GB&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="system" 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="Tahoma" svg:font-family="Tahoma" 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="#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="true"/>
+ <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="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" 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="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </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="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="AR PL SungtiL GB" style:font-family-asian="&apos;AR PL SungtiL GB&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&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" loext:contextual-spacing="false" fo:line-height="120%"/>
+ </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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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" loext: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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss" 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="Lucida Sans1" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </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>
+ <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="Table1" style:family="table">
+ <style:table-properties style:width="16.662cm" fo:margin-left="0cm" fo:margin-right="0cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.623cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table2.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="PG_5f_Default">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="transparent" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" 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="7.001cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" 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="true" 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="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm2"/>
+ </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-decls>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="Standard"/>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="Standard">Section1:P01</text:p>
+ <text:p text:style-name="Standard">Section1:P02</text:p>
+ <text:p text:style-name="Standard">Section1:P03</text:p>
+ <text:p text:style-name="Standard">Section1:P04</text:p>
+ <text:p text:style-name="Standard">Section1:P05</text:p>
+ <text:p text:style-name="Standard">Section1:P06</text:p>
+ <text:p text:style-name="Standard">Section1:P07</text:p>
+ <text:p text:style-name="Standard">Section1:P08</text:p>
+ <text:p text:style-name="Standard">Section1:P09</text:p>
+ <text:p text:style-name="Standard">Section1:P10</text:p>
+ <text:p text:style-name="Standard">Section1:P11</text:p>
+ <text:p text:style-name="Standard">Section1:P12</text:p>
+ <text:p text:style-name="Standard">Section1:P13</text:p>
+ <text:p text:style-name="Standard">Section1:P14</text:p>
+ <text:p text:style-name="Standard">Section1:P15</text:p>
+ <text:p text:style-name="Standard">Section1:P16</text:p>
+ <text:p text:style-name="Standard">Section1:P17</text:p>
+ <text:p text:style-name="Standard">Section1:P18</text:p>
+ <text:p text:style-name="Standard">Section1:P19</text:p>
+ <text:p text:style-name="Standard">Section1:P20</text:p>
+ <text:p text:style-name="Standard">Section1:P21</text:p>
+ <text:p text:style-name="Standard">Section1:P22</text:p>
+ <text:p text:style-name="Standard">Section1:P23</text:p>
+ <text:p text:style-name="Standard">Section1:P24</text:p>
+ <text:p text:style-name="Standard">Section1:P25</text:p>
+ <text:p text:style-name="Standard">Section1:P26</text:p>
+ <text:p text:style-name="Standard">Section1:P27</text:p>
+ <text:p text:style-name="Standard">Section1:P28</text:p>
+ <text:p text:style-name="Standard">Section1:P29</text:p>
+ <text:p text:style-name="Standard">Section1:P30</text:p>
+ <text:p text:style-name="Standard">Section1:P31</text:p>
+ <text:p text:style-name="Standard">Section1:P32</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ </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/uiwriter/data/tdf113686.fodt b/sw/qa/extras/uiwriter/data/tdf113686.fodt
new file mode 100644
index 000000000..7f7f8ac74
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113686.fodt
@@ -0,0 +1,278 @@
+<?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: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">49108</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">22809</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">9377</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3007</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">49107</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">22807</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">0</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-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="PrintProspect" 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="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintPaperFromSetup" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" 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="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" 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="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" 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="PrinterName" config:type="string"/>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" 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="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 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="InvertBorderSpacing" 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="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">676140</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" 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="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</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="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" 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="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="PrintDrawings" 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="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+ <config:config-item config:name="StylesNoDefault" 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="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</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="Liberation Sans" svg:font-family="Liberation Sans" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="Liberation Serif" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" 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="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" 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="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:language="en" fo:country="GB"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="16.662cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0cm" fo:border="0.05pt solid #000000">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="16.616cm" fo:margin-left="0cm" fo:margin-right="0.046cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="4345*"/>
+ </style:style>
+ <style:style style:name="Table2.B" style:family="table-column">
+ <style:table-column-properties style:column-width="3.025cm" style:rel-column-width="1715*"/>
+ </style:style>
+ <style:style style:name="Table2.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.738cm" style:rel-column-width="1552*"/>
+ </style:style>
+ <style:style style:name="Table2.D" style:family="table-column">
+ <style:table-column-properties style:column-width="3.189cm" style:rel-column-width="1808*"/>
+ </style:style>
+ <style:style style:name="Table2.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="PG_5f_Default">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="transparent" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style: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="none" 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: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: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>
+ <style:page-layout style:name="pm3">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="6.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" 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: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>
+ <number:number-style style:name="N3">
+ <number:number number:decimal-places="0" loext:min-decimal-places="0" number:min-integer-digits="1" number:grouping="true"/>
+ </number:number-style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="Endnote" style:page-layout-name="pm2"/>
+ <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:p text:style-name="P1"/>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-column table:style-name="Table2.B"/>
+ <table:table-column table:style-name="Table2.C"/>
+ <table:table-column table:style-name="Table2.D"/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p>Table2:A1-P01</text:p>
+ <text:p>Table2:A1-P02</text:p>
+ <text:p>Table2:A1-P03</text:p>
+ <text:p>Table2:A1-P04</text:p>
+ <text:p>Table2:A1-P05</text:p>
+ <text:p>Table2:A1-P06</text:p>
+ <text:p>Table2:A1-P07</text:p>
+ <text:p>Table2:A1-P08</text:p>
+ <text:p>Table2:A1-P09</text:p>
+ <text:p>Table2:A1-P10</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:B1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:C1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+ <text:p text:style-name="Standard">Table2:D1</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="Standard">Table1:A1</text:p>
+ </text:section>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Table1:A2</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/uiwriter/data/tdf113790.docx b/sw/qa/extras/uiwriter/data/tdf113790.docx
new file mode 100644
index 000000000..b6334aae7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113790.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odt b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odt
new file mode 100644
index 000000000..f4d58da53
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_off.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odt b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odt
new file mode 100644
index 000000000..8de77fc61
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113877_blank_bold_on.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odt b/sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odt
new file mode 100644
index 000000000..3dbebda6f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113877_blank_ownStandard.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odt b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odt
new file mode 100644
index 000000000..db480edbe
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odt b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odt
new file mode 100644
index 000000000..47fe7e076
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113877_insert_numbered_list_abcd.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf114536.odt b/sw/qa/extras/uiwriter/data/tdf114536.odt
new file mode 100644
index 000000000..4ad9c7f1f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf114536.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf115065.odt b/sw/qa/extras/uiwriter/data/tdf115065.odt
new file mode 100644
index 000000000..86fc28aaf
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf115065.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf115815.odt b/sw/qa/extras/uiwriter/data/tdf115815.odt
new file mode 100644
index 000000000..7c2aad0da
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf115815.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf116403-considerborders.odt b/sw/qa/extras/uiwriter/data/tdf116403-considerborders.odt
new file mode 100644
index 000000000..c0fb91ad7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf116403-considerborders.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf116789.fodt b/sw/qa/extras/uiwriter/data/tdf116789.fodt
new file mode 100644
index 000000000..87caf309f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf116789.fodt
@@ -0,0 +1,27 @@
+<?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:body>
+ <office:text>
+ <table:table table:name="Table1">
+ <table:table-column table:number-columns-repeated="2"/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p><text:bookmark-start text:name="Bookmark 1"/>hello<text:bookmark-end text:name="Bookmark 1"/></text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p/>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <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/uiwriter/data/tdf117225.odt b/sw/qa/extras/uiwriter/data/tdf117225.odt
new file mode 100644
index 000000000..9e31eb6b2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf117225.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf117923.docx b/sw/qa/extras/uiwriter/data/tdf117923.docx
new file mode 100644
index 000000000..c10ac2405
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf117923.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf118311.fodt b/sw/qa/extras/uiwriter/data/tdf118311.fodt
new file mode 100644
index 000000000..cf1914e51
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf118311.fodt
@@ -0,0 +1,19 @@
+<?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:body>
+ <office:text>
+ <table:table>
+ <table:table-column table:number-columns-repeated="2"/>
+ <table:table-row>
+ <table:table-cell office:value-type="string">
+ <text:p>a</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string">
+ <text:p>b</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf118699.docx b/sw/qa/extras/uiwriter/data/tdf118699.docx
new file mode 100644
index 000000000..6aea0911a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf118699.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf119019.docx b/sw/qa/extras/uiwriter/data/tdf119019.docx
new file mode 100644
index 000000000..d38c9e4ae
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf119019.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf120336.docx b/sw/qa/extras/uiwriter/data/tdf120336.docx
new file mode 100644
index 000000000..a9152bf31
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf120336.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf120338.docx b/sw/qa/extras/uiwriter/data/tdf120338.docx
new file mode 100644
index 000000000..94e0023ce
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf120338.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf121546.odt b/sw/qa/extras/uiwriter/data/tdf121546.odt
new file mode 100644
index 000000000..6b8b78f69
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf121546.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf122942.odt b/sw/qa/extras/uiwriter/data/tdf122942.odt
new file mode 100644
index 000000000..c56583d30
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf122942.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf123102.odt b/sw/qa/extras/uiwriter/data/tdf123102.odt
new file mode 100644
index 000000000..731a9b152
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf123102.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf123285.odt b/sw/qa/extras/uiwriter/data/tdf123285.odt
new file mode 100644
index 000000000..1f92e1511
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf123285.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf123786.fodt b/sw/qa/extras/uiwriter/data/tdf123786.fodt
new file mode 100644
index 000000000..8eb85164b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf123786.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: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:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="ru" fo:country="RU"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf124397.docx b/sw/qa/extras/uiwriter/data/tdf124397.docx
new file mode 100644
index 000000000..65e2d25bc
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf124397.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf124722.rtf b/sw/qa/extras/uiwriter/data/tdf124722.rtf
new file mode 100644
index 000000000..93f386d00
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf124722.rtf
@@ -0,0 +1,873 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\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;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f379\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
+{\f380\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f382\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f383\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f386\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
+{\f387\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;}{\*\defchp \fs24 }{\*\defpap
+\ql \li0\ri0\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\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 \styrsid14253008 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused \sqformat Normal Table;}{
+\s15\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
+\sbasedon0 \snext15 \slink16 \ssemihidden \sunhideused \styrsid10907829 header;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \slink15 \slocked \ssemihidden \styrsid10907829 Header Char;}{\s17\ql \li0\ri0\widctlpar
+\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
+\sbasedon0 \snext17 \slink18 \ssemihidden \sunhideused \styrsid10907829 footer;}{\*\cs18 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \slink17 \slocked \ssemihidden \styrsid10907829 Footer Char;}}{\*\rsidtbl \rsid7148033\rsid10907829\rsid12212756
+\rsid14253008}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\creatim\yr2011\mo2\dy26\hr12\min47}{\revtim\yr2011\mo2\dy26\hr12\min48}{\version1}{\edmins0}{\nofpages22}
+{\nofwords17496}{\nofchars71928}{\nofcharsws89246}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
+\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale110\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\rempersonalinfo\allowfieldendsel
+\wrppunct\asianbrkrule\rsidroot12212756\newtblstyruls\nogrowautofit\remdttm\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal
+\nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0{\*\ftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid10907829 \rtlch\fcs1 \af0\afs24\alang1025
+\ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829 \chftnsep
+\par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid10907829 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829 \chftnsepc
+\par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid10907829 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829 \chftnsep
+\par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid10907829 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829 \chftnsepc
+\par }}\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid14253008\sftnbj {\headerl \ltrpar \pard\plain \ltrpar\s15\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
+\rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829
+\par }}{\headerr \ltrpar \pard\plain \ltrpar\s15\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829
+\par }}{\footerl \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829
+\par }}{\footerr \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829
+\par }}{\headerf \ltrpar \pard\plain \ltrpar\s15\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829
+\par }}{\footerf \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid10907829
+\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\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1
+\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid12212756\charrsid12212756 The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the la
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+ the lazy dog. The quick bro}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid12212756 wn fox jumped over the lazy dog.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid12212756\charrsid12212756
+ The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick br
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid12212756 wn fox jumped over the lazy dog.}{\rtlch\fcs1 \af0 \ltrch\fcs0
+\insrsid12212756\charrsid12212756 The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the la
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+he lazy dog. The quick brown fox jumped over the lazy dog. The quick bro}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid12212756 wn fox jumped over the lazy dog.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid12212756\charrsid12212756
+ The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brow
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+p
+ed over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The
+
+quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped ov
+e
+r the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick
+
+brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the
+
+lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown
+
+fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy
+d
+og. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox j
+u
+mped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T
+h
+e quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped
+o
+ver the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The qui
+c
+k brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over t
+h
+e lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick bro
+w
+n fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the laz
+y
+ dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox
+
+jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
+
+The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumpe
+d
+ over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The q
+u
+ick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over
+
+the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick b
+r
+own fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the l
+a
+zy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown f
+o
+x jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy do
+g
+. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jum
+ped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.}{
+\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid14253008
+\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
+72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
+2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
+44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7
+065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000
+00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08
+84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc
+52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353
+bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468
+656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c
+070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7
+29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65
+312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8
+a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04
+98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c
+94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471
+7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671
+9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1
+e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5
+193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1
+17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2
+8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6
+6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a
+668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847
+bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e
+16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b
+5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0
+8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2
+c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966
+0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b
+7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb
+9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0
+088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf
+8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26
+ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0
+28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6
+345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93
+b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30
+254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74
+68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24
+51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198
+720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528
+a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000
+000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000
+002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468
+656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000
+00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000
+00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000}
+{\*\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
+4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000000031
+2376f6d5cb01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf124904.fodt b/sw/qa/extras/uiwriter/data/tdf124904.fodt
new file mode 100644
index 000000000..0e98b4915
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf124904.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: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" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94000180659744" text:id="ct94000180659744">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>x</dc:creator>
+ <dc:date>2021-11-08T11:45:09</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94000186222464" text:id="ct94000186222464">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>x</dc:creator>
+ <dc:date>2021-11-08T11:39:40</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:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start text:name="__RefHeading___Toc1_4053559556"/>Heading of example<text:change-start text:change-id="ct94000180659744"/> <text:span text:style-name="T1">document</text:span><text:change-end text:change-id="ct94000180659744"/> <text:change-start text:change-id="ct94000186222464"/>file<text:bookmark-end text:name="__RefHeading___Toc1_4053559556"/><text:change-end text:change-id="ct94000186222464"/></text:h>
+ <text:p text:style-name="P1">Reference to <text:bookmark-ref text:reference-format="number-all-superior" text:ref-name="__RefHeading___Toc1_4053559556"/><text:bookmark-ref text:reference-format="text" text:ref-name="__RefHeading___Toc1_4053559556">Heading of example document </text:bookmark-ref></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf125151_protected.fodt b/sw/qa/extras/uiwriter/data/tdf125151_protected.fodt
new file mode 100644
index 000000000..634f2d223
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125151_protected.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:body>
+ <office:text>
+ <text:section text:name="Section1" text:protected="true">
+ <text:p>Protected Section</text:p>
+ <text:p text:style-name="Standard"><field:fieldmark-start text:name="Unknown1" field:type="vnd.oasis.opendocument.field.FORMTEXT"/>Form Text<field:fieldmark-end/></text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf125151_protectedB.fodt b/sw/qa/extras/uiwriter/data/tdf125151_protectedB.fodt
new file mode 100644
index 000000000..82e7bd267
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125151_protectedB.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: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="ProtectForm" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:body>
+ <office:text>
+ <text:p>UnProtected Section, but with Protect_Form set</text:p>
+ <text:p text:style-name="Standard"><field:fieldmark-start text:name="Unknown1" field:type="vnd.oasis.opendocument.field.FORMTEXT"/>Form Text<field:fieldmark-end/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf125261.odt b/sw/qa/extras/uiwriter/data/tdf125261.odt
new file mode 100644
index 000000000..f89e1b21f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125261.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf125310.fodt b/sw/qa/extras/uiwriter/data/tdf125310.fodt
new file mode 100644
index 000000000..cf204e698
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125310.fodt
@@ -0,0 +1,23 @@
+<?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:styles>
+ <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:master-page-name="">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" style:page-number="auto" fo:break-before="auto" fo:break-after="auto"/>
+ <style:text-properties fo:font-size="130%" fo:font-weight="bold" style:font-size-asian="130%" style:font-weight-asian="bold" style:font-size-complex="130%" style:font-weight-complex="bold"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Heading_20_1" style:master-page-name="Standard">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:h text:style-name="P1" text:outline-level="1">This paragraph has got a page break.</text:h>
+ <text:p>This hasn’t.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf125310b.fodt b/sw/qa/extras/uiwriter/data/tdf125310b.fodt
new file mode 100644
index 000000000..1c131ce99
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125310b.fodt
@@ -0,0 +1,24 @@
+<?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:styles>
+ <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:master-page-name="">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" style:page-number="auto" fo:break-before="auto" fo:break-after="auto"/>
+ <style:text-properties fo:font-size="130%" fo:font-weight="bold" style:font-size-asian="130%" style:font-weight-asian="bold" style:font-size-complex="130%" style:font-weight-complex="bold"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Heading_20_1" style:master-page-name="Standard">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:h text:style-name="P1" text:outline-level="1">This paragraph has got a page break.</text:h>
+ <text:p>This hasn’t.</text:p>
+ <text:h text:style-name="P1" text:outline-level="1">This paragraph has got a page break.</text:h>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf125881.docx b/sw/qa/extras/uiwriter/data/tdf125881.docx
new file mode 100644
index 000000000..569d048ee
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125881.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf125916.docx b/sw/qa/extras/uiwriter/data/tdf125916.docx
new file mode 100644
index 000000000..6e1350da9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125916.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf126206.docx b/sw/qa/extras/uiwriter/data/tdf126206.docx
new file mode 100644
index 000000000..166125e7a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf126206.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf126340.odt b/sw/qa/extras/uiwriter/data/tdf126340.odt
new file mode 100644
index 000000000..79b481015
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf126340.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf126504.odt b/sw/qa/extras/uiwriter/data/tdf126504.odt
new file mode 100644
index 000000000..3f09230f2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf126504.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf126626.docx b/sw/qa/extras/uiwriter/data/tdf126626.docx
new file mode 100644
index 000000000..a2a289c2d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf126626.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf126784_distributeSelectedColumns.odt b/sw/qa/extras/uiwriter/data/tdf126784_distributeSelectedColumns.odt
new file mode 100644
index 000000000..90c23c56a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf126784_distributeSelectedColumns.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf127652.odt b/sw/qa/extras/uiwriter/data/tdf127652.odt
new file mode 100644
index 000000000..12b2b156b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf127652.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf128335.odt b/sw/qa/extras/uiwriter/data/tdf128335.odt
new file mode 100644
index 000000000..6fb758af9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf128335.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf128375.docx b/sw/qa/extras/uiwriter/data/tdf128375.docx
new file mode 100644
index 000000000..dffd4037c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf128375.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf128603.odt b/sw/qa/extras/uiwriter/data/tdf128603.odt
new file mode 100644
index 000000000..6fb758af9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf128603.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf128739.docx b/sw/qa/extras/uiwriter/data/tdf128739.docx
new file mode 100644
index 000000000..cf5d00f91
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf128739.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf128782.odt b/sw/qa/extras/uiwriter/data/tdf128782.odt
new file mode 100644
index 000000000..bb4a7d7f6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf128782.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf128860.fodt b/sw/qa/extras/uiwriter/data/tdf128860.fodt
new file mode 100644
index 000000000..5e93b60f6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf128860.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: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:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="de" fo:country="DE"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf129270.odt b/sw/qa/extras/uiwriter/data/tdf129270.odt
new file mode 100644
index 000000000..e86c1f872
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf129270.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf129382.docx b/sw/qa/extras/uiwriter/data/tdf129382.docx
new file mode 100644
index 000000000..19da7ef53
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf129382.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf129655-vtextbox.odt b/sw/qa/extras/uiwriter/data/tdf129655-vtextbox.odt
new file mode 100644
index 000000000..8d668400c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf129655-vtextbox.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf129805.docx b/sw/qa/extras/uiwriter/data/tdf129805.docx
new file mode 100644
index 000000000..53cb5550d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf129805.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf130094.fodt b/sw/qa/extras/uiwriter/data/tdf130094.fodt
new file mode 100644
index 000000000..4c3cb917b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf130094.fodt
@@ -0,0 +1,177 @@
+<?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:meta><meta:creation-date>2022-02-08T10:19:21.699082588</meta:creation-date><dc:date>2022-02-08T10:19:45.472654585</dc:date><meta:editing-duration>PT24S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="3" meta:word-count="6" meta:character-count="22" meta:non-whitespace-character-count="22"/><meta:generator>LibreOfficeDev/7.4.0.0.alpha0$Linux_X86_64 LibreOffice_project/9d02b1edafd44b75a8996a97c329fdd4967e8f54</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="'Lohit Devanagari'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="'Noto Serif CJK SC'" 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%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="es" fo:country="ES" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" 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="es" fo:country="ES" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" 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="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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: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:parent-style-name="Standard" style:list-style-name="L1">
+ <style:text-properties officeooo:rsid="000ff775" officeooo:paragraph-rsid="000ff775"/>
+ </style:style>
+ <text:list-style style:name="L1">
+ <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" loext:num-list-format="%1%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%2%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%3%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%4%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%5%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%6%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%7%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%8%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%9%." style:num-suffix="." style:num-format="1">
+ <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" text:style-name="Numbering_20_Symbols" loext:num-list-format="%10%." style:num-suffix="." style:num-format="1">
+ <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>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:list xml:id="list665726368" text:style-name="L1">
+ <text:list-item>
+ <text:p text:style-name="P1">First</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">Second</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">Third</text:p>
+ </text:list-item>
+ </text:list>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf130680.odt b/sw/qa/extras/uiwriter/data/tdf130680.odt
new file mode 100644
index 000000000..9065433dc
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf130680.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf130685.odt b/sw/qa/extras/uiwriter/data/tdf130685.odt
new file mode 100644
index 000000000..f83827ebb
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf130685.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf130746.odt b/sw/qa/extras/uiwriter/data/tdf130746.odt
new file mode 100644
index 000000000..7fcbec95b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf130746.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf130805.odt b/sw/qa/extras/uiwriter/data/tdf130805.odt
new file mode 100644
index 000000000..12e215123
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf130805.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf131684.docx b/sw/qa/extras/uiwriter/data/tdf131684.docx
new file mode 100644
index 000000000..7d3397dfb
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf131684.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf131963.docx b/sw/qa/extras/uiwriter/data/tdf131963.docx
new file mode 100644
index 000000000..15db34ee9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf131963.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132160.odt b/sw/qa/extras/uiwriter/data/tdf132160.odt
new file mode 100644
index 000000000..8a8ae7b8b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132160.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132187.odt b/sw/qa/extras/uiwriter/data/tdf132187.odt
new file mode 100644
index 000000000..27bea84b6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132187.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132236.odt b/sw/qa/extras/uiwriter/data/tdf132236.odt
new file mode 100644
index 000000000..f37c9befc
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132236.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132321.odt b/sw/qa/extras/uiwriter/data/tdf132321.odt
new file mode 100644
index 000000000..1b725c072
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132321.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132420.odt b/sw/qa/extras/uiwriter/data/tdf132420.odt
new file mode 100644
index 000000000..8e556aa5a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132420.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132596.docx b/sw/qa/extras/uiwriter/data/tdf132596.docx
new file mode 100644
index 000000000..f19213ae1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132596.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132597.odt b/sw/qa/extras/uiwriter/data/tdf132597.odt
new file mode 100644
index 000000000..68e9c9dff
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132597.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132637_protectTrackChanges.doc b/sw/qa/extras/uiwriter/data/tdf132637_protectTrackChanges.doc
new file mode 100644
index 000000000..2f75e6027
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132637_protectTrackChanges.doc
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132725.odt b/sw/qa/extras/uiwriter/data/tdf132725.odt
new file mode 100644
index 000000000..b14fc2048
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132725.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132744.odt b/sw/qa/extras/uiwriter/data/tdf132744.odt
new file mode 100644
index 000000000..1c5894bc1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132744.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132911.odt b/sw/qa/extras/uiwriter/data/tdf132911.odt
new file mode 100644
index 000000000..3c311f3ed
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132911.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf132944.odt b/sw/qa/extras/uiwriter/data/tdf132944.odt
new file mode 100644
index 000000000..08c3562ae
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf132944.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf133477.fodt b/sw/qa/extras/uiwriter/data/tdf133477.fodt
new file mode 100644
index 000000000..e18a0e458
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133477.fodt
@@ -0,0 +1,21 @@
+<?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:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 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>
+ <draw:gradient draw:name="Gradient_20_1" draw:display-name="Gradient 1" draw:style="rectangular" draw:cx="0%" draw:cy="0%" draw:start-color="#ffff00" draw:end-color="#0066cc" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="45deg" draw:border="0%"/>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:stroke="none" svg:stroke-width="0cm" svg:stroke-color="#000000" draw:marker-start="" draw:marker-start-width="0.3cm" draw:marker-start-center="false" draw:marker-end="" draw:marker-end-width="0.3cm" draw:marker-end-center="false" draw:fill="gradient" draw:fill-color="#00b8ff" draw:fill-gradient-name="Gradient_20_1" draw:gradient-step-count="3" draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle" draw:shadow="hidden" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:shadow-color="#808080" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="middle" 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>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"><draw:rect text:anchor-type="as-char" draw:z-index="0" draw:name="Alakzat1" draw:style-name="gr1" svg:width="4cm" svg:height="10cm">
+ <text:p/>
+ </draw:rect></text:p>
+ <text:p text:style-name="Standard">Top left corner is blue.</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf133490.odt b/sw/qa/extras/uiwriter/data/tdf133490.odt
new file mode 100644
index 000000000..98050b58f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133490.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf133524.fodt b/sw/qa/extras/uiwriter/data/tdf133524.fodt
new file mode 100644
index 000000000..aaa4b88d5
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133524.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: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:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="hu" fo:country="HU"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf133524_ro.fodt b/sw/qa/extras/uiwriter/data/tdf133524_ro.fodt
new file mode 100644
index 000000000..591db1f4e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133524_ro.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: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:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="ro" fo:country="RO"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf133589.fodt b/sw/qa/extras/uiwriter/data/tdf133589.fodt
new file mode 100644
index 000000000..68fa94697
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133589.fodt
@@ -0,0 +1,19 @@
+<?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:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="hu" fo:country="HU" style:writing-mode="rl-tb"/>
+ </style:default-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="end" style:justify-single-word="false" style:writing-mode="rl-tb"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf133967.odt b/sw/qa/extras/uiwriter/data/tdf133967.odt
new file mode 100644
index 000000000..18ed5bfb7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133967.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf133982.docx b/sw/qa/extras/uiwriter/data/tdf133982.docx
new file mode 100644
index 000000000..d2e8573d1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133982.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf133990.odt b/sw/qa/extras/uiwriter/data/tdf133990.odt
new file mode 100644
index 000000000..8eaca8161
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133990.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134021.docx b/sw/qa/extras/uiwriter/data/tdf134021.docx
new file mode 100644
index 000000000..cda11fbdf
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134021.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134227.docx b/sw/qa/extras/uiwriter/data/tdf134227.docx
new file mode 100644
index 000000000..e5228e6ca
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134227.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134250.fodt b/sw/qa/extras/uiwriter/data/tdf134250.fodt
new file mode 100644
index 000000000..86aaa140c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134250.fodt
@@ -0,0 +1,86 @@
+<?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.2" 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" 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: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>
+
+ <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="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="Standard">
+ <style:text-properties officeooo:rsid="001fe5a9" officeooo:paragraph-rsid="001fe5a9"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="001fe5a9" officeooo:paragraph-rsid="001fe5a9"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="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:section text:style-name="Sect1" text:name="Section1">
+ <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="P2">foo</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P1">b<text:span text:style-name="T1">a</text:span><text:bookmark text:name="Bookmark 1"/>r</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf134252.fodt b/sw/qa/extras/uiwriter/data/tdf134252.fodt
new file mode 100644
index 000000000..6e19ac847
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134252.fodt
@@ -0,0 +1,95 @@
+<?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="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" 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: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="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="Standard">
+ <style:text-properties officeooo:rsid="00078615" officeooo:paragraph-rsid="00078615"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="00095b34" officeooo:paragraph-rsid="00095b34"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="#81d41a" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect2" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style: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: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:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="P1">bar</text:p>
+ <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="P3">baz</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </text:section>
+ <text:section text:style-name="Sect2" text:name="Section2">
+ <text:p text:style-name="P1">foo</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf134253.odt b/sw/qa/extras/uiwriter/data/tdf134253.odt
new file mode 100644
index 000000000..234b0bdca
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134253.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134404.odt b/sw/qa/extras/uiwriter/data/tdf134404.odt
new file mode 100644
index 000000000..53875f138
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134404.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134436.fodt b/sw/qa/extras/uiwriter/data/tdf134436.fodt
new file mode 100644
index 000000000..40d02a83a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134436.fodt
@@ -0,0 +1,83 @@
+<?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="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" 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: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>
+ <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="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="Standard">
+ <style:text-properties officeooo:rsid="001bc824" officeooo:paragraph-rsid="001bc824"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="001bc824" officeooo:paragraph-rsid="001bc824"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="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>
+ <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="P2">a</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P1">b</text:p>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="P1"/>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf134626.odt b/sw/qa/extras/uiwriter/data/tdf134626.odt
new file mode 100644
index 000000000..157bc2587
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134626.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134931.odt b/sw/qa/extras/uiwriter/data/tdf134931.odt
new file mode 100644
index 000000000..bfd1ccf2e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134931.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134965.odt b/sw/qa/extras/uiwriter/data/tdf134965.odt
new file mode 100644
index 000000000..a51898df9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134965.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf135056.odt b/sw/qa/extras/uiwriter/data/tdf135056.odt
new file mode 100644
index 000000000..bd94317d0
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135056.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf135061.odt b/sw/qa/extras/uiwriter/data/tdf135061.odt
new file mode 100644
index 000000000..19b3afa31
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135061.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf135412.docx b/sw/qa/extras/uiwriter/data/tdf135412.docx
new file mode 100644
index 000000000..b420fa5ce
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135412.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf135623.docx b/sw/qa/extras/uiwriter/data/tdf135623.docx
new file mode 100644
index 000000000..ed139eaef
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135623.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf135661.odt b/sw/qa/extras/uiwriter/data/tdf135661.odt
new file mode 100644
index 000000000..7fe6a3ca4
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135661.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf135662.odt b/sw/qa/extras/uiwriter/data/tdf135662.odt
new file mode 100644
index 000000000..d65725bda
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135662.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf135733.odt b/sw/qa/extras/uiwriter/data/tdf135733.odt
new file mode 100644
index 000000000..58293a079
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135733.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf136385.odt b/sw/qa/extras/uiwriter/data/tdf136385.odt
new file mode 100644
index 000000000..ee008e523
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf136385.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf136452.fodt b/sw/qa/extras/uiwriter/data/tdf136452.fodt
new file mode 100644
index 000000000..74c3102aa
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf136452.fodt
@@ -0,0 +1,80 @@
+<?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="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <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="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: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 Devanagari1" 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 Devanagari1" 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"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="#3465a4" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect2" style:family="section">
+ <style:section-properties fo:background-color="#729fcf" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect3" style:family="section">
+ <style:section-properties fo:background-color="#3465a4" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard">A</text:p>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="Standard">B</text:p>
+ <text:p text:style-name="Standard">C</text:p>
+ </text:section>
+ <text:p text:style-name="Standard">D</text:p>
+ <text:section text:style-name="Sect2" text:name="Section2">
+ <text:p text:style-name="Standard">E</text:p>
+ <text:p text:style-name="Standard">F</text:p>
+ </text:section>
+ <text:p text:style-name="Standard">G</text:p>
+ <text:section text:style-name="Sect3" text:name="Section3">
+ <text:p text:style-name="Standard">H</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf136453.fodt b/sw/qa/extras/uiwriter/data/tdf136453.fodt
new file mode 100644
index 000000000..2234957e1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf136453.fodt
@@ -0,0 +1,66 @@
+<?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" 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: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="Sect1" style:family="section">
+ <style:section-properties fo:background-color="#81d41a" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style: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: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:p text:style-name="Standard">foo</text:p>
+ <text:p text:style-name="Standard">bar</text:p>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="Standard">baz</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf136715.odt b/sw/qa/extras/uiwriter/data/tdf136715.odt
new file mode 100644
index 000000000..ca5c89ce4
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf136715.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf136778.docx b/sw/qa/extras/uiwriter/data/tdf136778.docx
new file mode 100644
index 000000000..d1b6c877c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf136778.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf137964.odt b/sw/qa/extras/uiwriter/data/tdf137964.odt
new file mode 100644
index 000000000..efbb27628
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf137964.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf138130.docx b/sw/qa/extras/uiwriter/data/tdf138130.docx
new file mode 100644
index 000000000..a570dec4b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf138130.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf138482.docx b/sw/qa/extras/uiwriter/data/tdf138482.docx
new file mode 100644
index 000000000..7bb4623e2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf138482.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf139127.fodt b/sw/qa/extras/uiwriter/data/tdf139127.fodt
new file mode 100644
index 000000000..1acd9dc24
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf139127.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:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="0012fa68" officeooo:paragraph-rsid="0012fa68"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:break-before="page"/>
+ <style:text-properties officeooo:rsid="0011ba97" officeooo:paragraph-rsid="0011ba97"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal"/>
+ </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>
+ <style:page-layout style:name="pm2">
+ <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: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" style:next-style-name="Landscape"/>
+ <style:master-page style:name="Landscape" style:page-layout-name="pm2" style:next-style-name="Standard"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1">First <text:span text:style-name="T1">page</text:span></text:p>
+ <text:p text:style-name="P2">B</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf139638.odt b/sw/qa/extras/uiwriter/data/tdf139638.odt
new file mode 100644
index 000000000..5c3b73020
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf139638.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf139737.fodt b/sw/qa/extras/uiwriter/data/tdf139737.fodt
new file mode 100644
index 000000000..ff9fcfe21
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf139737.fodt
@@ -0,0 +1,306 @@
+<?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:meta><meta:initial-creator>xisco</meta:initial-creator><dc:creator>xisco</dc:creator><meta:editing-cycles>11</meta:editing-cycles><meta:creation-date>2020-05-29T10:25:00</meta:creation-date><dc:date>2020-05-29T10:32:00</dc:date><meta:editing-duration>PT7M</meta:editing-duration><meta:generator>LibreOfficeDev/7.3.1.0.0$Linux_X86_64 LibreOffice_project/54cda94175f372695c55576817e3ae14655598ea</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="5" meta:paragraph-count="25" meta:word-count="1816" meta:character-count="12318" meta:non-whitespace-character-count="10518"/><meta:user-defined meta:name="AppVersion">14.0000</meta:user-defined><meta:template xlink:type="simple" xlink:actuate="onRequest" xlink:title="Normal" xlink:href=""/></office:meta>
+ <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="Cambria" svg:font-family="Cambria" style:font-family-generic="roman" 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="Times New Roman" svg:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Times New Roman1" svg:font-family="'Times New Roman'" 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="11pt" fo:language="es" fo:country="ES" style:letter-kerning="false" 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.249cm" 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="es" fo:country="ES" style:letter-kerning="false" 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"/>
+ </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="0cm" style:contextual-spacing="false" fo:line-height="100%" fo:text-align="start" style:justify-single-word="false" fo:orphans="2" fo:widows="2" style:writing-mode="lr-tb"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="12pt" style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES" style:font-name-asian="Times New Roman1" style:font-family-asian="'Times New Roman'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:font-name-complex="Times New Roman1" style:font-family-complex="'Times New Roman'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="12pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" loext:linked-style-name="Body_20_Text_20_Char" style:class="text">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties fo:color="#ff0000" loext:opacity="100%" fo:language="es" fo:country="ES" fo:font-weight="bold" style:language-asian="es" style:country-asian="ES" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Standard" loext:linked-style-name="Heading_20_1_20_Char" style:default-outline-level="1" style:list-style-name="" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.847cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:keep-together="always" fo:keep-with-next="always"/>
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" style:font-name="Cambria" fo:font-family="Cambria" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="14pt" fo:font-weight="bold" style:font-name-asian="F" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-name-complex="F" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="_5f_Tesis" style:display-name="_Tesis" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:line-height="200%" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="1.251cm" style:auto-text-indent="false">
+ <style:tab-stops>
+ <style:tab-stop style:position="1.249cm"/>
+ <style:tab-stop style:position="2.498cm"/>
+ <style:tab-stop style:position="3.747cm"/>
+ <style:tab-stop style:position="4.995cm"/>
+ <style:tab-stop style:position="6.244cm"/>
+ <style:tab-stop style:position="7.493cm"/>
+ <style:tab-stop style:position="8.742cm"/>
+ <style:tab-stop style:position="9.991cm"/>
+ <style:tab-stop style:position="11.24cm"/>
+ <style:tab-stop style:position="12.488cm"/>
+ <style:tab-stop style:position="13.737cm"/>
+ <style:tab-stop style:position="14.118cm"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ <style:text-properties fo:color="#000000" loext:opacity="100%"/>
+ </style:style>
+ <style:style style:name="Contents_20_Heading" style:display-name="Contents Heading" style:family="paragraph" style:parent-style-name="Heading_20_1" style:next-style-name="Standard" style:default-outline-level="" style:class="index">
+ <style:paragraph-properties fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" loext:linked-style-name="Footer_20_Char" style:class="extra">
+ <style:paragraph-properties>
+ <style:tab-stops>
+ <style:tab-stop style:position="7.62cm" style:type="center"/>
+ <style:tab-stop style:position="15.24cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <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: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: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>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Footer">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0.635cm" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Contents_20_Heading">
+ <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="First_20_Page">
+ <style:paragraph-properties style:page-number="auto"/>
+ <style:text-properties fo:color="#4f81bd" loext:opacity="100%" style:font-name="Cambria" fo:font-size="16pt" style:font-size-asian="16pt"/>
+ </style:style>
+ <style:style style:name="P7" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="18pt" fo:font-weight="bold" style:font-size-asian="18pt" style:font-weight-asian="bold"/>
+ </style:style>
+ <style:style style:name="P8" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" fo:font-size="18pt" fo:font-weight="bold" style:font-size-asian="18pt" style:font-weight-asian="bold"/>
+ </style:style>
+ <style:style style:name="P12" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:paragraph-properties fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false"/>
+ <style:text-properties style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES"/>
+ </style:style>
+ <style:style style:name="P13" style:family="paragraph" style:parent-style-name="Text_20_body" style:master-page-name="Converted1">
+ <style:paragraph-properties fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false" style:page-number="auto" fo:break-before="page"/>
+ <style:text-properties style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES"/>
+ </style:style>
+ <style:style style:name="P15" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:paragraph-properties fo:line-height="150%"/>
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" fo:font-size="18pt" style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES" style:font-size-asian="18pt"/>
+ </style:style>
+ <style:style style:name="P16" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:paragraph-properties fo:line-height="150%" fo:text-align="end" style:justify-single-word="false"/>
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" fo:font-size="18pt" style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES" fo:font-weight="normal" style:font-size-asian="18pt" style:font-weight-asian="normal"/>
+ </style:style>
+ <style:style style:name="P17" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:paragraph-properties fo:line-height="150%" fo:text-align="end" style:justify-single-word="false"/>
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" fo:font-size="16pt" style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES" fo:font-weight="normal" style:font-size-asian="16pt" style:font-weight-asian="normal"/>
+ </style:style>
+ <style:style style:name="P18" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:paragraph-properties fo:line-height="150%"/>
+ </style:style>
+ <style:style style:name="P19" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:paragraph-properties fo:line-height="150%" fo:text-align="end" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P20" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:paragraph-properties fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P21" style:family="paragraph" style:parent-style-name="_5f_Tesis">
+ <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P22" style:family="paragraph" style:parent-style-name="_5f_Tesis">
+ <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="11pt" fo:font-style="italic" style:font-size-asian="11pt" style:font-style-asian="italic"/>
+ </style:style>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties fo:color="#4f81bd" loext:opacity="100%" style:font-name="Cambria" fo:font-size="16pt" fo:font-weight="bold" style:font-size-asian="16pt" style:font-weight-asian="bold"/>
+ </style:style>
+ <style:style style:name="T4" style:family="text">
+ <style:text-properties fo:font-size="11pt" style:font-size-asian="11pt"/>
+ </style:style>
+ <style:style style:name="T6" style:family="text">
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" fo:font-size="18pt" style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES" style:font-size-asian="18pt"/>
+ </style:style>
+ <style:style style:name="T7" style:family="text">
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" fo:font-size="18pt" style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES" fo:font-weight="normal" style:font-size-asian="18pt" style:font-weight-asian="normal"/>
+ </style:style>
+ <style:style style:name="T8" style:family="text">
+ <style:text-properties fo:color="#365f91" loext:opacity="100%" fo:font-size="16pt" style:rfc-language-tag="es-ES-u-co-trad" fo:language="es" fo:country="ES" fo:font-weight="normal" style:font-size-asian="16pt" style:font-weight-asian="normal"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="page" fo:background-color="#ffffff" style:background-transparency="100%" draw:fill="solid" draw:fill-color="#ffffff" draw:opacity="0%" fo:padding="0cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="1.27cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="22860" style:layout-grid-base-height="0.176cm" 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:header-footer-properties fo:min-height="1.27cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="1.169cm" style:dynamic-spacing="true"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="22860" style:layout-grid-base-height="0.176cm" 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="pm3">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="1.27cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="44" style:layout-grid-base-height="0.55cm" 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.37cm" 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:header-footer-properties fo:min-height="1.27cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="1.169cm" style:dynamic-spacing="true"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm4">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="44" style:layout-grid-base-height="0.55cm" 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.37cm" 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: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:footer>
+ <text:p text:style-name="P1"/>
+ </style:footer>
+ </style:master-page>
+ <style:master-page style:name="First_20_Page" style:display-name="First Page" style:page-layout-name="pm2" draw:style-name="dp1" style:next-style-name="Standard"/>
+ <style:master-page style:name="Converted1" style:page-layout-name="pm3" draw:style-name="dp1">
+ <style:footer>
+ <text:p text:style-name="P1"/>
+ </style:footer>
+ </style:master-page>
+ </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="P6"/>
+ <text:section text:style-name="Sect1" text:name="TextSection">
+ <text:p text:style-name="Standard"><text:span text:style-name="T2">x</text:span></text:p>
+ <text:p text:style-name="Standard"><text:bookmark text:name="_GoBack"/></text:p>
+ <text:p text:style-name="P21"><text:span text:style-name="T4">x</text:span></text:p>
+ <text:p text:style-name="P22"/>
+ <text:p text:style-name="_5f_Tesis"><text:span text:style-name="T4"><text:line-break/></text:span></text:p>
+ <text:p text:style-name="P7"/>
+ <text:p text:style-name="P3"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="P8"/>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P13"/>
+ <text:p text:style-name="P15"/>
+ <text:p text:style-name="P18"><text:span text:style-name="T6">x</text:span></text:p>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P12"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P19"><text:span text:style-name="T8">x</text:span></text:p>
+ <text:p text:style-name="P17"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P20"><text:span text:style-name="T7"><text:s/></text:span></text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf139843.odt b/sw/qa/extras/uiwriter/data/tdf139843.odt
new file mode 100644
index 000000000..67a555799
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf139843.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf140828.docx b/sw/qa/extras/uiwriter/data/tdf140828.docx
new file mode 100644
index 000000000..bfdabc5d7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf140828.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf140975.docx b/sw/qa/extras/uiwriter/data/tdf140975.docx
new file mode 100644
index 000000000..d11a912d3
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf140975.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf141175.odt b/sw/qa/extras/uiwriter/data/tdf141175.odt
new file mode 100644
index 000000000..3ccfa6b1a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf141175.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf142130.fodt b/sw/qa/extras/uiwriter/data/tdf142130.fodt
new file mode 100644
index 000000000..1bc26e6ac
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf142130.fodt
@@ -0,0 +1,37 @@
+<?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" 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.3" 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>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94146400887392" text:id="ct94146400887392">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>X</dc:creator>
+ <dc:date>2021-05-07T17:32:23</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="Standard"><draw:frame text:anchor-type="as-char" svg:width="7.276cm" svg:height="4.842cm" draw:z-index="0"><draw:image draw:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABmJLR0QA/wD/AP+gvaeTAAAA
+ CXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5QUGCg8pr2vxSAAAAB1pVFh0Q29tbWVudAAA
+ AAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAADElEQVQI12N4stkEAARKAcxTwEa2AAAAAElF
+ TkSuQmCC
+ </office:binary-data>
+ </draw:image>
+ </draw:frame><text:change-start text:change-id="ct94146400887392"/><draw:frame text:anchor-type="as-char" svg:width="10.663cm" svg:height="5.415cm" draw:z-index="1"><draw:image draw:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAAAmJLR0QA/4ePzL8AAAAJcEhZ
+ cwAACxMAAAsTAQCanBgAAAAHdElNRQflBQYKGR4LTuGQAAAACklEQVQI12M4DwAA0QDQfVbA
+ HQAAAABJRU5ErkJggg==
+ </office:binary-data>
+ </draw:image>
+ </draw:frame><text:change-end text:change-id="ct94146400887392"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf142157.odt b/sw/qa/extras/uiwriter/data/tdf142157.odt
new file mode 100644
index 000000000..072c86889
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf142157.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf142196.fodt b/sw/qa/extras/uiwriter/data/tdf142196.fodt
new file mode 100644
index 000000000..b184ba22e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf142196.fodt
@@ -0,0 +1,30 @@
+<?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" 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.3" 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>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94146400887392" text:id="ct94146400887392">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>X</dc:creator>
+ <dc:date>2021-05-07T17:32:23</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="Standard"><text:change-start text:change-id="ct94146400887392"/>Lorem <draw:frame text:anchor-type="char" svg:width="10.663cm" svg:height="5.415cm" draw:z-index="1"><draw:image draw:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAAAmJLR0QA/4ePzL8AAAAJcEhZ
+ cwAACxMAAAsTAQCanBgAAAAHdElNRQflBQYKGR4LTuGQAAAACklEQVQI12M4DwAA0QDQfVbA
+ HQAAAABJRU5ErkJggg==
+ </office:binary-data>
+ </draw:image>
+ </draw:frame>ipsum <text:change-end text:change-id="ct94146400887392"/>dolor sit amet.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf142700.fodt b/sw/qa/extras/uiwriter/data/tdf142700.fodt
new file mode 100644
index 000000000..16064a644
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf142700.fodt
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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: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:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" 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>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" 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" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true"/>
+ </style:style>
+ <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" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94919822029600" text:id="ct94919822029600">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>X</dc:creator>
+ <dc:date>2021-05-07T17:32:23</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="Standard"><text:change-start text:change-id="ct94919822029600"/>Lorem <draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="char" svg:x="4.89cm" svg:y="0.499cm" svg:width="6.541cm" svg:height="3.32cm" draw:z-index="0"><draw:image draw:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAAAmJLR0QA/4ePzL8AAAAJcEhZ
+ cwAACxMAAAsTAQCanBgAAAAHdElNRQflBQYKGR4LTuGQAAAACklEQVQI12M4DwAA0QDQfVbA
+ HQAAAABJRU5ErkJggg==
+ </office:binary-data>
+ </draw:image>
+ </draw:frame>ipsum <text:change-end text:change-id="ct94919822029600"/>dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf142715.odt b/sw/qa/extras/uiwriter/data/tdf142715.odt
new file mode 100644
index 000000000..70682a540
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf142715.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf143176.fodt b/sw/qa/extras/uiwriter/data/tdf143176.fodt
new file mode 100644
index 000000000..fdd89c38d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf143176.fodt
@@ -0,0 +1,20 @@
+<?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:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="hu" fo:country="HU" style:writing-mode="rl-tb"/>
+ </style:default-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="end" style:justify-single-word="false" style:writing-mode="rl-tb"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1">Lorem ipsum dolor sit amet,</text:p>
+ <text:p text:style-name="P1">consectetur adipiscing elit.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf143244.odt b/sw/qa/extras/uiwriter/data/tdf143244.odt
new file mode 100644
index 000000000..0fd3ff915
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf143244.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf143760_ContourToWrapOff.docx b/sw/qa/extras/uiwriter/data/tdf143760_ContourToWrapOff.docx
new file mode 100644
index 000000000..a604513c6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf143760_ContourToWrapOff.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf143904.odt b/sw/qa/extras/uiwriter/data/tdf143904.odt
new file mode 100644
index 000000000..5a1d28664
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf143904.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf144058.fodt b/sw/qa/extras/uiwriter/data/tdf144058.fodt
new file mode 100644
index 000000000..6c311cbbc
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf144058.fodt
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="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="4.249cm" style:rel-column-width="16383*"/>
+ </style:style>
+ <style:style style:name="Table1.D" style:family="table-column">
+ <style:table-column-properties style:column-width="4.251cm" style:rel-column-width="16386*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.D1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.D2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="17cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="17cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table2.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="Table2.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000d0e98" officeooo:paragraph-rsid="000d0e98"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="000d0e98" officeooo:paragraph-rsid="000ebd4f"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:paragraph-rsid="000d0e98"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="000ebd4f" officeooo:paragraph-rsid="000ebd4f"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:h text:outline-level="1">Lorem ipsum</text:h>
+ <text:p text:style-name="P1">dolor sit amet, consectetur adipiscing elit.</text:p>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A" table:number-columns-repeated="3"/>
+ <table:table-column table:style-name="Table1.D"/>
+ <table:table-row table:style-name="TableLine94153531010224">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P4">x</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.D1" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine94153591510960">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.D2" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-row table:style-name="TableLine94153607741600">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ <text:p text:style-name="P2">x</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine94153608696784">
+ <table:table-cell table:style-name="Table2.A2" office:value-type="string">
+ <text:p text:style-name="P4">x</text:p>
+ <text:p text:style-name="P4">x</text:p>
+ <text:p text:style-name="P4">x</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P1">Integer sodales tincidunt tristique.</text:p>
+ <text:p text:style-name="P1">Aliquam velit massa, laoreet vel leo nec, volutpat facilisis eros.</text:p>
+ <text:p text:style-name="P3"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf144317.odt b/sw/qa/extras/uiwriter/data/tdf144317.odt
new file mode 100644
index 000000000..9ec7cee61
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf144317.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf144748.fodt b/sw/qa/extras/uiwriter/data/tdf144748.fodt
new file mode 100644
index 000000000..4da444cf0
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf144748.fodt
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart: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:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:officeooo="http://openoffice.org/2009/office" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="15.984cm" fo:margin-left="0.009cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="5.327cm"/>
+ </style:style>
+ <style:style style:name="Table1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="5.329cm"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding-left="0.191cm" fo:padding-right="0.191cm" fo:padding-top="0cm" fo:padding-bottom="0cm" fo:border="0.5pt solid #000000" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding-left="0.191cm" fo:padding-right="0.191cm" fo:padding-top="0cm" fo:padding-bottom="0cm" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" fo:text-align="start" style:justify-single-word="false" fo:orphans="2" fo:widows="2"/>
+ <style:text-properties style:font-name="Calibri" fo:font-size="11pt" fo:language="hu" fo:country="HU" style:letter-kerning="false" 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:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Text_20_body"/>
+ <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:number-columns-repeated="2"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">a</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">b</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">c</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P1"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P1"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P1"/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">d</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">e</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">f</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">g</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">h</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1">i</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf144840.odt b/sw/qa/extras/uiwriter/data/tdf144840.odt
new file mode 100644
index 000000000..cb611262b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf144840.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf145091.docx b/sw/qa/extras/uiwriter/data/tdf145091.docx
new file mode 100644
index 000000000..f248d5d62
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf145091.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf145207.odt b/sw/qa/extras/uiwriter/data/tdf145207.odt
new file mode 100644
index 000000000..9e06862d7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf145207.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf145311.fodt b/sw/qa/extras/uiwriter/data/tdf145311.fodt
new file mode 100644
index 000000000..2ebc9d0eb
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf145311.fodt
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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>
+ <text:list xml:id="list3957351959" text:style-name="L1">
+ <text:list-item>
+ <text:p text:style-name="P1">January</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">February</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">March</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1"/>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">April</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">May</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">June</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">July</text:p>
+ </text:list-item>
+ </text:list>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf145321.odt b/sw/qa/extras/uiwriter/data/tdf145321.odt
new file mode 100644
index 000000000..0a460c7e6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf145321.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf145621.odt b/sw/qa/extras/uiwriter/data/tdf145621.odt
new file mode 100644
index 000000000..d3ff8650e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf145621.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf145731.odt b/sw/qa/extras/uiwriter/data/tdf145731.odt
new file mode 100644
index 000000000..312de88c5
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf145731.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf146449.odt b/sw/qa/extras/uiwriter/data/tdf146449.odt
new file mode 100644
index 000000000..c18d98e8a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf146449.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf147006.rtf b/sw/qa/extras/uiwriter/data/tdf147006.rtf
new file mode 100644
index 000000000..462c8dc4d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf147006.rtf
@@ -0,0 +1,24 @@
+{\rtf1\ansi\deff3\adeflang1025
+{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\fswiss\fprq2\fcharset0 Liberation Sans{\*\falt Arial};}{\f5\fnil\fprq2\fcharset0 Source Han Sans CN;}{\f6\fnil\fprq2\fcharset0 Lohit Devanagari;}{\f7\fnil\fprq0\fcharset128 Lohit Devanagari;}}
+{\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{\s0\snext0\rtlch\af6\afs24\alang1081 \ltrch\lang1031\langfe2052\hich\af3\loch\widctlpar\hyphpar0\ltrpar\cf0\f3\fs24\lang1031\kerning1\dbch\af8\langfe2052 Normal;}
+{\s20\sbasedon0\snext20 Frame Contents;}
+}{\*\generator LibreOfficeDev/7.4.0.0.alpha0$Linux_X86_64 LibreOffice_project/086efd30b2f5857d2b155099ec06c522d57ad81f}{\info{\creatim\yr2022\mo2\dy1\hr21\min9}{\revtim\yr2022\mo2\dy1\hr21\min10}{\printim\yr0\mo0\dy0\hr0\min0}}{\*\userprops}\deftab709
+\hyphauto1\viewscale100
+{\*\pgdsctbl
+{\pgdsc0\pgdscuse451\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Page Style;}}
+\formshade\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\pgndec\sftnnar\saftnnrlc\sectunlocked1\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
+{\*\ftnsep\chftnsep}\pard\plain \s0\rtlch\af6\afs24\alang1081 \ltrch\lang1031\langfe2052\hich\af3\loch\widctlpar\hyphpar0\ltrpar\cf0\f3\fs24\lang1031\kerning1\dbch\af8\langfe2052\loch\ql\ltrpar\loch
+{\shp{\*\shpinst\shpwr2\shpwrk0\shpbypara\shpbyignore\shptop114\shpbottom1248\shpbxcolumn\shpbxignore\shpleft4252\shpright5386\shpz0{\sp{\sn shapeType}{\sv 202}}{\sp{\sn dxWrapDistLeft}{\sv 72390}}{\sp{\sn dxWrapDistRight}{\sv 72390}}{\sp{\sn dyWrapDistTop}{\sv 72390}}{\sp{\sn dyWrapDistBottom}{\sv 72390}}{\sp{\sn posrelv}{\sv 2}}{\sp{\sn posv}{\sv 1}}{\sp{\sn posrelh}{\sv 2}}{\sp{\sn posh}{\sv 2}}{\sp{\sn dxTextLeft}{\sv 53975}}{\sp{\sn dyTextTop}{\sv 53975}}{\sp{\sn dxTextRight}{\sv 53975}}{\sp{\sn dyTextBottom}{\sv 53975}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineWidth}{\sv 635}}{\shptxt\pgndec\s20\loch\ql{
+{\*\shppict{\pict{\*\picprop{\sp{\sn wzDescription}{\sv }}{\sp{\sn wzName}{\sv }}}\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw19\pich19\picwgoal380\pichgoal380\pngblip
+89504e470d0a1a0a0000000d4948445200000013000000130806000000725036cc000000017352474200aece1ce900000006624b474400ff00ff00ffa0bda793
+000000097048597300000b1300000b1301009a9c180000000774494d4507db0906123403a1d7aeb2000000654944415438cb63fcffff3f03b50013318a2497b0
+fca78a6130838831908914171132908954afe13390899c30c225cf446e606353c7448e41b8d433e133e879cc1f467c7c747d3823009b467ce20c0c0c0c2cc428
+22d64026062a8251c38693618cd42c6901c5e32de14bf6d21e0000000049454e44ae426082}}
+}{\loch
+{\field{\*\fldinst { FORMTEXT }{\loch
+}}{\fldrslt {}{\loch
+}}}}
+\par \pard}}}
+
+\par }
diff --git a/sw/qa/extras/uiwriter/data/tdf147126.docx b/sw/qa/extras/uiwriter/data/tdf147126.docx
new file mode 100644
index 000000000..01ad39b34
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf147126.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf147507.fodt b/sw/qa/extras/uiwriter/data/tdf147507.fodt
new file mode 100644
index 000000000..bd579a4b8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf147507.fodt
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="15.621cm" fo:margin-left="-0.191cm" fo:margin-top="0cm" fo:margin-bottom="0cm" table:align="left" style:writing-mode="page"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="6.765cm"/>
+ </style:style>
+ <style:style style:name="Table1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.856cm"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding-left="0.191cm" fo:padding-right="0.191cm" fo:padding-top="0cm" fo:padding-bottom="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Block">
+ <style:paragraph-properties fo:orphans="0" fo:widows="0"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Caption" style:master-page-name="Standard">
+ <style:paragraph-properties fo:margin-left="1.27cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="1"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="i" style:print-orientation="portrait" fo:margin-top="0.847cm" fo:margin-bottom="1.27cm" fo:margin-left="3.81cm" fo:margin-right="2.54cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="36" 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:header-footer-properties fo:min-height="1.27cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="1.169cm" style:dynamic-spacing="true"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="1.27cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="1.169cm" style:dynamic-spacing="true"/>
+ </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:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94794749170512" text:id="ct94794749170512">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>Author</dc:creator>
+ <dc:date>2004-01-12T03:00:00</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94794748244288" text:id="ct94794748244288">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Author</dc:creator>
+ <dc:date>2004-01-05T21:45:00</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="P5"><text:change-start text:change-id="ct94794749170512"/>a<text:change-end text:change-id="ct94794749170512"/></text:p>
+ <text:p text:style-name="Contents_20_1"/>
+ <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:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P1"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Caption"><text:change-start text:change-id="ct94794748244288"/>s<text:change-end text:change-id="ct94794748244288"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf147723.docx b/sw/qa/extras/uiwriter/data/tdf147723.docx
new file mode 100644
index 000000000..4cdfb264b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf147723.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf148799.docx b/sw/qa/extras/uiwriter/data/tdf148799.docx
new file mode 100644
index 000000000..280fa18c1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf148799.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf148849.fodt b/sw/qa/extras/uiwriter/data/tdf148849.fodt
new file mode 100644
index 000000000..07efa8bb6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf148849.fodt
@@ -0,0 +1,53 @@
+<?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: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:dom="http://www.w3.org/2001/xml-events" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle: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="ct94678778467312" text:id="ct94678778467312">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>xxx4</dc:creator>
+ <dc:date>2021-09-21T14:41:20</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94678778469008" text:id="ct94678778469008">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>xxx4</dc:creator>
+ <dc:date>2021-09-21T14:41:20</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </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="Standard"/>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row table:style-name="TableLine94678778446544">
+ <table:table-cell table:style-name="TableBox94678778448640" office:value-type="string">
+ <text:p text:style-name="Standard"><text:change-start text:change-id="ct94678778467312"/>1<text:change-end text:change-id="ct94678778467312"/><text:change-start text:change-id="ct94678778469008"/><text:span text:style-name="T1">2</text:span><text:change-end text:change-id="ct94678778469008"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine94678778490512">
+ <table:table-cell table:style-name="TableBox94678778448640" office:value-type="string">
+ <text:p text:style-name="Standard">Row 2</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine94678778493872">
+ <table:table-cell table:style-name="TableBox94678778448640" office:value-type="string">
+ <text:p text:style-name="Standard">Row 3</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/uiwriter/data/tdf149089.odt b/sw/qa/extras/uiwriter/data/tdf149089.odt
new file mode 100644
index 000000000..08cb5a4db
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf149089.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf149550.docx b/sw/qa/extras/uiwriter/data/tdf149550.docx
new file mode 100644
index 000000000..3434fc1ff
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf149550.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf151462.odt b/sw/qa/extras/uiwriter/data/tdf151462.odt
new file mode 100755
index 000000000..cdd250232
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf151462.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf151993.docx b/sw/qa/extras/uiwriter/data/tdf151993.docx
new file mode 100644
index 000000000..462feb0a6
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf151993.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf153819.fodt b/sw/qa/extras/uiwriter/data/tdf153819.fodt
new file mode 100644
index 000000000..910807825
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf153819.fodt
@@ -0,0 +1,174 @@
+<?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:creation-date>2023-03-06T12:23:04.851927522</meta:creation-date><dc:date>2023-03-06T12:26:09.438416733</dc:date><meta:editing-duration>PT1M28S</meta:editing-duration><meta:editing-cycles>2</meta:editing-cycles><meta:generator>LibreOfficeDev/7.6.0.0.alpha0$Linux_X86_64 LibreOffice_project/e29c2b96b1aaba0fef5c83de7be18448e5903d08</meta:generator><meta:document-statistic meta:table-count="2" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="1" meta:character-count="1" meta:non-whitespace-character-count="1"/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">false</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="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="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"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="&apos;Noto Serif CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </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: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="hu" fo:country="HU" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" 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="hu" fo:country="HU" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" 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="no-limit" 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: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="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>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%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" loext:num-list-format="%10%" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ </text:outline-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="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.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table2.1" style:family="table-row">
+ <style:table-row-properties loext:text-changes-only="false"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.5pt solid #000000"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94918199868672" text:id="ct94918199868672">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2023-03-06T12:26:07</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>
+ <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="Table_20_Contents">x</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"><text:change-start text:change-id="ct94918199868672"/>â€<text:change-end text:change-id="ct94918199868672"/></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/uiwriter/data/tdf34957.odt b/sw/qa/extras/uiwriter/data/tdf34957.odt
new file mode 100644
index 000000000..291c6a29d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf34957.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf35021_tabOverMarginDemo.doc b/sw/qa/extras/uiwriter/data/tdf35021_tabOverMarginDemo.doc
new file mode 100644
index 000000000..22c79e8fa
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf35021_tabOverMarginDemo.doc
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf38394.fodt b/sw/qa/extras/uiwriter/data/tdf38394.fodt
new file mode 100644
index 000000000..238bab7b7
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf38394.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:meta><meta:initial-creator>ms </meta:initial-creator><meta:creation-date>2015-04-07T22:24:25.374012080</meta:creation-date><dc:date>2015-04-07T22:25:28.460806924</dc:date><dc:creator>ms </dc:creator><meta:editing-duration>PT1M3S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="1" meta:character-count="3" meta:non-whitespace-character-count="3"/><meta:generator>LibreOfficeDev/4.5.0.0.alpha0$Linux_X86_64 LibreOffice_project/52ae345470d8fa657817cf87b3e8e8c1b51bd7da</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Normal" svg:font-family="&apos;Source Han Sans CN Normal&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="fr" fo:country="FR" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Normal" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="fr" fo:country="FR" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Normal" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Frame_20_contents">
+ <style:text-properties officeooo:rsid="0007f24f" officeooo:paragraph-rsid="0007f24f"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties fo:margin-left="0.3cm" fo:margin-right="0.3cm" fo:margin-top="1.9cm" fo:margin-bottom="0.3cm" style:run-through="background" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" fo:background-color="#004586" style:background-transparency="25%" draw:fill="solid" draw:fill-gradient-name="">
+ <style:background-image/>
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:graphic-properties>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1"></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf39721.fodt b/sw/qa/extras/uiwriter/data/tdf39721.fodt
new file mode 100644
index 000000000..1acf06c5e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf39721.fodt
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94454449144064" text:id="ct94454449144064">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2021-01-06T16:18:57</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94454455394000" text:id="ct94454455394000">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2021-01-06T16:20:17</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:list xml:id="list627175737" text:style-name="L3">
+ <text:list-item>
+ <text:p text:style-name="P1">Lorem<text:change-start text:change-id="ct94454449144064"/> ipsu<text:change-end text:change-id="ct94454449144064"/>m</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">dol<text:change-start text:change-id="ct94454455394000"/>or <text:change-end text:change-id="ct94454455394000"/>sit</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">amet.</text:p>
+ </text:list-item>
+ </text:list>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf39828.fodt b/sw/qa/extras/uiwriter/data/tdf39828.fodt
new file mode 100644
index 000000000..b32ca5306
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf39828.fodt
@@ -0,0 +1,57 @@
+<?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: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:dom="http://www.w3.org/2001/xml-events" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle: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="ct94678778467312" text:id="ct94678778467312">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>xxx4</dc:creator>
+ <dc:date>2021-09-21T14:41:20</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94678778469008" text:id="ct94678778469008">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>xxx4</dc:creator>
+ <dc:date>2021-09-21T14:41:20</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </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>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row table:style-name="TableLine94678778446544">
+ <table:table-cell table:style-name="TableBox94678778448640" office:value-type="string">
+ <text:p text:style-name="Standard"><text:change-start text:change-id="ct94678778467312"/>1<text:change-end text:change-id="ct94678778467312"/><text:change-start text:change-id="ct94678778469008"/><text:span text:style-name="T1">2</text:span><text:change-end text:change-id="ct94678778469008"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine94678778490512">
+ <table:table-cell table:style-name="TableBox94678778448640" office:value-type="string">
+ <text:p text:style-name="Standard">2</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine94678778493872">
+ <table:table-cell table:style-name="TableBox94678778448640" office:value-type="string">
+ <text:p text:style-name="Standard"><text:table-formula text:formula="ooow: &lt;A1&gt;+&lt;A2&gt;" style:data-style-name="N0">4</text:table-formula></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine94678778453968">
+ <table:table-cell table:style-name="TableBox94678778448640" office:value-type="string">
+ <text:p text:style-name="Standard"><text:table-formula text:formula="ooow:SUM(&lt;A1:A3&gt;)" style:data-style-name="N0">8</text:table-formula></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/uiwriter/data/tdf45525.odt b/sw/qa/extras/uiwriter/data/tdf45525.odt
new file mode 100644
index 000000000..056ac84bc
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf45525.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf47471_paraStyleBackground.odt b/sw/qa/extras/uiwriter/data/tdf47471_paraStyleBackground.odt
new file mode 100644
index 000000000..1d6f1a5f2
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf47471_paraStyleBackground.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf50447.fodt b/sw/qa/extras/uiwriter/data/tdf50447.fodt
new file mode 100644
index 000000000..db849a632
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf50447.fodt
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
+ </style:style>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="T6" style:family="text">
+ <style:text-properties fo:font-style="italic" fo:font-weight="bold" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T7" style:family="text">
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="T8" style:family="text">
+ <style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:h text:outline-level="1"><text:span text:style-name="T8">Lorem</text:span><text:span text:style-name="T7"> </text:span><text:span text:style-name="T6">ipsum</text:span></text:h>
+ <text:p text:style-name="Standard"><text:span text:style-name="T1">dolor</text:span> sit <text:span text:style-name="T2">amet</text:span>.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf52391.fodt b/sw/qa/extras/uiwriter/data/tdf52391.fodt
new file mode 100644
index 000000000..b61d76f71
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf52391.fodt
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties fo:background-color="#fff200"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94610104150512" text:id="ct94610104150512">
+ <text:format-change>
+ <office:change-info>
+ <dc:creator>anonymous</dc:creator>
+ <dc:date>2019-01-29T12:09:20</dc:date>
+ </office:change-info>
+ </text:format-change>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94610081735200" text:id="ct94610081735200">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>anonymous</dc:creator>
+ <dc:date>2018-12-03T20:35:00</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94610081779760" text:id="ct94610081779760">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>anonymous</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="Standard"><text:change-start text:change-id="ct94610104150512"/><text:span text:style-name="T2">Portion1</text:span><text:change-end text:change-id="ct94610104150512"/><text:change-start text:change-id="ct94610081735200"/>Portion2<text:change-end text:change-id="ct94610081735200"/><text:change-start text:change-id="ct94610081779760"/></text:p>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"><text:change-end text:change-id="ct94610081779760"/>Format-only change in Portion1...</text:p>
+ <text:p text:style-name="Standard">...its rejection results also acception, but now rejection clears direct formatting in its text area.</text:p>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf54819.fodt b/sw/qa/extras/uiwriter/data/tdf54819.fodt
new file mode 100644
index 000000000..f9a8e9d0b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf54819.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: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:body>
+ <office:text>
+ <text:h>Lorem ipsum</text:h>
+ <text:p>dolor sit amet.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf54819b.odt b/sw/qa/extras/uiwriter/data/tdf54819b.odt
new file mode 100644
index 000000000..0fb7a6f95
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf54819b.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf58604.odt b/sw/qa/extras/uiwriter/data/tdf58604.odt
new file mode 100644
index 000000000..34c51c518
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf58604.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf61154.fodt b/sw/qa/extras/uiwriter/data/tdf61154.fodt
new file mode 100644
index 000000000..18e0c0a64
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf61154.fodt
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <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>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94620665978512" text:id="ct94620665978512">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>X</dc:creator>
+ <dc:date>2020-12-03</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94620665981936" text:id="ct94620665981936">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>X</dc:creator>
+ <dc:date>2020-12-03</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94620665960832" text:id="ct94620665960832">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>X</dc:creator>
+ <dc:date>2020-12-03</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="Standard"/>
+ <text:table-of-content text:style-name="Sect1" text:protected="true" text:name="Table of Contents1">
+ <text:table-of-content-source text:outline-level="10">
+ <text:index-title-template text:style-name="Contents_20_Heading">Table of Contents</text:index-title-template>
+ <text:table-of-content-entry-template text:outline-level="1" text:style-name="Contents_20_1">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="2" text:style-name="Contents_20_2">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="3" text:style-name="Contents_20_3">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="4" text:style-name="Contents_20_4">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="5" text:style-name="Contents_20_5">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="6" text:style-name="Contents_20_6">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="7" text:style-name="Contents_20_7">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="8" text:style-name="Contents_20_8">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="9" text:style-name="Contents_20_9">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ <text:table-of-content-entry-template text:outline-level="10" text:style-name="Contents_20_10">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ </text:table-of-content-source>
+ <text:index-body>
+ <text:index-title text:style-name="Sect1" text:name="Table of Contents1_Head">
+ <text:p text:style-name="Contents_20_Heading">Table of Contents</text:p>
+ </text:index-title>
+ <text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#__RefHeading__5574_1973640051" text:style-name="Index_20_Link" text:visited-style-name="Index_20_Link">Update me!<text:tab/>1</text:a></text:p>
+ </text:index-body>
+ </text:table-of-content>
+ <text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="__RefHeading__5574_1973640051"/>Text <text:change-start text:change-id="ct94620665978512"/>Inserted<text:change-end text:change-id="ct94620665978512"/><text:change-start text:change-id="ct94620665981936"/>D<text:change-end text:change-id="ct94620665981936"/><text:change-start text:change-id="ct94620665960832"/>eleted<text:bookmark-end text:name="__RefHeading__5574_1973640051"/><text:change-end text:change-id="ct94620665960832"/></text:h>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf64242_optimizeTable.odt b/sw/qa/extras/uiwriter/data/tdf64242_optimizeTable.odt
new file mode 100644
index 000000000..83d9be2cd
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf64242_optimizeTable.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf66405.docx b/sw/qa/extras/uiwriter/data/tdf66405.docx
new file mode 100644
index 000000000..398b0ce77
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf66405.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf76636.doc b/sw/qa/extras/uiwriter/data/tdf76636.doc
new file mode 100644
index 000000000..2d94868da
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf76636.doc
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf76817.docx b/sw/qa/extras/uiwriter/data/tdf76817.docx
new file mode 100644
index 000000000..20478778a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf76817.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf76817.fodt b/sw/qa/extras/uiwriter/data/tdf76817.fodt
new file mode 100644
index 000000000..4b6decb1a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf76817.fodt
@@ -0,0 +1,77 @@
+<?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: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>
+ <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:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false"/>
+ <style:text-properties fo:font-size="130%" fo:font-weight="bold" style:font-size-asian="130%" style:font-weight-asian="bold" style:font-size-complex="130%" 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:paragraph-properties fo:margin-top="0.353cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false"/>
+ <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>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="1">
+ <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="1" text:display-levels="2">
+ <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>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:h text:style-name="Heading_20_1" text:outline-level="1">Should be 1</text:h>
+ <text:h text:style-name="Heading_20_2" text:outline-level="2">Should be 1.1</text:h>
+ <text:h text:style-name="Heading_20_1" text:outline-level="1">Should be 2</text:h>
+ <text:h text:style-name="Heading_20_2" text:outline-level="2">Should be 2.1</text:h>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf77014.odt b/sw/qa/extras/uiwriter/data/tdf77014.odt
new file mode 100644
index 000000000..66d6835e8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf77014.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf78727.docx b/sw/qa/extras/uiwriter/data/tdf78727.docx
new file mode 100644
index 000000000..a8787d49c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf78727.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf83260-1.odt b/sw/qa/extras/uiwriter/data/tdf83260-1.odt
new file mode 100644
index 000000000..b6e144b57
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf83260-1.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf83798.odt b/sw/qa/extras/uiwriter/data/tdf83798.odt
new file mode 100644
index 000000000..51b01cd36
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf83798.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf84695-tab.odt b/sw/qa/extras/uiwriter/data/tdf84695-tab.odt
new file mode 100644
index 000000000..aa438bdf9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf84695-tab.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf84695.odt b/sw/qa/extras/uiwriter/data/tdf84695.odt
new file mode 100644
index 000000000..f8c3b0183
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf84695.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf86639.rtf b/sw/qa/extras/uiwriter/data/tdf86639.rtf
new file mode 100644
index 000000000..cdf0be77f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf86639.rtf
@@ -0,0 +1,3 @@
+{\rtf1\ansi\ansicpg1252\deff0\deflang1035{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
+{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang11\f0\fs22 testiiii\par
+}
diff --git a/sw/qa/extras/uiwriter/data/tdf87922.odt b/sw/qa/extras/uiwriter/data/tdf87922.odt
new file mode 100644
index 000000000..b0560f180
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf87922.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf88453-table.odt b/sw/qa/extras/uiwriter/data/tdf88453-table.odt
new file mode 100644
index 000000000..2c205616a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf88453-table.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf88453.odt b/sw/qa/extras/uiwriter/data/tdf88453.odt
new file mode 100644
index 000000000..de8491bbb
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf88453.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf89720.odt b/sw/qa/extras/uiwriter/data/tdf89720.odt
new file mode 100644
index 000000000..0b86ec51a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf89720.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf89954.odt b/sw/qa/extras/uiwriter/data/tdf89954.odt
new file mode 100644
index 000000000..538d9780a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf89954.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf90003.odt b/sw/qa/extras/uiwriter/data/tdf90003.odt
new file mode 100644
index 000000000..280c254a8
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf90003.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf90069.docx b/sw/qa/extras/uiwriter/data/tdf90069.docx
new file mode 100644
index 000000000..719502a67
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf90069.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf90362.fodt b/sw/qa/extras/uiwriter/data/tdf90362.fodt
new file mode 100644
index 000000000..97db3d59a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf90362.fodt
@@ -0,0 +1,12 @@
+<?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:body>
+ <office:text>
+ <text:p>Before</text:p>
+ <text:section text:name="Protected" text:protected="true">
+ <text:p>Inside</text:p>
+ </text:section>
+ <text:p>After</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf90883.odt b/sw/qa/extras/uiwriter/data/tdf90883.odt
new file mode 100644
index 000000000..ea9df2744
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf90883.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf91292_paraBackground.docx b/sw/qa/extras/uiwriter/data/tdf91292_paraBackground.docx
new file mode 100644
index 000000000..bd512eb3f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf91292_paraBackground.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf91801.fodt b/sw/qa/extras/uiwriter/data/tdf91801.fodt
new file mode 100644
index 000000000..4d5486f71
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf91801.fodt
@@ -0,0 +1,21 @@
+<?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:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:ooow="http://openoffice.org/2004/writer" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:user-field-decls>
+ <text:user-field-decl office:value-type="float" office:value="111" text:name="aaa"/>
+ <text:user-field-decl office:value-type="float" office:value="222" text:name="bbb"/>
+ </text:user-field-decls>
+ <table:table table:name="Table1">
+ <table:table-column/>
+ <table:table-row>
+ <table:table-cell table:formula="ooow:aaa+bbb*2" office:value-type="float" office:value="111">
+ <text:p>111</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf92648.docx b/sw/qa/extras/uiwriter/data/tdf92648.docx
new file mode 100644
index 000000000..4857723d3
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf92648.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf95699.odt b/sw/qa/extras/uiwriter/data/tdf95699.odt
new file mode 100644
index 000000000..79cf8586c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf95699.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf96943.odt b/sw/qa/extras/uiwriter/data/tdf96943.odt
new file mode 100644
index 000000000..1ee5b9f91
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf96943.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf97601.odt b/sw/qa/extras/uiwriter/data/tdf97601.odt
new file mode 100644
index 000000000..d3995f261
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf97601.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf98987.docx b/sw/qa/extras/uiwriter/data/tdf98987.docx
new file mode 100644
index 000000000..3b24e341d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf98987.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf99004.docx b/sw/qa/extras/uiwriter/data/tdf99004.docx
new file mode 100644
index 000000000..ef864407e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf99004.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf99689.odt b/sw/qa/extras/uiwriter/data/tdf99689.odt
new file mode 100644
index 000000000..456309a96
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf99689.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf99689_figures.odt b/sw/qa/extras/uiwriter/data/tdf99689_figures.odt
new file mode 100644
index 000000000..973e48d39
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf99689_figures.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf99689_tables.odt b/sw/qa/extras/uiwriter/data/tdf99689_tables.odt
new file mode 100644
index 000000000..15b386eab
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf99689_tables.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/testFontEmbedding.odt b/sw/qa/extras/uiwriter/data/testFontEmbedding.odt
new file mode 100644
index 000000000..17471af39
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/testFontEmbedding.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/testInconsistentBookmark.ott b/sw/qa/extras/uiwriter/data/testInconsistentBookmark.ott
new file mode 100644
index 000000000..ff3970a27
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/testInconsistentBookmark.ott
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/test_anchor_as_character.odt b/sw/qa/extras/uiwriter/data/test_anchor_as_character.odt
new file mode 100644
index 000000000..cad88f5bf
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/test_anchor_as_character.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/textfield-getanchor-gettext-in-footer.odt b/sw/qa/extras/uiwriter/data/textfield-getanchor-gettext-in-footer.odt
new file mode 100644
index 000000000..5089ae8af
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/textfield-getanchor-gettext-in-footer.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/threadedException.fodt b/sw/qa/extras/uiwriter/data/threadedException.fodt
new file mode 100644
index 000000000..0c0312d2a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/threadedException.fodt
@@ -0,0 +1,530 @@
+<?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:creation-date>2014-10-12T18:41:05.34</meta:creation-date>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta:editing-duration>PT5M19S</meta:editing-duration>
+
+
+
+
+ <meta:editing-cycles>3</meta:editing-cycles>
+
+
+
+
+ <meta:generator>LibreOfficeDev/4.4.0.0.alpha0$Windows_x86 LibreOffice_project/86a3fe47a66950e26d23d7d7f2680fa7d4fb0839</meta:generator>
+
+
+
+
+ <dc:title>writerInfo</dc:title>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <meta:initial-creator>Regina Henschel</meta:initial-creator><dc:date>2014-10-12T18:46:53.238000000</dc:date><dc:creator>Regina Henschel</dc:creator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="1" meta:page-count="1" meta:paragraph-count="8" meta:word-count="15" meta:character-count="135" meta:non-whitespace-character-count="124"/><meta:user-defined meta:name="Info 1"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/><meta:template xlink:type="simple" xlink:actuate="onRequest" xlink:title="writerInfo" xlink:href="../myoffice/template/meineStandards/writerInfo.ott" meta:date="2014-10-12T18:41:04.980000000"/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">4403</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">36747</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">15475</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">14095</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">8774</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">4403</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">36745</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">19876</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">0</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-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="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" 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="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintProspect" 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="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintRightPages" 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="ApplyParagraphMarkFormatToNumbering" 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="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" 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="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">1795725</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">1851411</config:config-item>
+ <config:config-item config:name="UnxForceZeroExtLeading" 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="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" 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="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" 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="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" 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="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="AddExternalLeading" 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="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="SaveGlobalDocumentLinks" 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="OutlineLevelYieldsNumbering" 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="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" 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="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" 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="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" 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="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" 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="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" 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="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" 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="CharacterCompressionType" config:type="short">0</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">
+ <ooo:library-embedded ooo:name="Standard"/>
+ </ooo:libraries>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Palatino Linotype" svg:font-family="&apos;Palatino Linotype&apos;"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Andale Sans UI" svg:font-family="&apos;Andale Sans UI&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Mangal" svg:font-family="Mangal" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" 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="#808080" draw:fill-color="#cfe7f5" 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="Palatino Linotype" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Palatino Linotype" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Andale Sans UI" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" 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:text-properties fo:language="en" fo:country="US"/>
+ </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:master-page-name="">
+ <style:paragraph-properties style:page-number="auto" fo:keep-with-next="always"/>
+ </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.212cm" loext:contextual-spacing="false"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false"/>
+ <style:text-properties style:font-name="Palatino Linotype" fo:font-family="&apos;Palatino Linotype&apos;" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </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" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-name="Palatino Linotype" fo:font-family="&apos;Palatino Linotype&apos;" fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma" 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-name="Palatino Linotype" fo:font-family="&apos;Palatino Linotype&apos;" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.498cm" style:type="center"/>
+ <style:tab-stop style:position="16.999cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.498cm" style:type="center"/>
+ <style:tab-stop style:position="16.999cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Header_20_left" style:display-name="Header left" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.498cm" style:type="center"/>
+ <style:tab-stop style:position="16.999cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>ame="P6" style:family="paragraph" style:parent-style-name="Frame_20_contents">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ </style:style>
+ <style:style style:name="P8" style:family="paragraph">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%" fo:text-align="center" fo:text-indent="0cm"/>
+ </style:style>
+ <style:style style:name="P8" style:family="paragraph">
+ <loext:graphic-properties draw:fill="solid" draw:fill-color="#cfe7f5"/>
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%" fo:text-align="center" fo:text-indent="0cm"/>
+ <style:text-properties style:use-window-font-color="true" style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Arial" fo:font-size="12pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" style:letter-kerning="true" style:font-name-asian="Microsoft YaHei" style:font-size-asian="12pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-name-complex="Mangal" style:font-size-complex="12pt" style:font-style-complex="normal" style:font-weight-complex="normal" style:text-emphasize="none" style:font-relief="none" style:text-overline-style="none" style:text-overline-color="font-color"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text"/>
+ <style:style style:name="T2" style:family="text">
+ <style:text-properties style:use-window-font-color="true" style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Arial" fo:font-size="12pt" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" style:letter-kerning="true" style:font-name-asian="Microsoft YaHei" style:font-size-asian="12pt" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-name-complex="Mangal" style:font-size-complex="12pt" style:font-style-complex="normal" style:font-weight-complex="normal" style:text-emphasize="none" style:font-relief="none" style:text-overline-style="none" style:text-overline-color="font-color"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Formula">
+ <style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" draw:ole-draw-aspect="1"/>
+ </style:style>
+ <text:list-style style:name="L1">
+ <text:list-level-style-number text:level="1" style:num-format="A">
+ <style:list-level-properties/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" style:num-format="A">
+ <style:list-level-properties text:space-before="0.8cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" style:num-format="A">
+ <style:list-level-properties text:space-before="1.6cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" style:num-format="A">
+ <style:list-level-properties text:space-before="2.4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" style:num-format="A">
+ <style:list-level-properties text:space-before="3.2cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" style:num-format="A">
+ <style:list-level-properties text:space-before="4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" style:num-format="A">
+ <style:list-level-properties text:space-before="4.8cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" style:num-format="A">
+ <style:list-level-properties text:space-before="5.6cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" style:num-format="A">
+ <style:list-level-properties text:space-before="6.4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" style:num-format="A">
+ <style:list-level-properties text:space-before="7.2cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ </text:list-style>
+ <text:list-style style:name="L2">
+ <text:list-level-style-number text:level="1" style:num-format="A">
+ <style:list-level-properties/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" style:num-format="A">
+ <style:list-level-properties text:space-before="0.8cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" style:num-format="A">
+ <style:list-level-properties text:space-before="1.6cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" style:num-format="A">
+ <style:list-level-properties text:space-before="2.4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" style:num-format="A">
+ <style:list-level-properties text:space-before="3.2cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" style:num-format="A">
+ <style:list-level-properties text:space-before="4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" style:num-format="A">
+ <style:list-level-properties text:space-before="4.8cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" style:num-format="A">
+ <style:list-level-properties text:space-before="5.6cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" style:num-format="A">
+ <style:list-level-properties text:space-before="6.4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" style:num-format="A">
+ <style:list-level-properties text:space-before="7.2cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ </text:list-style>
+ <text:list-style style:name="L3">
+ <text:list-level-style-number text:level="1" style:num-format="A">
+ <style:list-level-properties/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" style:num-format="A">
+ <style:list-level-properties text:space-before="0.8cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" style:num-format="A">
+ <style:list-level-properties text:space-before="1.6cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" style:num-format="A">
+ <style:list-level-properties text:space-before="2.4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" style:num-format="A">
+ <style:list-level-properties text:space-before="3.2cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" style:num-format="A">
+ <style:list-level-properties text:space-before="4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" style:num-format="A">
+ <style:list-level-properties text:space-before="4.8cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" style:num-format="A">
+ <style:list-level-properties text:space-before="5.6cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" style:num-format="A">
+ <style:list-level-properties text:space-before="6.4cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" style:num-format="A">
+ <style:list-level-properties text:space-before="7.2cm"/>
+ <style:text-properties fo:color="#000000" fo:font-size="100%"/>
+ </text:list-level-style-number>
+ </text:list-style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:stroke="solid" svg:stroke-width="0cm" svg:stroke-color="#808080" draw:marker-start="" draw:marker-start-width="0.199cm" draw:marker-start-center="false" draw:marker-end="" draw:marker-end-width="0.199cm" draw:marker-end-center="false" draw:fill="solid" draw:fill-color="#cfe7f5" draw:textarea-horizontal-align="center" draw:textarea-vertical-align="bottom" draw:fit-to-size="false" draw:fit-to-contour="false" fo:padding-top="0cm" fo:padding-bottom="0cm" fo:padding-left="0cm" fo:padding-right="0cm" draw:shadow="hidden" draw:shadow-offset-x="0.199cm" draw:shadow-offset-y="0.199cm" draw:shadow-color="#808080" style:run-through="foreground" style:wrap="left" style:number-wrapped-paragraphs="1" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="right" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" style:flow-with-text="false"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic" style:parent-style-name="Formula">
+ <style:graphic-properties draw:stroke="solid" svg:stroke-width="0cm" svg:stroke-color="#808080" draw:marker-start="" draw:marker-start-width="0.199cm" draw:marker-start-center="false" draw:marker-end="" draw:marker-end-width="0.199cm" draw:marker-end-center="false" draw:fill="solid" draw:fill-color="#cfe7f5" draw:textarea-horizontal-align="center" draw:textarea-vertical-align="bottom" draw:fit-to-size="false" draw:fit-to-contour="false" fo:padding-top="0cm" fo:padding-bottom="0cm" fo:padding-left="0cm" fo:padding-right="0cm" draw:shadow="hidden" draw:shadow-offset-x="0.199cm" draw:shadow-offset-y="0.199cm" draw:shadow-color="#808080" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="right" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" style:flow-with-text="false"/>
+ </style:style>
+ <style:page-layout sltye:name="pm1">
+ <style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" 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>
+ <style:page-layout style:name="pm2" style:page-usage="left">
+ <style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" 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>
+ <style:page-layout style:name="pm3" style:page-usage="right">
+ <style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" 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>
+ <style:page-layout style:name="pm4" style:page-usage="mirrored">
+ <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.499cm" fo:margin-bottom="2cm" fo:margin-left="3cm" 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:header-footer-properties fo:min-height="1.3cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.801cm" fo:background-color="#e6e6e6" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm" style:dynamic-spacing="false"/>
+ </style:footer-style>
+ </style:page-layout>
+ <number:date-style style:name="N84">
+ <number:year number:style="long"/>
+ <number:text>-</number:text>
+ <number:month number:style="long"/>
+ <number:text>-</number:text>
+ <number:day number:style="long"/>
+ </number:date-style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="Left_20_Page" style:display-name="Left Page" style:page-layout-name="pm2"/>
+ <style:master-page style:name="Right_20_Page" style:display-name="Right Page" style:page-layout-name="pm3"/>
+ <style:master-page style:name="Mirrored" style:page-layout-name="pm4">
+ <style:header>
+ <text:p text:style-name="Header_20_right">Thema einfügen</text:p>
+ </style:header>
+ <style:header-left>
+ <text:p text:style-name="Header_20_left">Thema einfügen</text:p>
+ </style:header-left>
+ <style:footer>
+ <text:p text:style-name="P1"><text:span text:style-name="Dokumentinfo"><text:file-name text:display="full">F:\TempLO-development&amp;QA\PolygonWithText.odt</text:file-name></text:span><text:tab/><text:page-number text:select-page="current">0</text:page-number>/<text:page-count>1</text:page-count></text:p>
+ </style:footer>
+ <style:footer-left>
+ <text:p text:style-name="P2"><text:page-number text:select-page="current">0</text:page-number>/<text:page-count>1</text:page-count><text:tab/><text:span text:style-name="Dokumentinfo"><text:print-dÿÿÿóstyle:data-style-name="N84"/></text:span></text:p>
+ </style:footer-left>
+ </style:master-page>
+ </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-decls>
+ <text:h text:style-name="P5" text:outline-level="1">Isosceles</text:h>
+ <text:p text:style-name="Text_20_body"><draw:polygon text:anchor-type="paragraph" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P8" svg:width="5.999cm" svg:height="5.199cm" svg:x="10.996cm" svg:y="0.001cm" svg:viewBox="0 0 6000 5200" draw:points="0,5200 6000,5200 3000,0">
+ <text:p text:style-name="P7"><text:span text:style-name="T2">Text area is bottom aligned.</text:span></text:p>
+ <text:p text:style-name="P7"><text:span text:style-name="T2">The second paragraph has a long part</text:span><text:span text:style-name="T2"><text:line-break/></text:span><text:span text:style-name="T2">and a short.</text:span></text:p>
+ <text:p text:style-name="P7"><text:span text:style-name="T2">This is a third paragraph.</text:span></text:p>
+ </draw:polygon>Polygon with simple text </text:p>
+ <text:p text:style-name="Text_20_body"><draw:polygon text:anchor-type="paragraph" draw:z-index="1" draw:style-name="gr2" draw:text-style-name="P8" svg:width="5.999cm" svg:height="5.199cm" svg:x="10.996cm" svg:y="-0.001cm" svg:viewBox="0 0 6000 5200" draw:points="0,5200 6000,5200 3000,0">
+ <text:p text:style-name="P6"><draw:frame draw:style-name="fr1" draw:name="Object1" text:anchor-type="as-char" svg:width="1.598cm" svg:height="0.998cm" draw:z-index="3"><draw:object>
+ <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
+ <semantics>
+ <mrow>
+ <mrow>
+ <mi>h</mi>
+ <mo stretchy="false">=</mo>
+ <mfrac>
+ <mi>a</mi>
+ <mn>2</mn>
+ </mfrac>
+ </mrow>
+ <msqrt>
+ <mn>3</mn>
+ </msqrt>
+ </mrow>
+ <annotation encoding="StarMath 5.0">h={ a over 2 }sqrt{ 3 }</annotation>
+ </semantics>
+ </math>
+ </draw:object><draw:image>
+ <office:binary-data>VkNMTVRGAQAxAAAAAAAAAAEAGwAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAT4GAADm
+ AwAARAAAAJYAAQACAAAACQCLAAEAAgAAAP//gQABABAAAAAAAAAAAAAAAD0GAADlAwAAlQAB
+ AAQAAAAAAAAAlgABAAIAAAAJAIsAAQACAAAAHwCKAAEAQgAAAAMAPAAAABAATGliZXJhdGlv
+ biBTZXJpZgAAAAAAAKYBAAAAAAMAAAAFAAAAAAACAP8DAAAAAAAAAAAA/wMAAAAAAIgAAQAC
+ AAAAAQCHAAEABQAAAP////8AhgABAAQAAAAAAAAAcgACABcAAABqAAAAZgIAAAEAaNMAAAAA
+ AAEAAQBoAIwAAQAAAAAAiwABAAIAAAAfAIoAAQA8AAAAAwA2AAAACgBPcGVuU3ltYm9sAAAA
+ AAAApgEAAP//AAAAAAUAAAAAAAAA/wMAAAAAAAAAAAD/AwAAAAAAiAABAAIAAAABAIcAAQAF
+ AAAA/////wCGAAEABAAAAAAAAAByAAIAGgAAAFMBAABmAgAAAQAAAD0ATwEAAAAAAQABAD0A
+ jAABAAAAAACLAAEAAgAAAB8AigABAEIAAAADADwAAAAQAExpYmVyYXRpb24gU2VyaWYAAAAA
+ AACmAQAAAAADAAAABQAAAAAAAgD/AwAAAAAAAAAAAP8DAAAAAACIAAEAAgAAAAEAhwABAAUA
+ AAD/////AIYAAQAEAAAAAAAAAHIAAgAXAAAA0AIAAH0BAAABAGHTAAAAAAABAAEAYQCMAAEA
+ AAAAAIsAAQACAAAAHwCFAAEABQAAAAAAAAABhAABAAUAAAAAAAAAAIoAAQA8AAAAAwA2AAAA
+ CgBPcGVuU3ltYm9sAAAAAAAApgEAAP//AAAAAAUAAAAAAAAA/wMAAAAAAAAAAAD/AwAAAAAA
+ iAABAAIAAAABAIcAAQAFAAAA/////wCGAAEABAAAAAAAAABnAAEAEAAAALsCAADnAQAAxQMA
+ APsBAACMAAEAAAAAAIsAAQACAAAAHwCKAAEAQgAAAAMAPAAAABAATGliZXJhdGlvbiBTZXJp
+ ZgAAAAAAAKYBAAAAAAMAAAAFAAAAAAAAAP8DAAAAAAAAAAAA/wMAAAAAAIgAAQACAAAAAQCH
+ AAEABQAAAP////8AhgABAAQAAAAAAAAAcgACABcAAADQAgAAjgMAAAEAMtMAAAAAAAEAAQAy
+ AIwAAQAAAAAAiwABAAIAAAAfAIoAAQA8AAAAAwA2AAAACgBPcGVuU3ltYm9sAAAvAQAACAIA
+ AP//AAAAAAUAAAAAAAAA/wMAAAAAAAAAAAD/AwAAAAAAiAABAAIAAAABAIcAAQAFAAAA////
+ /wCGAAEABAAAAAAAAAByAAIAGgAAAA0EAAB7AgAAAQAAABoi4QAAAAAAAQABABoijAABAAAA
+ AACLAAEAAgAAAB8AhQABAAUAAAAAAAAAAYQAAQAFAAAAAAAAAACKAAEAPAAAAAMANgAAAAoA
+ T3BlblN5bWJvbAAALwEAAAgCAAD//wAAAAAFAAAAAAAAAP8DAAAAAAAAAAAA/wMAAAAAAIgA
+ AQACAAAAAQCHAAEABQAAAP////8AhgABAAQAAAAAAAAAZwABABAAAADhBAAA6QAAAM4FAAD3
+ AAAAjAABAAAAAACLAAEAAgAAAB8AigABAEIAAAADADwAAAAQAExpYmVyYXRpb24gU2VyaWYA
+ AAAAAACmAQAAAAADAAAABQAAAAAAAAD/AwAAAAAAAAAAAP8DAAAAAACIAAEAAgAAAAEAhwAB
+ AAUAAAD/////AIYAAQAEAAAAAAAAAHIAAgAXAAAACwUAAGYCAAABADPTAAAAAAABAAEAMwCM
+ AAEAAAAAAJUAAQAEAAAAAAAAAJYAAQACAAAACQCMAAEAAAAAAA==
+ </office:binary-data>
+ </draw:image>
+ </draw:frame></text:p>
+ </draw:polygon>Polygon with TextBox </text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/try2.fodt b/sw/qa/extras/uiwriter/data/try2.fodt
new file mode 100644
index 000000000..624a75a85
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/try2.fodt
@@ -0,0 +1,66 @@
+<?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: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"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style: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:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct110725936" text:id="ct110725936">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2020-10-12T19:26:19</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct110726576" text:id="ct110726576">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2020-10-12T19:26:26</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="Standard">A<text:change-start text:change-id="ct110725936"/></text:p>
+ <text:p text:style-name="Standard"><text:change-end text:change-id="ct110725936"/>xxxxxxxxxxxxxxxxxx<text:change-start text:change-id="ct110726576"/>x</text:p>
+ <text:p text:style-name="Standard">y<text:change-end text:change-id="ct110726576"/>y</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/txbx_crash.odt b/sw/qa/extras/uiwriter/data/txbx_crash.odt
new file mode 100644
index 000000000..0a029da88
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/txbx_crash.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/udindex3.odt b/sw/qa/extras/uiwriter/data/udindex3.odt
new file mode 100644
index 000000000..e6c7736b9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/udindex3.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/unicodeAltX.odt b/sw/qa/extras/uiwriter/data/unicodeAltX.odt
new file mode 100644
index 000000000..3ad797c66
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/unicodeAltX.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/uno-cycle.odt b/sw/qa/extras/uiwriter/data/uno-cycle.odt
new file mode 100644
index 000000000..51e798f84
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/uno-cycle.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/variable-field-table-row-split-header.fodt b/sw/qa/extras/uiwriter/data/variable-field-table-row-split-header.fodt
new file mode 100644
index 000000000..9d3668b6b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/variable-field-table-row-split-header.fodt
@@ -0,0 +1,270 @@
+<?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:meta><meta:creation-date>2022-04-06T17:07:05.947362063</meta:creation-date><dc:date>2022-04-06T17:17:45.832216066</dc:date><meta:editing-duration>PT10M42S</meta:editing-duration><meta:editing-cycles>2</meta:editing-cycles><meta:generator>LibreOfficeDev/7.4.0.0.alpha0$Linux_X86_64 LibreOffice_project/a5b31508f860f07ec86cda3cf992fcea2bee68ef</meta:generator><meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="5" meta:paragraph-count="7" meta:word-count="7" meta:character-count="15" meta:non-whitespace-character-count="15"/></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="'Lohit Devanagari'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="'Source Han Serif CN'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <draw:gradient draw:name="gradient" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0deg" draw:border="0%"/>
+ <draw:hatch draw:name="hatch" draw:style="single" draw:color="#3465a4" draw:distance="0.02cm" draw:rotation="0"/>
+ <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%" loext:color-lum-mod="100%" loext:color-lum-off="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 Devanagari1" 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 Devanagari1" 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>
+ <style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="3.249cm" style:type="center"/>
+ <style:tab-stop style:position="6.5cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="3.249cm" style:type="center"/>
+ <style:tab-stop style:position="6.5cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="3.249cm" style:type="center"/>
+ <style:tab-stop style:position="6.5cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <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: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="Table1" style:family="table">
+ <style:table-properties style:width="6.5cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="3.251cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:break-before="page"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="10.5cm" fo:page-height="14.801cm" 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:header-footer-properties fo:min-height="0cm" fo:margin-bottom="0.499cm" fo:background-color="transparent" draw:fill="none"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0cm" fo:margin-top="0.499cm" fo:background-color="transparent" draw:fill="none"/>
+ </style:footer-style>
+ </style:page-layout>
+ <number:number-style style:name="N0">
+ <number:number number:min-integer-digits="1"/>
+ </number:number-style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ <style:header>
+ <text:p text:style-name="Header"><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">4</text:variable-get></text:p>
+ </style:header>
+ <style:footer>
+ <text:p text:style-name="Footer"><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">4</text:variable-get></text:p>
+ </style:footer>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:variable-decls>
+ <text:variable-decl office:value-type="float" text:name="CARRYOVER_VALUE"/>
+ </text:variable-decls>
+ <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="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
+ <table:table-row table:style-name="TableLine213872096">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"><text:soft-page-break/></text:p>
+ <text:p text:style-name="P2"/>
+ <text:p text:style-name="P2"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">0</text:variable-get><text:variable-set text:name="CARRYOVER_VALUE" office:value-type="float" office:value="1" style:data-style-name="N0">1</text:variable-set><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">1</text:variable-get></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine213872096">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"><text:soft-page-break/></text:p>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <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"><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">1</text:variable-get><text:variable-set text:name="CARRYOVER_VALUE" office:value-type="float" office:value="2" style:data-style-name="N0">2</text:variable-set><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">2</text:variable-get></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine213872096">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"><text:soft-page-break/></text:p>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <text:p text:style-name="Table_20_Contents"/>
+ <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"><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">2</text:variable-get><text:variable-set text:name="CARRYOVER_VALUE" office:value-type="float" office:value="3" style:data-style-name="N0">3</text:variable-set><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">3</text:variable-get></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="TableLine213872096">
+ <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"><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">3</text:variable-get><text:variable-set text:name="CARRYOVER_VALUE" office:value-type="float" office:value="4" style:data-style-name="N0">4</text:variable-set><text:variable-get text:name="CARRYOVER_VALUE" style:data-style-name="N0">4</text:variable-get></text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="Standard"/>
+ <text:p text:style-name="P1"/>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/watermark-position.odt b/sw/qa/extras/uiwriter/data/watermark-position.odt
new file mode 100644
index 000000000..53ff24781
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/watermark-position.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/watermark.docx b/sw/qa/extras/uiwriter/data/watermark.docx
new file mode 100644
index 000000000..0b26d4442
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/watermark.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
new file mode 100644
index 000000000..ddbe5e009
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -0,0 +1,1754 @@
+/* -*- 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 <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/document/XDocumentInsertable.hpp>
+#include <com/sun/star/drawing/GraphicExportFilter.hpp>
+#include <com/sun/star/i18n/TextConversionOption.hpp>
+#include <swmodeltestbase.hxx>
+#include <ndtxt.hxx>
+#include <wrtsh.hxx>
+#include <shellio.hxx>
+#include <expfld.hxx>
+#include <drawdoc.hxx>
+#include <redline.hxx>
+#include <fmtclds.hxx>
+#include <dcontact.hxx>
+#include <view.hxx>
+#include <hhcwrp.hxx>
+#include <swacorr.hxx>
+#include <swmodule.hxx>
+#include <modcfg.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <unotools/streamwrap.hxx>
+#include <unocrsrhelper.hxx>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <vcl/TypeSerializer.hxx>
+
+#include <svx/svdpage.hxx>
+#include <svx/svdview.hxx>
+#include <svx/svxids.hrc>
+
+#include <editeng/eeitem.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <UndoManager.hxx>
+#include <frmatr.hxx>
+
+#include <com/sun/star/text/TextMarkupType.hpp>
+#include <osl/file.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <vcl/scheduler.hxx>
+#include <sfx2/watermarkitem.hxx>
+#include <sfx2/docfile.hxx>
+#include <fmthdft.hxx>
+#include <iodetect.hxx>
+#include <comphelper/processfactory.hxx>
+#include <unotxdoc.hxx>
+#include <swdtflvr.hxx>
+#include <sortedobjs.hxx>
+#include <rootfrm.hxx>
+#include <txtfrm.hxx>
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
+
+void lcl_selectCharacters(SwPaM& rPaM, sal_Int32 first, sal_Int32 end)
+{
+ rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), first);
+ rPaM.SetMark();
+ rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), end);
+}
+} //namespace
+
+class SwUiWriterTest : public SwModelTestBase
+{
+public:
+ std::unique_ptr<SwTextBlocks> readDOCXAutotext(
+ std::u16string_view sFileName, bool bEmpty = false);
+ void testRedlineFrame(char const*const file);
+};
+
+std::unique_ptr<SwTextBlocks> SwUiWriterTest::readDOCXAutotext(std::u16string_view sFileName, bool bEmpty)
+{
+ utl::TempFile tmp;
+ tmp.EnableKillingFile();
+ OUString rURL = tmp.GetURL();
+ CPPUNIT_ASSERT_EQUAL(
+ osl::FileBase::E_None,
+ osl::File::copy(m_directories.getURLFromSrc(DATA_DIRECTORY) + sFileName, rURL));
+
+ SfxMedium aSrcMed(rURL, StreamMode::STD_READ);
+ SwDoc* pDoc = createSwDoc();
+
+ SwReader aReader(aSrcMed, rURL, pDoc);
+ Reader* pDOCXReader = SwReaderWriter::GetDOCXReader();
+ auto pGlossary = std::make_unique<SwTextBlocks>(rURL);
+
+ CPPUNIT_ASSERT(pDOCXReader != nullptr);
+ CPPUNIT_ASSERT_EQUAL(!bEmpty, aReader.ReadGlossaries(*pDOCXReader, *pGlossary, false));
+
+ return pGlossary;
+}
+
+void SwUiWriterTest::testRedlineFrame(char const*const file)
+{
+ SwDoc * pDoc(createSwDoc(DATA_DIRECTORY, file));
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // there is exactly one frame
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ RedlineFlags nMode = pWrtShell->GetRedlineFlags();
+ CPPUNIT_ASSERT(nMode & RedlineFlags::ShowDelete);
+
+ // hide delete redlines
+ pWrtShell->SetRedlineFlags(nMode & ~RedlineFlags::ShowDelete);
+
+ // there is still exactly one frame
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ pWrtShell->SetRedlineFlags(nMode); // show again
+
+ // there is still exactly one frame
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+//Replacement tests
+
+constexpr OUStringLiteral ORIGINAL_REPLACE_CONTENT(u"toto titi tutu");
+constexpr OUStringLiteral EXPECTED_REPLACE_CONTENT(u"toto toto tutu");
+
+// Chinese conversion tests
+
+const sal_Unicode CHINESE_TRADITIONAL_CONTENT(0x9F8D);
+const sal_Unicode CHINESE_SIMPLIFIED_CONTENT(0x9F99);
+constexpr OUStringLiteral NON_CHINESE_CONTENT(u"Hippopotamus");
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testReplaceForward)
+{
+ SwDoc* pDoc = createSwDoc();
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, ORIGINAL_REPLACE_CONTENT);
+
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ lcl_selectCharacters(aPaM, 5, 9);
+ pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false);
+
+ CPPUNIT_ASSERT_EQUAL(OUString(EXPECTED_REPLACE_CONTENT), pTextNode->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(OUString(ORIGINAL_REPLACE_CONTENT), pTextNode->GetText());
+}
+
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testRedlineFrameAtCharStartOutside0)
+{
+ testRedlineFrame("redlineFrame.fodt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testRedlineFrameAtCharStartOutside)
+{
+ testRedlineFrame("redlineFrame_at_char_start_outside.fodt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testRedlineFrameAtCharStartInside)
+{
+ testRedlineFrame("redlineFrame_at_char_start_inside.fodt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testRedlineFrameAtParaStartOutside)
+{
+ testRedlineFrame("redline_fly_duplication_at_para_start_outside.fodt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testRedlineFrameAtParaEndInside)
+{
+ testRedlineFrame("redline_fly_duplication_at_para_end_inside.fodt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testRedlineFrameAtParaOneParagraph)
+{
+ // test ALLFLYS flag: oddly enough it didn't fail as fodt but failed as odt...
+ testRedlineFrame("redline_fly_at_para_one_paragraph.odt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testRedlineFrameAtPara2ndParagraph)
+{
+ // lost via the buggy increment in Copy
+ testRedlineFrame("redline_fly_duplication_at_para_2nd_paragraph.fodt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testThreadedException)
+{
+ SvFileStream aFileStream(m_directories.getURLFromSrc(DATA_DIRECTORY) + "threadedException.fodt", StreamMode::READ);
+
+ //threaded reading only kicks in if there is sufficient buffer to make it worthwhile, so read
+ //from a SvFileStream to ensure that
+ bool bRes = TestImportFODT(aFileStream);
+
+ CPPUNIT_ASSERT(!bRes);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf149595)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "demo91.fodt");
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // all 4 shapes are on the 2nd paragraph
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(4), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ {
+ pWrtShell->Down(false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // one shape is anchored in the middle, others at the start/end/at-para
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Up(false);
+ TransferableDataHelper aHelper(pTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs()->size());
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Undo();
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(4), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+ }
+
+ // now try the same with redlining enabled - should be the same result
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ {
+ pWrtShell->Down(false);
+ pWrtShell->SttPara(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ // problem was that this deleted all at-char flys, even at the start/end
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Up(false);
+ TransferableDataHelper aHelper(pTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs()->size());
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Undo();
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(4), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testBookmarkCopy)
+{
+ SwDoc * pDoc(createSwDoc());
+
+ // add text and bookmark
+ IDocumentMarkAccess & rIDMA(*pDoc->getIDocumentMarkAccess());
+ IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations());
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwCursor aPaM(SwPosition(aIdx), nullptr);
+ rIDCO.InsertString(aPaM, "foo");
+ rIDCO.SplitNode(*aPaM.GetPoint(), false);
+ rIDCO.InsertString(aPaM, "bar");
+ aPaM.SetMark();
+ aPaM.MovePara(GoCurrPara, fnParaStart);
+ rIDMA.makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK,
+ ::sw::mark::InsertMode::New);
+ aPaM.Exchange();
+ aPaM.DeleteMark();
+ rIDCO.SplitNode(*aPaM.GetPoint(), false);
+ rIDCO.InsertString(aPaM, "baz");
+
+ // copy range
+ rIDCO.SplitNode(*aPaM.GetPoint(), false);
+ SwPosition target(*aPaM.GetPoint());
+ aPaM.Move(fnMoveBackward, GoInContent);
+ aPaM.SetMark();
+ aPaM.SttEndDoc(true/*start*/);
+ aPaM.Move(fnMoveForward, GoInContent); // partially select 1st para
+
+ rIDCO.CopyRange(aPaM, target, SwCopyFlags::CheckPosInFly);
+
+ // check bookmark was copied to correct position
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), rIDMA.getBookmarksCount());
+ for (auto it(rIDMA.getBookmarksBegin()); it != rIDMA.getBookmarksEnd(); ++it)
+ {
+ OUString markText(SwPaM((*it)->GetMarkPos(), (*it)->GetOtherMarkPos()).GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"), markText);
+ }
+
+ // copy 2nd time, such that bCanMoveBack is false in CopyImpl
+ SwPaM aCopyPaM(*aPaM.GetMark(), *aPaM.GetPoint());
+ aPaM.SttEndDoc(true/*start*/);
+ rIDCO.SplitNode(*aPaM.GetPoint(), false);
+ aPaM.SttEndDoc(true/*start*/);
+
+ rIDCO.CopyRange(aCopyPaM, *aPaM.GetPoint(), SwCopyFlags::CheckPosInFly);
+
+ // check bookmark was copied to correct position
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), rIDMA.getBookmarksCount());
+ for (auto it(rIDMA.getBookmarksBegin()); it != rIDMA.getBookmarksEnd(); ++it)
+ {
+ OUString markText(SwPaM((*it)->GetMarkPos(), (*it)->GetOtherMarkPos()).GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"), markText);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testInsertFileInInputFieldException)
+{
+ createSwDoc();
+ uno::Reference<text::XTextDocument> const xTextDoc(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> const xBody(xTextDoc->getText());
+ uno::Reference<lang::XMultiServiceFactory> const xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextCursor> const xCursor(xBody->createTextCursor());
+ uno::Reference<document::XDocumentInsertable> const xInsertable(xCursor, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> const xContent(
+ xFactory->createInstance("com.sun.star.text.textfield.Input"), uno::UNO_QUERY);
+ xBody->insertTextContent(xCursor, xContent, false);
+ xCursor->goLeft(1, false);
+ // try to insert some random file
+ OUString const url(m_directories.getURLFromSrc(DATA_DIRECTORY) + "fdo75110.odt");
+ // inserting even asserts in debug builds - document model goes invalid with input field split across 2 nodes
+ CPPUNIT_ASSERT_THROW(xInsertable->insertDocumentFromURL(url, {}), uno::RuntimeException);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf67238)
+{
+ //create a new writer document
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ //insert a 3X3 table in the newly created document
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ const SwTable& rTable = pWrtShell->InsertTable(TableOpt, 3, 3);
+ //checking for the rows and columns
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount());
+ //selecting the table
+ pWrtShell->StartOfSection();
+ pWrtShell->SelTable();
+ //making the table protected
+ pWrtShell->ProtectCells();
+ //checking each cell's protection, it should be protected
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ //undo the changes, make cells [un]protected
+ rUndoManager.Undo();
+ //checking each cell's protection, it should be [un]protected
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ //redo the changes, make cells protected
+ rUndoManager.Redo();
+ //checking each cell's protection, it should be protected
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ //moving the cursor to the starting of the document
+ pWrtShell->StartOfSection();
+ //making the table [un]protected
+ pWrtShell->SelTable();
+ pWrtShell->UnProtectCells();
+ //checking each cell's protection, it should be [un]protected
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ //undo the changes, make cells protected
+ rUndoManager.Undo();
+ //checking each cell's protection, it should be protected
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ //redo the changes, make cells [un]protected
+ rUndoManager.Redo();
+ //checking each cell's protection, it should be [un]protected
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("A3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("B3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C1"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C2"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+ CPPUNIT_ASSERT(!((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf147220)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert(u"él");
+
+ // hide and enable
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT(pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->GoStartSentence();
+ pWrtShell->SetMark();
+ pWrtShell->GoEndSentence();
+
+ // this did not remove the original text from the layout
+ pWrtShell->Replace(u"Él", false);
+
+ // currently the deleted text is before the replacement text, not sure if
+ // that is really required
+ CPPUNIT_ASSERT_EQUAL(OUString(u"élÉl"),
+ pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"Él"),
+ static_cast<SwTextFrame const*>(pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->getLayoutFrame(nullptr))->GetText());
+
+ SwRedlineTable const& rRedlines(pDoc->getIDocumentRedlineAccess().GetRedlineTable());
+ CPPUNIT_ASSERT_EQUAL(SwRedlineTable::size_type(2), rRedlines.size());
+ CPPUNIT_ASSERT_EQUAL(RedlineType::Delete, rRedlines[0]->GetType());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"él"), rRedlines[0]->GetText());
+ CPPUNIT_ASSERT_EQUAL(RedlineType::Insert, rRedlines[1]->GetType());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"Él"), rRedlines[1]->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf135978)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("foobar");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("bazquux");
+
+ CPPUNIT_ASSERT(pWrtShell->IsEndOfDoc());
+
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFlyFrameFormat const* pFly = dynamic_cast<SwFlyFrameFormat const*>(
+ pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true));
+ CPPUNIT_ASSERT(pFly != nullptr);
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+ // move cursor back to body
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+
+ // hide and enable
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ CPPUNIT_ASSERT(pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, /*bBasicCall=*/false);
+ pWrtShell->Delete();
+
+ // now split
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->SplitNode();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+
+ // the problem was that undo removed the fly frame from the layout
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo75110)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "fdo75110.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->SelAll();
+ // The problem was that SwEditShell::DeleteSel() what this Delete() invokes took the wrong selection...
+ pWrtShell->Delete();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ // ... so this Undo() call resulted in a crash.
+ rUndoManager.Undo();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo75898)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "fdo75898.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SelAll();
+ pWrtShell->InsertRow(1, true);
+ pWrtShell->InsertRow(1, true);
+
+ // Now check if the table has 3 lines.
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+ SwTableNode* pTableNode = pShellCursor->Start()->nNode.GetNode().FindTableNode();
+ // This was 1, when doing the same using the UI, Writer even crashed.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pTableNode->GetTable().GetTabLines().size());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testReplaceBackward)
+{
+ //Regression test of fdo#70143
+ //EDITING: undo search&replace corrupt text when searching backward
+ SwDoc* pDoc = createSwDoc();
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, "toto titi tutu");
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ lcl_selectCharacters(aPaM, 9, 5);
+
+ pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false);
+
+ CPPUNIT_ASSERT_EQUAL(OUString(EXPECTED_REPLACE_CONTENT), pTextNode->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(OUString(ORIGINAL_REPLACE_CONTENT), pTextNode->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo69893)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "fdo69893.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->SelAll(); // A1 is empty -> selects the whole table.
+ pWrtShell->SelAll(); // Selects the whole document.
+
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode());
+ // Selection did not include the para after table, this was "B1".
+ CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo70807)
+{
+ createSwDoc(DATA_DIRECTORY, "fdo70807.odt");
+
+ uno::Reference<container::XIndexAccess> xStylesIter(getStyles("PageStyles"), uno::UNO_QUERY);
+
+ for (sal_Int32 i = 0; i < xStylesIter->getCount(); ++i)
+ {
+ uno::Reference<style::XStyle> xStyle(xStylesIter->getByIndex(i), uno::UNO_QUERY);
+
+ bool expectedUsedStyle = false;
+ bool expectedUserDefined = false;
+
+ OUString styleName(xStyle->getName());
+
+ // just these styles are user defined styles
+ if (styleName == "pagestyle1" || styleName == "pagestyle2")
+ expectedUserDefined = true;
+
+ // just these styles are used in the document
+ if (styleName == "Right Page" || styleName == "pagestyle1" || styleName == "pagestyle2")
+ expectedUsedStyle = true;
+
+ CPPUNIT_ASSERT_EQUAL(expectedUserDefined, bool(xStyle->isUserDefined()));
+ CPPUNIT_ASSERT_EQUAL(expectedUsedStyle, bool(xStyle->isInUse()));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testImportRTF)
+{
+ // Insert "foobar" and position the cursor between "foo" and "bar".
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("foobar");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 3, /*bBasicCall=*/false);
+
+ // Insert the RTF at the cursor position.
+ OString aData = "{\\rtf1 Hello world!\\par}";
+ SvMemoryStream aStream(const_cast<char*>(aData.getStr()), aData.getLength(), StreamMode::READ);
+ SwReader aReader(aStream, OUString(), OUString(), *pWrtShell->GetCursor());
+ Reader* pRTFReader = SwReaderWriter::GetRtfReader();
+ CPPUNIT_ASSERT(pRTFReader != nullptr);
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, aReader.Read(*pRTFReader));
+
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), pDoc->GetNodes()[nIndex - 1]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"), pDoc->GetNodes()[nIndex]->GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testExportRTF)
+{
+ // Insert "aaabbbccc" and select "bbb".
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("aaabbbccc");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 3, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 3, /*bBasicCall=*/false);
+
+ // Create the clipboard document.
+ rtl::Reference<SwDoc> xClpDoc(new SwDoc());
+ xClpDoc->SetClipBoard(true);
+ pWrtShell->Copy(*xClpDoc);
+
+ // And finally export it as RTF.
+ WriterRef xWrt;
+ SwReaderWriter::GetWriter(u"RTF", OUString(), xWrt);
+ SvMemoryStream aStream;
+ SwWriter aWrt(aStream, *xClpDoc);
+ aWrt.Write(xWrt);
+
+ OString aData(static_cast<const char*>(aStream.GetData()), aStream.GetSize());
+
+ //Amusingly eventually there was a commit id with "ccc" in it, and so the rtf contained
+ //{\*\generator LibreOfficeDev/4.4.0.0.alpha0$Linux_X86_64 LibreOffice_project/f70664ccc6837f2cc21a29bb4f44e41e100efe6b}
+ //so the test fell over. so strip the generator tag
+ sal_Int32 nGeneratorStart = aData.indexOf("{\\*\\generator ");
+ CPPUNIT_ASSERT(nGeneratorStart != -1);
+ sal_Int32 nGeneratorEnd = aData.indexOf('}', nGeneratorStart + 1);
+ CPPUNIT_ASSERT(nGeneratorEnd != -1);
+ aData = aData.replaceAt(nGeneratorStart, nGeneratorEnd-nGeneratorStart+1, "");
+
+ CPPUNIT_ASSERT(aData.startsWith("{\\rtf1"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aData.indexOf("aaa"));
+ CPPUNIT_ASSERT(aData.indexOf("bbb") != -1);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aData.indexOf("ccc"));
+ // Ensure there's no extra newline
+ CPPUNIT_ASSERT(aData.endsWith("bbb}" SAL_NEWLINE_STRING "}"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testDOCXAutoTextEmpty)
+{
+ // file contains normal content but no AutoText
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-empty.dotx", true);
+ CPPUNIT_ASSERT(pGlossary != nullptr);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testDOCXAutoTextMultiple)
+{
+ // file contains three AutoText entries
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-multiple.dotx");
+
+ // check entries count
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pGlossary->GetCount());
+
+ // check names of entries, sorted order
+ CPPUNIT_ASSERT_EQUAL(OUString("Anothercomplex"), pGlossary->GetLongName(0));
+ CPPUNIT_ASSERT_EQUAL(OUString("Multiple"), pGlossary->GetLongName(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("Second Autotext"), pGlossary->GetLongName(2));
+
+ // check if previously loaded content is correct (eg. doesn't contain title)
+ SwDoc* pDoc = pGlossary->GetDoc();
+ CPPUNIT_ASSERT(pDoc != nullptr);
+
+ SwNodeIndex aDocEnd(pDoc->GetNodes().GetEndOfContent());
+ SwNodeIndex aStart(*aDocEnd.GetNode().StartOfSectionNode(), 1);
+
+ CPPUNIT_ASSERT(aStart < aDocEnd);
+
+ // first line
+ SwNode& rNode = aStart.GetNode();
+ CPPUNIT_ASSERT(rNode.IsTextNode());
+ SwTextNode& rTextNode = *rNode.GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("Another "), rTextNode.GetText());
+
+ // Make sure that autotext does not set a custom page style, leading to an unexpected page break
+ // on insertion.
+ // Without the accompanying fix in place, this test would have failed: the text node had an
+ // attribute set containing a page style item.
+ CPPUNIT_ASSERT(!rTextNode.HasSwAttrSet() || !rTextNode.GetSwAttrSet().HasItem(RES_PAGEDESC));
+
+ // last line
+ SwNodeIndex aLast(*aDocEnd.GetNode().EndOfSectionNode(), -1);
+ SwNode& rLastNode = aLast.GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("complex"), rLastNode.GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testDOTMAutoText)
+{
+ // this is dotm file difference is that in the dotm
+ // there are no empty paragraphs at the end of each entry
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-dotm.dotm");
+
+ SwDoc* pDoc = pGlossary->GetDoc();
+ CPPUNIT_ASSERT(pDoc != nullptr);
+
+ // check if content is correct
+ SwNodeIndex aDocEnd(pDoc->GetNodes().GetEndOfContent());
+ SwNodeIndex aStart(*aDocEnd.GetNode().StartOfSectionNode(), 1);
+ SwNode& rNode = aStart.GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("paragraph"), rNode.GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testDOCXAutoTextGallery)
+{
+ // this file contains one AutoText entry and other
+ // entries which are not AutoText (have different "gallery" value)
+ std::unique_ptr<SwTextBlocks> pGlossary = readDOCXAutotext(u"autotext-gallery.dotx");
+
+ SwDoc* pDoc = pGlossary->GetDoc();
+ CPPUNIT_ASSERT(pDoc != nullptr);
+
+ // check entries count
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pGlossary->GetCount());
+
+ // check entry name (if not contains gallery type)
+ CPPUNIT_ASSERT_EQUAL(OUString("Multiple"), pGlossary->GetLongName(0));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testWatermarkDOCX)
+{
+ SwDoc* const pDoc = createSwDoc(DATA_DIRECTORY, "watermark.docx");
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ const SfxWatermarkItem* pWatermark;
+ SfxItemState eState = pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher()->QueryState(SID_WATERMARK, pWatermark);
+
+ CPPUNIT_ASSERT(eState >= SfxItemState::DEFAULT);
+ CPPUNIT_ASSERT(pWatermark);
+ CPPUNIT_ASSERT_EQUAL(static_cast<unsigned short>(SID_WATERMARK), pWatermark->Which());
+
+ CPPUNIT_ASSERT_EQUAL(OUString("CustomWatermark"), pWatermark->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("DejaVu Sans Light"), pWatermark->GetFont());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(45), pWatermark->GetAngle());
+ CPPUNIT_ASSERT_EQUAL(Color(0x548dd4), pWatermark->GetColor());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(50), pWatermark->GetTransparency());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testWatermarkPosition)
+{
+ // tdf#108494 Watermark inserted in the document with page break was outside the first page
+ const int aPagesInDocument = 2;
+ const int aAdditionalPagesCount[] = { 0, 0, 1, 1, 5, 5, 20, 20 };
+ const bool aChangeHeader[] = { true, false, true, false, true, false, true, false };
+
+ for (tools::ULong i = 0; i < sizeof(aAdditionalPagesCount) / sizeof(int); ++i)
+ {
+ int aPages = aPagesInDocument + aAdditionalPagesCount[i];
+
+ // Empty document with one Page Break
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "watermark-position.odt");
+ SwEditShell* pEditShell = pDoc->GetEditShell();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ uno::Reference<frame::XModel> xModel = pDoc->GetDocShell()->GetBaseModel();
+ uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xModel, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
+ uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(xStyleFamily->getByName("Default Page Style"), uno::UNO_QUERY);
+
+ // 1. Add additional page breaks
+ for (int j = 0; j < aAdditionalPagesCount[i]; ++j)
+ pWrtShell->InsertPageBreak();
+
+ // 2. Change header state (On, Off, On)
+ if (aChangeHeader[i])
+ {
+ SwPageDesc aDesc(pDoc->GetPageDesc(0));
+ SwFrameFormat& rMaster = aDesc.GetMaster();
+ rMaster.SetFormatAttr(SwFormatHeader(true));
+ pDoc->ChgPageDesc(0, aDesc);
+
+ aDesc = pDoc->GetPageDesc(0);
+ SwFrameFormat& rMaster2 = aDesc.GetMaster();
+ rMaster2.SetFormatAttr(SwFormatHeader(false));
+ pDoc->ChgPageDesc(0, aDesc);
+
+ aDesc = pDoc->GetPageDesc(0);
+ SwFrameFormat& rMaster3 = aDesc.GetMaster();
+ rMaster3.SetFormatAttr(SwFormatHeader(true));
+ pDoc->ChgPageDesc(0, aDesc);
+ }
+
+ // 3. Insert Watermark
+ SfxWatermarkItem aWatermark;
+ aWatermark.SetText("Watermark");
+ aWatermark.SetFont("DejaVu Sans");
+
+ pEditShell->SetWatermark(aWatermark);
+
+ uno::Reference<css::drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT(xShape.is());
+
+ SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+
+ // Get Watermark object
+ SdrObject* pObject = pPage->GetObj(0);
+ pObject->RecalcBoundRect();
+ const tools::Rectangle& rRect = pObject->GetSnapRect();
+ Size rSize = pPage->GetSize();
+
+ // Page break, calculate height of a page
+ const int nPageHeight = rSize.getHeight() / aPages;
+
+ std::stringstream aMessage;
+ aMessage << "Case: " << i << ", nPageHeight = " << nPageHeight << ", rRect.Bottom = " << rRect.Bottom();
+
+ // Check if Watermark is inside a page
+ CPPUNIT_ASSERT_MESSAGE(aMessage.str(), nPageHeight >= rRect.Bottom());
+
+ // Check if Watermark is centered
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(xShape, "HoriOrient"));
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER, getProperty<sal_Int16>(xShape, "VertOrient"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo74981)
+{
+ // create a document with an input field
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::Input)), "foo", "bar", 0, 0);
+ pWrtShell->InsertField2(aField);
+
+ {
+ // expect hints
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwTextNode* pTextNode = aIdx.GetNode().GetTextNode();
+ CPPUNIT_ASSERT(pTextNode->HasHints());
+ }
+
+ // go to the begin of the paragraph and split this node
+ pWrtShell->Left(CRSR_SKIP_CHARS, false, 100, false);
+ pWrtShell->SplitNode();
+
+ {
+ // expect only the second paragraph to have hints
+ SwNodeIndex aIdx(SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1));
+ SwTextNode* pTextNode = aIdx.GetNode().GetTextNode();
+ CPPUNIT_ASSERT(pTextNode->HasHints());
+ --aIdx;
+ pTextNode = aIdx.GetNode().GetTextNode();
+ CPPUNIT_ASSERT(!pTextNode->HasHints());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf98512)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwInputFieldType *const pType(static_cast<SwInputFieldType*>(
+ pWrtShell->GetFieldType(0, SwFieldIds::Input)));
+ SwInputField aField1(pType, "foo", "bar", INP_TXT, 0);
+ pWrtShell->InsertField2(aField1);
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ SwInputField aField2(pType, "baz", "quux", INP_TXT, 0);
+ pWrtShell->InsertField2(aField2);
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->SetMark();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ OUString const expected1(
+ OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + "foo" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND));
+ OUString const expected2(
+ OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + "baz" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)
+ + expected1);
+ CPPUNIT_ASSERT_EQUAL(expected2, pWrtShell->getShellCursor(false)->GetText());
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->SetMark();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ CPPUNIT_ASSERT_EQUAL(expected1, pWrtShell->getShellCursor(false)->GetText());
+ rUndoManager.Redo();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->SetMark();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ CPPUNIT_ASSERT_EQUAL(expected2, pWrtShell->getShellCursor(false)->GetText());
+ rUndoManager.Undo();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->SetMark();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ CPPUNIT_ASSERT_EQUAL(expected1, pWrtShell->getShellCursor(false)->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testShapeTextboxSelect)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "shape-textbox.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(1);
+ SwContact* pTextBox = static_cast<SwContact*>(pObject->GetUserCall());
+ // First, make sure that pTextBox is a fly frame (textbox of a shape).
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_FLYFRMFMT), pTextBox->GetFormat()->Which());
+
+ // Then select it.
+ pWrtShell->SelectObj(Point(), 0, pObject);
+ const SdrMarkList& rMarkList = pWrtShell->GetDrawView()->GetMarkedObjectList();
+ SwDrawContact* pShape = static_cast<SwDrawContact*>(rMarkList.GetMark(0)->GetMarkedSdrObj()->GetUserCall());
+ // And finally make sure the shape got selected, not just the textbox itself.
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_DRAWFRMFMT), pShape->GetFormat()->Which());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testShapeTextboxDelete)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "shape-textbox.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(0);
+ pWrtShell->SelectObj(Point(), 0, pObject);
+ size_t nActual = pPage->GetObjCount();
+ // Two objects on the draw page: the shape and its textbox.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), nActual);
+
+ pWrtShell->DelSelectedObj();
+ nActual = pPage->GetObjCount();
+ // Both (not only the shape) should be removed by now (the textbox wasn't removed, so this was 1).
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), nActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testAnchorChangeSelection)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "test_anchor_as_character.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(0);
+ CPPUNIT_ASSERT(pObject);
+
+ // Then select it.
+ pWrtShell->SelectObj(Point(), 0, pObject);
+ const SdrMarkList& rMarkList = pWrtShell->GetDrawView()->GetMarkedObjectList();
+ CPPUNIT_ASSERT_EQUAL(pObject, rMarkList.GetMark(0)->GetMarkedSdrObj());
+
+ pWrtShell->ChgAnchor(RndStdIds::FLY_AS_CHAR);
+
+ // tdf#125039 shape must still be selected, extensions depend on that
+ CPPUNIT_ASSERT_EQUAL(pObject, rMarkList.GetMark(0)->GetMarkedSdrObj());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCp1000071)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "cp1000071.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ CPPUNIT_ASSERT_EQUAL( SwRedlineTable::size_type( 2 ), rTable.size());
+ SwNodeOffset redlineStart0NodeIndex = rTable[ 0 ]->Start()->nNode.GetIndex();
+ sal_Int32 redlineStart0Index = rTable[ 0 ]->Start()->nContent.GetIndex();
+ SwNodeOffset redlineEnd0NodeIndex = rTable[ 0 ]->End()->nNode.GetIndex();
+ sal_Int32 redlineEnd0Index = rTable[ 0 ]->End()->nContent.GetIndex();
+ SwNodeOffset redlineStart1NodeIndex = rTable[ 1 ]->Start()->nNode.GetIndex();
+ sal_Int32 redlineStart1Index = rTable[ 1 ]->Start()->nContent.GetIndex();
+ SwNodeOffset redlineEnd1NodeIndex = rTable[ 1 ]->End()->nNode.GetIndex();
+ sal_Int32 redlineEnd1Index = rTable[ 1 ]->End()->nContent.GetIndex();
+
+ // Change the document layout to be 2 columns, and then undo.
+ pWrtShell->SelAll();
+ SwSectionData section(SectionType::Content, pWrtShell->GetUniqueSectionName());
+ SfxItemSet set( pDoc->GetDocShell()->GetPool(), svl::Items<RES_COL, RES_COL> );
+ SwFormatCol col;
+ col.Init( 2, 0, 10000 );
+ set.Put( col );
+ pWrtShell->InsertSection( section, &set );
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+
+ // Check that redlines are the same like at the beginning.
+ CPPUNIT_ASSERT_EQUAL( SwRedlineTable::size_type( 2 ), rTable.size());
+ CPPUNIT_ASSERT_EQUAL( redlineStart0NodeIndex, rTable[ 0 ]->Start()->nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineStart0Index, rTable[ 0 ]->Start()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineEnd0NodeIndex, rTable[ 0 ]->End()->nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineEnd0Index, rTable[ 0 ]->End()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineStart1NodeIndex, rTable[ 1 ]->Start()->nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineStart1Index, rTable[ 1 ]->Start()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineEnd1NodeIndex, rTable[ 1 ]->End()->nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTable[ 1 ]->End()->nContent.GetIndex());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testShapeTextboxVertadjust)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "shape-textbox-vertadjust.odt");
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(1);
+ SwFrameFormat* pFormat = static_cast<SwContact*>(pObject->GetUserCall())->GetFormat();
+ // This was SDRTEXTVERTADJUST_TOP.
+ CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_CENTER, pFormat->GetTextVertAdjust().GetValue());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testShapeTextboxAutosize)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "shape-textbox-autosize.odt");
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ // 0-1 is the first UI-visible shape+textbox.
+ SdrObject* pFirst = pPage->GetObj(0);
+ CPPUNIT_ASSERT_EQUAL(OUString("1st"), pFirst->GetName());
+
+ // 2-3 is the second UI-visible shape+textbox.
+ SdrObject* pSecond = pPage->GetObj(2);
+ CPPUNIT_ASSERT_EQUAL(OUString("2nd"), pSecond->GetName());
+
+ // Shape -> textbox synchronization was missing, the second shape had the
+ // same height as the first, even though the first contained 1 paragraph
+ // and the other 2 ones.
+ CPPUNIT_ASSERT(pFirst->GetSnapRect().getHeight() < pSecond->GetSnapRect().getHeight());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo82191)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "fdo82191.odt");
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ // Make sure we have a single draw shape.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), SwTextBoxHelper::getCount(pPage));
+
+ SwDoc aClipboard;
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrObject* pObject = pPage->GetObj(0);
+ // Select it, then copy and paste.
+ pWrtShell->SelectObj(Point(), 0, pObject);
+ pWrtShell->Copy(aClipboard);
+ pWrtShell->Paste(aClipboard);
+
+ // This was one: the textbox of the shape wasn't copied.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), SwTextBoxHelper::getCount(*pDoc));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCommentedWord)
+{
+ // This word is commented. <- string in document
+ // 123456789 <- character positions
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "commented-word.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // Move the cursor into the second word.
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 5, /*bBasicCall=*/false);
+ // Select the word.
+ pWrtShell->SelWrd();
+
+ // Make sure that not only the word, but its comment anchor is also selected.
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+ // This was 9, only "word", not "word<anchor character>" was selected.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(10), pShellCursor->End()->nContent.GetIndex());
+
+ // Test that getAnchor() points to "word", not to an empty string.
+ 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::XTextContent> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("word"), xField->getAnchor()->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTextFieldGetAnchorGetTextInFooter)
+{
+ createSwDoc(DATA_DIRECTORY, "textfield-getanchor-gettext-in-footer.odt");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextContent> xField(xFields->nextElement(), uno::UNO_QUERY);
+
+ OUString value = xField->getAnchor()->getText()->getString();
+ CPPUNIT_ASSERT_EQUAL(OUString("userfield_in_footer"), value );
+}
+
+// Tests that a blank document is still blank after conversion
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionBlank)
+{
+
+ // Given
+ SwDoc* pDoc = createSwDoc();
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ const uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ // When
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
+ i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
+ true, false, false );
+ aWrap.Convert();
+
+ // Then
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString(), pTextNode->GetText());
+
+}
+
+// Tests that non Chinese text is unchanged after conversion
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionNonChineseText)
+{
+
+ // Given
+ SwDoc* pDoc = createSwDoc();
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ const uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, NON_CHINESE_CONTENT);
+
+ // When
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
+ i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
+ true, false, false );
+ aWrap.Convert();
+
+ // Then
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString(NON_CHINESE_CONTENT), pTextNode->GetText());
+
+}
+
+// Tests conversion of traditional Chinese characters to simplified Chinese
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionTraditionalToSimplified)
+{
+
+ // Given
+ SwDoc* pDoc = createSwDoc();
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ const uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(CHINESE_TRADITIONAL_CONTENT));
+
+ // When
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_TRADITIONAL, LANGUAGE_CHINESE_SIMPLIFIED, nullptr,
+ i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
+ true, false, false );
+ aWrap.Convert();
+
+ // Then
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString(CHINESE_SIMPLIFIED_CONTENT), pTextNode->GetText());
+
+}
+
+// Tests conversion of simplified Chinese characters to traditional Chinese
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionSimplifiedToTraditional)
+{
+
+ // Given
+ SwDoc* pDoc = createSwDoc();
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ const uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(CHINESE_SIMPLIFIED_CONTENT));
+
+ // When
+ SwHHCWrapper aWrap( pView, xContext, LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_TRADITIONAL, nullptr,
+ i18n::TextConversionOption::CHARACTER_BY_CHARACTER, false,
+ true, false, false );
+ aWrap.Convert();
+
+ // Then
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString(CHINESE_TRADITIONAL_CONTENT), pTextNode->GetText());
+
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo85554)
+{
+ // Load the document, it contains one shape with a textbox.
+ createSwDoc(DATA_DIRECTORY, "fdo85554.odt");
+
+ // Add a second shape to the document.
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xShape->setSize(awt::Size(10000, 10000));
+ xShape->setPosition(awt::Point(1000, 1000));
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ xDrawPage->add(xShape);
+
+ // Save it and load it back.
+ reload("writer8", "fdo85554.odt");
+
+ // This was 1, we lost a shape on export.
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testMergeDoc)
+{
+ SwDoc* const pDoc1(createSwDoc(DATA_DIRECTORY, "merge-change1.odt"));
+
+ auto xDoc2Component(loadFromDesktop(
+ m_directories.getURLFromSrc(DATA_DIRECTORY) + "merge-change2.odt",
+ "com.sun.star.text.TextDocument"));
+ auto pxDoc2Document(
+ dynamic_cast<SwXTextDocument *>(xDoc2Component.get()));
+ CPPUNIT_ASSERT(pxDoc2Document);
+ SwDoc* const pDoc2(pxDoc2Document->GetDocShell()->GetDoc());
+
+ SwEditShell* const pEditShell(pDoc1->GetEditShell());
+ pEditShell->MergeDoc(*pDoc2);
+
+ // accept all redlines
+ while(pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+
+ CPPUNIT_ASSERT_EQUAL(7, getParagraphs());
+ getParagraph(1, "Para One: Two Three Four Five");
+ getParagraph(2, "Para Two: One Three Four Five");
+ getParagraph(3, "Para Three: One Two Four Five");
+ getParagraph(4, "Para Four: One Two Three Four Five");
+ getParagraph(5, "Para Six: One Three Four Five");
+ getParagraph(6, "");
+ getParagraph(7, "");
+
+ xDoc2Component->dispose();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCreatePortions)
+{
+ createSwDoc(DATA_DIRECTORY, "uno-cycle.odt");
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xText(xBookmarksSupplier->getBookmarks()->getByName("Mark"), uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xTextCursor(xText->getAnchor(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTextCursor.is());
+
+ uno::Reference<container::XEnumerationAccess> xParagraph(
+ xTextCursor->createEnumeration()->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xParagraph.is());
+ // This looped forever in lcl_CreatePortions
+ xParagraph->createEnumeration();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testBookmarkUndo)
+{
+ SwDoc* pDoc = createSwDoc();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
+ SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) );
+
+ pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK,
+ ::sw::mark::InsertMode::New);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findMark("Mark");
+ CPPUNIT_ASSERT(ppBkmk != pMarkAccess->getAllMarksEnd());
+
+ pMarkAccess->renameMark(*ppBkmk, "Mark_");
+ CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark") == pMarkAccess->getAllMarksEnd()));
+ CPPUNIT_ASSERT(pMarkAccess->findMark("Mark_") != pMarkAccess->getAllMarksEnd());
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(pMarkAccess->findMark("Mark") != pMarkAccess->getAllMarksEnd());
+ CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark_") == pMarkAccess->getAllMarksEnd()));
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark") == pMarkAccess->getAllMarksEnd()));
+ CPPUNIT_ASSERT(pMarkAccess->findMark("Mark_") != pMarkAccess->getAllMarksEnd());
+
+ pMarkAccess->deleteMark(pMarkAccess->findMark("Mark_"), false);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+}
+
+static void lcl_setWeight(SwWrtShell* pWrtShell, FontWeight aWeight)
+{
+ SvxWeightItem aWeightItem(aWeight, EE_CHAR_WEIGHT);
+ SvxScriptSetItem aScriptSetItem(SID_ATTR_CHAR_WEIGHT, pWrtShell->GetAttrPool());
+ aScriptSetItem.PutItemForScriptType(SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX, aWeightItem);
+ pWrtShell->SetAttrSet(aScriptSetItem.GetItemSet());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo85876)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ lcl_setWeight(pWrtShell, WEIGHT_BOLD);
+ pWrtShell->Insert("test");
+ lcl_setWeight(pWrtShell, WEIGHT_NORMAL);
+ pWrtShell->SplitNode();
+ pWrtShell->SplitNode();
+ pWrtShell->Up(false);
+ pWrtShell->Insert("test");
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getParagraph(1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ xCursor->collapseToStart();
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+ {
+ auto xCursor(xText->createTextCursorByRange(getParagraph(2)));
+ CPPUNIT_ASSERT(xCursor.is());
+ xCursor->collapseToStart();
+ // this used to be BOLD too with fdo#85876
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xCursor, "CharWeight"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCaretPositionMovingUp)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("after");
+ pWrtShell->InsertLineBreak();
+ pWrtShell->Up(false);
+ pWrtShell->Insert("before");
+
+ CPPUNIT_ASSERT_EQUAL(OUString(u"beforeAfter" + OUStringChar(CH_TXTATR_NEWLINE)), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf93441)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("Hello");
+ pWrtShell->InsertLineBreak();
+ pWrtShell->Insert("Hello World");
+ pWrtShell->Up(false);
+ pWrtShell->Insert(" World");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Hello World\nHello World
+ // - Actual : WorldHello\nHello World
+ CPPUNIT_ASSERT_EQUAL(OUString(u"Hello World" + OUStringChar(CH_TXTATR_NEWLINE) + u"Hello World"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf81226)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("before");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->Down(false);
+ pWrtShell->Insert("after");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: beforeafter
+ // - Actual : beafterfore
+ CPPUNIT_ASSERT_EQUAL(OUString("beforeafter"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf137532)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("test");
+
+ //Select the word and change it to bold
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 4, /*bBasicCall=*/false);
+ lcl_setWeight(pWrtShell, WEIGHT_BOLD);
+
+ // Select first character and replace it
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ pWrtShell->Insert("x");
+
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("xest"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ xCursor.set(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), xCursor->getString());
+
+ // Without the fix in place, this test would have failed in
+ // - Expected: 150
+ // - Actual : 100
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ xCursor.set(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xCursor, "CharWeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo87448)
+{
+ createSwDoc(DATA_DIRECTORY, "fdo87448.odt");
+
+ // Save the first shape to a metafile.
+ uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter = drawing::GraphicExportFilter::create(comphelper::getProcessComponentContext());
+ uno::Reference<lang::XComponent> xSourceDoc(getShape(1), uno::UNO_QUERY);
+ xGraphicExporter->setSourceDocument(xSourceDoc);
+
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+ uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({
+ { "OutputStream", uno::Any(xOutputStream) },
+ { "FilterName", uno::Any(OUString("SVM")) }
+ }));
+ xGraphicExporter->filter(aDescriptor);
+ aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+ // Read it back and dump it as an XML file.
+ Graphic aGraphic;
+ TypeSerializer aSerializer(aStream);
+ aSerializer.readGraphic(aGraphic);
+ const GDIMetaFile& rMetaFile = aGraphic.GetGDIMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, rMetaFile);
+
+ // The first polyline in the document has a number of points to draw arcs,
+ // the last one jumps back to the start, so we call "end" the last but one.
+ sal_Int32 nFirstEnd = getXPath(pXmlDoc, "(//polyline)[1]/point[last()-1]", "x").toInt32();
+ // The second polyline has a different start point, but the arc it draws
+ // should end at the ~same position as the first polyline.
+ sal_Int32 nSecondEnd = getXPath(pXmlDoc, "(//polyline)[2]/point[last()]", "x").toInt32();
+
+ // nFirstEnd was 6023 and nSecondEnd was 6648, now they should be much closer, e.g. nFirstEnd = 6550, nSecondEnd = 6548
+ OString aMsg = "nFirstEnd is " + OString::number(nFirstEnd) + ", nSecondEnd is " + OString::number(nSecondEnd);
+ // Assert that the difference is less than half point.
+ CPPUNIT_ASSERT_MESSAGE(aMsg.getStr(), abs(nFirstEnd - nSecondEnd) < 10);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTextCursorInvalidation)
+{
+ createSwDoc();
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPageStyle.is());
+ xPageStyle->setPropertyValue("HeaderIsOn", uno::Any(true));
+ uno::Reference<text::XText> xHeader(getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText"));
+ CPPUNIT_ASSERT(xHeader.is());
+ // create cursor inside the header text
+ uno::Reference<text::XTextCursor> xCursor(xHeader->createTextCursor());
+ // can't go right in empty header
+ CPPUNIT_ASSERT(!xCursor->goRight(1, false));
+// this does not actually delete the header: xPageStyle->setPropertyValue("HeaderIsOn", uno::makeAny(false));
+ pWrtShell->ChangeHeaderOrFooter(u"Default Page Style", true, false, false);
+ // must be disposed after deleting header
+ // cursor ends up in body
+ // UPDATE: this behaviour has been corrected as a side effect of the fix to tdf#46561:
+ //CPPUNIT_ASSERT_THROW(xCursor->goRight(1, false), uno::RuntimeException);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf68183)
+{
+ // First disable RSID and check if indeed no such attribute is inserted.
+ SwDoc* pDoc = createSwDoc();
+ SW_MOD()->GetModuleConfig()->SetStoreRsid(false);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert2("X");
+
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(false, pTextNode->GetSwAttrSet().HasItem(RES_PARATR_RSID));
+
+ // Then enable storing of RSID and make sure that the attribute is inserted.
+ SW_MOD()->GetModuleConfig()->SetStoreRsid(true);
+
+ pWrtShell->DelToStartOfLine();
+ pWrtShell->Insert2("X");
+
+ CPPUNIT_ASSERT_EQUAL(true, pTextNode->GetSwAttrSet().HasItem(RES_PARATR_RSID));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCp1000115)
+{
+ createSwDoc(DATA_DIRECTORY, "cp1000115.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "/root/page[2]/body/tab/row/cell[2]/txt");
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ // This was 1: the long paragraph in the B1 cell did flow over to the
+ // second page, so there was only one paragraph in the second cell of the
+ // second page.
+ CPPUNIT_ASSERT_EQUAL(2, xmlXPathNodeSetGetLength(pXmlNodes));
+ xmlXPathFreeObject(pXmlObj);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf63214)
+{
+ //This is a crash test
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ pWrtShell->Insert("V");
+ { //limiting the lifetime of SwPaM with a nested scope
+ //the shell cursor are automatically adjusted when nodes are deleted, but the shell doesn't know about an SwPaM on the stack
+ IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
+ SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) );
+ aPaM.SetMark();
+ aPaM.Move(fnMoveForward, GoInContent);
+ //Inserting a crossRefBookmark
+ pMarkAccess->makeMark(aPaM, "Bookmark",
+ IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK,
+ ::sw::mark::InsertMode::New);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ }
+ //moving cursor to the end of paragraph
+ pWrtShell->EndPara();
+ //inserting paragraph break
+ pWrtShell->SplitNode();
+ rUndoManager.Undo();
+ rUndoManager.Redo();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf90003)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf90003.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ CPPUNIT_ASSERT(pXmlDoc);
+ // This was 1: an unexpected fly portion was created, resulting in too
+ // large x position for the empty paragraph marker.
+ assertXPath(pXmlDoc, "//Special[@nType='PortionType::Fly']", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf51741)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
+ SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) );
+ //Modification 1
+ pMarkAccess->makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK,
+ ::sw::mark::InsertMode::New);
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ //Modification 2
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+ //Modification 3
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->findMark("Mark");
+ CPPUNIT_ASSERT(ppBkmk != pMarkAccess->getAllMarksEnd());
+ //Modification 4
+ pMarkAccess->renameMark(*ppBkmk, "Mark_");
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark") == pMarkAccess->getAllMarksEnd()));
+ CPPUNIT_ASSERT(pMarkAccess->findMark("Mark_") != pMarkAccess->getAllMarksEnd());
+ //Modification 5
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT(pMarkAccess->findMark("Mark") != pMarkAccess->getAllMarksEnd());
+ CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark_") == pMarkAccess->getAllMarksEnd()));
+ //Modification 6
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark") == pMarkAccess->getAllMarksEnd()));
+ CPPUNIT_ASSERT(pMarkAccess->findMark("Mark_") != pMarkAccess->getAllMarksEnd());
+ //Modification 7
+ pMarkAccess->deleteMark(pMarkAccess->findMark("Mark_"), false);
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+ //Modification 8
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ //Modification 9
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT(pWrtShell->IsModified());
+ pWrtShell->ResetModified();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testDefaultsOfOutlineNumbering)
+{
+ uno::Reference<text::XDefaultNumberingProvider> xDefNum(m_xSFactory->createInstance("com.sun.star.text.DefaultNumberingProvider"), uno::UNO_QUERY);
+ css::lang::Locale alocale;
+ alocale.Language = "en";
+ alocale.Country = "US";
+ const uno::Sequence<beans::PropertyValues> aPropVal(xDefNum->getDefaultContinuousNumberingLevels(alocale));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aPropVal.getLength());
+ for(const auto& rPropValues : aPropVal)
+ {
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), rPropValues.getLength());
+ for(const auto& rPropVal : rPropValues)
+ {
+ uno::Any aAny = rPropVal.Value;
+ if(rPropVal.Name == "Prefix" || rPropVal.Name == "Suffix" || rPropVal.Name == "Transliteration")
+ CPPUNIT_ASSERT_EQUAL(OUString("string"), aAny.getValueTypeName());
+ else if(rPropVal.Name == "NumberingType")
+ CPPUNIT_ASSERT_EQUAL(OUString("short"), aAny.getValueTypeName());
+ else if(rPropVal.Name == "NatNum")
+ CPPUNIT_ASSERT_EQUAL(OUString("short"), aAny.getValueTypeName());
+ //It is expected to be long but right now its short !error!
+ else
+ CPPUNIT_FAIL("Property Name not matched");
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testDeleteTableRedlines)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ const SwTable& rTable = pWrtShell->InsertTable(TableOpt, 1, 3);
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount());
+ uno::Sequence<beans::PropertyValue> aDescriptor;
+ SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("A1"))), u"TableCellInsert", aDescriptor);
+ SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("B1"))), u"TableCellInsert", aDescriptor);
+ SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("C1"))), u"TableCellInsert", aDescriptor);
+ IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess();
+ SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable();
+ rExtras.DeleteAllTableRedlines(*pDoc, rTable, false, RedlineType::Any);
+ CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(0), rExtras.GetSize());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testXFlatParagraph)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ //Inserting some text in the document
+ pWrtShell->Insert("This is sample text");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("This is another sample text");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("This is yet another sample text");
+ //retrieving the XFlatParagraphs
+ uno::Reference<text::XFlatParagraphIteratorProvider> xFPIP(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XFlatParagraphIterator> xFPIterator(xFPIP->getFlatParagraphIterator(sal_Int32(text::TextMarkupType::SPELLCHECK), true));
+ uno::Reference<text::XFlatParagraph> xFlatPara(xFPIterator->getFirstPara());
+ CPPUNIT_ASSERT_EQUAL(OUString("This is sample text"), xFlatPara->getText());
+ //checking modified status
+ CPPUNIT_ASSERT(!xFlatPara->isModified());
+ //checking "checked" status, modifying it and asserting the changes
+ CPPUNIT_ASSERT(!xFlatPara->isChecked(sal_Int32(text::TextMarkupType::SPELLCHECK)));
+ xFlatPara->setChecked((sal_Int32(text::TextMarkupType::SPELLCHECK)), true);
+ CPPUNIT_ASSERT(xFlatPara->isChecked(sal_Int32(text::TextMarkupType::SPELLCHECK)));
+ //getting other XFlatParagraphs and asserting their contents
+ uno::Reference<text::XFlatParagraph> xFlatPara2(xFPIterator->getParaAfter(xFlatPara));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is another sample text"), xFlatPara2->getText());
+ uno::Reference<text::XFlatParagraph> xFlatPara3(xFPIterator->getParaAfter(xFlatPara2));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is yet another sample text"), xFlatPara3->getText());
+ uno::Reference<text::XFlatParagraph> xFlatPara4(xFPIterator->getParaBefore(xFlatPara3));
+ CPPUNIT_ASSERT_EQUAL(xFlatPara2->getText(), xFlatPara4->getText());
+ //changing the attributes of last para
+ uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({
+ { "CharWeight", uno::Any(float(css::awt::FontWeight::BOLD)) }
+ }));
+ xFlatPara3->changeAttributes(sal_Int32(0), sal_Int32(5), aDescriptor);
+ //checking Language Portions
+ uno::Sequence<::sal_Int32> aLangPortions(xFlatPara4->getLanguagePortions());
+ CPPUNIT_ASSERT(!aLangPortions.hasElements());
+ //examining Language of text
+ css::lang::Locale alocale = xFlatPara4->getLanguageOfText(sal_Int32(0), sal_Int32(4));
+ CPPUNIT_ASSERT_EQUAL(OUString("en"), alocale.Language);
+ CPPUNIT_ASSERT_EQUAL(OUString("US"), alocale.Country);
+ //examining Primary Language of text
+ css::lang::Locale aprimarylocale = xFlatPara4->getPrimaryLanguageOfText(sal_Int32(0), sal_Int32(20));
+ CPPUNIT_ASSERT_EQUAL(OUString("en"), aprimarylocale.Language);
+ CPPUNIT_ASSERT_EQUAL(OUString("US"), aprimarylocale.Country);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf81995)
+{
+ uno::Reference<text::XDefaultNumberingProvider> xDefNum(m_xSFactory->createInstance("com.sun.star.text.DefaultNumberingProvider"), uno::UNO_QUERY);
+ css::lang::Locale alocale;
+ alocale.Language = "en";
+ alocale.Country = "US";
+ const uno::Sequence<uno::Reference<container::XIndexAccess>> aIndexAccess(xDefNum->getDefaultOutlineNumberings(alocale));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aIndexAccess.getLength());
+ for(const auto& rIndexAccess : aIndexAccess)
+ {
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), rIndexAccess->getCount());
+ for(int j=0;j<rIndexAccess->getCount();j++)
+ {
+ uno::Sequence<beans::PropertyValue> aProps;
+ rIndexAccess->getByIndex(j) >>= aProps;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12), aProps.getLength());
+ for(const beans::PropertyValue& rProp : std::as_const(aProps))
+ {
+ uno::Any aAny = rProp.Value;
+ if(rProp.Name == "Prefix" || rProp.Name == "Suffix" || rProp.Name == "BulletChar" || rProp.Name == "BulletFontName" || rProp.Name == "Transliteration")
+ CPPUNIT_ASSERT_EQUAL(OUString("string"), aAny.getValueTypeName());
+ else if(rProp.Name == "NumberingType" || rProp.Name == "ParentNumbering" || rProp.Name == "Adjust")
+ CPPUNIT_ASSERT_EQUAL(OUString("short"), aAny.getValueTypeName());
+ else if(rProp.Name == "LeftMargin" || rProp.Name == "SymbolTextDistance" || rProp.Name == "FirstLineOffset" || rProp.Name == "NatNum")
+ CPPUNIT_ASSERT_EQUAL(OUString("long"), aAny.getValueTypeName());
+ else
+ CPPUNIT_FAIL("Property Name not matched");
+ }
+ }
+ }
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
new file mode 100644
index 000000000..0a5fce248
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -0,0 +1,3235 @@
+/* -*- 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/LineSpacing.hpp>
+#include <com/sun/star/text/TableColumnSeparator.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <comphelper/propertysequence.hxx>
+#include <unotools/mediadescriptor.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <vcl/scheduler.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
+#include <ndtxt.hxx>
+#include <swdtflvr.hxx>
+#include <wrtsh.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <flyfrm.hxx>
+#include <pagefrm.hxx>
+#include <fmtanchr.hxx>
+#include <UndoManager.hxx>
+#include <sortedobjs.hxx>
+#include <itabenum.hxx>
+#include <fmtfsize.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <swacorr.hxx>
+#include <redline.hxx>
+#include <frameformats.hxx>
+#include <unotxdoc.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
+constexpr OUStringLiteral FLOATING_TABLE_DATA_DIRECTORY
+ = u"/sw/qa/extras/uiwriter/data/floating_table/";
+} // namespace
+
+/// Second set of tests asserting the behavior of Writer user interface shells.
+class SwUiWriterTest2 : public SwModelTestBase
+{
+public:
+ virtual std::unique_ptr<Resetter> preTest(const char* filename) override
+ {
+ m_aSavedSettings = Application::GetSettings();
+ if (OString(filename).indexOf("LocaleArabic") != -1)
+ {
+ std::unique_ptr<Resetter> pResetter(
+ new Resetter([this]() { Application::SetSettings(this->m_aSavedSettings); }));
+ AllSettings aSettings(m_aSavedSettings);
+ aSettings.SetLanguageTag(LanguageTag("ar"));
+ Application::SetSettings(aSettings);
+ return pResetter;
+ }
+ return nullptr;
+ }
+
+protected:
+ AllSettings m_aSavedSettings;
+};
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf47471_paraStyleBackground)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf47471_paraStyleBackground.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("00Background"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(Color(0xe0c2cd), getProperty<Color>(getParagraph(2), "FillColor"));
+
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ dispatchCommand(mxComponent, ".uno:ResetAttributes", {});
+
+ // the background color should revert to the color for 00Background style
+ CPPUNIT_ASSERT_EQUAL(Color(0xdedce6), getProperty<Color>(getParagraph(2), "FillColor"));
+ // the paragraph style should not be reset
+ CPPUNIT_ASSERT_EQUAL(OUString("00Background"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("00Background"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+
+ // Save it and load it back.
+ reload("writer8", "tdf47471_paraStyleBackgroundRT.odt");
+
+ CPPUNIT_ASSERT_EQUAL(Color(0xdedce6), getProperty<Color>(getParagraph(2), "FillColor"));
+ // on round-trip, the paragraph style name was lost
+ CPPUNIT_ASSERT_EQUAL(OUString("00Background"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("00Background"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdfChangeNumberingListAutoFormat)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf117923.docx");
+
+ // Ensure that all text portions are calculated before testing.
+ SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ CPPUNIT_ASSERT(pViewShell);
+ pViewShell->Reformat();
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Check that we actually test the line we need
+ assertXPathContent(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]", "GHI GHI GHI GHI");
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "nType",
+ "PortionType::Number");
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "rText", "2.");
+ // The numbering height was 960 in DOC format.
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "nHeight", "220");
+
+ // tdf#127606: now it's possible to change formatting of numbering
+ // increase font size (220 -> 260)
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Grow", {});
+ pViewShell->Reformat();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "nHeight", "260");
+
+ // save it to DOCX
+ reload("Office Open XML Text", "tdf117923.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pViewShell
+ = pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
+ pViewShell->Reformat();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // this was 220
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", "nHeight", "260");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf101534)
+{
+ // Copy the first paragraph of the document.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf101534.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->EndPara(/*bSelect=*/true);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Copy();
+
+ // Go to the second paragraph, assert that we have margins as direct
+ // formatting.
+ pWrtShell->Down(/*bSelect=*/false);
+ SfxItemSet aSet(pWrtShell->GetAttrPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>);
+ pWrtShell->GetCurAttr(aSet);
+ CPPUNIT_ASSERT(aSet.HasItem(RES_LR_SPACE));
+
+ // Make sure that direct formatting is preserved during paste.
+ pWrtShell->EndPara(/*bSelect=*/false);
+ TransferableDataHelper aHelper(pTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ aSet.ClearItem();
+ pWrtShell->GetCurAttr(aSet);
+ // This failed, direct formatting was lost.
+ CPPUNIT_ASSERT(aSet.HasItem(RES_LR_SPACE));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineMoveInsertInDelete)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert(" foo");
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->InsertFootnote("");
+ CPPUNIT_ASSERT(pWrtShell->IsCursorInFootnote());
+ RedlineFlags const mode(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ CPPUNIT_ASSERT(mode & (RedlineFlags::ShowDelete | RedlineFlags::ShowInsert));
+ pWrtShell->SetRedlineFlags(mode);
+ // insert redline
+ pWrtShell->Insert("bar");
+ // first delete redline, logically containing the insert redline
+ // (note: Word apparently allows similar things...)
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ pWrtShell->Delete(); // the footnote
+ // second delete redline, following the first one
+ pWrtShell->EndOfSection(false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 3, /*bBasicCall=*/false);
+ pWrtShell->Delete(); // "foo"
+
+ // hiding used to copy the 2nd delete redline "foo", but not delete it
+ pWrtShell->SetRedlineFlags(mode & ~RedlineFlags::ShowDelete); // hide
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(" "),
+ pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+ pWrtShell->SetRedlineFlags(mode); // show again
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(u"\u0001 foo"),
+ pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineInHiddenSection)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("foo");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("bar");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("baz");
+
+ RedlineFlags const mode(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ CPPUNIT_ASSERT(mode & (RedlineFlags::ShowDelete | RedlineFlags::ShowInsert));
+ pWrtShell->SetRedlineFlags(mode);
+
+ // delete paragraph "bar"
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 8, /*bBasicCall=*/false);
+ pWrtShell->Delete();
+
+ pWrtShell->StartOfSection();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->EndOfSection(true);
+
+ SwSectionData section(SectionType::Content, pWrtShell->GetUniqueSectionName());
+ section.SetHidden(true);
+ SwSection const* pSection = pWrtShell->InsertSection(section, nullptr);
+
+ SwSectionNode const* pNode = pSection->GetFormat()->GetSectionNode();
+
+ CPPUNIT_ASSERT(
+ !pNode->GetNodes()[pNode->GetIndex() + 1]->GetTextNode()->getLayoutFrame(nullptr));
+ CPPUNIT_ASSERT(
+ !pNode->GetNodes()[pNode->GetIndex() + 2]->GetTextNode()->getLayoutFrame(nullptr));
+ CPPUNIT_ASSERT(
+ !pNode->GetNodes()[pNode->GetIndex() + 3]->GetTextNode()->getLayoutFrame(nullptr));
+ CPPUNIT_ASSERT(pNode->GetNodes()[pNode->GetIndex() + 4]->IsEndNode());
+
+ pWrtShell->SetRedlineFlags(mode & ~RedlineFlags::ShowDelete); // hide
+
+ CPPUNIT_ASSERT(
+ !pNode->GetNodes()[pNode->GetIndex() + 1]->GetTextNode()->getLayoutFrame(nullptr));
+ CPPUNIT_ASSERT(pNode->GetNodes()[pNode->GetIndex() + 2]->IsEndNode());
+
+ pWrtShell->SetRedlineFlags(mode); // show again
+
+ CPPUNIT_ASSERT(
+ !pNode->GetNodes()[pNode->GetIndex() + 1]->GetTextNode()->getLayoutFrame(nullptr));
+ // there was a frame created here
+ CPPUNIT_ASSERT(
+ !pNode->GetNodes()[pNode->GetIndex() + 2]->GetTextNode()->getLayoutFrame(nullptr));
+ CPPUNIT_ASSERT(
+ !pNode->GetNodes()[pNode->GetIndex() + 3]->GetTextNode()->getLayoutFrame(nullptr));
+ CPPUNIT_ASSERT(pNode->GetNodes()[pNode->GetIndex() + 4]->IsEndNode());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineSplitContentNode)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "try2.fodt");
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ SwViewOption aViewOptions(*pWrtShell->GetViewOptions());
+ // these are required so that IsBlank() is true
+ aViewOptions.SetBlank(true);
+ aViewOptions.SetViewMetaChars(true);
+ pWrtShell->ApplyViewOptions(aViewOptions);
+
+ // enable redlining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ // hide
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ pWrtShell->CalcLayout();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 18, /*bBasicCall=*/false);
+ pWrtShell->SplitNode(true);
+ rUndoManager.Undo();
+ // crashed
+ pWrtShell->SplitNode(true);
+ rUndoManager.Undo();
+ rUndoManager.Redo();
+ rUndoManager.Undo();
+ rUndoManager.Redo();
+ rUndoManager.Undo();
+ pWrtShell->SplitNode(true);
+ rUndoManager.Undo();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137318)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("A");
+
+ // enable redlining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ // hide
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->DelLine();
+ pWrtShell->StartOfSection(false);
+ pWrtShell->SplitNode(true);
+ pWrtShell->SplitNode(true);
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 0);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text", 0);
+ // not sure why there's an empty text portion here, but it's not a problem
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text[1][@Portion]", 0);
+
+ pWrtShell->Undo();
+
+ // the problem was that here the "A" showed up again
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 0);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text[1][@Portion]", 0);
+
+ pWrtShell->Undo();
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1][@Portion]", 0);
+
+ pWrtShell->Undo();
+
+ // now the "A" is no longer deleted
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1][@Portion]", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nLength", "1");
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "Portion", "A");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf136704)
+{
+ SwDoc* const pDoc(createSwDoc());
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+ corr.GetSwFlags().bReplaceStyles = true;
+ SvxSwAutoFormatFlags flags(*SwEditShell::GetAutoFormatFlags());
+ comphelper::ScopeGuard const g([=]() { SwEditShell::SetAutoFormatFlags(&flags); });
+ flags.bReplaceStyles = true;
+ SwEditShell::SetAutoFormatFlags(&flags);
+
+ pWrtShell->Insert("test");
+ const sal_Unicode cIns = ':';
+ pWrtShell->AutoCorrect(corr, cIns);
+
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 3"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134250)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf134250.fodt");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+ uno::Reference<text::XTextContent> xTextContent(xSections->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("foo" SAL_NEWLINE_STRING "bar"),
+ xTextContent->getAnchor()->getString());
+
+ // select all with table at start -> 3 times
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ // .uno:Copy without touching shared clipboard
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ // .uno:Paste without touching shared clipboard
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+ // this would crash in 2 different ways
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+ // Without the fix in place, section's content would have been gone after undo
+ CPPUNIT_ASSERT_EQUAL(OUString("foo" SAL_NEWLINE_STRING "bar"),
+ xTextContent->getAnchor()->getString());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo" SAL_NEWLINE_STRING "bar"),
+ xTextContent->getAnchor()->getString());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134436)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf134436.fodt");
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+
+ // select all 3 times, table at the start
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ // the stupid SwXTextView::getString doesn't work "for symmetry" so use CursorShell
+ CPPUNIT_ASSERT_EQUAL(OUString("a\nb\n"), pWrtShell->GetCursor()->GetText());
+
+ // first, the section doesn't get deleted
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("a\nb\n"), pWrtShell->GetCursor()->GetText());
+
+ // second, the section does get deleted because point is at the end
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("a\nb\n"), pWrtShell->GetCursor()->GetText());
+
+ // the problem was that the section was not deleted on Redo
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("a\nb\n"), pWrtShell->GetCursor()->GetText());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134252)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf134252.fodt");
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCursor(xTextViewCursorSupplier->getViewCursor());
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+
+ // select all with section
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar" SAL_NEWLINE_STRING "baz" SAL_NEWLINE_STRING),
+ xCursor->getString());
+
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), xCursor->getString());
+
+ // this would crash
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar" SAL_NEWLINE_STRING "baz" SAL_NEWLINE_STRING),
+ xCursor->getString());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), xCursor->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar" SAL_NEWLINE_STRING "baz" SAL_NEWLINE_STRING),
+ xCursor->getString());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), xCursor->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf136452)
+{
+ SwDoc* const pDoc(createSwDoc(DATA_DIRECTORY, "tdf136452.fodt"));
+
+ SwNodeOffset const nNodes(pDoc->GetNodes().Count());
+
+ SwWrtShell* const pWrtShell(pDoc->GetDocShell()->GetWrtShell());
+
+ // first deletion spanning 2 sections
+ pWrtShell->SttEndDoc(false);
+ pWrtShell->SetMark();
+ pWrtShell->Up(true, 2);
+ pWrtShell->Delete();
+
+ // 2 paragraphs deleted, last section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 4, pDoc->GetNodes().Count());
+
+ // second deletion spanning 2 sections
+ pWrtShell->SetMark();
+ pWrtShell->Up(true, 3);
+ pWrtShell->Delete();
+
+ // 3 paragraphs deleted, 2nd section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 9, pDoc->GetNodes().Count());
+
+ pWrtShell->Undo();
+
+ // 2 paragraphs deleted, last section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 4, pDoc->GetNodes().Count());
+
+ // this crashed
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(nNodes, pDoc->GetNodes().Count());
+
+ pWrtShell->Redo();
+
+ // 2 paragraphs deleted, last section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 4, pDoc->GetNodes().Count());
+
+ pWrtShell->Redo();
+
+ // 3 paragraphs deleted, 2nd section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 9, pDoc->GetNodes().Count());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf136453)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf136453.fodt");
+ SwWrtShell* const pWrtShell(pDoc->GetDocShell()->GetWrtShell());
+
+ SwNodeOffset const nNodes(pDoc->GetNodes().Count());
+
+ pWrtShell->SttEndDoc(false);
+ pWrtShell->SetMark();
+ pWrtShell->Up(true, 1);
+ pWrtShell->SttPara(true);
+ pWrtShell->Delete();
+
+ // one paragraph deleted, section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 3, pDoc->GetNodes().Count());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(nNodes, pDoc->GetNodes().Count());
+
+ // check that every node has 1 frame
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/txt", 1);
+
+ pWrtShell->Redo();
+
+ // one paragraph deleted, section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 3, pDoc->GetNodes().Count());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section", 0);
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(nNodes, pDoc->GetNodes().Count());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/txt", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137245)
+{
+ SwDoc* const pDoc(createSwDoc());
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+ corr.GetSwFlags().bSetBorder = true;
+ // sigh, it's a global... err i mean Singleton design pattern *eyeroll*
+ SvxSwAutoFormatFlags flags(*SwEditShell::GetAutoFormatFlags());
+ comphelper::ScopeGuard const g([=]() { SwEditShell::SetAutoFormatFlags(&flags); });
+ flags.bSetBorder = true;
+ SwEditShell::SetAutoFormatFlags(&flags);
+
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+ // move cursor back to body
+ pWrtShell->SttEndDoc(false);
+ // keep first paragraph empty so that its flys may be deleted too
+ //pWrtShell->Insert("abc");
+ pWrtShell->SplitNode(false);
+
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+
+ const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), rFormats.size());
+
+ // move cursor back to body
+ pWrtShell->SttEndDoc(false);
+ pWrtShell->Insert("---");
+ pWrtShell->SplitNode(true);
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), rFormats.size());
+
+ // check that the AutoFormat did something
+ pWrtShell->SttEndDoc(true);
+ SfxItemSet set{ pDoc->GetAttrPool(), svl::Items<RES_BOX, RES_BOX> };
+ pWrtShell->GetCurParAttr(set);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, set.GetItemState(RES_BOX, false));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf132236)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132236.odt");
+
+ // select everything and delete
+ SwWrtShell* const pWrtShell(pDoc->GetDocShell()->GetWrtShell());
+ pWrtShell->Down(true);
+ pWrtShell->Down(true);
+ pWrtShell->Down(true);
+ pWrtShell->Delete();
+ sw::UndoManager& rUndoManager(pDoc->GetUndoManager());
+ rUndoManager.Undo();
+
+ // check that the text frames exist inside their sections
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[1]/txt", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[2]/txt", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ sw::UnoCursorPointer pCursor(
+ pDoc->CreateUnoCursor(SwPosition(SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1))));
+
+ pDoc->getIDocumentContentOperations().InsertString(*pCursor, "foo");
+
+ {
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>);
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ pWrtShell->StartOfSection(false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ flySet.Put(anchor);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pCursor->SetMark();
+ pCursor->GetMark()->nContent.Assign(pCursor->GetContentNode(), 0);
+ pCursor->GetPoint()->nContent.Assign(pCursor->GetContentNode(), 3);
+
+ // replace with more text
+ pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "blahblah", false);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("blahblah"), pCursor->GetNode().GetTextNode()->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText());
+
+ rUndoManager.Redo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("blahblah"), pCursor->GetNode().GetTextNode()->GetText());
+
+ rUndoManager.Undo();
+
+ pCursor->GetMark()->nContent.Assign(pCursor->GetContentNode(), 0);
+ pCursor->GetPoint()->nContent.Assign(pCursor->GetContentNode(), 3);
+
+ // replace with less text
+ pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "x", false);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("x"), pCursor->GetNode().GetTextNode()->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText());
+
+ rUndoManager.Redo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("x"), pCursor->GetNode().GetTextNode()->GetText());
+
+ rUndoManager.Undo();
+
+ pCursor->GetMark()->nContent.Assign(pCursor->GetContentNode(), 0);
+ pCursor->GetPoint()->nContent.Assign(pCursor->GetContentNode(), 3);
+
+ // regex replace with paragraph breaks
+ pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "xyz\\n\\nquux\\n", true);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ pWrtShell->StartOfSection(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText());
+ pWrtShell->StartOfSection(false);
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pWrtShell->GetCursor()->GetText());
+
+ rUndoManager.Redo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ pWrtShell->StartOfSection(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText());
+
+ // regex replace with paragraph join
+ pWrtShell->StartOfSection(false);
+ pWrtShell->Down(true);
+ pDoc->getIDocumentContentOperations().ReplaceRange(*pWrtShell->GetCursor(), "bar", true);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ pWrtShell->StartOfSection(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("bar\nquux\n"), pWrtShell->GetCursor()->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ pWrtShell->StartOfSection(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText());
+
+ rUndoManager.Redo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ pWrtShell->StartOfSection(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("bar\nquux\n"), pWrtShell->GetCursor()->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ pWrtShell->StartOfSection(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText());
+ pWrtShell->StartOfSection(false);
+ pWrtShell->EndOfSection(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pWrtShell->GetCursor()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf140007)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("foo");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("bar");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("baz");
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(13), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(11)]->GetTextNode()->GetText());
+
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->EndPara(false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ pWrtShell->Replace(" ", true);
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->EndPara(false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ pWrtShell->Replace(" ", true);
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar baz"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(11), pDoc->GetNodes().Count());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(13), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(11)]->GetTextNode()->GetText());
+
+ pWrtShell->Redo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->Redo();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar baz"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(11), pDoc->GetNodes().Count());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(13), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(11)]->GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf139982)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // turn on redlining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ pWrtShell->Insert("helloo");
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->EndPara(/*bSelect=*/true);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Replace("hello", true);
+
+ // the problem was that a redline delete with the same author as redline
+ // insert has its text deleted immediately, including anchored flys.
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Redo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf135976)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("foobar");
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+
+ // turn on redlining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->UnSelectFrame();
+ pWrtShell->SttEndDoc(/*bStart=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ pWrtShell->DelLeft();
+ pWrtShell->DelLeft();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ // the problem was that the fly was deleted from the layout
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ // check that the anchor was moved outside the redline
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ // check that the anchor was restored
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Redo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ // now again in the other direction:
+
+ pWrtShell->SttEndDoc(/*bStart=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 3, /*bBasicCall=*/false);
+
+ pWrtShell->DelRight();
+ pWrtShell->DelRight();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ // the problem was that the fly was deleted from the layout
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Redo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf39721)
+{
+// FIXME: disabled on Windows because of a not reproducible problem (not related to the patch)
+#if !defined(_WIN32)
+ // check move down with redlining
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf39721.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // store original text of the document for checking Undo
+ OUString sOrigText(pTextDoc->getText()->getString());
+
+ // first paragraph is "Lorem ipsum" with deleted "m ips"
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), getParagraph(1)->getString());
+
+ // move down first paragraph with change tracking
+ dispatchCommand(mxComponent, ".uno:MoveDown", {});
+
+ // deletion isn't rejected
+ CPPUNIT_ASSERT_EQUAL(OUString("Loremm"), getParagraph(3)->getString());
+
+ // Undo and repeat it with the second paragraph
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sOrigText, pTextDoc->getText()->getString());
+
+ // second paragraph is "dolor sit" with deleted "lor "
+ CPPUNIT_ASSERT_EQUAL(OUString("dolor sit"), getParagraph(2)->getString());
+
+ // move down second paragraph with change tracking
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Up(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+
+ dispatchCommand(mxComponent, ".uno:MoveDown", {});
+
+ // This was "dolor sit" (rejecting tracked deletion)
+ CPPUNIT_ASSERT_EQUAL(OUString("dolsit"), getParagraph(4)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sOrigText, pTextDoc->getText()->getString());
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf145066_bad_paragraph_deletion)
+{
+ // check move down with redlining: jumping over a deleted paragraph
+ // resulted bad deletion of the not deleted adjacent paragraph in Show Changes mode
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf39721.fodt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Three paragraphs (list items)
+ CPPUNIT_ASSERT_EQUAL(3, getParagraphs());
+
+ // move down once and move up two times second paragraph with change tracking
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:MoveDown", {});
+ dispatchCommand(mxComponent, ".uno:MoveUp", {});
+ dispatchCommand(mxComponent, ".uno:MoveUp", {});
+
+ // accept all changes
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+ // This was 2 (bad deletion of the first paragraph)
+ // TODO fix unnecessary insertion of a new list item at the end of the document
+ CPPUNIT_ASSERT(getParagraphs() >= 3);
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ // This was "Loremdolsit\namet.\n" (bad deletion of "m\n" at the end of item 1)
+ CPPUNIT_ASSERT_EQUAL(OUString("Loremm" SAL_NEWLINE_STRING "dolsit" SAL_NEWLINE_STRING
+ "amet." SAL_NEWLINE_STRING),
+ pTextDoc->getText()->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf145311_move_over_empty_paragraphs)
+{
+ // check move up/down with redlining: jumping over an empty paragraph
+ // resulted bad insertion of the empty paragraph in Show Changes mode
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf145311.fodt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // 8 paragraphs (list items)
+ CPPUNIT_ASSERT_EQUAL(8, getParagraphs());
+
+ // move down the first item over the empty paragraph
+ for (int i = 0; i < 4; ++i)
+ dispatchCommand(mxComponent, ".uno:MoveDown", {});
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // This was 3 (bad conversion of the empty item to a tracked insertion)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+
+ // check move up
+
+ for (int i = 0; i < 3; ++i)
+ dispatchCommand(mxComponent, ".uno:MoveUp", {});
+
+ // This was 3 (bad conversion of the empty item to a tracked insertion)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf54819)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819.fodt");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ //turn on red-lining and hide changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE("redlines shouldn't be visible",
+ !IDocumentRedlineAccess::IsShowChanges(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // remove first paragraph with paragraph break
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // remaining paragraph keeps its original style
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf54819_keep_numbering_with_Undo)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819b.odt");
+
+ // heading
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // next paragraph: bulleted list item
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ OUString sNumName = getProperty<OUString>(getParagraph(3), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE("redlines shouldn't be visible",
+ !IDocumentRedlineAccess::IsShowChanges(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // remove heading with paragraph break
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // solved problem: changing paragraph style after deletion
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ sNumName = getProperty<OUString>(getParagraph(2), "NumberingStyleName");
+ // solved problem: lost numbering
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+
+ // accept deletion, remaining (now second) paragraph: still bulleted list item
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(2), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+
+ // solved problem: Undo with the workaround
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+ rUndoManager.Undo();
+
+ // heading, manual test is correct
+ // TODO: it works well, but the test fails...
+ // SwWrtShell* const pWrtShell2 = pDoc->GetDocShell()->GetWrtShell();
+ // CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ // getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ // CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ // getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // next paragraph: bulleted list item
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(3), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf119571_keep_numbering_with_Undo)
+{
+ // as the previous test, but with partial paragraph deletion:
+ // all deleted paragraphs get the formatting of the first (the partially deleted) one
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819b.odt");
+
+ // heading
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // next paragraph: bulleted list item
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ OUString sNumName = getProperty<OUString>(getParagraph(3), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+
+ // third paragraph: normal text without numbering
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(4), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Bad numbering", sNumName.isEmpty());
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE("redlines shouldn't be visible",
+ !IDocumentRedlineAccess::IsShowChanges(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // remove only end part of the heading and the next numbered paragraph with paragraph break
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 6, /*bBasicCall=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 2, /*bBasicCall=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // solved problem: changing paragraph style after deletion
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ // solved problem: apply numbering
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // accept deletion
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+
+ // Joined paragraph 2 and paragraph 4: Fusce...nunc.
+ CPPUNIT_ASSERT(getParagraph(2)->getString().startsWith("Fusce"));
+ CPPUNIT_ASSERT(getParagraph(2)->getString().endsWith("nunc."));
+ // Remaining (now second) paragraph: it is still heading
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // solved problem: Undo with the workaround
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+ rUndoManager.Undo();
+
+ // heading
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // next paragraph: bulleted list item
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(3), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+
+ // third paragraph: normal text without numbering
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(4), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Bad numbering", sNumName.isEmpty());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf119571_keep_numbering_with_Reject)
+{
+ // as the previous test, but with partial paragraph deletion:
+ // all deleted paragraphs get the formatting of the first (the partially deleted) one
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819b.odt");
+
+ // heading
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // next paragraph: bulleted list item
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ OUString sNumName = getProperty<OUString>(getParagraph(3), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+
+ // third paragraph: normal text without numbering
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(4), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Bad numbering", sNumName.isEmpty());
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE("redlines shouldn't be visible",
+ !IDocumentRedlineAccess::IsShowChanges(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // remove only end part of the heading and the next numbered paragraph with paragraph break
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 6, /*bBasicCall=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 2, /*bBasicCall=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // solved problem: changing paragraph style after deletion
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ // solved problem: apply numbering
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // reject deletion
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(false);
+
+ // heading
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Outline"),
+ getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
+
+ // next paragraph: bulleted list item
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(3), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Missing numbering style", !sNumName.isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
+
+ // third paragraph: normal text without numbering
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ sNumName = getProperty<OUString>(getParagraph(4), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Bad numbering", sNumName.isEmpty());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf140077)
+{
+ SwDoc* const pDoc = createSwDoc();
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // hide
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ pWrtShell->Insert("a");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("b");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ // enable
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->Delete();
+ pWrtShell->SttEndDoc(/*bStart=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ // crashed in layout
+ pWrtShell->SplitNode();
+
+ pWrtShell->Undo();
+ pWrtShell->Redo();
+ pWrtShell->Undo();
+ pWrtShell->Redo();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376_redline)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ // need 2 paragraphs to get to the bMoveNds case
+ pWrtShell->Insert("foo");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("bar");
+ pWrtShell->SplitNode();
+ pWrtShell->StartOfSection(false);
+
+ // add AT_PARA fly at 1st to be deleted node
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+
+ pWrtShell->SttEndDoc(false);
+ SwInsertTableOptions tableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ const SwTable& rTable = pWrtShell->InsertTable(tableOpt, 1, 1);
+
+ pWrtShell->StartOfSection(false);
+ SwPaM pam(*pWrtShell->GetCursor()->GetPoint());
+ pam.SetMark();
+ pam.GetPoint()->nNode = *rTable.GetTableNode();
+ pam.GetPoint()->nContent.Assign(nullptr, 0);
+ pam.Exchange(); // same selection direction as in doc compare...
+
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert | RedlineFlags::ShowDelete);
+ rIDRA.AppendRedline(new SwRangeRedline(RedlineType::Delete, pam), true);
+ // this used to assert/crash with m_pAnchoredFlys mismatch because the
+ // fly was not deleted but its anchor was moved to the SwTableNode
+ rIDRA.AcceptAllRedline(true);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ // need 2 paragraphs to get to the bMoveNds case
+ pWrtShell->Insert("foo");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("bar");
+ pWrtShell->SplitNode();
+ pWrtShell->StartOfSection(false);
+
+ // add AT_PARA fly at 1st to be deleted node
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>);
+ flySet.Put(anchor);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+
+ pWrtShell->SttEndDoc(false);
+ SwInsertTableOptions tableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ const SwTable& rTable = pWrtShell->InsertTable(tableOpt, 1, 1);
+
+ pWrtShell->StartOfSection(false);
+ SwPaM pam(*pWrtShell->GetCursor()->GetPoint());
+ pam.SetMark();
+ pam.GetPoint()->nNode = *rTable.GetTableNode();
+ pam.GetPoint()->nContent.Assign(nullptr, 0);
+ pam.Exchange(); // same selection direction as in doc compare...
+
+ // this used to assert/crash with m_pAnchoredFlys mismatch because the
+ // fly was not deleted but its anchor was moved to the SwTableNode
+ pDoc->getIDocumentContentOperations().DeleteRange(pam);
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147414)
+{
+ SwDoc* const pDoc(createSwDoc());
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+
+ pWrtShell->Insert("Abc");
+
+ // hide and enable
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ CPPUNIT_ASSERT(pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ // backspace
+ pWrtShell->DelLeft();
+ pWrtShell->AutoCorrect(corr, u' ');
+
+ // problem was this was 1 i.e. before the deleted "b" while " " was inserted after
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3),
+ pWrtShell->getShellCursor(false)->GetPoint()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Ab c"),
+ pWrtShell->getShellCursor(false)->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147310)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // somehow bug happens only with 2 tables
+ SwInsertTableOptions tableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(tableOpt, 1, 1);
+ pWrtShell->InsertTable(tableOpt, 1, 1);
+
+ pWrtShell->SttEndDoc(/*bStart=*/true);
+
+ pWrtShell->DeleteRow(false);
+ pWrtShell->DeleteRow(false);
+
+ {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/tab", 0);
+ discardDumpedLayout();
+ }
+ pWrtShell->Undo();
+ // this did not create frames for the table
+ pWrtShell->Undo();
+ {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // there are 2 tables
+ assertXPath(pXmlDoc, "/root/page/body/tab", 2);
+ discardDumpedLayout();
+ }
+ pWrtShell->Redo();
+ pWrtShell->Redo();
+ {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/tab", 0);
+ discardDumpedLayout();
+ }
+ pWrtShell->Undo();
+ pWrtShell->Undo();
+ {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // there are 2 tables
+ assertXPath(pXmlDoc, "/root/page/body/tab", 2);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf64242_optimizeTable)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf64242_optimizeTable.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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();
+
+ double origWidth = getProperty<double>(xTextTable, "Width");
+ sal_Int32 nToleranceW = origWidth * .01;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Table Width", double(17013), origWidth, nToleranceW);
+
+ pWrtShell->SelTable(); //select the whole table
+
+ dispatchCommand(mxComponent, ".uno:SetOptimalColumnWidth", {});
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Table Width: optimize", origWidth,
+ getProperty<double>(xTextTable, "Width"), nToleranceW);
+
+ dispatchCommand(mxComponent, ".uno:SetMinimalColumnWidth", {});
+ CPPUNIT_ASSERT_MESSAGE("Table Width: minimized",
+ (origWidth - nToleranceW) > getProperty<double>(xTextTable, "Width"));
+
+ double origRowHeight = getProperty<double>(xTableRows->getByIndex(2), "Height");
+ sal_Int32 nToleranceH = origRowHeight * .01;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Row Height", double(3441), origRowHeight, nToleranceH);
+
+ dispatchCommand(mxComponent, ".uno:SetOptimalRowHeight", {});
+ double optimalRowHeight = getProperty<double>(xTableRows->getByIndex(2), "Height");
+ CPPUNIT_ASSERT_MESSAGE("Row Height: optimized",
+ (origRowHeight - nToleranceH) > optimalRowHeight);
+
+ dispatchCommand(mxComponent, ".uno:SetMinimalRowHeight", {});
+ double minimalRowHeight = getProperty<double>(xTableRows->getByIndex(2), "Height");
+ CPPUNIT_ASSERT_MESSAGE("Row Height: minimized",
+ (optimalRowHeight - nToleranceH) > minimalRowHeight);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Row set to auto-height", double(0), minimalRowHeight);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf45525)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf45525.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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(3889.0, getProperty<double>(xTableRows->getByIndex(0), "Height"));
+ CPPUNIT_ASSERT_EQUAL(0.0, getProperty<double>(xTableRows->getByIndex(1), "Height"));
+ CPPUNIT_ASSERT_EQUAL(0.0, getProperty<double>(xTableRows->getByIndex(2), "Height"));
+ CPPUNIT_ASSERT_EQUAL(0.0, getProperty<double>(xTableRows->getByIndex(3), "Height"));
+ CPPUNIT_ASSERT_EQUAL(0.0, getProperty<double>(xTableRows->getByIndex(4), "Height"));
+
+ //Select three cells in the first column
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+
+ dispatchCommand(mxComponent, ".uno:SetOptimalRowHeight", {});
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1914
+ // - Actual : 3889
+ CPPUNIT_ASSERT_EQUAL(1914.0, getProperty<double>(xTableRows->getByIndex(0), "Height"));
+ CPPUNIT_ASSERT_EQUAL(1914.0, getProperty<double>(xTableRows->getByIndex(1), "Height"));
+ CPPUNIT_ASSERT_EQUAL(1914.0, getProperty<double>(xTableRows->getByIndex(2), "Height"));
+ CPPUNIT_ASSERT_EQUAL(0.0, getProperty<double>(xTableRows->getByIndex(3), "Height"));
+ CPPUNIT_ASSERT_EQUAL(0.0, getProperty<double>(xTableRows->getByIndex(4), "Height"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf126784_distributeSelectedColumns)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf126784_distributeSelectedColumns.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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();
+
+ auto aSeq = getProperty<uno::Sequence<text::TableColumnSeparator>>(xTableRows->getByIndex(0),
+ "TableColumnSeparators");
+ sal_Int16 nOrigCol2Pos = aSeq[0].Position;
+ sal_Int16 nOrigCol3Pos = aSeq[1].Position;
+
+ //Select column 1 and 2
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+
+ dispatchCommand(mxComponent, ".uno:DistributeColumns", {});
+
+ aSeq = getProperty<uno::Sequence<text::TableColumnSeparator>>(xTableRows->getByIndex(0),
+ "TableColumnSeparators");
+ CPPUNIT_ASSERT_MESSAGE("Second column should shrink", nOrigCol2Pos < aSeq[0].Position);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Last column shouldn't change", nOrigCol3Pos, aSeq[1].Position);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf144317)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf144317.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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();
+
+ auto aSeq = getProperty<uno::Sequence<text::TableColumnSeparator>>(xTableRows->getByIndex(0),
+ "TableColumnSeparators");
+ sal_Int16 nOrigCol1Pos = aSeq[0].Position;
+
+ // Move the cursor inside the table
+ pWrtShell->Down(/*bSelect=*/false);
+
+ //Select some cells in the first column
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+
+ dispatchCommand(mxComponent, ".uno:SetMinimalColumnWidth", {});
+
+ aSeq = getProperty<uno::Sequence<text::TableColumnSeparator>>(xTableRows->getByIndex(0),
+ "TableColumnSeparators");
+ CPPUNIT_ASSERT_MESSAGE("First column should shrink", aSeq[0].Position < nOrigCol1Pos);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf108687_tabstop)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf108687_tabstop.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwNodeOffset nStartIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(9), nStartIndex);
+
+ // Now pressing 'tab' should jump to the radio buttons.
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+ //sal_Int32 nEndIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ //CPPUNIT_ASSERT_EQUAL(sal_Int32(11), nEndIndex);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf119571)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819.fodt");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // join paragraphs by removing the end of the first one with paragraph break
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // second paragraph changes its style in "Show changes" mode
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf144058)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf144058.fodt");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // join first and last but one paragraphs by removing the end of the first paragraph
+ // with paragraph break, and by removing two tables of the selected range completely
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // accept all: tables are deleted
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // This was 2 (remaining empty tables)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147507)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf147507.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // select all, backspace and reject all crashed
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SwBackSpace", {});
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf119019)
+{
+ // check handling of overlapping redlines
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf119019.docx");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus."),
+ getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(2), 1)->getString());
+ // second paragraph has got a tracked paragraph formatting at this point
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
+
+ // delete last word of the second paragraph to remove tracked paragraph formatting
+ // of this paragraph to track and show word deletion correctly.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 7, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // check tracked text deletion
+ CPPUNIT_ASSERT_EQUAL(OUString("tellus."), getRun(getParagraph(2), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(2), 2)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 2), "RedlineType"));
+
+ // make sure that the tracked paragraph formatting is removed
+ CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf119824)
+{
+ // check handling of overlapping redlines with Redo
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf119019.docx");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Pellentesque habitant morbi tristique senectus "
+ "et netus et malesuada fames ac turpis egestas. "
+ "Proin pharetra nonummy pede. Mauris et orci."),
+ getParagraph(3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(3), 1)->getString());
+ // third paragraph has got a tracked paragraph formatting at this point
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(3), 1), "RedlineType"));
+
+ // and a tracked text deletion at the beginning of the paragraph
+ CPPUNIT_ASSERT_EQUAL(OUString("Pellentesque habitant morbi tristique senectus "),
+ getRun(getParagraph(3), 3)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(3), 2)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(3), 2), "RedlineType"));
+
+ // delete last word of the third paragraph to remove tracked paragraph formatting
+ // of this paragraph to track and show word deletion correctly.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 5, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // check tracking of the new text deletion
+ CPPUNIT_ASSERT_EQUAL(OUString("orci."), getRun(getParagraph(3), 7)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(3), 6)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(3), 6), "RedlineType"));
+
+ // make sure that the tracked paragraph formatting is removed (tracked deletion is in the second run)
+ CPPUNIT_ASSERT_EQUAL(OUString("Pellentesque habitant morbi tristique senectus "),
+ getRun(getParagraph(3), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(3), 1)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(3), 1), "RedlineType"));
+
+ // tdf#119824 check redo
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+ rUndoManager.Undo();
+ rUndoManager.Redo();
+ rUndoManager.Redo();
+
+ // check again the first tracked text deletion (we lost this before the redo fix)
+ CPPUNIT_ASSERT_EQUAL(OUString("Pellentesque habitant morbi tristique senectus "),
+ getRun(getParagraph(3), 2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(3), 1)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(3), 1), "RedlineType"));
+
+ // check redo of the new tracked text deletion
+ CPPUNIT_ASSERT_EQUAL(OUString("orci."), getRun(getParagraph(3), 7)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getRun(getParagraph(3), 6)->getString());
+ CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(3), 6), "RedlineType"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105413)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf105413.fodt");
+
+ // all paragraphs have got Standard paragraph style
+ for (int i = 1; i < 4; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(i), "ParaStyleName"));
+ }
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Set Heading 1 paragraph style in the 3th paragraph.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/false);
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 1")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "num-parent-style.docx");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ 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(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ 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"));
+
+ // set Heading 2 style of paragraph 2 to Heading 1
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 1")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ getProperty<sal_Int32>(getParagraph(2), "OutlineLevel"));
+ // This was "1 Heading" instead of "2 Heading"
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(getParagraph(2), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(4), "OutlineLevel"));
+ // This was "2.1 Heading"
+ CPPUNIT_ASSERT_EQUAL(OUString("3.1"),
+ getProperty<OUString>(getParagraph(4), "ListLabelString"));
+
+ // set Heading 1 style of paragraph 3 to Heading 2
+
+ pWrtShell->Down(/*bSelect=*/false);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ getProperty<sal_Int32>(getParagraph(3), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), getProperty<OUString>(getParagraph(3), "ListLabelString"));
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues2 = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 2")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues2);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(3), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2.1"),
+ getProperty<OUString>(getParagraph(3), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(4), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2.2"),
+ getProperty<OUString>(getParagraph(4), "ListLabelString"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817_round_trip)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf76817.fodt");
+
+ // save it to DOCX
+ reload("Office Open XML Text", "tdf76817.docx");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwViewShell* pViewShell
+ = pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
+ pViewShell->Reformat();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ 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(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ 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"));
+
+ // set Heading 2 style of paragraph 2 to Heading 1
+
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 1")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ getProperty<sal_Int32>(getParagraph(2), "OutlineLevel"));
+ // This was "1 Heading" instead of "2 Heading"
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(getParagraph(2), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(4), "OutlineLevel"));
+ // This was "2.1 Heading"
+ CPPUNIT_ASSERT_EQUAL(OUString("3.1"),
+ getProperty<OUString>(getParagraph(4), "ListLabelString"));
+
+ // set Heading 1 style of paragraph 3 to Heading 2
+
+ pWrtShell->Down(/*bSelect=*/false);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ getProperty<sal_Int32>(getParagraph(3), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), getProperty<OUString>(getParagraph(3), "ListLabelString"));
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues2 = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 2")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues2);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(3), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2.1"),
+ getProperty<OUString>(getParagraph(3), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(4), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2.2"),
+ getProperty<OUString>(getParagraph(4), "ListLabelString"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817_custom_outline)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf76817.docx");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ 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(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(2), "OutlineLevel"));
+ // This wasn't numbered
+ CPPUNIT_ASSERT_EQUAL(OUString("1.1"),
+ getProperty<OUString>(getParagraph(2), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(4), "OutlineLevel"));
+ // This wasn't numbered
+ CPPUNIT_ASSERT_EQUAL(OUString("2.1"),
+ getProperty<OUString>(getParagraph(4), "ListLabelString"));
+
+ // set Heading 2 style of paragraph 2 to Heading 1
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 1")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ getProperty<sal_Int32>(getParagraph(2), "OutlineLevel"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(getParagraph(2), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(4), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2),
+ getProperty<sal_Int32>(getParagraph(4), "OutlineLevel"));
+ // This wasn't numbered
+ CPPUNIT_ASSERT_EQUAL(OUString("3.1"),
+ getProperty<OUString>(getParagraph(4), "ListLabelString"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf123102)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf123102.odt");
+ // insert a new row after a vertically merged cell
+ dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // This was "3." - caused by the hidden numbered paragraph of the new merged cell
+ assertXPath(pXmlDoc, "/root/page/body/tab/row[6]/cell[1]/txt/Special", "rText", "2.");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testUnfloatButtonSmallTable)
+{
+ // The floating table in the test document is too small, so we don't provide an unfloat button
+ SwDoc* pDoc = createSwDoc(FLOATING_TABLE_DATA_DIRECTORY, "small_floating_table.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ const SwSortedObjs* pAnchored
+ = pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs();
+ CPPUNIT_ASSERT(pAnchored);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pAnchored->size());
+ SwAnchoredObject* pAnchoredObj = (*pAnchored)[0];
+
+ SwFlyFrame* pFlyFrame = pAnchoredObj->DynCastFlyFrame();
+ CPPUNIT_ASSERT(pFlyFrame);
+ CPPUNIT_ASSERT(!pFlyFrame->IsShowUnfloatButton(pWrtShell));
+
+ SdrObject* pObj = pFlyFrame->GetFormat()->FindRealSdrObject();
+ CPPUNIT_ASSERT(pObj);
+ pWrtShell->SelectObj(Point(), 0, pObj);
+ CPPUNIT_ASSERT(!pFlyFrame->IsShowUnfloatButton(pWrtShell));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testUnfloatButton)
+{
+ // Different use cases where unfloat button should be visible
+ const std::vector<OUString> aTestFiles = {
+ "unfloatable_floating_table.odt", // Typical use case of multipage floating table
+ "unfloatable_floating_table.docx", // Need to test the DOCX import whether we detect the floating table correctly
+ "unfloatable_floating_table.doc", // Also the DOC import
+ "unfloatable_small_floating_table.docx" // Atypical use case, when the table is small, but because of it's position is it broken to two pages
+ };
+
+ for (const OUString& aTestFile : aTestFiles)
+ {
+ OString sTestFileName = OUStringToOString(aTestFile, RTL_TEXTENCODING_UTF8);
+ OString sFailureMessage = OString::Concat("Failure in the test file: ") + sTestFileName;
+
+ SwDoc* pDoc = createSwDoc(FLOATING_TABLE_DATA_DIRECTORY, sTestFileName.getStr());
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pWrtShell);
+
+ const SwSortedObjs* pAnchored;
+ if (sTestFileName == "unfloatable_small_floating_table.docx")
+ pAnchored = pWrtShell->GetLayout()
+ ->GetLower()
+ ->GetLower()
+ ->GetLower()
+ ->GetNext()
+ ->GetDrawObjs();
+ else
+ pAnchored = pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pAnchored);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailureMessage.getStr(), static_cast<size_t>(1),
+ pAnchored->size());
+ SwAnchoredObject* pAnchoredObj = (*pAnchored)[0];
+
+ // The unfloat button is not visible until it gets selected
+ SwFlyFrame* pFlyFrame = pAnchoredObj->DynCastFlyFrame();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pFlyFrame);
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(),
+ !pFlyFrame->IsShowUnfloatButton(pWrtShell));
+
+ SdrObject* pObj = pFlyFrame->GetFormat()->FindRealSdrObject();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pObj);
+ pWrtShell->SelectObj(Point(), 0, pObj);
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pFlyFrame->IsShowUnfloatButton(pWrtShell));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testUnfloatButtonReadOnlyMode)
+{
+ // In read only mode we don't show the unfloat button even if we have a multipage floating table
+ SwDoc* pDoc = createSwDoc(FLOATING_TABLE_DATA_DIRECTORY, "unfloatable_floating_table.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ pWrtShell->SetReadonlyOption(true);
+
+ const SwSortedObjs* pAnchored
+ = pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs();
+ CPPUNIT_ASSERT(pAnchored);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pAnchored->size());
+ SwAnchoredObject* pAnchoredObj = (*pAnchored)[0];
+
+ SwFlyFrame* pFlyFrame = pAnchoredObj->DynCastFlyFrame();
+ CPPUNIT_ASSERT(pFlyFrame);
+ CPPUNIT_ASSERT(!pFlyFrame->IsShowUnfloatButton(pWrtShell));
+
+ SdrObject* pObj = pFlyFrame->GetFormat()->FindRealSdrObject();
+ CPPUNIT_ASSERT(pObj);
+ pWrtShell->SelectObj(Point(), 0, pObj);
+ CPPUNIT_ASSERT(!pFlyFrame->IsShowUnfloatButton(pWrtShell));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testUnfloating)
+{
+ // Test unfloating with tables imported from different file formats
+ const std::vector<OUString> aTestFiles = {
+ "unfloatable_floating_table.odt",
+ "unfloatable_floating_table.docx",
+ "unfloatable_floating_table.doc",
+ };
+
+ for (const OUString& aTestFile : aTestFiles)
+ {
+ OString sTestFileName = OUStringToOString(aTestFile, RTL_TEXTENCODING_UTF8);
+ OString sFailureMessage = OString::Concat("Failure in the test file: ") + sTestFileName;
+
+ // Test what happens when pushing the unfloat button
+ SwDoc* pDoc = createSwDoc(FLOATING_TABLE_DATA_DIRECTORY, "unfloatable_floating_table.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pWrtShell);
+
+ SwFlyFrame* pFlyFrame;
+
+ // Before unfloating we have only one page with a fly frame
+ {
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailureMessage.getStr(), SwFrameType::Page,
+ pWrtShell->GetLayout()->GetLower()->GetType());
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(),
+ !pWrtShell->GetLayout()->GetLower()->GetNext());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ sFailureMessage.getStr(), SwFrameType::Txt,
+ pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetType());
+ const SwSortedObjs* pAnchored
+ = pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pAnchored);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailureMessage.getStr(), static_cast<size_t>(1),
+ pAnchored->size());
+ SwAnchoredObject* pAnchoredObj = (*pAnchored)[0];
+ pFlyFrame = pAnchoredObj->DynCastFlyFrame();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pFlyFrame);
+ }
+
+ // Select the floating table
+ SdrObject* pObj = pFlyFrame->GetFormat()->FindRealSdrObject();
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pObj);
+ pWrtShell->SelectObj(Point(), 0, pObj);
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(), pFlyFrame->IsShowUnfloatButton(pWrtShell));
+
+ // Push the unfloat button
+ pFlyFrame->ActiveUnfloatButton(pWrtShell);
+ Scheduler::ProcessEventsToIdle();
+
+ // After unfloating we have two pages with one table frame on each page
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(),
+ pWrtShell->GetLayout()->GetLower()->GetNext());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailureMessage.getStr(), SwFrameType::Page,
+ pWrtShell->GetLayout()->GetLower()->GetNext()->GetType());
+ CPPUNIT_ASSERT_MESSAGE(sFailureMessage.getStr(),
+ !pWrtShell->GetLayout()->GetLower()->GetNext()->GetNext());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ sFailureMessage.getStr(), SwFrameType::Tab,
+ pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetType());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ sFailureMessage.getStr(), SwFrameType::Tab,
+ pWrtShell->GetLayout()->GetLower()->GetNext()->GetLower()->GetLower()->GetType());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRTLparaStyle_LocaleArabic)
+{
+ // New documents, created in RTL locales, were not round-tripping the paragraph style as RTL.
+ // Set the locale to "ar" for this test - see preTest() at the top of this file.
+ std::unique_ptr<Resetter> const pChanges(preTest("LocaleArabic"));
+
+ createSwDoc(); // new, empty doc - everything defaults to RTL with Arabic locale
+
+ // Save it and load it back.
+ reload("Office Open XML Text", "tdf116404_paraStyleFrameDir.docx");
+
+ uno::Reference<beans::XPropertySet> xPageStyle(
+ getStyles("ParagraphStyles")->getByName("Default Paragraph Style"), uno::UNO_QUERY_THROW);
+ // Test the text Direction value for the -none- based paragraph styles
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("RTL Writing Mode", sal_Int32(1),
+ getProperty<sal_Int32>(xPageStyle, "WritingMode"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122893)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf105413.fodt");
+
+ // all paragraphs are left-aligned with preset single line spacing
+ for (int i = 1; i < 4; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(i), "ParaAdjust"));
+ dispatchCommand(mxComponent, ".uno:SpacePara1", {});
+ }
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Set center-aligned paragraph with preset double line spacing in the 3th paragraph.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/false);
+
+ dispatchCommand(mxComponent, ".uno:CenterPara", {});
+ dispatchCommand(mxComponent, ".uno:SpacePara2", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3),
+ getProperty<sal_Int32>(getParagraph(3), "ParaAdjust")); // center-aligned
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(200),
+ getProperty<style::LineSpacing>(getParagraph(3), "ParaLineSpacing")
+ .Height); // double line spacing
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(2), "ParaAdjust")); // left-aligned
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(100),
+ getProperty<style::LineSpacing>(getParagraph(2), "ParaLineSpacing")
+ .Height); // single line spacing
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122901)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf105413.fodt");
+
+ // all paragraphs with zero borders
+ for (int i = 1; i < 4; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(i), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(i), "ParaBottomMargin"));
+ }
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Increase paragraph borders in the 3th paragraph, similar to the default icon of the UI
+ // "Increase Paragraph Spacing".
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/false);
+
+ dispatchCommand(mxComponent, ".uno:ParaspaceIncrease", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(101), getProperty<sal_Int32>(getParagraph(3), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(101),
+ getProperty<sal_Int32>(getParagraph(3), "ParaBottomMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(2), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf122942)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf122942.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Do the moral equivalent of mouse button down, move and up.
+ // Start creating a custom shape that overlaps with the rounded rectangle
+ // already present in the document.
+ Point aStartPos(8000, 3000);
+ pWrtShell->BeginCreate(SdrObjKind::CustomShape, aStartPos);
+
+ // Set its size.
+ Point aMovePos(10000, 5000);
+ pWrtShell->MoveCreate(aMovePos);
+
+ // Finish creation.
+ pWrtShell->EndCreate(SdrCreateCmd::ForceEnd);
+
+ // Make sure that the shape is inserted.
+ const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rFormats.size());
+
+ reload("writer8", "tdf122942.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ pDoc = pWrtShell->GetDoc();
+ const SwFrameFormats& rFormats2 = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rFormats2.size());
+
+ // Make sure the top of the inserted shape does not move outside the existing shape, even after
+ // reload.
+ SdrObject* pObject1 = rFormats2[0]->FindSdrObject();
+ CPPUNIT_ASSERT(pObject1);
+ const tools::Rectangle& rOutRect1 = pObject1->GetLastBoundRect();
+ SdrObject* pObject2 = rFormats2[1]->FindSdrObject();
+ CPPUNIT_ASSERT(pObject2);
+ const tools::Rectangle& rOutRect2 = pObject2->GetLastBoundRect();
+ CPPUNIT_ASSERT(rOutRect2.Top() > rOutRect1.Top());
+ CPPUNIT_ASSERT(rOutRect2.Top() < rOutRect1.Bottom());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf132160)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf132160.odt");
+
+ // this would crash due to delete redline starting with ToX
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // this would crash due to insert redline ending on table node
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137526)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132160.odt");
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // select and delete a word
+ dispatchCommand(mxComponent, ".uno:WordRightSel", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("support"));
+
+ // this would crash due to bad redline range
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("Encryption"));
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137684)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132160.odt");
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // select and delete a word letter by letter
+ for (int i = 0; i <= 10; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ }
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("support"));
+
+ // this would crash due to bad redline range
+ for (int i = 0; i <= 10; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ }
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("Encryption "));
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137503)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132160.odt");
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // select and delete the first two paragraphs
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("The"));
+
+ // this would crash due to bad redline range
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("Encryption "));
+
+ // this would crash due to bad redline range
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("The"));
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf138605)
+{
+ SwDoc* const pDoc(createSwDoc());
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // insert a word, delete it with change tracking and try to undo it
+ pWrtShell->Insert("word");
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ // this crashed due to bad access to the empty redline table
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // more Undo
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("word"));
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith(""));
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf138135)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132160.odt");
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // select and delete a word letter by letter by using backspace
+ dispatchCommand(mxComponent, ".uno:GoToNextWord", {});
+
+ for (int i = 0; i <= 10; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ }
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("support"));
+
+ // TODO group redlines for managing tracked changes/showing in margin
+ for (int i = 0; i <= 10; ++i)
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("Encryption"));
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf52391)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf52391.fodt");
+
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ const uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 1);
+ // this was "Portion1", because the tracked background color of Portion1 was
+ // accepted for "Reject All". Now rejection clears formatting of the text
+ // in format-only changes, concatenating the text portions in the first paragraph.
+ CPPUNIT_ASSERT_EQUAL(OUString("Portion1Portion2"), xRun->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137771)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132160.odt");
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // delete a word at the end of the paragraph.
+ dispatchCommand(mxComponent, ".uno:GotoEndOfPara", {});
+ for (int i = 0; i < 6; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ }
+
+ CPPUNIT_ASSERT(getParagraph(1)->getString().endsWith("to be "));
+
+ // Dump the rendering of the first page as an XML file.
+ SwDocShell* pShell = pDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // This would be 5 without the new vertical redline mark
+ assertXPath(pXmlDoc, "/metafile/push/push/push/line", 6);
+
+ // This was the content of the next <text> (missing deletion on margin)
+ // or only the first character of the deleted character sequence
+ assertXPathContent(pXmlDoc, "/metafile/push/push/push/textarray[9]/text", " saved.");
+
+ // this would crash due to bad redline range
+ for (int i = 0; i < 6; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ }
+ CPPUNIT_ASSERT(getParagraph(1)->getString().endsWith("to be saved."));
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf142130)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf142130.fodt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Dump the rendering of the first page as an XML file.
+ SwDocShell* pShell = pDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // This was 6 (bad crossing out of the first, not deleted image)
+ // (4 lines = 2 lines for crossing out of the second image + 2 lines =
+ // vertical "changed line" indicator before the two paragraph lines)
+ assertXPath(pXmlDoc, "/metafile/push/push/push/line", 4);
+
+ // check line color
+ assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/linecolor", 5);
+ // tdf#142128 This was 3 (NON_PRINTING_CHARACTER_COLOR = #268bd2)
+ assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/linecolor[@color='#268bd2']", 0);
+
+ // reject deletion of the second image
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(false);
+
+ xMetaFile = pShell->GetPreviewMetaFile();
+ xmlDocUniquePtr pXmlDoc2 = dumpAndParse(dumper, *xMetaFile);
+ // no crossing out and vertical redlines
+ assertXPath(pXmlDoc2, "/metafile/push/push/push/line", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf142196)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf142196.fodt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Dump the rendering of the first page as an XML file.
+ SwDocShell* pShell = pDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // This was 1 (missing crossing out of the deleted image)
+ // (2 lines = crossing out of the deleted image + 1 line for the
+ // vertical "changed line" indicator before the paragraph line)
+ assertXPath(pXmlDoc, "//line", 3);
+
+ // check line color
+ assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/linecolor", 1);
+ // tdf#142128 This was NON_PRINTING_CHARACTER_COLOR (#268bd2)
+ assertXPath(
+ pXmlDoc,
+ "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/linecolor[@color='#268bd2']", 0);
+
+ // reject deletion of the image
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(false);
+
+ xMetaFile = pShell->GetPreviewMetaFile();
+ xmlDocUniquePtr pXmlDoc2 = dumpAndParse(dumper, *xMetaFile);
+
+ // no crossing out and vertical "changed line" indicator
+ assertXPath(pXmlDoc2, "//line", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf142700)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf142700.fodt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Dump the rendering of the first page as an XML file.
+ SwDocShell* pShell = pDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // (2 lines = crossing out of the deleted image + 1 line for the
+ // vertical "changed line" indicator before the paragraph line)
+ assertXPath(pXmlDoc, "//line", 3);
+
+ // check line color
+ assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/linecolor", 1);
+ // tdf#142128 This was NON_PRINTING_CHARACTER_COLOR (#268bd2)
+ assertXPath(
+ pXmlDoc,
+ "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/linecolor[@color='#268bd2']", 0);
+
+ // reject deletion of the image
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(false);
+
+ xMetaFile = pShell->GetPreviewMetaFile();
+ xmlDocUniquePtr pXmlDoc2 = dumpAndParse(dumper, *xMetaFile);
+
+ // no crossing out and vertical "changed line" indicator
+ // This was 2 (not removed strikethrough)
+ assertXPath(pXmlDoc2, "//line", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf139120)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // delete paragraph break
+ dispatchCommand(mxComponent, ".uno:GotoEndOfPara", {});
+ for (int i = 0; i < 6; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ }
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum sit amet."), pTextDoc->getText()->getString());
+
+ for (int i = 0; i < 6; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ }
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("dolor sit amet."), getParagraph(2)->getString());
+
+ // Dump the rendering of the first page as an XML file.
+ SwDocShell* pShell = pDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // This was the 3, containing the text "$2" instead of nothing
+ assertXPath(pXmlDoc, "/metafile/push/push/push/textarray", 2);
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testJoinParaChangesInMargin)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819.fodt");
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // delete a character and the paragraph break at the end of the paragraph
+ dispatchCommand(mxComponent, ".uno:GotoEndOfPara", {});
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsudolor sit amet."), getParagraph(1)->getString());
+
+ // Undo
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ // this would crash due to bad redline range
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), getParagraph(1)->getString());
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf140757)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819.fodt");
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // delete a character in the first paragraph, and another character in the second one
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ pWrtShell->Down(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+
+ CPPUNIT_ASSERT_EQUAL(OUString("orem ipsum"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("olor sit amet."), getParagraph(2)->getString());
+
+ // accept all changes
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(/*bAccept=*/true);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("orem ipsum"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("olor sit amet."), getParagraph(2)->getString());
+
+ // This crashed
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // Check result of Undo
+ rIDRA.AcceptAllRedline(/*bAccept=*/false);
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("dolor sit amet."), getParagraph(2)->getString());
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testConditionalHiddenSectionIssue)
+{
+ // tdf#54703
+ // When exporting the bug document as PDF, the conditional hidden
+ // sections became visible in the PDF and in the document.
+
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "HiddenSection.odt");
+
+ // Check section conditional hidden status - all should be hidden (IsCondHidden == true)
+ for (SwNodeOffset i(0); i < pDoc->GetNodes().Count(); ++i)
+ {
+ if (SwSectionNode const* const pNode = pDoc->GetNodes()[i]->GetSectionNode())
+ {
+ CPPUNIT_ASSERT_EQUAL(true, pNode->GetSection().IsCondHidden());
+ }
+ }
+
+ // PDF export
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+ SvMemoryStream aMemory;
+ aMemory.WriteStream(aFile);
+ auto pPdfDocument = pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize(), OString());
+ CPPUNIT_ASSERT(pPdfDocument);
+ auto pPdfPage = pPdfDocument->openPage(0);
+ CPPUNIT_ASSERT(pPdfPage);
+
+ // No PDF object should be present in the page - sections remained hidden
+ CPPUNIT_ASSERT_EQUAL(0, pPdfPage->getObjectCount());
+
+ // Check section conditional hidden status - all should remained hidden (IsCondHidden == true)
+ for (SwNodeOffset i(0); i < pDoc->GetNodes().Count(); ++i)
+ {
+ if (SwSectionNode const* const pNode = pDoc->GetNodes()[i]->GetSectionNode())
+ {
+ CPPUNIT_ASSERT_EQUAL(true, pNode->GetSection().IsCondHidden());
+ }
+ }
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
new file mode 100644
index 000000000..6d93e784f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -0,0 +1,4523 @@
+/* -*- 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 <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <vcl/filter/PDFiumLibrary.hxx>
+#include <vcl/scheduler.hxx>
+#include <vcl/TypeSerializer.hxx>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/drawing/GraphicExportFilter.hpp>
+#include <IDocumentDrawModelAccess.hxx>
+#include <com/sun/star/table/TableBorder2.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <comphelper/propertysequence.hxx>
+#include <boost/property_tree/json_parser.hpp>
+#include <frameformats.hxx>
+#include <swdtflvr.hxx>
+#include <tools/json_writer.hxx>
+#include <unotools/streamwrap.hxx>
+#include <sfx2/linkmgr.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <view.hxx>
+#include <wrtsh.hxx>
+#include <unotxdoc.hxx>
+#include <drawdoc.hxx>
+#include <dcontact.hxx>
+#include <svx/svdpage.hxx>
+#include <ndtxt.hxx>
+#include <txtfld.hxx>
+#include <toxmgr.hxx>
+#include <IDocumentFieldsAccess.hxx>
+#include <IDocumentLinksAdministration.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <rootfrm.hxx>
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
+} // namespace
+
+/// Third set of tests asserting the behavior of Writer user interface shells.
+class SwUiWriterTest3 : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145731)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf145731.odt");
+
+ CPPUNIT_ASSERT_EQUAL(9, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(9, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139843)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf139843.odt");
+
+ int nPages = getPages();
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(nPages, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf146848)
+{
+ // Reuse existing document
+ createSwDoc(DATA_DIRECTORY, "tdf77014.odt");
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ 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());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ xFields = xFieldsAccess->createEnumeration();
+
+ int nFieldsCount = 0;
+ while (xFields->hasMoreElements())
+ {
+ xFields->nextElement();
+ nFieldsCount++;
+ }
+ CPPUNIT_ASSERT_EQUAL(4, nFieldsCount);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145321)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf145321.odt");
+
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testVariableFieldTableRowSplitHeader)
+{
+ SwDoc* const pDoc = createSwDoc(DATA_DIRECTORY, "variable-field-table-row-split-header.fodt");
+
+ // finish layout
+ Scheduler::ProcessEventsToIdle();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // the fields in cell are: variable-get variable-set variable-get
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special[1]", "rText", "0");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special[2]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special[3]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/Special[1]", "rText", "0");
+ assertXPath(pXmlDoc, "/root/page[1]/footer/txt[1]/Special[1]", "rText", "1");
+ // here the header had shown the wrong value
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell[2]/txt[1]/Special[1]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell[2]/txt[1]/Special[2]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell[2]/txt[1]/Special[3]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[2]/header/txt[1]/Special[1]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[2]/footer/txt[1]/Special[1]", "rText", "2");
+
+ assertXPath(pXmlDoc, "/root/page[3]/body/tab/row[2]/cell[2]/txt[1]/Special[1]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[3]/body/tab/row[2]/cell[2]/txt[1]/Special[2]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[3]/body/tab/row[2]/cell[2]/txt[1]/Special[3]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[3]/header/txt[1]/Special[1]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[3]/footer/txt[1]/Special[1]", "rText", "3");
+
+ assertXPath(pXmlDoc, "/root/page[4]/body/tab/row[2]/cell[2]/txt[1]/Special[1]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[4]/body/tab/row[2]/cell[2]/txt[1]/Special[2]", "rText", "4");
+ assertXPath(pXmlDoc, "/root/page[4]/body/tab/row[2]/cell[2]/txt[1]/Special[3]", "rText", "4");
+ assertXPath(pXmlDoc, "/root/page[4]/header/txt[1]/Special[1]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[4]/footer/txt[1]/Special[1]", "rText", "4");
+
+ assertXPath(pXmlDoc, "/root/page[5]/header/txt[1]/Special[1]", "rText", "4");
+ assertXPath(pXmlDoc, "/root/page[5]/footer/txt[1]/Special[1]", "rText", "4");
+
+ discardDumpedLayout();
+ // update and check again
+ pDoc->getIDocumentFieldsAccess().UpdateFields(true);
+ Scheduler::ProcessEventsToIdle();
+ pXmlDoc = parseLayoutDump();
+
+ // the fields in cell are: variable-get variable-set variable-get
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special[1]", "rText", "0");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special[2]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[2]/txt[1]/Special[3]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt[1]/Special[1]", "rText", "0");
+ assertXPath(pXmlDoc, "/root/page[1]/footer/txt[1]/Special[1]", "rText", "1");
+ // here the header had shown the wrong value
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell[2]/txt[1]/Special[1]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell[2]/txt[1]/Special[2]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell[2]/txt[1]/Special[3]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[2]/header/txt[1]/Special[1]", "rText", "1");
+ assertXPath(pXmlDoc, "/root/page[2]/footer/txt[1]/Special[1]", "rText", "2");
+
+ assertXPath(pXmlDoc, "/root/page[3]/body/tab/row[2]/cell[2]/txt[1]/Special[1]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[3]/body/tab/row[2]/cell[2]/txt[1]/Special[2]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[3]/body/tab/row[2]/cell[2]/txt[1]/Special[3]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[3]/header/txt[1]/Special[1]", "rText", "2");
+ assertXPath(pXmlDoc, "/root/page[3]/footer/txt[1]/Special[1]", "rText", "3");
+
+ assertXPath(pXmlDoc, "/root/page[4]/body/tab/row[2]/cell[2]/txt[1]/Special[1]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[4]/body/tab/row[2]/cell[2]/txt[1]/Special[2]", "rText", "4");
+ assertXPath(pXmlDoc, "/root/page[4]/body/tab/row[2]/cell[2]/txt[1]/Special[3]", "rText", "4");
+ assertXPath(pXmlDoc, "/root/page[4]/header/txt[1]/Special[1]", "rText", "3");
+ assertXPath(pXmlDoc, "/root/page[4]/footer/txt[1]/Special[1]", "rText", "4");
+
+ assertXPath(pXmlDoc, "/root/page[5]/header/txt[1]/Special[1]", "rText", "4");
+ assertXPath(pXmlDoc, "/root/page[5]/footer/txt[1]/Special[1]", "rText", "4");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147126)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf147126.docx");
+ CPPUNIT_ASSERT(mxComponent);
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ const auto pLayoutXML1 = parseLayoutDump();
+
+ for (auto nFly = 1; nFly < 8; ++nFly)
+ {
+ const auto nFlyLeft = getXPath(pLayoutXML1,
+ OString::Concat("/root/page/body/txt[2]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "left")
+ .toInt64();
+ const auto nFlyRight = getXPath(pLayoutXML1,
+ OString::Concat("/root/page/body/txt[2]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "width")
+ .toInt64();
+ const auto nFlyTop = getXPath(pLayoutXML1,
+ OString::Concat("/root/page/body/txt[2]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "top")
+ .toInt64();
+ const auto nFlyBottom = getXPath(pLayoutXML1,
+ OString::Concat("/root/page/body/txt[2]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "height")
+ .toInt64();
+
+ const auto sDrawRect = getXPath(
+ pLayoutXML1,
+ OString::Concat("/root/page/body/txt[2]/anchored/SwAnchoredDrawObject/SdrObjGroup/"
+ "SdrObjList/SdrObject[")
+ + OString::Concat(OString::number(nFly)) + OString::Concat("]"),
+ "aOutRect");
+
+ const auto nComaPos1 = sDrawRect.indexOf(',', 0);
+ const auto nComaPos2 = sDrawRect.indexOf(',', nComaPos1 + 1);
+ const auto nComaPos3 = sDrawRect.indexOf(',', nComaPos2 + 1);
+
+ const auto nDraw1 = o3tl::toInt64(sDrawRect.subView(0, nComaPos1));
+ const auto nDraw2 = o3tl::toInt64(sDrawRect.subView(nComaPos1 + 1, nComaPos2 - nComaPos1));
+ const auto nDraw3 = o3tl::toInt64(sDrawRect.subView(nComaPos2 + 1, nComaPos3 - nComaPos2));
+ const auto nDraw4 = o3tl::toInt64(
+ sDrawRect.subView(nComaPos3 + 1, sDrawRect.getLength() - nComaPos3 - 1));
+
+ CPPUNIT_ASSERT_GREATER(nDraw1, nFlyLeft);
+ CPPUNIT_ASSERT_GREATER(nDraw2, nFlyTop);
+ CPPUNIT_ASSERT_LESS(nDraw3, nFlyRight);
+ CPPUNIT_ASSERT_LESS(nDraw4, nFlyBottom);
+ }
+
+ for (auto nLineBreakCount = 0; nLineBreakCount < 4; ++nLineBreakCount)
+ {
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+ }
+ for (auto nSpaceCount = 0; nSpaceCount < 10; ++nSpaceCount)
+ {
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_SPACE);
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ dumpLayout(mxComponent);
+ const auto pLayoutXML2 = parseLayoutDump();
+
+ for (auto nFly = 1; nFly < 8; ++nFly)
+ {
+ const auto nFlyLeft = getXPath(pLayoutXML2,
+ OString::Concat("/root/page/body/txt[6]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "left")
+ .toInt64();
+ const auto nFlyRight = getXPath(pLayoutXML2,
+ OString::Concat("/root/page/body/txt[6]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "width")
+ .toInt64();
+ const auto nFlyTop = getXPath(pLayoutXML2,
+ OString::Concat("/root/page/body/txt[6]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "top")
+ .toInt64();
+ const auto nFlyBottom = getXPath(pLayoutXML2,
+ OString::Concat("/root/page/body/txt[6]/anchored/fly[")
+ + OString::Concat(OString::number(nFly))
+ + OString::Concat("]/infos/bounds"),
+ "height")
+ .toInt64();
+
+ const auto sDrawRect = getXPath(
+ pLayoutXML2,
+ OString::Concat("/root/page/body/txt[6]/anchored/SwAnchoredDrawObject/SdrObjGroup/"
+ "SdrObjList/SdrObject[")
+ + OString::Concat(OString::number(nFly)) + OString::Concat("]"),
+ "aOutRect");
+
+ const auto nComaPos1 = sDrawRect.indexOf(',', 0);
+ const auto nComaPos2 = sDrawRect.indexOf(',', nComaPos1 + 1);
+ const auto nComaPos3 = sDrawRect.indexOf(',', nComaPos2 + 1);
+
+ const auto nDraw1 = o3tl::toInt64(sDrawRect.subView(0, nComaPos1));
+ const auto nDraw2 = o3tl::toInt64(sDrawRect.subView(nComaPos1 + 1, nComaPos2 - nComaPos1));
+ const auto nDraw3 = o3tl::toInt64(sDrawRect.subView(nComaPos2 + 1, nComaPos3 - nComaPos2));
+ const auto nDraw4 = o3tl::toInt64(
+ sDrawRect.subView(nComaPos3 + 1, sDrawRect.getLength() - nComaPos3 - 1));
+
+ CPPUNIT_ASSERT_GREATER(nDraw1, nFlyLeft);
+ CPPUNIT_ASSERT_GREATER(nDraw2, nFlyTop);
+ CPPUNIT_ASSERT_LESS(nDraw3, nFlyRight);
+ CPPUNIT_ASSERT_LESS(nDraw4, nFlyBottom);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf129382.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // without the fix, it crashes
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135662)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf135662.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 2
+ // - Actual : 1
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134227)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf134227.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ // Without the fix in place, it would have crashed here
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139638)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf139638.odt");
+
+ uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexes->getCount());
+ uno::Reference<text::XDocumentIndex> xTOCIndex(xIndexes->getByIndex(0), uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have crashed
+ xTOCIndex->update();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135412)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf135412.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("X"), xShape->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ // Without the fix in place, the text in the shape wouldn't be pasted
+ xShape.set(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("X"), xShape->getString());
+
+ //Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+ xShape.set(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("X"), xShape->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf138482)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf138482.docx");
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134965)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf134965.odt");
+
+ 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());
+
+ for (sal_Int32 i = 0; i < 10; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128375)
+{
+ for (sal_Int32 i = 0; i < 2; ++i)
+ {
+ createSwDoc(DATA_DIRECTORY, "tdf128375.docx");
+
+ 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());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed cutting the second document
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135061)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf135061.odt");
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(20, getShapes());
+
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132911)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132911.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ // Without the fix in place, it would have crashed here
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ //tdf#135247: Without the fix in place, this would have crashed
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf61154)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf61154.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->GotoNextTOXBase();
+
+ // show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX();
+ pWrtShell->UpdateTableOf(*pTOXBase);
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode();
+ SwNodeIndex aIdx(*pTitleNode);
+
+ // table of contents node shouldn't contain tracked deletion
+ // This was "Text InsertedDeleted\t1"
+ SwTextNode* pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT_EQUAL(OUString("Text Inserted\t1"), pNext->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf124904)
+{
+ // don't show deletions in referenced text,
+ // (except if the full text is deleted)
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf124904.fodt");
+
+ // show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // remove the first word "Heading" (with change tracking) to update the referenced text
+ dispatchCommand(mxComponent, ".uno:DelToEndOfWord", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // This was "Reference to Heading of document file"
+ CPPUNIT_ASSERT_EQUAL(OUString("Reference to of example document "),
+ getParagraph(2)->getString());
+
+ // don't hide the wholly deleted referenced text
+ dispatchCommand(mxComponent, ".uno:DelToEndOfLine", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(OUString("Reference to Heading of example document file"),
+ getParagraph(2)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf100691)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf100691.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->GotoNextTOXBase();
+
+ const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX();
+ pWrtShell->UpdateTableOf(*pTOXBase);
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode();
+ SwNodeIndex aIdx(*pTitleNode);
+
+ // table of contents node shouldn't contain invisible text
+ // This was "Text Hidden\t1"
+ SwTextNode* pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT_EQUAL(OUString("Text\t1"), pNext->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134404)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf134404.odt");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
+ Scheduler::ProcessEventsToIdle();
+ dispatchCommand(mxComponent, ".uno:InsertPagebreak", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, the image would have been deleted
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf112342)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf112342.docx");
+
+ //Get the last para
+ uno::Reference<text::XTextRange> xPara = getParagraph(3);
+ auto xCur = xPara->getText()->createTextCursor();
+ //Go to the end of it
+ xCur->gotoEnd(false);
+ //And let's remove the last 2 chars (the last para with its char).
+ xCur->goLeft(2, true);
+ xCur->setString("");
+
+ //If the second paragraph on the second page, this will be passed.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Page break does not match", 2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132321)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf132321.odt");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
+ Scheduler::ProcessEventsToIdle();
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, the button form would have also been deleted
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135056)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf135056.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pWrtShell->GetTOXCount());
+
+ const SwTOXBase* pTOX = pWrtShell->GetTOX(0);
+ CPPUNIT_ASSERT(pTOX);
+
+ //Without the fix in place, it would have hung here
+ pWrtShell->DeleteTOX(*pTOX, true);
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pWrtShell->GetTOXCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pWrtShell->GetTOXCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132597)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132597.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ // Paste special as RTF
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
+
+ dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139737)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf139737.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ // Paste special as RTF
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
+
+ dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147961)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ pWrtShell->Insert("++");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ // Without the fix in place, this test would have crashed here
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147206)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // insert empty paragraph and heading text
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("abc");
+ pWrtShell->SplitNode();
+
+ // set one to heading so there will be an entry in the tox
+ pWrtShell->Up(false, 1);
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 1")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ pWrtShell->EndOfSection(false);
+
+ // tdf#142423: Without the fix in place, this test would have failed with
+ // - Expected: 18
+ // - Actual : 18.2
+ CPPUNIT_ASSERT_EQUAL(18.0f, getProperty<float>(getParagraph(2), "CharHeight"));
+
+ // insert table of contents
+ SwTOXMgr mgr(pWrtShell);
+ SwTOXDescription desc{ TOX_CONTENT };
+ mgr.UpdateOrInsertTOX(desc, nullptr, nullptr);
+
+ // get url of heading cross reference mark
+ IDocumentMarkAccess& rIDMA(*pDoc->getIDocumentMarkAccess());
+ auto const headingMark
+ = std::find_if(rIDMA.getAllMarksBegin(), rIDMA.getAllMarksEnd(), [](auto const* const it) {
+ return it->GetName().startsWith(
+ IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix());
+ });
+ CPPUNIT_ASSERT(headingMark != rIDMA.getAllMarksEnd());
+ OUString const headingLink("#" + (*headingMark)->GetName());
+
+ // select tox entry
+ pWrtShell->SttEndDoc(false);
+ pWrtShell->Up(false, 1);
+ pWrtShell->EndPara(true);
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ pWrtShell->SttEndDoc(true);
+
+ // Paste special as RTF
+ TransferableDataHelper helper(xTransfer);
+ SwTransferable::PasteFormat(*pWrtShell, helper, SotClipboardFormatId::RTF);
+ Scheduler::ProcessEventsToIdle();
+
+ // check hyperlinking
+ CPPUNIT_ASSERT_EQUAL(
+ headingLink, getProperty<OUString>(getRun(getParagraph(1), 1, "abc\t1"), "HyperLinkURL"));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(), getProperty<OUString>(getRun(getParagraph(2), 1, OUString()), "HyperLinkURL"));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(),
+ getProperty<OUString>(getRun(getParagraph(3), 1, "Table of Contents"), "HyperLinkURL"));
+ CPPUNIT_ASSERT_EQUAL(
+ headingLink, getProperty<OUString>(getRun(getParagraph(4), 1, "abc\t1"), "HyperLinkURL"));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(), getProperty<OUString>(getRun(getParagraph(5), 1, OUString()), "HyperLinkURL"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf144840)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf144840.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ 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());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ // Paste special as RTF
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
+
+ dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+
+ table::TableBorder2 tableBorder = getProperty<table::TableBorder2>(xTextTable, "TableBorder2");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 4
+ // - Actual : 0
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(4), tableBorder.TopLine.LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(4), tableBorder.LeftLine.LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(4), tableBorder.RightLine.LineWidth);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(4), tableBorder.BottomLine.LineWidth);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131963)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf131963.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(11, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ // Paste special as RTF
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
+
+ dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+
+ // tdf#133169: without the fix in place, it would have been 2 instead of 11
+ CPPUNIT_ASSERT_EQUAL(11, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132596)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132596.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ // Paste special as RTF
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
+
+ dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126626)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf126626.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ // without the fix, it crashes
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133967)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf133967.odt");
+
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ for (sal_Int32 i = 0; i < 10; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ // Without the fix in place, this test would have failed with:
+ //- Expected: 1
+ //- Actual : 45
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132187)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132187.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfDoc", {});
+
+ TransferableDataHelper aHelper(xTransfer);
+ for (sal_Int32 i = 0; i < 10; ++i)
+ {
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ //without the fix in place, this test would fail with:
+ //- Expected: 1
+ //- Actual : 70
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130094)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf130094.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("First"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Second"), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Third"), getParagraph(3)->getString());
+
+ // Select the first and second lines
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("First"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Second"), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(3)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("First"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Second"), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Third"), getParagraph(3)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("First"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Second"), getParagraph(2)->getString());
+
+ // Without the fix in place, this test would have failed with
+ // - Expected:
+ // - Actual : First
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(3)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135733)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf135733.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ //Move the cursor inside the table
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+
+ //Select first column
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->Down(/*bSelect=*/true);
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+
+ pWrtShell->SttPg(/*bSelect=*/false);
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ // without the fix, it crashes
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128739)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf128739.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Fehler: Verweis nicht gefunden"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(OUString("Fehler: Verweis nicht gefunden"), getParagraph(1)->getString());
+
+ // without the fix, it crashes
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf124722)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf124722.rtf");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(22, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ CPPUNIT_ASSERT_EQUAL(22, getPages());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(43, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(22, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "udindex3.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwView& rView(*pDoc->GetDocShell()->GetView());
+
+ // update indexes
+ for (auto i = pWrtShell->GetTOXCount(); 0 < i;)
+ {
+ --i;
+ pWrtShell->UpdateTableOf(*pWrtShell->GetTOX(i));
+ }
+
+ // click on the links...
+ {
+ OUString const tmp("Table of Contents");
+ pWrtShell->GotoNextTOXBase(&tmp);
+ }
+
+ { // ToC toxmark
+ pWrtShell->Down(false);
+ SfxItemSet aSet(pWrtShell->GetAttrPool(),
+ svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>);
+ pWrtShell->GetCurAttr(aSet);
+ CPPUNIT_ASSERT(aSet.HasItem(RES_TXTATR_INETFMT));
+ pWrtShell->Push();
+ OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20tocmark%19C%7Ctoxmark"), url);
+ rView.JumpToSwMark(url.subView(1)); // SfxApplication::OpenDocExec_Impl eats the "#"
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "tocmark"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
+
+ { // ToC heading
+ pWrtShell->Down(false);
+ SfxItemSet aSet(pWrtShell->GetAttrPool(),
+ svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>);
+ pWrtShell->GetCurAttr(aSet);
+ CPPUNIT_ASSERT(aSet.HasItem(RES_TXTATR_INETFMT));
+ pWrtShell->Push();
+ OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc105_706348105"), url);
+ rView.JumpToSwMark(url.subView(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
+
+ {
+ OUString const tmp("User-Defined1");
+ pWrtShell->GotoNextTOXBase(&tmp);
+ }
+
+ { // UD1 toxmark 1
+ pWrtShell->Down(false);
+ SfxItemSet aSet(pWrtShell->GetAttrPool(),
+ svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>);
+ pWrtShell->GetCurAttr(aSet);
+ CPPUNIT_ASSERT(aSet.HasItem(RES_TXTATR_INETFMT));
+ pWrtShell->Push();
+ OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20udmark%19UUser-Defined%7Ctoxmark"), url);
+ rView.JumpToSwMark(url.subView(1));
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "udmark the first"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
+
+ { // UD1 toxmark 2 (with same text)
+ pWrtShell->Down(false);
+ SfxItemSet aSet(pWrtShell->GetAttrPool(),
+ svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>);
+ pWrtShell->GetCurAttr(aSet);
+ CPPUNIT_ASSERT(aSet.HasItem(RES_TXTATR_INETFMT));
+ pWrtShell->Push();
+ OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("#2%19the%20udmark%19UUser-Defined%7Ctoxmark"), url);
+ rView.JumpToSwMark(url.subView(1));
+ CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "udmark the 2nd"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
+
+ { // UD heading
+ pWrtShell->Down(false);
+ SfxItemSet aSet(pWrtShell->GetAttrPool(),
+ svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>);
+ pWrtShell->GetCurAttr(aSet);
+ CPPUNIT_ASSERT(aSet.HasItem(RES_TXTATR_INETFMT));
+ pWrtShell->Push();
+ OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc105_706348105"), url);
+ rView.JumpToSwMark(url.subView(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
+
+ {
+ OUString const tmp("NewUD!|1");
+ pWrtShell->GotoNextTOXBase(&tmp);
+ }
+
+ { // UD2 toxmark, with same text as those in other UD
+ pWrtShell->Down(false);
+ SfxItemSet aSet(pWrtShell->GetAttrPool(),
+ svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>);
+ pWrtShell->GetCurAttr(aSet);
+ CPPUNIT_ASSERT(aSet.HasItem(RES_TXTATR_INETFMT));
+ pWrtShell->Push();
+ OUString const url(aSet.GetItem<SwFormatINetFormat>(RES_TXTATR_INETFMT)->GetValue());
+ CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20udmark%19UNewUD!%7C%7Ctoxmark"), url);
+ rView.JumpToSwMark(url.subView(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("the udmark"),
+ pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf125261)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf125261.odt");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.example.com/"),
+ getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
+ //apply autocorrect StartAutoCorrect
+ dispatchCommand(mxComponent, ".uno:AutoFormatApply", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.example.com/"),
+ getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
+ // without the fix, it hangs
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("https://www.example.com/"),
+ getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf141175)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf141175.odt");
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ //Use selectAll 3 times in a row
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ //Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133990)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf133990.odt");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ //Use selectAll 3 times in a row
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ //Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126504)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf126504.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ //Use selectAll 2 times in a row
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
+ Scheduler::ProcessEventsToIdle();
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ //Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133982)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf133982.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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());
+
+ //Use selectAll 3 times in a row
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ //Without the fix in place, it would have crashed here
+ xTransfer->Cut();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134253)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf134253.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+
+ //Use selectAll 3 times in a row
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ //Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, TestAsCharTextBox)
+{
+ // Related tickets:
+ // tdf#138598 Replace vertical alignment of As_char textboxes in footer
+ // tdf#140158 Remove horizontal positioning of As_char textboxes, because
+ // the anchor moving does the same for it.
+
+ createSwDoc(DATA_DIRECTORY, "AsCharTxBxTest.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ // Add 3x tab to the doc
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+
+ auto pExportDump = parseLayoutDump();
+ CPPUNIT_ASSERT(pExportDump);
+
+ // Check if the texbox fallen apart due to the tabs
+ const double nLeftSideOfShape1
+ = getXPath(pExportDump, "/root/page/body/txt/anchored/SwAnchoredDrawObject/bounds", "left")
+ .toDouble();
+ const double nLeftSideOfTxBx1
+ = getXPath(pExportDump, "/root/page/body/txt/anchored/fly/infos/bounds", "left").toDouble();
+
+ CPPUNIT_ASSERT(nLeftSideOfShape1 < nLeftSideOfTxBx1);
+
+ // Another test is for the tdf#138598: Check footer textbox
+ const double nLeftSideOfShape2
+ = getXPath(pExportDump, "/root/page[2]/footer/txt/anchored/SwAnchoredDrawObject/bounds",
+ "left")
+ .toDouble();
+ const double nLeftSideOfTxBx2
+ = getXPath(pExportDump, "/root/page[2]/footer/txt/anchored/fly/infos/bounds", "left")
+ .toDouble();
+
+ CPPUNIT_ASSERT(nLeftSideOfShape2 < nLeftSideOfTxBx2);
+
+ const double nTopSideOfShape2
+ = getXPath(pExportDump, "/root/page[2]/footer/txt/anchored/SwAnchoredDrawObject/bounds",
+ "top")
+ .toDouble();
+ const double nTopSideOfTxBx2
+ = getXPath(pExportDump, "/root/page[2]/footer/txt/anchored/fly/infos/bounds", "top")
+ .toDouble();
+
+ CPPUNIT_ASSERT(nTopSideOfShape2 < nTopSideOfTxBx2);
+ // Without the fix in place the two texboxes has been fallen apart, and asserts will broken.
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf140975)
+{
+ // Load the bugdoc
+ createSwDoc(DATA_DIRECTORY, "tdf140975.docx");
+
+ // Set the Anchor of the shape to As_Char
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+ dispatchCommand(mxComponent, ".uno:SetAnchorToChar", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Get the layout of the textbox
+ auto pExportDump = parseLayoutDump();
+ CPPUNIT_ASSERT(pExportDump);
+
+ const sal_Int32 nShpTop
+ = getXPath(pExportDump, "/root/page/body/txt[4]/anchored/SwAnchoredDrawObject/bounds",
+ "top")
+ .toInt32();
+ const sal_Int32 nFrmTop
+ = getXPath(pExportDump, "/root/page/body/txt[4]/anchored/fly/infos/bounds", "top")
+ .toInt32();
+
+ // Without the fix in place, the frame has less value for Top than
+ // the shape. This means the frame is outside from the shape.
+ CPPUNIT_ASSERT_GREATER(nShpTop, nFrmTop);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf76636)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf76636.doc");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getColumns()->getCount());
+
+ //go to middle row
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
+ Scheduler::ProcessEventsToIdle();
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT | KEY_SHIFT);
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:MergeCells", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTextTable->getColumns()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf76636_2)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf76636.doc");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getColumns()->getCount());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
+ Scheduler::ProcessEventsToIdle();
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RIGHT | KEY_SHIFT);
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:MergeCells", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getColumns()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf140828)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf140828.docx");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ uno::Reference<drawing::XShape> xShp = getShape(1);
+ CPPUNIT_ASSERT(xShp);
+
+ uno::Reference<beans::XPropertySet> ShpProps(xShp, uno::UNO_QUERY_THROW);
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:SetAnchorAtChar", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(
+ text::TextContentAnchorType::TextContentAnchorType_AT_CHARACTER,
+ ShpProps->getPropertyValue("AnchorType").get<text::TextContentAnchorType>());
+
+ uno::Reference<text::XTextFrame> xTxBx(SwTextBoxHelper::getUnoTextFrame(xShp));
+ CPPUNIT_ASSERT(xTxBx);
+
+ uno::Reference<beans::XPropertySet> TxBxProps(xTxBx, uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("top left image"), xTxBx->getText()->getString());
+
+ CPPUNIT_ASSERT_MESSAGE("Bad Relative Orientation and Position!",
+ TxBxProps->getPropertyValue("HoriOrientRelation").get<sal_Int16>()
+ != text::RelOrientation::CHAR);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132725)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf132725.odt");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(OUString("AA"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfPara", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // tdf#137587 fly is no longer deleted by backspace
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(OUString("AA"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // tdf#137587 fly is no longer deleted by backspace
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+
+ //Without the fix in place, it would crash here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(OUString("A"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126340)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf126340.odt");
+
+ dispatchCommand(mxComponent, ".uno:GoDown", {});
+ // without the fix, it crashes
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), getParagraph(1)->getString());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf124397)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf124397.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());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ // Without the fix in place, it would crash here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf108124)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf108124.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ uno::Reference<text::XTextGraphicObjectsSupplier> xTextGraphicObjectsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(
+ xTextGraphicObjectsSupplier->getGraphicObjects(), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+
+ uno::Reference<drawing::XShape> xOldShape1(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xOldShape2(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+
+ uno::Reference<drawing::XShape> xNewShape1(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xNewShape2(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
+
+ // there should be 2 different objects now but they have the same names,
+ // so rely on the object identity for testing...
+ CPPUNIT_ASSERT(xOldShape1.get() != xNewShape1.get());
+ CPPUNIT_ASSERT(xOldShape1.get() != xNewShape2.get());
+ CPPUNIT_ASSERT(xOldShape2.get() != xNewShape1.get());
+ CPPUNIT_ASSERT(xOldShape2.get() != xNewShape2.get());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107975)
+{
+ // This test also covers tdf#117185 tdf#110442
+
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf107975.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ uno::Reference<text::XTextGraphicObjectsSupplier> xTextGraphicObjectsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(
+ xTextGraphicObjectsSupplier->getGraphicObjects(), uno::UNO_QUERY);
+
+ uno::Reference<drawing::XShape> xShape(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty<text::TextContentAnchorType>(xShape, "AnchorType"));
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+
+ //Position the mouse cursor (caret) after "ABC" below the blue image
+ dispatchCommand(mxComponent, ".uno:GoRight", {});
+ {
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ }
+
+ // without the fix, it crashes
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("ABC"), getParagraph(1)->getString());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ //try again with anchor at start of doc which is another special case
+ xShape.set(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xShapeContent(xShape, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> const xStart = pTextDoc->getText()->getStart();
+ xShapeContent->attach(xStart);
+
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty<text::TextContentAnchorType>(xShape, "AnchorType"));
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ xTransfer.set(new SwTransferable(*pWrtShell));
+ xTransfer->Copy();
+
+ //Position the mouse cursor (caret) after "ABC" below the blue image
+ dispatchCommand(mxComponent, ".uno:GoRight", {});
+ {
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ }
+
+ // without the fix, it crashes
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("ABC"), getParagraph(1)->getString());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134021)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf134021.docx");
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(12, getPages());
+
+ dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
+
+ dispatchCommand(mxComponent, ".uno:DeleteTable", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(12, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136778)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf136778.docx");
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
+
+ dispatchCommand(mxComponent, ".uno:DeleteTable", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf123285)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf123285.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ CPPUNIT_ASSERT_EQUAL(true,
+ getParagraph(1)->getString().endsWith(
+ ". Here is a short sentence demonstrating this very peculiar bug"
+ ". Here is a short sentence demonstrating this very peculiar bug."));
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
+ Scheduler::ProcessEventsToIdle();
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, the last "sentence" would have been changed to " entence"
+ CPPUNIT_ASSERT_EQUAL(true,
+ getParagraph(1)->getString().endsWith(
+ ". Here is a short sentence demonstrating this very peculiar bug"
+ ". Here is a short sentence demonstrating this very peculiar bug."));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130746)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf130746.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ 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());
+
+ dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
+
+ 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);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_UP | KEY_MOD2);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129805)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf129805.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("x"), getParagraph(1)->getString());
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ // without the fix in place, it would crash here
+ xTransfer->Cut();
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("x"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130685)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf130685.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ // Without fix in place, this test would have failed with:
+ //- Expected: 2
+ //- Actual : 4
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132944)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf132944.odt");
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, the document would have had 2 pages
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf104649)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf104649.docx");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134931)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf134931.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:GoDown", {});
+
+ TransferableDataHelper aHelper(xTransfer);
+ for (sal_Int32 i = 0; i < 10; ++i)
+ {
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11), xIndexAccess->getCount());
+
+ // Without the fix in place, this test would have failed with:
+ // - Expected: 4
+ // - Actual : 1
+ // Because the tables are pasted but not displayed
+
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130680)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf130680.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(23), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwDoc> xClpDoc(new SwDoc());
+ xClpDoc->SetClipBoard(true);
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ // without the fix, it crashes
+ xTransfer->Cut();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ xClpDoc.clear();
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(23), xIndexAccess->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131684)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf131684.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ 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());
+
+ //Use selectAll 3 times in a row
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ // without the fix, it crashes
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ // check that the text frame has the correct upper
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ OUString const sectionId = getXPath(pXmlDoc, "/root/page[1]/body/section[7]", "id");
+ OUString const sectionLower = getXPath(pXmlDoc, "/root/page[1]/body/section[7]", "lower");
+ OUString const textId = getXPath(pXmlDoc, "/root/page[1]/body/section[7]/txt[1]", "id");
+ OUString const textUpper = getXPath(pXmlDoc, "/root/page[1]/body/section[7]/txt[1]", "upper");
+ CPPUNIT_ASSERT_EQUAL(textId, sectionLower);
+ CPPUNIT_ASSERT_EQUAL(sectionId, textUpper);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132420)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf132420.odt");
+
+ CPPUNIT_ASSERT_EQUAL(12, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ //Without the fix in place, 1 frame and 1 image would be gone and getShapes would return 10
+ CPPUNIT_ASSERT_EQUAL(12, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132744)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132744.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // disable change tracking to cut the table
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+
+ //Without the fix in place, the image wouldn't be pasted
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf146622)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-del-add.docx");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTables->getCount());
+ uno::Reference<container::XNameAccess> xTableNames = xTablesSupplier->getTextTables();
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
+ uno::Reference<text::XTextTable> xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // This was 3 (deleting the already deleted row with change tracking)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+ // This was 2 (deleting the already deleted table with change tracking)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getRows()->getCount());
+
+ // check that the first table was deleted with change tracking
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // Undo AcceptAllTrackedChanges and DeleteRows
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // now only the second table deleted by AcceptAllTrackedChanges
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf146962)
+{
+ // load a 2-row table, set Hide Changes mode and delete the first row with change tracking
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116789.fodt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // enable redlining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ // hide changes
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // Without the fix in place, the deleted row would be visible
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // This was 2
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 1);
+
+ // check it in Show Changes mode
+
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetLayout()->IsHideRedlines());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // 2 rows are visible now
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+
+ // check it in Hide Changes mode again
+
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // only a single row is visible again
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 1);
+
+ // tdf#148227 check Undo of tracked table row deletion
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 1
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147347)
+{
+ // load a 2-row table, set Hide Changes mode and delete the table with change tracking
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116789.fodt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // enable redlining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ // hide changes
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ dispatchCommand(mxComponent, ".uno:DeleteTable", {});
+
+ // Without the fix in place, the deleted row would be visible
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // This was 1
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 0);
+
+ // check it in Show Changes mode
+
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetLayout()->IsHideRedlines());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // 2 rows are visible now
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+
+ // check it in Hide Changes mode again
+
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // no visible row again
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 0);
+
+ // tdf#148228 check Undo of tracked table deletion
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 0
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf148345)
+{
+ // load a 2-row table, set Hide Changes mode and delete the first row with change tracking
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116789.fodt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // enable redlining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ // hide changes
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // Without the fix in place, the deleted row would be visible
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // This was 2
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 1);
+
+ // check it in Show Changes mode
+
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetLayout()->IsHideRedlines());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // 2 rows are visible now
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+
+ // check it in Hide Changes mode again
+
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // only a single row is visible again
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 1);
+
+ // tdf#148227 check Reject All of tracked table row deletion
+
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 1
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf141391)
+{
+ // table insertion in the first paragraph of the cell
+ // overwrites the row content, instead of inserting a nested table
+
+ // load a 2-row table
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116789.fodt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // select the table, and copy it into at paragraph start of cell "A2"
+
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ // remove the selection and positionate the cursor at beginning of A2
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // 3-row, overwriting cells of the second row and inserting a new row
+ // with the 2-row clipboard table content
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/txt/Text", "Portion", "hello");
+
+ // Undo
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // 2 rows again, no copied text content
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/Text", 0);
+
+ // insert the 2-row table into the second paragraph of cell "A2" as a nested table
+ // For this it's enough to positionate the text cursor not in the first paragraph
+
+ // insert some text and an empty paragraph
+ pWrtShell->Insert("Some text...");
+ pWrtShell->SplitNode();
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/txt", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/txt[1]/Text", "Portion",
+ "Some text...");
+ // the empty paragraph in A2
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/txt[2]/Text", 0);
+
+ // insert the table, as a nested one in cell "A2"
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/tab/row", 2);
+
+ // Undo
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // 2 rows again, no copied text content
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/txt[1]/Text", "Portion",
+ "Some text...");
+
+ // copy the 2-row table into the fist paragraph of cell "A2",
+ // but not at paragraph start (changed behaviour)
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Insert("and some text again in the first paragraph to be sure...");
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+
+ // 3-row, overwriting cells of the second row and inserting a new row
+ // with the 2-row clipboard table content
+
+ // This was 2 (nested table)
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 3);
+ // This was "Some text..." with a nested table
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[1]/txt/Text", "Portion", "hello");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf148791)
+{
+ // test Paste as Rows Above with centered table alignment
+
+ // load a 2-row table
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116789.fodt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // select and copy the table, and Paste As Rows Above
+
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ // remove the selection and positionate the cursor at beginning of A2
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Up(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
+ Scheduler::ProcessEventsToIdle();
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Paste as Rows Above results 4-row table with default table alignment
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 4);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[1]/txt/Text", "Portion", "hello");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[3]/cell[1]/txt/Text", "Portion", "hello");
+
+ // set table alignment to center, select and copy the table again
+ 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());
+
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+
+ // Default table alignment
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::FULL,
+ getProperty<sal_Int16>(xTextTable, "HoriOrient"));
+
+ //CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xTextTable, "TableTemplateName"));
+ uno::Reference<beans::XPropertySet> xTableProps(xTextTable, uno::UNO_QUERY_THROW);
+
+ xTableProps->setPropertyValue("HoriOrient", uno::Any(text::HoriOrientation::CENTER));
+
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER,
+ getProperty<sal_Int16>(xTextTable, "HoriOrient"));
+
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ // remove the selection and positionate the cursor at beginning of A2
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Up(/*bSelect=*/false);
+ pWrtShell->Up(/*bSelect=*/false);
+ pWrtShell->Up(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
+ Scheduler::ProcessEventsToIdle();
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 5 (inserting only a single row for the 4-row clipboard content, and
+ // overwriting 3 existing rows)
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 8);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[1]/cell[1]/txt/Text", "Portion", "hello");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[3]/cell[1]/txt/Text", "Portion", "hello");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[5]/cell[1]/txt/Text", "Portion", "hello");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row[7]/cell[1]/txt/Text", "Portion", "hello");
+
+ // tdf#64902 add a test case for nested tables
+
+ // insert a nested table, and copy as paste as rows above the whole table with it
+ dispatchCommand(mxComponent, ".uno:PasteNestedTable", {});
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ // remove the selection and positionate the cursor at beginning of A2
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ // skip 7 table rows plus 4 rows of the nested table
+ for (int i = 0; i < 7 + 4; ++i)
+ pWrtShell->Up(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
+ Scheduler::ProcessEventsToIdle();
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // rows of the nested table doesn't effect row number of the main table
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 16);
+ // there are two nested tables after the paste
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell/tab", 2);
+
+ // tdf#64902 add a test case for repeated table headings
+
+ xTableProps->setPropertyValue("RepeatHeadline", uno::Any(true));
+ CPPUNIT_ASSERT(getProperty<bool>(xTextTable, "RepeatHeadline"));
+
+ xTableProps->setPropertyValue("HeaderRowCount", uno::Any(sal_Int32(3)));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(xTextTable, "HeaderRowCount"));
+
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ // remove the selection and positionate the cursor at beginning of A2
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ // skip 15 table rows plus 4 * 2 rows of the nested tables
+ for (int i = 0; i < 15 + 4 * 2; ++i)
+ pWrtShell->Up(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
+ Scheduler::ProcessEventsToIdle();
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // repeating table header (and its thead/tbody indentation) doesn't effect row number
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 32);
+ // there are two nested tables after the paste
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell/tab", 4);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135014)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(sal_Int32(0)) } }));
+
+ // Toggle Numbering List
+ dispatchCommand(mxComponent, ".uno:DefaultBullet", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Sequence<beans::PropertyValue> aArgs2(comphelper::InitPropertySequence(
+ { { "Param", uno::Any(OUString("NewNumberingStyle")) },
+ { "Family", uno::Any(static_cast<sal_Int16>(SfxStyleFamily::Pseudo)) } }));
+
+ // New Style from selection
+ dispatchCommand(mxComponent, ".uno:StyleNewByExample", aArgs2);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have failed here
+ reload("Office Open XML Text", "tdf135014.docx");
+
+ xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='NewNumberingStyle']/w:qFormat", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130629)
+{
+ createSwDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
+
+ dispatchCommand(mxComponent, ".uno:BasicShapes.diamond", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ // Undo twice
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ // Shape toolbar is active, use ESC before inserting a new shape
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_ESCAPE);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:BasicShapes.diamond", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145584)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ {
+ return;
+ }
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtSh);
+
+ pWrtSh->Insert("Hello World");
+
+ // Select 'World'
+ pWrtSh->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 5, /*bBasicCall=*/false);
+
+ // Save as PDF.
+ uno::Sequence<beans::PropertyValue> aFilterData(
+ comphelper::InitPropertySequence({ { "Selection", uno::Any(true) } }));
+
+ uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence(
+ { { "FilterName", uno::Any(OUString("writer_pdf_Export")) },
+ { "FilterData", uno::Any(aFilterData) },
+ { "URL", uno::Any(maTempFile.GetURL()) } }));
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:ExportToPDF", aDescriptor);
+
+ // Parse the export result.
+ SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+ SvMemoryStream aMemory;
+ aMemory.WriteStream(aFile);
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize(), OString());
+ CPPUNIT_ASSERT(pPdfDocument);
+ CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(pPdfPage);
+ CPPUNIT_ASSERT_EQUAL(1, pPdfPage->getObjectCount());
+ std::unique_ptr<vcl::pdf::PDFiumTextPage> pPdfTextPage = pPdfPage->getTextPage();
+ CPPUNIT_ASSERT(pPdfTextPage);
+
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pPageObject = pPdfPage->getObject(0);
+ OUString sText = pPageObject->getText(pPdfTextPage);
+ CPPUNIT_ASSERT_EQUAL(OUString("World"), sText);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf140731)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtSh);
+
+ pWrtSh->Insert("Lorem");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_F3);
+ Scheduler::ProcessEventsToIdle();
+
+ // generating a big text with ~60k words and several paragraphs
+ for (sal_Int32 i = 0; i < 8; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ dispatchCommand(mxComponent, ".uno:GoToStartOfDoc", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Format->Text operations on small selections (which would generate <~500 redlines)
+ // changetracking still working
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ Scheduler::ProcessEventsToIdle();
+
+ SwCursorShell* pShell(pDoc->GetEditShell());
+
+ pShell->SelectTextModel(1, 500);
+
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToTitleCase", {});
+ Scheduler::ProcessEventsToIdle();
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(120),
+ pEditShell->GetRedlineCount());
+
+ //Removing all the redlines.
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), pEditShell->GetRedlineCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToTitleCase", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, on big selections writer would freeze. Now it ignores change tracking.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), pEditShell->GetRedlineCount());
+
+ // The patch has no effects on the Format->Text operations
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("Lorem Ipsum Dolor Sit Amet"));
+
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToUpper", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("LOREM IPSUM DOLOR SIT AMET"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf116315)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtSh);
+
+ pWrtSh->Insert("This is a test");
+ pWrtSh->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 4, /*bBasicCall=*/false);
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_SHIFT | KEY_F3);
+ Scheduler::ProcessEventsToIdle();
+
+ // Title Case
+ CPPUNIT_ASSERT_EQUAL(OUString("This is a Test"), getParagraph(1)->getString());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_SHIFT | KEY_F3);
+ Scheduler::ProcessEventsToIdle();
+
+ // Sentence Case
+ // Without the fix in place, this test would have failed with
+ // - Expected: This is a Test
+ // - Actual : This is a TEST
+ CPPUNIT_ASSERT_EQUAL(OUString("This is a Test"), getParagraph(1)->getString());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_SHIFT | KEY_F3);
+ Scheduler::ProcessEventsToIdle();
+
+ // Upper Case
+ CPPUNIT_ASSERT_EQUAL(OUString("This is a TEST"), getParagraph(1)->getString());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_SHIFT | KEY_F3);
+ Scheduler::ProcessEventsToIdle();
+
+ // Lower Case
+ CPPUNIT_ASSERT_EQUAL(OUString("This is a test"), getParagraph(1)->getString());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf144364)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtSh);
+
+ // expands autotext (via F3)
+ pWrtSh->Insert("AR");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_F3);
+ Scheduler::ProcessEventsToIdle();
+
+ // was ...'letter of <placeholder:"November 21, 2004":"Click placeholder and overwrite">'
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("We hereby acknowledge the receipt of your letter of <November 21, 2004>."),
+ getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf141613)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtSh);
+
+ pWrtSh->Insert("Test");
+
+ dispatchCommand(mxComponent,
+ ".uno:InsertPageHeader?PageStyle:string=Default%20Page%20Style&On:bool=true",
+ {});
+
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xPageStyle, "HeaderIsOn"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(1)->getString());
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107494)
+{
+ createSwDoc();
+
+ // Create a graphic object, but don't insert it yet.
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextGraphic(
+ xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+
+ uno::Reference<text::XTextContent> xTextContent(xTextGraphic, uno::UNO_QUERY);
+
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+
+ xPageStyle->setPropertyValue("HeaderIsOn", uno::Any(true));
+
+ uno::Reference<text::XText> xHeader(
+ getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText"));
+ CPPUNIT_ASSERT(xHeader.is());
+ uno::Reference<text::XTextCursor> xHeaderCursor(xHeader->createTextCursor());
+
+ xHeader->insertTextContent(xHeaderCursor, xTextContent, false);
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ xPageStyle->setPropertyValue("HeaderIsOn", uno::Any(false));
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ xPageStyle->setPropertyValue("FooterIsOn", uno::Any(true));
+
+ uno::Reference<text::XText> xFooter(
+ getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterText"));
+ CPPUNIT_ASSERT(xFooter.is());
+ uno::Reference<text::XTextCursor> xFooterCursor(xFooter->createTextCursor());
+
+ xTextGraphic.set(xFactory->createInstance("com.sun.star.text.TextGraphicObject"),
+ uno::UNO_QUERY);
+
+ xTextContent.set(xTextGraphic, uno::UNO_QUERY);
+
+ xFooter->insertTextContent(xFooterCursor, xTextContent, false);
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ xPageStyle->setPropertyValue("FooterIsOn", uno::Any(false));
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133358)
+{
+ SwDoc* const pDoc = createSwDoc();
+ SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtSh);
+
+ pWrtSh->Insert("Test");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(1)->getString());
+
+ uno::Reference<beans::XPropertyState> xParagraph(getParagraph(1), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
+
+ dispatchCommand(mxComponent, ".uno:IncrementIndent", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1251), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1251), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131771)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ 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());
+
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xTextTable, "TableTemplateName"));
+ uno::Reference<beans::XPropertySet> xTableProps(xTextTable, uno::UNO_QUERY_THROW);
+ xTableProps->setPropertyValue("TableTemplateName", uno::Any(OUString("Default Style")));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Default Style"),
+ getProperty<OUString>(xTextTable, "TableTemplateName"));
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, ".uno:GoDown", {});
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Default Style"),
+ getProperty<OUString>(xTextTable, "TableTemplateName"));
+
+ uno::Reference<text::XTextTable> xTextTable2(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Default Style
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("Default Style"),
+ getProperty<OUString>(xTextTable2, "TableTemplateName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf80663)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130805)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf130805.odt");
+
+ const SwFrameFormats& rFrmFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(rFrmFormats.size() >= size_t(o3tl::make_unsigned(1)));
+ auto pShape = rFrmFormats.front();
+ CPPUNIT_ASSERT(pShape);
+
+ SwTextBoxHelper::create(pShape, pShape->FindRealSdrObject());
+ auto pTxBxFrm = SwTextBoxHelper::getOtherTextBoxFormat(getShape(1));
+ CPPUNIT_ASSERT(pTxBxFrm);
+
+ auto pTxAnch = pTxBxFrm->GetAnchor().GetContentAnchor();
+ auto pShpAnch = pShape->GetAnchor().GetContentAnchor();
+ CPPUNIT_ASSERT(pTxAnch);
+ CPPUNIT_ASSERT(pShpAnch);
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("The textbox got apart!", pTxAnch->nNode, pShpAnch->nNode);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107893)
+{
+ //Open the sample doc
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf107893.odt");
+
+ //Get the format of the shape
+ const SwFrameFormats& rFrmFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(rFrmFormats.size() >= size_t(o3tl::make_unsigned(1)));
+ SwFrameFormat* pShape = rFrmFormats.front();
+ CPPUNIT_ASSERT(pShape);
+
+ //Add a textbox
+ SwTextBoxHelper::create(pShape, pShape->FindRealSdrObject());
+ SwFrameFormat* pTxBxFrm = SwTextBoxHelper::getOtherTextBoxFormat(getShape(1));
+ CPPUNIT_ASSERT(pTxBxFrm);
+
+ //Remove the textbox using Undo
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ //Add again
+ SwTextBoxHelper::create(pShape, pShape->FindRealSdrObject());
+ pTxBxFrm = SwTextBoxHelper::getOtherTextBoxFormat(getShape(1));
+
+ //This was nullptr because of unsuccessful re-adding
+ CPPUNIT_ASSERT_MESSAGE("Textbox cannot be readd after Undo!", pTxBxFrm);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf121031)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(3)) }, { "Columns", uno::Any(sal_Int32(3)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ 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());
+
+ dispatchCommand(mxComponent, ".uno:DeleteTable", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ // Without the fix in place, the table would be hidden
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, TestTextBoxCrashAfterLineDel)
+{
+ // Open the desired file
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "txbx_crash.odt");
+
+ // Get the format of the shape
+ const SwFrameFormats& rFrmFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(rFrmFormats.size() >= size_t(o3tl::make_unsigned(1)));
+ SwFrameFormat* pShape = rFrmFormats.front();
+ CPPUNIT_ASSERT(pShape);
+
+ // Add a textbox
+ SwTextBoxHelper::create(pShape, pShape->FindRealSdrObject());
+ SwFrameFormat* pTxBxFrm = SwTextBoxHelper::getOtherTextBoxFormat(getShape(1));
+ CPPUNIT_ASSERT(pTxBxFrm);
+
+ // remove the last paragraph
+ auto xCursor = getParagraph(1)->getText()->createTextCursor();
+ xCursor->gotoEnd(false);
+ xCursor->goLeft(3, true);
+
+ // This caused crash before, now it should pass with the patch.
+ xCursor->setString(OUString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf121546)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf121546.odt");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("xxxxxxxxxxxxxxxxxxxx"), getParagraph(2)->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+
+ // Create a new document
+ createSwDoc();
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("xxxxxxxxxxxxxxxxxxxx"), getParagraph(2)->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("xxxxxxxxxxxxxxxxxxxx"), getParagraph(2)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ // Without the fix in place, this test would have crashed here
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145621)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf145621.odt");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("AAAAAA"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+
+ // Without the fix in place, this test would have crashed
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ CPPUNIT_ASSERT_EQUAL(OUString("AAAAAA"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134626)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf134626.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Apple"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+ Scheduler::ProcessEventsToIdle();
+ TransferableDataHelper aHelper(xTransfer);
+
+ // Create a new document
+ pDoc = createSwDoc();
+ pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // Without the fix in place, this test would have crashed here
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Apple"), getParagraph(1)->getString());
+
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("AppleApple"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Apple"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139566)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(1)) }, { "Columns", uno::Any(sal_Int32(1)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ // Move the cursor outside the table
+ pWrtSh->Down(/*bSelect=*/false);
+
+ pWrtSh->Insert("Test");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(2)->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<frame::XFrames> xFrames = mxDesktop->getFrames();
+ sal_Int32 nFrames = xFrames->getCount();
+
+ // Create a second window so the first window looses focus
+ dispatchCommand(mxComponent, ".uno:NewWindow", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(nFrames + 1, xFrames->getCount());
+
+ dispatchCommand(mxComponent, ".uno:CloseWin", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(nFrames, xFrames->getCount());
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSelections(xModel->getCurrentSelection(),
+ uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have failed here
+ CPPUNIT_ASSERT(xSelections.is());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf96067)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(3)) }, { "Columns", uno::Any(sal_Int32(3)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:InsertRowsBefore", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf87199)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(1)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getColumns()->getCount());
+
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ xCellA1->setString("test1");
+
+ uno::Reference<text::XTextRange> xCellA2(xTextTable->getCellByName("A2"), uno::UNO_QUERY);
+ xCellA2->setString("test2");
+
+ dispatchCommand(mxComponent, ".uno:EntireColumn", {});
+ dispatchCommand(mxComponent, ".uno:MergeCells", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getColumns()->getCount());
+
+ CPPUNIT_ASSERT(xCellA1->getString().endsWith("test2"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getColumns()->getCount());
+
+ xCellA1.set(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT(xCellA1->getString().endsWith("test1"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf39828)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf39828.fodt");
+
+ // show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTextTable->getRows()->getCount());
+
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ // deleted "1", inserted "2"
+ CPPUNIT_ASSERT_EQUAL(OUString("12"), xCellA1->getString());
+ uno::Reference<text::XTextRange> xCellA3(xTextTable->getCellByName("A3"), uno::UNO_QUERY);
+ // This was 14 (bad sum: 2 + A1, where A1 was 12 instead of the correct 2)
+ CPPUNIT_ASSERT_EQUAL(OUString("4"), xCellA3->getString());
+ uno::Reference<text::XTextRange> xCellA4(xTextTable->getCellByName("A4"), uno::UNO_QUERY);
+ // This was 28 (bad sum: 2 + A1 + A3, where A1 was 12 and A3 was 14)
+ CPPUNIT_ASSERT_EQUAL(OUString("8"), xCellA4->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf146573)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf39828.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // remove redlines, add a footnote, and change the value
+ // of the cell with the footnote
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+ Scheduler::ProcessEventsToIdle();
+ pWrtShell->Right(CRSR_SKIP_CELLS, /*bSelect=*/false, /*nCount=*/1, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:InsertFootnote", {});
+ dispatchCommand(mxComponent, ".uno:PageUp", {}); // leave footnote
+ pWrtShell->Left(CRSR_SKIP_CELLS, /*bSelect=*/false, /*nCount=*/1, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CELLS, /*bSelect=*/true, /*nCount=*/1, /*bBasicCall=*/false);
+ pWrtShell->Insert("100");
+
+ // trigger recalculation by leaving the cell
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTextTable->getRows()->getCount());
+
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ // value "100" and footnote index "1"
+ CPPUNIT_ASSERT_EQUAL(OUString("1001"), xCellA1->getString());
+ uno::Reference<text::XTextRange> xCellA3(xTextTable->getCellByName("A3"), uno::UNO_QUERY);
+ // This was 4 (missing recalculation)
+ CPPUNIT_ASSERT_EQUAL(OUString("102"), xCellA3->getString());
+ uno::Reference<text::XTextRange> xCellA4(xTextTable->getCellByName("A4"), uno::UNO_QUERY);
+ // This was 8 (missing recalculation)
+ CPPUNIT_ASSERT_EQUAL(OUString("204"), xCellA4->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf148849)
+{
+ // load a document with a table and an empty paragraph before the table
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf148849.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // record changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ // hide changes
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ 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());
+
+ // put cursor in the first table row
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+
+ // delete a table row
+ pWrtShell->DeleteRow();
+
+ // check cursor position
+
+ // This was "", because the text cursor jumped to the start of the document
+ // after deleting a table row instead of remaining in the next table row
+ SwNode& rNode = pWrtShell->GetCursor()->GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 2"), rNode.GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf150576)
+{
+ // load a document with a table and an empty paragraph before the table
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf148849.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // record changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ // hide changes
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ 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());
+
+ // Check deletion of the first row, if the second row deleted already
+
+ // put cursor in the second table row
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/2);
+ SwNode& rNode = pWrtShell->GetCursor()->GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 2"), rNode.GetTextNode()->GetText());
+
+ // delete the second table row
+ pWrtShell->DeleteRow();
+
+ // check cursor position (row 3)
+ SwNode& rNode2 = pWrtShell->GetCursor()->GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 3"), rNode2.GetTextNode()->GetText());
+
+ // put cursor in the first row
+ pWrtShell->Up(/*bSelect=*/false, /*nCount=*/1);
+ SwNode& rNode3 = pWrtShell->GetCursor()->GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("12"), rNode3.GetTextNode()->GetText());
+
+ // delete the first row
+ pWrtShell->DeleteRow();
+
+ // This was empty (cursor jumped in the start of the document instead of
+ // the next not deleted row)
+ SwNode& rNode4 = pWrtShell->GetCursor()->GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 3"), rNode4.GetTextNode()->GetText());
+
+ // Check skipping previous lines
+
+ // restore deleted rows
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ SwNode& rNode5 = pWrtShell->GetCursor()->GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 2"), rNode5.GetTextNode()->GetText());
+
+ // delete the second row
+ pWrtShell->DeleteRow();
+ SwNode& rNode7 = pWrtShell->GetCursor()->GetNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 3"), rNode7.GetTextNode()->GetText());
+
+ // delete the third, i.e. last row
+ pWrtShell->DeleteRow();
+ SwNode& rNode8 = pWrtShell->GetCursor()->GetNode();
+
+ // This was empty (cursor jumped in the start of the document instead of
+ // the previous not deleted row)
+ CPPUNIT_ASSERT_EQUAL(OUString("12"), rNode8.GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132603)
+{
+ createSwDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues
+ = comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } });
+
+ dispatchCommand(mxComponent, ".uno:InsertAnnotation", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, it would crash here
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ tools::JsonWriter aJsonWriter;
+ pTextDoc->getPostIts(aJsonWriter);
+ char* pChar = aJsonWriter.extractData();
+ std::stringstream aStream(pChar);
+ free(pChar);
+ boost::property_tree::ptree aTree;
+ boost::property_tree::read_json(aStream, aTree);
+ for (const boost::property_tree::ptree::value_type& rValue : aTree.get_child("comments"))
+ {
+ const boost::property_tree::ptree& rComment = rValue.second;
+ OString aText(rComment.get<std::string>("text").c_str());
+ CPPUNIT_ASSERT_EQUAL(OString("Comment"), aText);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf117601)
+{
+ createSwDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(5)) }, { "Columns", uno::Any(sal_Int32(3)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+
+ uno::Reference<text::XTextRange> xCellB1(xTextTable->getCellByName("B1"), uno::UNO_QUERY);
+ xCellB1->setString("test1");
+
+ uno::Reference<text::XTextRange> xCellB2(xTextTable->getCellByName("B2"), uno::UNO_QUERY);
+ xCellB2->setString("test2");
+
+ //go to middle row
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_UP);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RIGHT);
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:EntireColumn", {});
+ dispatchCommand(mxComponent, ".uno:MergeCells", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+
+ CPPUNIT_ASSERT(xCellB1->getString().endsWith("test2"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
+
+ CPPUNIT_ASSERT(xCellB1->getString().endsWith("test1"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf138130)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf138130.docx");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+
+ awt::Point aPos = xShape->getPosition();
+
+ //select shape and change the anchor
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:SetAnchorToPage", {});
+ Scheduler::ProcessEventsToIdle();
+
+ //position has changed
+ CPPUNIT_ASSERT(aPos.X < xShape->getPosition().X);
+ CPPUNIT_ASSERT(aPos.Y < xShape->getPosition().Y);
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(aPos.X, xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos.Y, xShape->getPosition().Y);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136385)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf136385.odt");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+
+ awt::Point aPos = xShape->getPosition();
+
+ //select shape and change the anchor
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:SetAnchorToPage", {});
+ Scheduler::ProcessEventsToIdle();
+
+ //position has changed
+ CPPUNIT_ASSERT(aPos.X < xShape->getPosition().X);
+ CPPUNIT_ASSERT(aPos.Y < xShape->getPosition().Y);
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ //Without the fix in place, this test would have failed with
+ //- Expected: 2447
+ //- Actual : 446
+ CPPUNIT_ASSERT_EQUAL(aPos.X, xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos.Y, xShape->getPosition().Y);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145207)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf145207.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(3, getShapes());
+
+ //select one shape and use the TAB key to iterate over the different shapes
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+
+ for (sal_Int32 i = 0; i < 10; ++i)
+ {
+ // Without the fix in place, this test would have crashed here
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128782)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf128782.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ uno::Reference<drawing::XShape> xShape1 = getShape(1);
+ uno::Reference<drawing::XShape> xShape2 = getShape(2);
+
+ awt::Point aPos[2];
+ aPos[0] = xShape1->getPosition();
+ aPos[1] = xShape2->getPosition();
+
+ //select shape 2 and move it down
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X);
+ //Y position in shape 2 has changed
+ CPPUNIT_ASSERT(aPos[1].Y < xShape2->getPosition().Y);
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X);
+ // Shape2 has come back to the original position
+ // without the fix in place, it would have failed
+ CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135623)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf135623.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ uno::Reference<drawing::XShape> xShape1 = getShape(1);
+ uno::Reference<drawing::XShape> xShape2 = getShape(2);
+
+ awt::Point aPos[2];
+ aPos[0] = xShape1->getPosition();
+ aPos[1] = xShape2->getPosition();
+
+ //select shape 1 and move it down
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
+ //Y position in shape 1 has changed
+ CPPUNIT_ASSERT(aPos[0].Y < xShape1->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X);
+
+ // Without the fix in place, this test would have failed here
+ // - Expected: 1351
+ // - Actual : 2233
+ CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133490)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf133490.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Cut();
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ SwTransferable::Paste(*pWrtShell, aHelper);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ uno::Reference<drawing::XShape> xShape1 = getShape(1);
+ uno::Reference<drawing::XShape> xShape2 = getShape(2);
+
+ awt::Point aPos[2];
+ aPos[0] = xShape1->getPosition();
+ aPos[1] = xShape2->getPosition();
+
+ //select shape 2 and move it to the right
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+ Scheduler::ProcessEventsToIdle();
+
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RIGHT);
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
+ //X position in shape 2 has changed
+ CPPUNIT_ASSERT(aPos[1].X < xShape2->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
+
+ for (sal_Int32 i = 0; i < 4; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, undo action would have changed shape1's position
+ // and this test would have failed with
+ // - Expected: -139
+ // - Actual : 1194
+ CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
+ CPPUNIT_ASSERT(aPos[1].X < xShape2->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
+ }
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
+ // Shape 2 has come back to the original position
+ CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132637_protectTrackChanges)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf132637_protectTrackChanges.doc");
+
+ // The password should only prevent turning off track changes, not open as read-only
+ CPPUNIT_ASSERT(!pDoc->GetDocShell()->IsReadOnly());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf127652)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf127652.odt");
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // get a page cursor
+ 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);
+
+ // go to the start of page 4
+ xCursor->jumpToPage(4);
+ xCursor->jumpToStartOfPage();
+
+ // mark a section that overlaps multiple pages
+ pWrtShell->Down(false, 2);
+ pWrtShell->Up(true, 5);
+
+ // delete the marked section
+ pWrtShell->DelRight();
+
+ // go to the start of page 4
+ xCursor->jumpToPage(4);
+ xCursor->jumpToStartOfPage();
+
+ // move up to page 3
+ pWrtShell->Up(false, 5);
+
+ // check that we are on the third page
+ // in the bug one issue was that the cursor was placed incorrectly, so
+ // moving up to the previous page would not work any more
+ sal_uInt16 assertPage = 3;
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ sal_uInt16 currentPage = pShell->GetPageNumSeqNonEmpty();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("We are on the wrong page!", assertPage, currentPage);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, AtPageTextBoxCrash)
+{
+ // Load sample file
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "AtPageTextBoxCrash.odt");
+
+ // Get the format of the shape
+ const SwFrameFormats& rFrmFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(rFrmFormats.size() >= size_t(o3tl::make_unsigned(1)));
+ auto pShape = rFrmFormats.front();
+ CPPUNIT_ASSERT(pShape);
+
+ // Add a textbox to the shape
+ SwTextBoxHelper::create(pShape, pShape->FindRealSdrObject());
+ auto pTxBxFrm = SwTextBoxHelper::getOtherTextBoxFormat(getShape(1));
+ CPPUNIT_ASSERT(pTxBxFrm);
+
+ // Change its anchor to page
+ uno::Reference<beans::XPropertySet> xShpProps(getShape(1), uno::UNO_QUERY_THROW);
+ xShpProps->setPropertyValue(
+ "AnchorType", uno::Any(text::TextContentAnchorType::TextContentAnchorType_AT_PAGE));
+
+ // The page anchored objects must not have content anchor
+ // unless this will lead to crash later, for example on
+ // removing the paragraph where it is anchored to...
+ CPPUNIT_ASSERT_EQUAL(RndStdIds::FLY_AT_PAGE, pTxBxFrm->GetAnchor().GetAnchorId());
+ CPPUNIT_ASSERT(!pTxBxFrm->GetAnchor().GetContentAnchor());
+
+ // Remove the paragraph where the textframe should be anchored
+ // before. Now with the patch it must not crash...
+ auto xPara = getParagraph(1);
+ xPara->getText()->setString(OUString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135661)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf135661.odt");
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3424), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1545), xShape->getPosition().Y);
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+
+ CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ xShape.set(getShape(1), uno::UNO_QUERY);
+
+ //Without the fix in place, the shape position would have been 0,0
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3424), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1545), xShape->getPosition().Y);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477)
+{
+ if (getDefaultDeviceBitCount() < 24)
+ return;
+ createSwDoc(DATA_DIRECTORY, "tdf133477.fodt");
+
+ // Save the shape to a BMP.
+ uno::Reference<drawing::XGraphicExportFilter> xGraphicExporter
+ = drawing::GraphicExportFilter::create(mxComponentContext);
+ uno::Reference<lang::XComponent> xSourceDoc(getShape(1), uno::UNO_QUERY);
+ xGraphicExporter->setSourceDocument(xSourceDoc);
+
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
+ uno::Sequence<beans::PropertyValue> aDescriptor(
+ comphelper::InitPropertySequence({ { "OutputStream", uno::Any(xOutputStream) },
+ { "FilterName", uno::Any(OUString("BMP")) } }));
+ xGraphicExporter->filter(aDescriptor);
+ aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+ // Read it back and check the color of the first pixel.
+ // (Actually check at one-pixel offset, because imprecise shape positioning may
+ // result in blending with background for the first pixel).
+ Graphic aGraphic;
+ TypeSerializer aSerializer(aStream);
+ aSerializer.readGraphic(aGraphic);
+
+ BitmapEx aBitmap = aGraphic.GetBitmapEx();
+ CPPUNIT_ASSERT_EQUAL(Color(0, 102, 204), aBitmap.GetPixelColor(1, 1));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf137964)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf137964.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3579), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4090), xShape->getPosition().Y);
+
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(1);
+ SwContact* pTextBox = static_cast<SwContact*>(pObject->GetUserCall());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_FLYFRMFMT), pTextBox->GetFormat()->Which());
+
+ pWrtShell->SelectObj(Point(), 0, pObject);
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_SHIFT | KEY_UP);
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_SHIFT | KEY_LEFT);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, the shape would have stayed where it was
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2579), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3090), xShape->getPosition().Y);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf143244)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf143244.odt");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+ uno::Reference<text::XTextRange> xCell(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x009353), getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xdddddd), getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A5"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xdddddd), getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A6"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xbee3d3), getProperty<Color>(xCell, "BackColor"));
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ xTextTable.set(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:GoUp", {});
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ for (sal_Int32 i = 0; i < 6; ++i)
+ {
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ xTextTable.set(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ xTextTable.set(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+ xCell.set(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0x009353), getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xdddddd), getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A5"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xdddddd), getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A6"), uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Color: R:255 G:255 B:255 A:255
+ // - Actual : Color: R:190 G:227 B:211 A:0
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A7"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xdddddd), getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A8"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<Color>(xCell, "BackColor"));
+
+ xCell.set(xTextTable->getCellByName("A9"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(Color(0xbee3d3), getProperty<Color>(xCell, "BackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136715)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf136715.odt");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getColumns()->getCount());
+
+ uno::Reference<text::XTextRange> xCell(xTextTable->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(awt::FontWeight::BOLD, getProperty<float>(xPara, "CharWeight"));
+
+ xCell.set(xTextTable->getCellByName("A2"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xPara, "CharWeight"));
+
+ xCell.set(xTextTable->getCellByName("A3"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xPara, "CharWeight"));
+
+ xCell.set(xTextTable->getCellByName("A4"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xPara, "CharWeight"));
+
+ dispatchCommand(mxComponent, ".uno:GoDown", {});
+ dispatchCommand(mxComponent, ".uno:GoDown", {});
+ dispatchCommand(mxComponent, ".uno:LineDownSel", {});
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getColumns()->getCount());
+
+ xCell.set(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xPara, "CharWeight"));
+
+ xCell.set(xTextTable->getCellByName("A2"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xPara, "CharWeight"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getColumns()->getCount());
+
+ xCell.set(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xPara, "CharWeight"));
+
+ xCell.set(xTextTable->getCellByName("A2"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 100
+ // - Actual : 150
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xPara, "CharWeight"));
+
+ xCell.set(xTextTable->getCellByName("A3"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xPara, "CharWeight"));
+
+ xCell.set(xTextTable->getCellByName("A4"), uno::UNO_QUERY);
+ xParaEnumAccess.set(xCell->getText(), uno::UNO_QUERY);
+ xParaEnum.set(xParaEnumAccess->createEnumeration());
+ xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xPara, "CharWeight"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf138897)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf100018-1.odt");
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ // this was crashing
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136740)
+{
+ createSwDoc();
+ css::uno::Reference<css::lang::XMultiServiceFactory> xFact(mxComponent,
+ css::uno::UNO_QUERY_THROW);
+ css::uno::Reference<css::beans::XPropertySet> xTextDefaults(
+ xFact->createInstance("com.sun.star.text.Defaults"), css::uno::UNO_QUERY_THROW);
+ const css::uno::Any aOrig = xTextDefaults->getPropertyValue("TabStopDistance");
+ sal_Int32 nDefTab = aOrig.get<sal_Int32>();
+ CPPUNIT_ASSERT(nDefTab != 0);
+
+ css::uno::Reference<css::text::XTextRange> const xParagraph(getParagraphOrTable(1),
+ css::uno::UNO_QUERY_THROW);
+ xParagraph->setString("Foo");
+
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("Foo"), xParagraph->getString());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, ".uno:GoToEndOfDoc", {});
+
+ const css::uno::Any aNew(nDefTab * 2);
+ xTextDefaults->setPropertyValue("TabStopDistance", aNew);
+ // it may become slightly different because of conversions, so get the actual value
+ const css::uno::Any aNewCorrected = xTextDefaults->getPropertyValue("TabStopDistance");
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(nDefTab * 2, aNewCorrected.get<sal_Int32>(), 1);
+
+ // Paste special as RTF
+ const auto aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat",
+ css::uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
+ dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("FooFoo"), xParagraph->getString());
+
+ // Without the fix in place, this would fail with
+ // equality assertion failed
+ // - Expected: <Any: (long) 2501>
+ // - Actual : <Any: (long) 1251>
+ // i.e., pasting RTF would reset the modified default tab stop distance to hardcoded default
+ CPPUNIT_ASSERT_EQUAL(aNewCorrected, xTextDefaults->getPropertyValue("TabStopDistance"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128106)
+{
+ SwWrtShell* pWrtShell
+ = createSwDoc(DATA_DIRECTORY, "cross_reference_demo_bmk.odt")->GetDocShell()->GetWrtShell();
+
+ utl::TempFile tempDir(nullptr, true);
+
+ const auto aPropertyValues = comphelper::InitPropertySequence(
+ { { "FileName", css::uno::Any(tempDir.GetURL() + "/test.odm") } });
+ dispatchCommand(mxComponent, ".uno:NewGlobalDoc", aPropertyValues);
+
+ // new document now!
+ mxComponent.set(pWrtShell->GetDoc()->GetDocShell()->GetModel());
+ CPPUNIT_ASSERT(mxComponent.is());
+
+ SwDoc* const pMasterDoc(pWrtShell->GetDoc());
+ CPPUNIT_ASSERT_EQUAL(
+ size_t(2),
+ pMasterDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks().size());
+ // no way to set SwDocShell::m_nUpdateDocMode away from NO_UPDATE ?
+ // pMasterDoc->getIDocumentLinksAdministration().UpdateLinks();
+ pMasterDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks(false, false,
+ nullptr);
+ // note: this has called SwGetRefFieldType::UpdateGetReferences()
+ SwFieldType const* const pType(
+ pMasterDoc->getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::GetRef));
+ std::vector<SwFormatField*> fields;
+ pType->GatherFields(fields);
+ CPPUNIT_ASSERT_EQUAL(size_t(6), fields.size());
+ std::sort(fields.begin(), fields.end(), [](auto const* const pA, auto const* const pB) {
+ SwTextField const* const pHintA(pA->GetTextField());
+ SwTextField const* const pHintB(pB->GetTextField());
+ // in this document: only 1 field per node
+ CPPUNIT_ASSERT(pA == pB || &pHintA->GetTextNode() != &pHintB->GetTextNode());
+ return pHintA->GetTextNode().GetIndex() < pHintB->GetTextNode().GetIndex();
+ });
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[0]->GetField()->GetSubType());
+ CPPUNIT_ASSERT_EQUAL(OUString("bookmarkchapter1_text"),
+ static_cast<SwGetRefField const*>(fields[0]->GetField())->GetSetRefName());
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),
+ static_cast<SwGetRefField const*>(fields[0]->GetField())
+ ->GetExpandedTextOfReferencedTextNode(*pWrtShell->GetLayout()));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[1]->GetField()->GetSubType());
+ CPPUNIT_ASSERT(
+ static_cast<SwGetRefField const*>(fields[1]->GetField())->IsRefToHeadingCrossRefBookmark());
+ CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2"),
+ static_cast<SwGetRefField const*>(fields[1]->GetField())->GetPar2());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[2]->GetField()->GetSubType());
+ CPPUNIT_ASSERT_EQUAL(OUString("Bookmarkchapter1"),
+ static_cast<SwGetRefField const*>(fields[2]->GetField())->GetSetRefName());
+ CPPUNIT_ASSERT_EQUAL(OUString("Chapter 1"),
+ static_cast<SwGetRefField const*>(fields[2]->GetField())->GetPar2());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[3]->GetField()->GetSubType());
+ CPPUNIT_ASSERT_EQUAL(OUString("bookmarkchapter1_text"),
+ static_cast<SwGetRefField const*>(fields[3]->GetField())->GetSetRefName());
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),
+ static_cast<SwGetRefField const*>(fields[3]->GetField())->GetPar2());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[4]->GetField()->GetSubType());
+ CPPUNIT_ASSERT(
+ static_cast<SwGetRefField const*>(fields[4]->GetField())->IsRefToHeadingCrossRefBookmark());
+ CPPUNIT_ASSERT_EQUAL(OUString("Chapter 1.1"),
+ static_cast<SwGetRefField const*>(fields[4]->GetField())->GetPar2());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_BOOKMARK), fields[5]->GetField()->GetSubType());
+ CPPUNIT_ASSERT(
+ static_cast<SwGetRefField const*>(fields[5]->GetField())->IsRefToHeadingCrossRefBookmark());
+ CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2"),
+ static_cast<SwGetRefField const*>(fields[5]->GetField())->GetPar2());
+
+ tempDir.EnableKillingFile();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf103612)
+{
+ SwDoc* const pGlobalDoc = createSwDoc(DATA_DIRECTORY, "DUMMY.odm");
+ CPPUNIT_ASSERT_EQUAL(
+ size_t(1),
+ pGlobalDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks().size());
+ pGlobalDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks(false, false,
+ nullptr);
+
+ xmlDocUniquePtr pLayout = parseLayoutDump();
+
+ assertXPath(pLayout, "/root/page[1]/body/section[1]/txt[1]/LineBreak[1]", "Line",
+ "Text before section");
+ // the inner section and its content was hidden
+ assertXPath(pLayout, "/root/page[1]/body/section[2]/txt[1]/LineBreak[1]", "Line",
+ "Text inside section before ToC");
+ assertXPath(pLayout, "/root/page[1]/body/section[3]/txt[1]/LineBreak[1]", "Line",
+ "Table of Contents");
+ assertXPath(pLayout, "/root/page[1]/body/section[4]/txt[1]/LineBreak[1]", "Line",
+ "First header*1");
+ assertXPath(pLayout, "/root/page[1]/body/section[4]/txt[2]/LineBreak[1]", "Line",
+ "Second header*1");
+ assertXPath(pLayout, "/root/page[1]/body/section[5]/txt[2]/LineBreak[1]", "Line",
+ "Text inside section after ToC");
+ assertXPath(pLayout, "/root/page[1]/body/section[6]/txt[1]/LineBreak[1]", "Line",
+ "Text after section");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf97899)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ IDocumentContentOperations& rIDCO(pDoc->getIDocumentContentOperations());
+
+ // Create an Ordered List
+ rIDCO.InsertString(*pCursor, "a");
+ pWrtShell->SplitNode();
+ rIDCO.InsertString(*pCursor, "b");
+ pWrtShell->SplitNode();
+ rIDCO.InsertString(*pCursor, "c");
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:DefaultNumbering", {});
+
+ // Save it as DOCX & load it again
+ reload("Office Open XML Text", "tdf97899-tmp.docx");
+ uno::Reference<container::XIndexAccess> xNumberingRules
+ = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
+ CPPUNIT_ASSERT(xNumberingRules->getCount());
+ uno::Sequence<beans::PropertyValue> aNumbering;
+ xNumberingRules->getByIndex(0) >>= aNumbering;
+ OUString sCharStyleName;
+ for (const auto& prop : aNumbering)
+ {
+ if (prop.Name == "CharStyleName")
+ {
+ prop.Value >>= sCharStyleName;
+ break;
+ }
+ }
+ CPPUNIT_ASSERT(!sCharStyleName.isEmpty());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx
new file mode 100644
index 000000000..ae650c84f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -0,0 +1,2242 @@
+
+/* -*- 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 <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
+#include <swmodeltestbase.hxx>
+#include <ndtxt.hxx>
+#include <wrtsh.hxx>
+#include <drawdoc.hxx>
+#include <redline.hxx>
+#include <dcontact.hxx>
+#include <view.hxx>
+#include <IDocumentSettingAccess.hxx>
+
+#include <editeng/brushitem.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdview.hxx>
+
+#include <i18nutil/transliteration.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <UndoManager.hxx>
+#include <tblafmt.hxx>
+
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/linguistic2/XLinguProperties.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/text/XParagraphAppend.hpp>
+#include <o3tl/cppunittraitshelper.hxx>
+#include <osl/thread.hxx>
+#include <hyp.hxx>
+#include <swdtflvr.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <sfx2/classificationhelper.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <editeng/unolingu.hxx>
+#include <vcl/scheduler.hxx>
+#include <config_fonts.h>
+#include <unotxdoc.hxx>
+#include <unotools/transliterationwrapper.hxx>
+#include <officecfg/Office/Writer.hxx>
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
+
+void lcl_selectCharacters(SwPaM& rPaM, sal_Int32 first, sal_Int32 end)
+{
+ rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), first);
+ rPaM.SetMark();
+ rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), end);
+}
+} //namespace
+
+class SwUiWriterTest4 : public SwModelTestBase
+{
+public:
+ void mergeDocs(const char* aDestDoc, const char* aInsertDoc);
+};
+
+void SwUiWriterTest4::mergeDocs(const char* aDestDoc, const char* aInsertDoc)
+{
+ createSwDoc(DATA_DIRECTORY, aDestDoc);
+
+ // set a page cursor into the end of the document
+ 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->jumpToEndOfPage();
+
+ // insert the same document at current cursor position
+ {
+ const OUString insertFileid
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + OUString::createFromAscii(aInsertDoc);
+ uno::Sequence<beans::PropertyValue> aPropertyValues(
+ comphelper::InitPropertySequence({ { "Name", uno::Any(insertFileid) } }));
+ dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf96515)
+{
+ // Enable hide whitespace mode.
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwViewOption aViewOptions(*pWrtShell->GetViewOptions());
+ aViewOptions.SetHideWhitespaceMode(true);
+ pWrtShell->ApplyViewOptions(aViewOptions);
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsWhitespaceHidden());
+
+ // Insert a new paragraph at the end of the document.
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XParagraphAppend> xParagraphAppend(xTextDocument->getText(),
+ uno::UNO_QUERY);
+ xParagraphAppend->finishParagraph(uno::Sequence<beans::PropertyValue>());
+ calcLayout();
+
+ // This was 2, a new page was created for the new paragraph.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+static OUString lcl_translitTest(SwDoc& rDoc, const SwPaM& rPaM, TransliterationFlags const nType)
+{
+ utl::TransliterationWrapper aTrans(::comphelper::getProcessComponentContext(), nType);
+ rDoc.getIDocumentContentOperations().TransliterateText(rPaM, aTrans);
+ //SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ return rPaM.GetNode(false).GetTextNode()->GetText();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf146449)
+{
+ load(DATA_DIRECTORY, "tdf146449.odt");
+
+ auto pDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pDoc);
+ auto pShell = pDoc->GetDocShell()->GetFEShell();
+ CPPUNIT_ASSERT(pShell);
+
+ auto xTextBox = getShapeByName(u"Frame1");
+ auto pObject = SdrObject::getSdrObjectFromXShape(xTextBox);
+
+ CPPUNIT_ASSERT(pShell->SelectObj(Point(), 0, pObject));
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<beans::XPropertySet> xShapeProps(xTextBox, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrameProps(xShapeProps->getPropertyValue("TextBoxContent"),
+ uno::UNO_QUERY);
+
+ const auto& nShapeZOrder = pObject->GetOrdNum();
+ const auto& nFrameZOrder = xFrameProps->getPropertyValue("ZOrder");
+
+ CPPUNIT_ASSERT_MESSAGE("Wrong Zorder!", nShapeZOrder < nFrameZOrder.get<sal_uInt32>());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf49033)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Insert the test text at the end of the document.
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert("Mary Jones met joe Smith. Time Passed.");
+ pWrtShell->StartOfSection();
+ SwShellCursor* pCursor = pWrtShell->getShellCursor(false);
+
+ using TF = TransliterationFlags;
+
+ /* -- Test behavior when there is no selection -- */
+
+ /* Move cursor between the 't' and the ' ' after 'met', nothing should change */
+ for (int i = 0; i < 14; i++)
+ pCursor->Move(fnMoveForward);
+
+ CPPUNIT_ASSERT_EQUAL(false, pCursor->HasMark());
+ CPPUNIT_ASSERT_EQUAL(false, pWrtShell->IsSelection());
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* Move cursor between the 'h' and the '.' after 'Smith', nothing should change */
+ for (int i = 0; i < 10; i++)
+ pCursor->Move(fnMoveForward);
+
+ CPPUNIT_ASSERT_EQUAL(false, pCursor->HasMark());
+ CPPUNIT_ASSERT_EQUAL(false, pWrtShell->IsSelection());
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* Move cursor between the 'm' and the 'e' in 'met' */
+ for (int i = 0; i < 12; i++)
+ pCursor->Move(fnMoveBackward);
+
+ CPPUNIT_ASSERT_EQUAL(false, pCursor->HasMark());
+ CPPUNIT_ASSERT_EQUAL(false, pWrtShell->IsSelection());
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary jones met joe smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+
+ /* Undo the sentence case change to reset for the following tests */
+ pDoc->GetIDocumentUndoRedo().Undo();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* -- Test behavior when there is a selection that does not cross a word boundary -- */
+ pCursor->Move(fnMoveBackward);
+ pWrtShell->SelWrd();
+ CPPUNIT_ASSERT_EQUAL(true, pCursor->HasMark());
+ CPPUNIT_ASSERT_EQUAL(true, pWrtShell->IsSelection());
+
+ OUString currentSelectedText;
+ pWrtShell->GetSelectedText(currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("met"), currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* -- Test behavior when there is a selection that does not begin at a word boundary: "et" -- */
+ for (int i = 0; i < 2; i++)
+ pCursor->Move(fnMoveBackward);
+ pCursor->SetMark();
+ for (int i = 0; i < 2; i++)
+ pCursor->Move(fnMoveForward);
+ pWrtShell->GetSelectedText(currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("et"), currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mEt joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ pDoc->GetIDocumentUndoRedo().Undo();
+ CPPUNIT_ASSERT_EQUAL(OUString("et"), currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mEt joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ pDoc->GetIDocumentUndoRedo().Undo();
+ CPPUNIT_ASSERT_EQUAL(OUString("et"), currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mET joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* -- Test behavior when there is a selection that crosses a word boundary -- */
+ for (int i = 0; i < 7; i++)
+ pCursor->Move(fnMoveBackward);
+ pCursor->SetMark();
+ for (int i = 0; i < 14; i++)
+ pCursor->Move(fnMoveForward);
+
+ pWrtShell->GetSelectedText(currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("nes met joe Sm"), currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNes met joe smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNes Met Joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNES MET JOE SMith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* Reset the 's' to upper-case for the next test */
+ for (int i = 0; i < 2; i++)
+ pCursor->Move(fnMoveBackward);
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward);
+ pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, OUString('S'), false);
+
+ /* -- Test behavior when there is a selection that crosses a sentence boundary -- */
+ for (int i = 0; i < 4; i++)
+ pCursor->Move(fnMoveBackward);
+ pCursor->SetMark();
+ for (int i = 0; i < 22; i++)
+ pCursor->Move(fnMoveForward);
+ pWrtShell->GetSelectedText(currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("joe Smith. Time Passed"), currentSelectedText);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met Joe smith. Time passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+
+ /* Undo the sentence case change to reset for the following tests */
+ pDoc->GetIDocumentUndoRedo().Undo();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met Joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met JOE SMITH. TIME PASSED."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe smith. time passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* Undo the previous changes to reset for the following tests */
+ pDoc->GetIDocumentUndoRedo().Undo();
+ pDoc->GetIDocumentUndoRedo().Undo();
+ pDoc->GetIDocumentUndoRedo().Undo();
+
+ /* -- Test behavior when there is a selection that does not reach end of sentence -- */
+ for (int i = 0; i < 37; i++)
+ pCursor->Move(fnMoveBackward);
+ pCursor->SetMark();
+ for (int i = 0; i < 10; i++)
+ pCursor->Move(fnMoveForward);
+ pWrtShell->GetSelectedText(currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones"), currentSelectedText);
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("MARY JONES met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("mary jones met joe Smith. Time Passed."),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf147196)
+{
+ using TF = TransliterationFlags;
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Insert the test text at the end of the document.
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert(
+ "2.2 Publication of information - CAA\nSection 4.2 of a CA\'s Certificate Policy and/or "
+ "Certification Practice Statement SHALL state the CA\'s policy or practice on processing "
+ "CAA Records for Fully Qualified Domain Names; that policy shall be consistent with these "
+ "Requirements. \n\nIt shall clearly specify the set of Issuer Domain Names that the CA "
+ "recognises in CAA \"issue\" or \"issuewild\" records as permitting it to issue. The CA "
+ "SHALL log all actions taken, if any, consistent with its processing practice.");
+
+ pWrtShell->StartOfSection();
+ SwShellCursor* pCursor = pWrtShell->getShellCursor(false);
+ pCursor->SetMark();
+ for (int i = 0; i < 510; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("2.2 Publication Of Information - Caa\nSection 4.2 Of A Ca\'s Certificate Policy "
+ "And/Or Certification Practice Statement Shall State The Ca\'s Policy Or Practice "
+ "On Processing Caa Records For Fully Qualified Domain Names; That Policy Shall Be "
+ "Consistent With These Requirements. \n\nIt Shall Clearly Specify The Set Of "
+ "Issuer Domain Names That The Ca Recognises In Caa \"Issue\" Or \"Issuewild\" "
+ "Records As Permitting It To Issue. The Ca Shall Log All Actions Taken, If Any, "
+ "Consistent With Its Processing Practice."),
+ lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf148148)
+{
+ using TF = TransliterationFlags;
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert(" text");
+
+ /* Test what happens when node contains text but selection does not contain any text */
+ pWrtShell->StartOfSection();
+ SwShellCursor* pCursor = pWrtShell->getShellCursor(false);
+ pCursor->SetMark();
+ for (int i = 0; i < 3; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+ CPPUNIT_ASSERT_EQUAL(OUString(" text"), lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" text"), lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" text"),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" text"),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* Test what happens when node contains text but selection does not contain any text */
+ pDoc = createSwDoc();
+ pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert("text ");
+
+ pWrtShell->StartOfSection();
+ pCursor = pWrtShell->getShellCursor(false);
+ for (int i = 0; i < 4; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+ pCursor->SetMark();
+ for (int i = 0; i < 2; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+
+ CPPUNIT_ASSERT_EQUAL(OUString("text "), lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("text "), lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("text "),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("text "),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* Test what happens when node contains only non-word text but selection does not contain any text */
+ pDoc = createSwDoc();
+ pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert("-1 ");
+
+ pWrtShell->StartOfSection();
+ pCursor = pWrtShell->getShellCursor(false);
+ for (int i = 0; i < 2; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+ pCursor->SetMark();
+ for (int i = 0; i < 2; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+
+ CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("-1 "),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString("-1 "),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ pDoc = createSwDoc();
+ pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert(" -1");
+
+ pWrtShell->StartOfSection();
+ pCursor = pWrtShell->getShellCursor(false);
+ pCursor->SetMark();
+ for (int i = 0; i < 2; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+
+ /* Test what happens when node and selection contains only non-word text */
+ pDoc = createSwDoc();
+ pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert(" -1");
+
+ pWrtShell->StartOfSection();
+ pCursor = pWrtShell->getShellCursor(false);
+ pCursor->SetMark();
+ for (int i = 0; i < 5; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(*pDoc, *pCursor, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(*pDoc, *pCursor, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"),
+ lcl_translitTest(*pDoc, *pCursor, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(OUString(" -1"),
+ lcl_translitTest(*pDoc, *pCursor, TF::UPPERCASE_LOWERCASE));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf96943)
+{
+ // Enable hide whitespace mode.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf96943.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwViewOption aViewOptions(*pWrtShell->GetViewOptions());
+ aViewOptions.SetHideWhitespaceMode(true);
+ pWrtShell->ApplyViewOptions(aViewOptions);
+
+ // Insert a new character at the end of the document.
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert("d");
+
+ // This was 2, a new page was created for the new layout line.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf96536)
+{
+ // Enable hide whitespace mode.
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwViewOption aViewOptions(*pWrtShell->GetViewOptions());
+ aViewOptions.SetHideWhitespaceMode(true);
+ pWrtShell->ApplyViewOptions(aViewOptions);
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsWhitespaceHidden());
+
+ // Insert a page break and go back to the first page.
+ pWrtShell->InsertPageBreak();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ calcLayout();
+ sal_Int32 nSingleParaPageHeight = parseDump("/root/page[1]/infos/bounds", "height").toInt32();
+ discardDumpedLayout();
+
+ // Insert a 2nd paragraph at the end of the first page, so the page height grows at least twice...
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XParagraphAppend> xParagraphAppend(xTextDocument->getText(),
+ uno::UNO_QUERY);
+ const uno::Reference<text::XTextRange> xInsertPos = getRun(getParagraph(1), 1);
+ xParagraphAppend->finishParagraphInsert(uno::Sequence<beans::PropertyValue>(), xInsertPos);
+ calcLayout();
+ CPPUNIT_ASSERT(parseDump("/root/page[1]/infos/bounds", "height").toInt32()
+ >= 2 * nSingleParaPageHeight);
+ discardDumpedLayout();
+
+ // ... and then delete the 2nd paragraph, which shrinks the page to the previous size.
+ uno::Reference<lang::XComponent> xParagraph(getParagraph(2), uno::UNO_QUERY);
+ xParagraph->dispose();
+ calcLayout();
+ CPPUNIT_ASSERT_EQUAL(nSingleParaPageHeight,
+ parseDump("/root/page[1]/infos/bounds", "height").toInt32());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf96479)
+{
+ // We want to verify the empty input text field in the bookmark
+ static const OUString emptyInputTextField
+ = OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + OUStringChar(CH_TXT_ATR_INPUTFIELDEND);
+
+ SwDoc* pDoc = createSwDoc();
+
+ // So we can clean up all references for reload
+ {
+ // Append bookmark
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ sw::mark::IMark* pMark = rIDMA.makeMark(
+ aPaM, "original", IDocumentMarkAccess::MarkType::BOOKMARK, ::sw::mark::InsertMode::New);
+ CPPUNIT_ASSERT(!pMark->IsExpanded());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+
+ // Get helper objects
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+
+ // Create cursor from bookmark
+ uno::Reference<text::XTextContent> xTextContent(
+ xBookmarksSupplier->getBookmarks()->getByName("original"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xTextContent->getAnchor();
+ uno::Reference<text::XTextCursor> xCursor
+ = xRange->getText()->createTextCursorByRange(xRange);
+ CPPUNIT_ASSERT(xCursor->isCollapsed());
+
+ // Remove bookmark
+ xRange->getText()->removeTextContent(xTextContent);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), rIDMA.getBookmarksCount());
+
+ // Insert replacement bookmark
+ uno::Reference<text::XTextContent> xBookmarkNew(
+ xFactory->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xBookmarkName(xBookmarkNew, uno::UNO_QUERY);
+ xBookmarkName->setName("replacement");
+ CPPUNIT_ASSERT(xCursor->isCollapsed());
+ // Force bookmark expansion
+ xCursor->getText()->insertString(xCursor, ".", true);
+ xCursor->getText()->insertTextContent(xCursor, xBookmarkNew, true);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ auto mark = *(rIDMA.getBookmarksBegin());
+ CPPUNIT_ASSERT(mark->IsExpanded());
+
+ // Create and insert input textfield with some content
+ uno::Reference<text::XTextField> xTextField(
+ xFactory->createInstance("com.sun.star.text.TextField.Input"), uno::UNO_QUERY);
+ uno::Reference<text::XTextCursor> xCursorNew(
+ xBookmarkNew->getAnchor()->getText()->createTextCursorByRange(
+ xBookmarkNew->getAnchor()));
+ CPPUNIT_ASSERT(!xCursorNew->isCollapsed());
+ xCursorNew->getText()->insertTextContent(xCursorNew, xTextField, true);
+ xBookmarkNew = uno::Reference<text::XTextContent>(
+ xBookmarksSupplier->getBookmarks()->getByName("replacement"), uno::UNO_QUERY);
+ xCursorNew = xBookmarkNew->getAnchor()->getText()->createTextCursorByRange(
+ xBookmarkNew->getAnchor());
+ CPPUNIT_ASSERT(!xCursorNew->isCollapsed());
+
+ // Can't check the actual content of the text node via UNO
+ mark = *(rIDMA.getBookmarksBegin());
+ CPPUNIT_ASSERT(mark->IsExpanded());
+ SwPaM pam(mark->GetMarkStart(), mark->GetMarkEnd());
+ // Check for the actual bug, which didn't include CH_TXT_ATR_INPUTFIELDEND in the bookmark
+ CPPUNIT_ASSERT_EQUAL(emptyInputTextField, pam.GetText());
+ }
+
+ {
+ // Save and load cycle
+ // Actually not needed, but the bug symptom of a missing bookmark
+ // occurred because a broken bookmark was saved and loading silently
+ // dropped the broken bookmark!
+ reload("writer8", "testTdf96479.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ pDoc = pTextDoc->GetDocShell()->GetDoc();
+
+ // Lookup "replacement" bookmark
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xBookmarksSupplier->getBookmarks()->hasByName("replacement"));
+
+ uno::Reference<text::XTextContent> xTextContent(
+ xBookmarksSupplier->getBookmarks()->getByName("replacement"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xTextContent->getAnchor();
+ uno::Reference<text::XTextCursor> xCursor
+ = xRange->getText()->createTextCursorByRange(xRange);
+ CPPUNIT_ASSERT(!xCursor->isCollapsed());
+
+ // Verify bookmark content via text node / PaM
+ auto mark = *(rIDMA.getBookmarksBegin());
+ CPPUNIT_ASSERT(mark->IsExpanded());
+ SwPaM pam(mark->GetMarkStart(), mark->GetMarkEnd());
+ CPPUNIT_ASSERT_EQUAL(emptyInputTextField, pam.GetText());
+ }
+}
+
+// If you resave original document the bookmark will be changed from
+//
+// <text:p text:style-name="Standard">
+// <text:bookmark-start text:name="test"/>
+// <text:bookmark-end text:name="test"/>
+// def
+// </text:p>
+//
+// to
+//
+// <text:p text:style-name="Standard">
+// <text:bookmark text:name="test"/>
+// def
+// </text:p>
+//
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testBookmarkCollapsed)
+{
+ // load document
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "collapsed_bookmark.odt");
+ CPPUNIT_ASSERT(pDoc);
+
+ // save original document
+ utl::TempFile aTempFile;
+ save("writer8", aTempFile);
+
+ // load only content.xml from the resaved document
+ if (xmlDocUniquePtr pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml"))
+ {
+ const OString aPath("/office:document-content/office:body/office:text/text:p");
+
+ const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
+ CPPUNIT_ASSERT_EQUAL(0, pos1); // found, and it is first
+
+ CPPUNIT_ASSERT_ASSERTION_FAIL(
+ getXPathPosition(pXmlDoc, aPath, "bookmark-start")); // not found
+ CPPUNIT_ASSERT_ASSERTION_FAIL(
+ getXPathPosition(pXmlDoc, aPath, "bookmark-end")); // not found
+ }
+}
+
+// 1. Open a new writer document
+// 2. Enter the text "abcdef"
+// 3. Select "abc"
+// 4. Insert a bookmark on "abc" using Insert->Bookmark. Name the bookmark "test".
+// 5. Open the navigator (F5)
+// Select the bookmark "test" using the navigator.
+// 6. Hit Del, thus deleting "abc" (The bookmark "test" is still there).
+// 7. Save the document:
+// <text:p text:style-name="Standard">
+// <text:bookmark-start text:name="test"/>
+// <text:bookmark-end text:name="test"/>
+// def
+// </text:p>
+//
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRemoveBookmarkText)
+{
+ // create document
+ {
+ // create a text document with "abcdef"
+ SwDoc* pDoc = createSwDoc();
+
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, "abcdef");
+ }
+
+ // mark "abc" with "testBookmark" bookmark
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ lcl_selectCharacters(aPaM, 0, 3);
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ sw::mark::IMark* pMark
+ = rIDMA.makeMark(aPaM, "testBookmark", IDocumentMarkAccess::MarkType::BOOKMARK,
+ ::sw::mark::InsertMode::New);
+
+ // verify
+ CPPUNIT_ASSERT(pMark->IsExpanded());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ }
+
+ // remove text marked with bookmark
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ lcl_selectCharacters(aPaM, 0, 3);
+ pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
+
+ // verify: bookmark is still exist
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ }
+ }
+
+ // save document
+ utl::TempFile aTempFile;
+ save("writer8", aTempFile);
+
+ // load only content.xml from the resaved document
+ if (xmlDocUniquePtr pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml"))
+ {
+ const OString aPath("/office:document-content/office:body/office:text/text:p");
+
+ CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, "bookmark")); // not found
+ const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start");
+ const int pos3 = getXPathPosition(pXmlDoc, aPath, "bookmark-end");
+
+ CPPUNIT_ASSERT_EQUAL(0, pos2); // found, and it is first
+ CPPUNIT_ASSERT_EQUAL(1, pos3); // found, and it is second
+ }
+}
+
+// 1. Open a new writer document
+// 2. Enter the text "abcdef"
+// 3. Select "abc"
+// 4. Insert a bookmark on "abc" using Insert->Bookmark. Name the bookmark "test".
+// 5. Open the navigator (F5)
+// Select the bookmark "test" using the navigator.
+// 6. Hit Del, thus deleting "abc" (The bookmark "test" is still there).
+// 7. Call our macro
+//
+// Sub Main
+// bookmark = ThisComponent.getBookmarks().getByName("test")
+// bookmark.getAnchor().setString("abc")
+// End Sub
+//
+// The text "abc" gets inserted inside the bookmark "test", and the document now contains the string "abcdef".
+// 7. Save the document:
+// <text:p text:style-name="Standard">
+// <text:bookmark-start text:name="test"/>
+// abc
+// <text:bookmark-end text:name="test"/>
+// def
+// </text:p>
+//
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRemoveBookmarkTextAndAddNew)
+{
+ // create document
+ {
+ // create a text document with "abcdef"
+ SwDoc* pDoc = createSwDoc();
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, "abcdef");
+ }
+
+ // mark "abc" with "testBookmark" bookmark
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ lcl_selectCharacters(aPaM, 0, 3);
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ sw::mark::IMark* pMark
+ = rIDMA.makeMark(aPaM, "testBookmark", IDocumentMarkAccess::MarkType::BOOKMARK,
+ ::sw::mark::InsertMode::New);
+
+ // verify
+ CPPUNIT_ASSERT(pMark->IsExpanded());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ }
+
+ // remove text marked with bookmark
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ lcl_selectCharacters(aPaM, 0, 3);
+ pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
+
+ // verify: bookmark is still exist
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ }
+
+ // write "abc" to area marked with "testBookmark" bookmark
+ {
+ // Get helper objects
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent,
+ uno::UNO_QUERY);
+
+ // Create cursor from bookmark
+ uno::Reference<text::XTextContent> xTextContent(
+ xBookmarksSupplier->getBookmarks()->getByName("testBookmark"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xTextContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString(""), xRange->getString());
+
+ // write "abc"
+ xRange->setString("abc");
+
+ // verify: bookmark is still exist
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ }
+ }
+
+ // save document
+ utl::TempFile aTempFile;
+ save("writer8", aTempFile);
+
+ // load only content.xml from the resaved document
+ if (xmlDocUniquePtr pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml"))
+ {
+ const OString aPath("/office:document-content/office:body/office:text/text:p");
+
+ CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, "bookmark")); // not found
+ const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start");
+ const int pos3 = getXPathPosition(pXmlDoc, aPath, "text");
+ const int pos4 = getXPathPosition(pXmlDoc, aPath, "bookmark-end");
+
+ CPPUNIT_ASSERT_EQUAL(0, pos2);
+ CPPUNIT_ASSERT_EQUAL(1, pos3);
+ CPPUNIT_ASSERT_EQUAL(2, pos4);
+ }
+}
+
+// 1. Load document:
+// <text:p text:style-name="Standard">
+// <text:bookmark-start text:name="test"/>
+// <text:bookmark-end text:name="test"/>
+// def
+// </text:p>
+//
+// 2. Call our macro
+//
+// Sub Main
+// bookmark = ThisComponent.getBookmarks().getByName("test")
+// bookmark.getAnchor().setString("abc")
+// End Sub
+//
+// The text "abc" gets inserted inside the bookmark "test", and the document now contains the string "abcdef".
+// 3. Save the document:
+// <text:p text:style-name="Standard">
+// <text:bookmark text:name="test"/>
+// abcdef
+// </text:p>
+//
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRemoveBookmarkTextAndAddNewAfterReload)
+{
+ // load document
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "collapsed_bookmark.odt");
+ CPPUNIT_ASSERT(pDoc);
+
+ // write "abc" to area marked with "testBookmark" bookmark
+ {
+ // Get helper objects
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+
+ // Create cursor from bookmark
+ uno::Reference<text::XTextContent> xTextContent(
+ xBookmarksSupplier->getBookmarks()->getByName("test"), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xRange = xTextContent->getAnchor();
+ CPPUNIT_ASSERT_EQUAL(OUString(""), xRange->getString());
+
+ // write "abc"
+ xRange->setString("abc");
+
+ // verify: bookmark is still exist
+ IDocumentMarkAccess& rIDMA = *pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getBookmarksCount());
+ }
+
+ // save original document
+ utl::TempFile aTempFile;
+ save("writer8", aTempFile);
+
+ // load only content.xml from the resaved document
+ if (xmlDocUniquePtr pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml"))
+ {
+ const OString aPath("/office:document-content/office:body/office:text/text:p");
+
+ const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
+ const int pos2 = getXPathPosition(pXmlDoc, aPath, "text");
+
+ CPPUNIT_ASSERT_EQUAL(0, pos1);
+ CPPUNIT_ASSERT_EQUAL(1, pos2);
+
+ CPPUNIT_ASSERT_ASSERTION_FAIL(
+ getXPathPosition(pXmlDoc, aPath, "bookmark-start")); // not found
+ CPPUNIT_ASSERT_ASSERTION_FAIL(
+ getXPathPosition(pXmlDoc, aPath, "bookmark-end")); // not found
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf96961)
+{
+ // Insert a page break.
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertPageBreak();
+
+ // Enable hide whitespace mode.
+ SwViewOption aViewOptions(*pWrtShell->GetViewOptions());
+ aViewOptions.SetHideWhitespaceMode(true);
+ pWrtShell->ApplyViewOptions(aViewOptions);
+
+ calcLayout();
+
+ // Assert that the height of the last page is larger than the height of other pages.
+ sal_Int32 nOther = parseDump("/root/page[1]/infos/bounds", "height").toInt32();
+ sal_Int32 nLast = parseDump("/root/page[2]/infos/bounds", "height").toInt32();
+ CPPUNIT_ASSERT(nLast > nOther);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf88453)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf88453.odt");
+ calcLayout();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // This was 0: the table does not fit the first page, but it wasn't split
+ // to continue on the second page.
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf88453Table)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf88453-table.odt");
+ calcLayout();
+ // This was 2: layout could not split the large outer table in the document
+ // into 3 pages.
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+}
+
+namespace
+{
+int checkShells(const SwDocShell* pSource, const SwDocShell* pDestination)
+{
+ return int(SfxClassificationHelper::CheckPaste(pSource->getDocProperties(),
+ pDestination->getDocProperties()));
+}
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testClassificationPaste)
+{
+ SwDocShell* pSourceShell = createSwDoc()->GetDocShell();
+ uno::Reference<lang::XComponent> xSourceComponent = mxComponent;
+ mxComponent.clear();
+
+ SwDocShell* pDestinationShell = createSwDoc()->GetDocShell();
+
+ // Not classified source, not classified destination.
+ CPPUNIT_ASSERT_EQUAL(int(SfxClassificationCheckPasteResult::None),
+ checkShells(pSourceShell, pDestinationShell));
+
+ // Classified source, not classified destination.
+ uno::Sequence<beans::PropertyValue> aInternalOnly
+ = comphelper::InitPropertySequence({ { "Name", uno::Any(OUString("Internal Only")) } });
+ dispatchCommand(xSourceComponent, ".uno:ClassificationApply", aInternalOnly);
+ CPPUNIT_ASSERT_EQUAL(int(SfxClassificationCheckPasteResult::TargetDocNotClassified),
+ checkShells(pSourceShell, pDestinationShell));
+
+ // Classified source and classified destination -- internal only has a higher level than confidential.
+ uno::Sequence<beans::PropertyValue> aConfidential
+ = comphelper::InitPropertySequence({ { "Name", uno::Any(OUString("Confidential")) } });
+ dispatchCommand(mxComponent, ".uno:ClassificationApply", aConfidential);
+ CPPUNIT_ASSERT_EQUAL(int(SfxClassificationCheckPasteResult::DocClassificationTooLow),
+ checkShells(pSourceShell, pDestinationShell));
+
+ xSourceComponent->dispose();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testSmallCaps)
+{
+ // Create a document, add some characters and select them.
+ createSwDoc();
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("text");
+ pWrtShell->SelAll();
+
+ // Dispatch the command to make them formatted small capitals.
+ dispatchCommand(mxComponent, ".uno:SmallCaps", {});
+
+ // This was css::style::CaseMap::NONE as the shell didn't handle the command.
+ CPPUNIT_ASSERT_EQUAL(css::style::CaseMap::SMALLCAPS,
+ getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharCaseMap"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf98987)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf98987.docx");
+ calcLayout();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[2]/SdrObject", "name",
+ "Rectangle 1");
+ sal_Int32 nRectangle1
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[2]/bounds", "top")
+ .toInt32();
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[1]/SdrObject", "name",
+ "Rectangle 2");
+ sal_Int32 nRectangle2
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[1]/bounds", "top")
+ .toInt32();
+ CPPUNIT_ASSERT_GREATER(nRectangle1, nRectangle2);
+
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[3]/SdrObject", "name",
+ "Rectangle 3");
+ sal_Int32 nRectangle3
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[3]/bounds", "top")
+ .toInt32();
+ // This failed: the 3rd rectangle had a smaller "top" value than the 2nd one, it even overlapped with the 1st one.
+ CPPUNIT_ASSERT_GREATER(nRectangle2, nRectangle3);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf99004)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf99004.docx");
+ calcLayout();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nTextbox1Top
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/bounds", "top").toInt32();
+ sal_Int32 nTextBox1Height
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/fly/infos/bounds", "height").toInt32();
+ sal_Int32 nTextBox1Bottom = nTextbox1Top + nTextBox1Height;
+
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[1]/SdrObject", "name",
+ "Rectangle 2");
+ sal_Int32 nRectangle2Top
+ = getXPath(pXmlDoc, "/root/page/body/txt/anchored/SwAnchoredDrawObject[1]/bounds", "top")
+ .toInt32();
+ // This was 3291 and 2531, should be now around 2472 and 2531, i.e. the two rectangles should not overlap anymore.
+ CPPUNIT_ASSERT(nTextBox1Bottom < nRectangle2Top);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf84695)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf84695.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(1);
+ SwContact* pTextBox = static_cast<SwContact*>(pObject->GetUserCall());
+ // First, make sure that pTextBox is a fly frame (textbox of a shape).
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_FLYFRMFMT), pTextBox->GetFormat()->Which());
+
+ // Then select it.
+ pWrtShell->SelectObj(Point(), 0, pObject);
+
+ // Now Enter + a key should add some text.
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ // This was empty, Enter did not start the fly frame edit mode.
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), xShape->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf84695NormalChar)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf84695.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(1);
+ SwContact* pTextBox = static_cast<SwContact*>(pObject->GetUserCall());
+ // First, make sure that pTextBox is a fly frame (textbox of a shape).
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_FLYFRMFMT), pTextBox->GetFormat()->Which());
+
+ // Then select it.
+ pWrtShell->SelectObj(Point(), 0, pObject);
+
+ // Now pressing 'a' should add a character.
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
+ // This was empty, pressing a normal character did not start the fly frame edit mode.
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), xShape->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf84695Tab)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf84695-tab.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(0);
+ SwContact* pShape = static_cast<SwContact*>(pObject->GetUserCall());
+ // First, make sure that pShape is a draw shape.
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_DRAWFRMFMT), pShape->GetFormat()->Which());
+
+ // Then select it.
+ pWrtShell->SelectObj(Point(), 0, pObject);
+
+ // Now pressing 'tab' should jump to the other shape.
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+
+ // And finally make sure the selection has changed.
+ const SdrMarkList& rMarkList = pWrtShell->GetDrawView()->GetMarkedObjectList();
+ SwContact* pOtherShape
+ = static_cast<SwContact*>(rMarkList.GetMark(0)->GetMarkedSdrObj()->GetUserCall());
+ // This failed, 'tab' didn't do anything -> the selected shape was the same.
+ CPPUNIT_ASSERT(pOtherShape != pShape);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTableStyleUndo)
+{
+ SwDoc* pDoc = createSwDoc();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ sal_Int32 nStyleCount = pDoc->GetTableStyles().size();
+ SwTableAutoFormat* pStyle = pDoc->MakeTableStyle("Test Style");
+ SvxBrushItem aBackground(Color(0xFF00FF), RES_BACKGROUND);
+ pStyle->GetBoxFormat(0).SetBackground(aBackground);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount + 1);
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount);
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount + 1);
+ // check if attributes are preserved
+ pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style");
+ CPPUNIT_ASSERT(pStyle);
+ CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground));
+
+ pDoc->DelTableStyle("Test Style");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount);
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount + 1);
+ pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style");
+ // check if attributes are preserved
+ CPPUNIT_ASSERT(pStyle);
+ CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground));
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount);
+
+ // undo delete so we can replace the style
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pDoc->GetTableStyles().size()), nStyleCount + 1);
+ pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style");
+ CPPUNIT_ASSERT(pStyle);
+ CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground));
+
+ SwTableAutoFormat aNewStyle("Test Style2");
+ SvxBrushItem aBackground2(Color(0x00FF00), RES_BACKGROUND);
+ aNewStyle.GetBoxFormat(0).SetBackground(aBackground2);
+
+ pDoc->ChgTableStyle("Test Style", aNewStyle);
+ pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style");
+ CPPUNIT_ASSERT(pStyle);
+ CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground2));
+ rUndoManager.Undo();
+ pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style");
+ CPPUNIT_ASSERT(pStyle);
+ CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground));
+ rUndoManager.Redo();
+ pStyle = pDoc->GetTableStyles().FindAutoFormat(u"Test Style");
+ CPPUNIT_ASSERT(pStyle);
+ CPPUNIT_ASSERT(bool(pStyle->GetBoxFormat(0).GetBackground() == aBackground2));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineCopyPaste)
+{
+ // regressed in tdf#106746
+ SwDoc* pDoc = createSwDoc();
+
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, "abzdezgh");
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+
+ // Turn on track changes, make changes, turn off track changes
+ uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("RecordChanges", uno::Any(true));
+ lcl_selectCharacters(aPaM, 2, 3);
+ pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "c", false);
+ lcl_selectCharacters(aPaM, 6, 7);
+ pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "f", false);
+ xPropertySet->setPropertyValue("RecordChanges", uno::Any(false));
+
+ // Create the clipboard document.
+ SwDoc aClipboard;
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Select the whole content, copy, delete the original and paste the copied content
+ pWrtShell->SelAll();
+ pWrtShell->Copy(aClipboard);
+ pWrtShell->Delete();
+ pWrtShell->Paste(aClipboard);
+
+ // With the bug this is "abzcdefgh", ie. contains the first deleted piece, too
+ CPPUNIT_ASSERT_EQUAL(OUString("abcdefgh"), pTextNode->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf135260)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("test");
+
+ // Turn on track changes
+ uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("RecordChanges", uno::Any(true));
+
+ for (int i = 0; i < 4; i++)
+ {
+ pWrtShell->DelLeft();
+ }
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // accept all redlines
+ while (pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected:
+ // - Actual : tes
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam)
+{
+ // Create a document with minimal content.
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("middle");
+
+ // Turn on track changes, and add changes to the start and end of the document.
+ uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("RecordChanges", uno::Any(true));
+ pWrtShell->StartOfSection();
+ pWrtShell->Insert("aaa");
+ pWrtShell->EndOfSection();
+ pWrtShell->Insert("zzz");
+
+ const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size());
+
+ // Select the first redline.
+ pWrtShell->StartOfSection();
+ uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(
+ { { "NextTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[0]->GetId())) } }));
+ dispatchCommand(mxComponent, ".uno:NextTrackedChange", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+ // This failed: the parameter wasn't handled so the next change (zzz) was
+ // selected, not the first one (aaa).
+ CPPUNIT_ASSERT_EQUAL(OUString("aaa"), pShellCursor->GetText());
+
+ // Select the second redline.
+ pWrtShell->StartOfSection();
+ aPropertyValues = comphelper::InitPropertySequence(
+ { { "NextTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } });
+ dispatchCommand(mxComponent, ".uno:NextTrackedChange", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+ pShellCursor = pWrtShell->getShellCursor(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("zzz"), pShellCursor->GetText());
+
+ // Move the cursor to the start again, and reject the second change.
+ pWrtShell->StartOfSection();
+ aPropertyValues = comphelper::InitPropertySequence(
+ { { "RejectTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } });
+ dispatchCommand(mxComponent, ".uno:RejectTrackedChange", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+ pShellCursor = pWrtShell->getShellCursor(false);
+
+ // This was 'middlezzz', the uno command rejected the redline under the
+ // cursor, instead of the requested one.
+ CPPUNIT_ASSERT_EQUAL(OUString("aaamiddle"),
+ pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineViewAuthor)
+{
+ // Test that setting an author at an SwView level has effect.
+
+ // Create a document with minimal content.
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("middle");
+ SwView* pView = pDocShell->GetView();
+ const OUString aAuthor("A U. Thor");
+ pView->SetRedlineAuthor(aAuthor);
+ pDocShell->SetView(pView);
+
+ // Turn on track changes, and add changes to the start of the document.
+ uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("RecordChanges", uno::Any(true));
+ pWrtShell->StartOfSection();
+ pWrtShell->Insert("aaa");
+
+ // Now assert that SwView::SetRedlineAuthor() had an effect.
+ const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(1), rTable.size());
+ SwRangeRedline* pRedline = rTable[0];
+ // This was 'Unknown Author' instead of 'A U. Thor'.
+ CPPUNIT_ASSERT_EQUAL(aAuthor, pRedline->GetAuthorString());
+
+ // Insert a comment and assert that SwView::SetRedlineAuthor() affects this as well.
+ dispatchCommand(mxComponent, ".uno:.uno:InsertAnnotation", {});
+ 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);
+ // This was 'Unknown Author' instead of 'A U. Thor'.
+ CPPUNIT_ASSERT_EQUAL(aAuthor, xField->getPropertyValue("Author").get<OUString>());
+
+ //Reset the redline author after using it, otherwise, it might interfere with other unittests
+ pView->SetRedlineAuthor("Unknown Author");
+ pDocShell->SetView(pView);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf91292)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf91292_paraBackground.docx");
+ uno::Reference<beans::XPropertySet> xPropertySet(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Solid background color", drawing::FillStyle_SOLID,
+ getProperty<drawing::FillStyle>(xPropertySet, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Background Color", Color(0x5C2D91),
+ getProperty<Color>(xPropertySet, "FillColor"));
+
+ // remove background color
+ xPropertySet->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_NONE));
+
+ // Save it and load it back.
+ reload("Office Open XML Text", "tdf91292_paraBackground.docx");
+
+ xPropertySet.set(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("No background color", drawing::FillStyle_NONE,
+ getProperty<drawing::FillStyle>(xPropertySet, "FillStyle"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf78727)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf78727.docx");
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ // This was 1: make sure we don't loose the TextBox anchored inside the
+ // table that is moved inside a text frame.
+ CPPUNIT_ASSERT(SwTextBoxHelper::getCount(pPage) > 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineTimestamp)
+{
+ // Test that a redline timestamp's second is not always 0.
+
+ // Create a document with minimal content.
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("middle");
+
+ // Turn on track changes, and add changes to the start and to the end of
+ // the document.
+ uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("RecordChanges", uno::Any(true));
+ pWrtShell->StartOfSection();
+ pWrtShell->Insert("aaa");
+ osl::Thread::wait(std::chrono::seconds(1));
+ pWrtShell->EndOfSection();
+ pWrtShell->Insert("zzz");
+
+ // Inserting additional characters at the start changed the table size to
+ // 3, i.e. the first and the second "aaa" wasn't combined.
+ pWrtShell->StartOfSection();
+ pWrtShell->Insert("aaa");
+
+ // Now assert that at least one of the seconds are not 0.
+ const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ if (rTable.size() >= 2
+ && rTable[0]->GetRedlineData().GetTimeStamp().GetMin()
+ != rTable[1]->GetRedlineData().GetTimeStamp().GetMin())
+ // The relatively rare case when waiting for a second also changes the minute.
+ return;
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size());
+ sal_uInt16 nSec1 = rTable[0]->GetRedlineData().GetTimeStamp().GetSec();
+ sal_uInt16 nSec2 = rTable[1]->GetRedlineData().GetTimeStamp().GetSec();
+ // This failed, seconds was always 0.
+ CPPUNIT_ASSERT(nSec1 != 0 || nSec2 != 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testCursorWindows)
+{
+ // Create a new document with one window.
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell1 = pDocShell->GetWrtShell();
+
+ // Create a second view and type something.
+ pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(
+ SID_NEWWINDOW, SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
+ SwWrtShell* pWrtShell2 = pDocShell->GetWrtShell();
+ OUString aText("foo");
+ pWrtShell2->Insert(aText);
+
+ // Assert that only the cursor of the actual window move, not other cursors.
+ SwShellCursor* pShellCursor1 = pWrtShell1->getShellCursor(false);
+ SwShellCursor* pShellCursor2 = pWrtShell2->getShellCursor(false);
+ // This was 3, not 0 -- cursor of the other window moved.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), pShellCursor1->Start()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(aText.getLength(), pShellCursor2->Start()->nContent.GetIndex());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testLandscape)
+{
+ // Set page orientation to landscape.
+ SwDoc* pDoc = createSwDoc();
+ uno::Sequence<beans::PropertyValue> aPropertyValues(
+ comphelper::InitPropertySequence({ { "AttributePage.Landscape", uno::Any(true) } }));
+ dispatchCommand(mxComponent, ".uno:AttributePage", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ // Assert that the document model was modified.
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ size_t nPageDesc = pWrtShell->GetCurPageDesc();
+ // This failed, page was still portrait.
+ CPPUNIT_ASSERT(pWrtShell->GetPageDesc(nPageDesc).GetLandscape());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf95699)
+{
+ // Open the document with single FORMCHECKBOX field, select all and copy to clipboard
+ // then check that clipboard contains the FORMCHECKBOX in text body.
+ // Previously that failed.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf95699.odt");
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ SwDoc aClipboard;
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SelAll();
+ pWrtShell->Copy(aClipboard);
+ pMarkAccess = aClipboard.getIDocumentMarkAccess();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ ::sw::mark::IFieldmark* pFieldMark
+ = pMarkAccess->getFieldmarkAfter(SwPosition(pDoc->GetNodes().GetEndOfExtras()));
+ CPPUNIT_ASSERT_EQUAL(OUString("vnd.oasis.opendocument.field.FORMCHECKBOX"),
+ pFieldMark->GetFieldname());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf104032)
+{
+ // Open the document with FORMCHECKBOX field, select it and copy to clipboard
+ // Go to end of document and paste it, then undo
+ // Previously that asserted in debug build.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf104032.odt");
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ SwDoc aClipboard;
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->StartOfSection();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ pWrtShell->Copy(aClipboard);
+ pWrtShell->EndOfSection();
+ pWrtShell->Paste(aClipboard);
+ rUndoManager.Undo();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf104440)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf104440.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//page[2]/body/txt/anchored");
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ // This was 0: both Text Frames in the document were anchored to a
+ // paragraph on page 1, while we expect that the second Text Frame is
+ // anchored to a paragraph on page 2.
+ CPPUNIT_ASSERT_EQUAL(1, xmlXPathNodeSetGetLength(pXmlNodes));
+ xmlXPathFreeObject(pXmlObj);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf104425)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf104425.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // The document contains one top-level 1-cell table with minimum row height set to 70 cm,
+ // and the cell contents does not exceed the minimum row height.
+ // It should span over 3 pages.
+ assertXPath(pXmlDoc, "//page", 3);
+ sal_Int32 nHeight1
+ = getXPath(pXmlDoc, "//page[1]/body/tab/row/infos/bounds", "height").toInt32();
+ sal_Int32 nHeight2
+ = getXPath(pXmlDoc, "//page[2]/body/tab/row/infos/bounds", "height").toInt32();
+ sal_Int32 nHeight3
+ = getXPath(pXmlDoc, "//page[3]/body/tab/row/infos/bounds", "height").toInt32();
+ double fSumHeight_mm = o3tl::convert<double>(nHeight1 + nHeight2 + nHeight3, o3tl::Length::twip,
+ o3tl::Length::mm);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(700.0, fSumHeight_mm, 0.05);
+}
+
+// accepting change tracking gets stuck on change
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf104814)
+{
+ SwDoc* const pDoc1(createSwDoc(DATA_DIRECTORY, "tdf104814.docx"));
+
+ SwEditShell* const pEditShell(pDoc1->GetEditShell());
+
+ // accept all redlines
+ while (pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+}
+
+// crash at redo of accepting table change tracking imported from DOCX
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTableRedlineRedoCrash)
+{
+ SwDoc* const pDoc(createSwDoc(DATA_DIRECTORY, "TC-table-del-add.docx"));
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ // accept all redlines, Undo and accept all redlines again
+
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(/*bAccept=*/true);
+
+ rUndoManager.Undo();
+
+ // without the fix, it crashes
+ rIDRA.AcceptAllRedline(true);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTableRemoveHasTextChangesOnly)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-del-add.docx");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // disable Record Changes
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ // 4 rows in Show Changes mode
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+
+ // Accepting tracked deletions results 3 rows
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(/*bAccept=*/true);
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 3);
+
+ // Undo: 4 rows again
+ pDoc->GetIDocumentUndoRedo().Undo();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+
+ // Accepting again: 3 rows (Undo of HasTextChangesOnly is correct)
+ rIDRA.AcceptAllRedline(/*bAccept=*/true);
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 3);
+
+ // Undo: 4 rows again
+ pDoc->GetIDocumentUndoRedo().Undo();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+
+ // Move the cursor after the redline, and insert some text without change tracking
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Insert("X");
+
+ // Accepting again: 4 rows (extra text keeps the deleted row)
+ rIDRA.AcceptAllRedline(/*bAccept=*/true);
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+
+ // delete the extra text with change tracking:
+ // this resulted tracked row deletion again, because of missing
+ // removing of HasTextChangeOnly SwTabLine property at accepting deletions previously
+
+ // disable Record Changes
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ dispatchCommand(mxComponent, ".uno:SwBackSpace", {});
+ rIDRA.AcceptAllRedline(/*bAccept=*/true);
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 3
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTableRemoveHasTextChangesOnly2)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-del-add.docx");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // disable Record Changes
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ // check redline count
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(14), pEditShell->GetRedlineCount());
+
+ // 4 rows in Show Changes mode
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+
+ // Move the cursor to the tracked insertion, after the first redline to activate the
+ // acception of the whole table row insertion with a single "Accept Change"
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ Scheduler::ProcessEventsToIdle();
+ dispatchCommand(mxComponent, ".uno:AcceptTrackedChange", {});
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // Accepting tracked insertion results still 4 rows, but less redlines
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(11), pEditShell->GetRedlineCount());
+
+ // Undo: 4 rows again
+ pDoc->GetIDocumentUndoRedo().Undo();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(14), pEditShell->GetRedlineCount());
+
+ // To check Undo of HasTextChangesOnly reject the same row results 3 rows
+ dispatchCommand(mxComponent, ".uno:Escape", {});
+ dispatchCommand(mxComponent, ".uno:RejectTrackedChange", {});
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 4 (lost HasTextChangesOnly)
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 3);
+
+ // Undo: 4 rows again
+ pDoc->GetIDocumentUndoRedo().Undo();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(14), pEditShell->GetRedlineCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf147182_AcceptAllChangesInTableSelection)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-del-add.docx");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // check redline count
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(14), pEditShell->GetRedlineCount());
+
+ // 4 rows in Show Changes mode
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+
+ // Select the first table to get a table selection
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:AcceptTrackedChange", {});
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // Accepting tracked changes in the selected table results 3 rows
+ // This was 4 (only text changes of the first selected cell were accepted)
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 3);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(8), pEditShell->GetRedlineCount());
+
+ // Undo: 4 rows again
+ pDoc->GetIDocumentUndoRedo().Undo();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(14), pEditShell->GetRedlineCount());
+
+ // To check Undo of HasTextChangesOnly reject the same row results 3 rows
+ dispatchCommand(mxComponent, ".uno:Escape", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:RejectTrackedChange", {});
+ Scheduler::ProcessEventsToIdle();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 4 (only text changes of the first selected cell were rejected)
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 3);
+
+ // Undo: 4 rows again
+ pDoc->GetIDocumentUndoRedo().Undo();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row", 4);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(14), pEditShell->GetRedlineCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf66405)
+{
+ // Imported formula should have zero margins
+ createSwDoc(DATA_DIRECTORY, "tdf66405.docx");
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xEmbeddedObjectsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xEmbeddedObjects
+ = xEmbeddedObjectsSupplier->getEmbeddedObjects();
+ uno::Reference<beans::XPropertySet> xFormula;
+ xEmbeddedObjects->getByName(xEmbeddedObjects->getElementNames()[0]) >>= xFormula;
+ uno::Reference<beans::XPropertySet> xComponent;
+ xFormula->getPropertyValue("Component") >>= xComponent;
+
+ // Test embedded object's margins
+ sal_Int32 nLeftMargin, nRightMargin, nTopMargin, nBottomMargin;
+ xFormula->getPropertyValue("LeftMargin") >>= nLeftMargin;
+ xFormula->getPropertyValue("RightMargin") >>= nRightMargin;
+ xFormula->getPropertyValue("TopMargin") >>= nTopMargin;
+ xFormula->getPropertyValue("BottomMargin") >>= nBottomMargin;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nLeftMargin);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nRightMargin);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nTopMargin);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nBottomMargin);
+
+ // Test embedded object component's margins
+ xComponent->getPropertyValue("LeftMargin") >>= nLeftMargin;
+ xComponent->getPropertyValue("RightMargin") >>= nRightMargin;
+ xComponent->getPropertyValue("TopMargin") >>= nTopMargin;
+ xComponent->getPropertyValue("BottomMargin") >>= nBottomMargin;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nLeftMargin);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nRightMargin);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nTopMargin);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nBottomMargin);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf35021_tabOverMarginDemo)
+{
+#if HAVE_MORE_FONTS
+ createSwDoc(DATA_DIRECTORY, "tdf35021_tabOverMarginDemo.doc");
+ calcLayout();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Tabs should go past the margin @ ~3381
+ sal_Int32 nMargin = getXPath(pXmlDoc, "//body/txt[1]/infos/prtBounds", "width").toInt32();
+ // left tab was 3381 because it got its own full line
+ sal_Int32 nWidth
+ = getXPath(pXmlDoc, "//SwFixPortion[@type='PortionType::TabLeft']", "width").toInt32();
+ CPPUNIT_ASSERT_MESSAGE("Left Tab width is ~4479", nMargin < nWidth);
+ // center tab was 842
+ nWidth = getXPath(pXmlDoc, "//SwFixPortion[@type='PortionType::TabCenter']", "width").toInt32();
+ CPPUNIT_ASSERT_MESSAGE("Center Tab width is ~3521", nMargin < nWidth);
+ // right tab was probably the same as center tab.
+ nWidth = getXPath(pXmlDoc, "//SwFixPortion[@type='PortionType::TabRight']", "width").toInt32();
+ CPPUNIT_ASSERT_MESSAGE("Right Tab width is ~2907", sal_Int32(2500) < nWidth);
+ // decimal tab was 266
+ nWidth
+ = getXPath(pXmlDoc, "//SwFixPortion[@type='PortionType::TabDecimal']", "width").toInt32();
+ CPPUNIT_ASSERT_MESSAGE("Decimal Tab width is ~4096", nMargin < nWidth);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf106701_tabOverMarginAutotab)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf106701_tabOverMarginAutotab.doc");
+ calcLayout();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // The right margin is ~3378
+ sal_Int32 nRightMargin = getXPath(pXmlDoc, "//body/txt[1]/infos/prtBounds", "width").toInt32();
+ // Automatic tabstops should never be affected by tabOverMargin compatibility
+ // The 1st line's width previously was ~9506
+ sal_Int32 nWidth = getXPath(pXmlDoc, "//LineBreak[1]", "nWidth").toInt32();
+ CPPUNIT_ASSERT_MESSAGE("1st line's width is less than the right margin", nWidth < nRightMargin);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf104492)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf104492.docx");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // The document should split table over 3 pages.
+ assertXPath(pXmlDoc, "//page", 3);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf107025)
+{
+ // Tdf107025 - characters advance with wrong distance, so that
+ // they are cluttered because of negative value or
+ // break into multiple lines because of overflow.
+ // The test document uses DFKAI-SB shipped with Windows.
+ createSwDoc(DATA_DIRECTORY, "tdf107025.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Verify the number of characters in each line.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1),
+ getXPath(pXmlDoc, "(//SwLinePortion)[1]", "length").toInt32());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9),
+ getXPath(pXmlDoc, "(//SwLinePortion)[2]", "length").toInt32());
+
+ // Do the subsequent test only if the first line can be displayed,
+ // in case that the required font does not exist.
+ sal_Int32 nWidth1 = getXPath(pXmlDoc, "(//SwLinePortion)[1]", "width").toInt32();
+ if (!nWidth1)
+ return;
+
+ CPPUNIT_ASSERT(!parseDump("(//SwLinePortion)[2]", "width").isEmpty());
+ sal_Int32 nWidth2 = getXPath(pXmlDoc, "(//SwLinePortion)[2]", "width").toInt32();
+ sal_Int32 nRatio = nWidth2 / nWidth1;
+
+ CPPUNIT_ASSERT(nRatio >= 9); // Occupy at least 9 cells.
+ CPPUNIT_ASSERT(nRatio < 18); // Occupy at most 18 cells.
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf107362)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf107362.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nHeight
+ = getXPath(pXmlDoc, "(//Text[@nType='PortionType::Text'])[1]", "nHeight").toInt32();
+ sal_Int32 nWidth1
+ = getXPath(pXmlDoc, "(//Text[@nType='PortionType::Text'])[1]", "nWidth").toInt32();
+ sal_Int32 nWidth2
+ = getXPath(pXmlDoc, "(//Text[@nType='PortionType::Text'])[2]", "nWidth").toInt32();
+ sal_Int32 nLineWidth = getXPath(pXmlDoc, "//LineBreak", "nWidth").toInt32();
+ sal_Int32 nKernWidth = nLineWidth - nWidth1 - nWidth2;
+ // Test only if fonts are available
+ if (nWidth1 > 500 && nWidth2 > 200)
+ {
+ // Kern width should be smaller than 1/3 of the CJK font height.
+ CPPUNIT_ASSERT(nKernWidth * 3 < nHeight);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf105417)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf105417.odt");
+ CPPUNIT_ASSERT(pDoc);
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ CPPUNIT_ASSERT(pView);
+ uno::Reference<linguistic2::XHyphenator> xHyphenator = LinguMgr::GetHyphenator();
+ CPPUNIT_ASSERT(xHyphenator.is());
+ // If there are no English hyphenation rules installed, we can't test
+ // hyphenation.
+ if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString())))
+ return;
+
+ uno::Reference<linguistic2::XLinguProperties> xLinguProperties(LinguMgr::GetLinguPropertySet());
+ // Automatic hyphenation means not opening a dialog, but going ahead
+ // non-interactively.
+ xLinguProperties->setIsHyphAuto(true);
+ SwHyphWrapper aWrap(pView, xHyphenator, /*bStart=*/false, /*bOther=*/true,
+ /*bSelection=*/false);
+ // This never returned, it kept trying to hyphenate the last word
+ // (greenbacks) again and again.
+ aWrap.SpellDocument();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf105625)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf105625.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // Ensure correct initial setting
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Writer::Cursor::Option::IgnoreProtectedArea::set(false, batch);
+ batch->commit();
+ // We should be able to edit at positions adjacent to fields.
+ // Check if the start and the end of the 1st paragraph are not protected
+ // (they are adjacent to FORMCHECKBOX)
+ pWrtShell->SttPara();
+ CPPUNIT_ASSERT_EQUAL(false, pWrtShell->HasReadonlySel());
+ pWrtShell->EndPara();
+ CPPUNIT_ASSERT_EQUAL(false, pWrtShell->HasReadonlySel());
+ // 2nd paragraph - FORMTEXT
+ pWrtShell->Down(/*bSelect=*/false);
+ // Check selection across FORMTEXT field boundary - must be read-only
+ pWrtShell->SttPara();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ CPPUNIT_ASSERT_EQUAL(true, pWrtShell->HasReadonlySel());
+ // Test deletion of whole field with single backspace
+ // Previously it only removed right boundary of FORMTEXT, or failed removal at all
+ const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess();
+ sal_Int32 nMarksBefore = pMarksAccess->getAllMarksCount();
+ pWrtShell->EndPara();
+ pWrtShell->DelLeft();
+ sal_Int32 nMarksAfter = pMarksAccess->getAllMarksCount();
+ CPPUNIT_ASSERT_EQUAL(nMarksBefore, nMarksAfter + 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf125151_protected)
+{
+ // Similar to testTdf105625 except this is in a protected section,
+ // so read-only is already true when fieldmarks are considered.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf125151_protected.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // Ensure correct initial setting
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Writer::Cursor::Option::IgnoreProtectedArea::set(false, batch);
+ batch->commit();
+ pWrtShell->Down(/*bSelect=*/false);
+ // The cursor moved inside of the FieldMark textbox.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Readonly 1", false, pWrtShell->HasReadonlySel());
+ // Move left to the start/definition of the textbox
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Readonly 2", true, pWrtShell->HasReadonlySel());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf125151_protectedB)
+{
+ // Similar to testTdf105625 except this is protected with the Protect_Form compat setting
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf125151_protectedB.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // Ensure correct initial setting
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Writer::Cursor::Option::IgnoreProtectedArea::set(false, batch);
+ batch->commit();
+ // The cursor starts inside of the FieldMark textbox.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Readonly 1", false, pWrtShell->HasReadonlySel());
+ // Move left to the start/definition of the textbox
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Readonly 2", true, pWrtShell->HasReadonlySel());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf106736)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf106736-grid.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nWidth
+ = getXPath(pXmlDoc, "(//Text[@nType='PortionType::TabLeft'])[1]", "nWidth").toInt32();
+ // In tdf106736, width of tab overflow so that it got
+ // width value around 9200, expected value is around 103
+ CPPUNIT_ASSERT_MESSAGE("Left Tab width is ~103", nWidth < 150);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testMsWordCompTrailingBlanks)
+{
+ // The option is true in settings.xml
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "MsWordCompTrailingBlanksTrue.odt");
+ CPPUNIT_ASSERT_EQUAL(true, pDoc->getIDocumentSettingAccess().get(
+ DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS));
+ calcLayout();
+ // Check that trailing spaces spans have no width if option is enabled
+
+ CPPUNIT_ASSERT_EQUAL(OUString(), parseDump("/root/page/body/txt[2]/Text[4]", "nWidth"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), parseDump("/root/page/body/txt[2]/Text[5]", "nWidth"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), parseDump("/root/page/body/txt[3]/Text[4]", "nWidth"));
+ CPPUNIT_ASSERT_EQUAL(OUString(), parseDump("/root/page/body/txt[3]/Text[5]", "nWidth"));
+
+ // The option is false in settings.xml
+ pDoc = createSwDoc(DATA_DIRECTORY, "MsWordCompTrailingBlanksFalse.odt");
+ CPPUNIT_ASSERT_EQUAL(false, pDoc->getIDocumentSettingAccess().get(
+ DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS));
+ calcLayout();
+ // Check that trailing spaces spans have width if option is disabled
+ CPPUNIT_ASSERT(!parseDump("/root/page/body/txt[2]/Text[4]", "nWidth").isEmpty());
+ CPPUNIT_ASSERT(!parseDump("/root/page/body/txt[2]/Text[5]", "nWidth").isEmpty());
+ CPPUNIT_ASSERT(!parseDump("/root/page/body/txt[3]/Text[4]", "nWidth").isEmpty());
+ CPPUNIT_ASSERT(!parseDump("/root/page/body/txt[3]/Text[5]", "nWidth").isEmpty());
+
+ // MsWordCompTrailingBlanks option should be false by default in new documents
+ pDoc = createSwDoc();
+ CPPUNIT_ASSERT_EQUAL(false, pDoc->getIDocumentSettingAccess().get(
+ DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS));
+
+ // The option should be true if a .docx, .doc or .rtf document is opened
+ pDoc = createSwDoc(DATA_DIRECTORY, "MsWordCompTrailingBlanks.docx");
+ CPPUNIT_ASSERT_EQUAL(true, pDoc->getIDocumentSettingAccess().get(
+ DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testCreateDocxAnnotation)
+{
+ createSwDoc();
+
+ // insert an annotation with a text
+ const OUString aSomeText("some text");
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Text", uno::Any(aSomeText) },
+ { "Author", uno::Any(OUString("me")) },
+ });
+ dispatchCommand(mxComponent, ".uno:InsertAnnotation", aPropertyValues);
+
+ // Save it as DOCX & load it again
+ reload("Office Open XML Text", "create-docx-annotation.docx");
+
+ // get the annotation
+ 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);
+
+ // this was empty instead of "some text"
+ CPPUNIT_ASSERT_EQUAL(aSomeText, xField->getPropertyValue("Content").get<OUString>());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf107976)
+{
+ // Create a document and create two transferables.
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell& rShell = *pDoc->GetDocShell()->GetWrtShell();
+ rtl::Reference<SwTransferable> pTransferable(new SwTransferable(rShell));
+ rtl::Reference<SwTransferable> pTransferable2(new SwTransferable(rShell));
+ // Now close the document.
+ mxComponent->dispose();
+ mxComponent.clear();
+ // This failed: the first shell had a pointer to the deleted shell.
+ CPPUNIT_ASSERT(!pTransferable->GetShell());
+ CPPUNIT_ASSERT(!pTransferable2->GetShell());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf58604)
+{
+#ifdef _WIN32
+ // Allow linebreak character follows hanging punctuation immediately instead of
+ // breaking at the start of the next line.
+ createSwDoc(DATA_DIRECTORY, "tdf58604.odt");
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("PortionType::Break"),
+ parseDump("(/root/page/body/txt/LineBreak[1]/preceding::Text)[last()]", "nType"));
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf112025)
+{
+ mergeDocs("fdo112025.odt", "fdo112025-insert.docx");
+
+ CPPUNIT_ASSERT_EQUAL(3, getParagraphs());
+
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf72942)
+{
+ mergeDocs("fdo72942.docx", "fdo72942-insert.docx");
+
+ // check styles of paragraphs added from [fdo72942.docx]
+ const uno::Reference<text::XTextRange> xRun1 = getRun(getParagraph(1), 1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Default English (Liberation serif) text with "),
+ xRun1->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"),
+ getProperty<OUString>(xRun1, "CharFontName"));
+
+ const uno::Reference<text::XTextRange> xRun2 = getRun(getParagraph(2), 1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Header 1 English text (Liberation sans) with "),
+ xRun2->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Liberation Sans"), getProperty<OUString>(xRun2, "CharFontName"));
+
+ // check styles of paragraphs added from [fdo72942-insert.docx]
+ const uno::Reference<text::XTextRange> xRun3 = getRun(getParagraph(4), 1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Default German text (Calibri) with "), xRun3->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"),
+ getProperty<OUString>(xRun3, "CharFontName"));
+
+ const uno::Reference<text::XTextRange> xRun4 = getRun(getParagraph(5), 1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Header 1 German text (Calibri Light) with "),
+ xRun4->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Liberation Sans"), getProperty<OUString>(xRun4, "CharFontName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf114306)
+{
+ createSwDoc(DATA_DIRECTORY, "fdo114306.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // There are 2 long paragraphs in cell A1.
+ // A part of paragraph 2 should flow over to the second page but
+ // *not* the whole paragraph. There should be 2 paragraphs on
+ // page 1 and 1 paragraph on page 2.
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row[1]/cell[1]/txt", 2);
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab[1]/row[1]/cell[1]/txt", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf114306_2)
+{
+ // tdf#114306 fix unexpected page break in row-spanned table
+ // load regression document without writer crash
+ createSwDoc(DATA_DIRECTORY, "fdo114306_2.odt");
+
+ // correct number of pages
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+}
+
+// During insert of the document with list inside into the main document inside the list
+// we should merge both lists into one, when they have the same list properties
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf113877)
+{
+ mergeDocs("tdf113877_insert_numbered_list.odt", "tdf113877_insert_numbered_list.odt");
+
+ const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+ const OUString listId4 = getProperty<OUString>(getParagraph(4), "ListId");
+ const OUString listId5 = getProperty<OUString>(getParagraph(5), "ListId");
+ const OUString listId6 = getProperty<OUString>(getParagraph(6), "ListId");
+ const OUString listId7 = getProperty<OUString>(getParagraph(7), "ListId");
+
+ // the initial list with 4 list items
+ CPPUNIT_ASSERT_EQUAL(listId1, listId4);
+
+ // the last of the first list, and the first of the inserted list
+ CPPUNIT_ASSERT_EQUAL(listId4, listId5);
+ CPPUNIT_ASSERT_EQUAL(listId5, listId6);
+ CPPUNIT_ASSERT_EQUAL(listId6, listId7);
+}
+
+// The same test as testTdf113877() but merging of two list should not be performed.
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf113877NoMerge)
+{
+ mergeDocs("tdf113877_insert_numbered_list.odt", "tdf113877_insert_numbered_list_abcd.odt");
+
+ const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+ const OUString listId4 = getProperty<OUString>(getParagraph(4), "ListId");
+ const OUString listId5 = getProperty<OUString>(getParagraph(5), "ListId");
+ const OUString listId6 = getProperty<OUString>(getParagraph(6), "ListId");
+ const OUString listId7 = getProperty<OUString>(getParagraph(7), "ListId");
+
+ // the initial list with 4 list items
+ CPPUNIT_ASSERT_EQUAL(listId1, listId4);
+
+ // the last of the first list, and the first of the inserted list
+ CPPUNIT_ASSERT(listId4 != listId5);
+ CPPUNIT_ASSERT_EQUAL(listId5, listId6);
+ CPPUNIT_ASSERT(listId6 != listId7);
+}
+
+// Related test to testTdf113877(): Inserting into empty document a new document with list.
+// Insert position has NO its own paragraph style ("Standard" will be used).
+//
+// Resulting document should be the same for following tests:
+// - testTdf113877_default_style()
+// - testTdf113877_Standard_style()
+//
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf113877_default_style)
+{
+ mergeDocs(nullptr, "tdf113877_insert_numbered_list_abcd.odt");
+
+ const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+ const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+ const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
+
+ CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+ CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
+// Related test to testTdf113877(): Inserting into empty document a new document with list.
+// Insert position has its own paragraph style derived from "Standard", but this style is the same as "Standard".
+//
+// Resulting document should be the same for following tests:
+// - testTdf113877_default_style()
+// - testTdf113877_Standard_style()
+//
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf113877_Standard_style)
+{
+ mergeDocs("tdf113877_blank_ownStandard.odt", "tdf113877_insert_numbered_list_abcd.odt");
+
+ const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+ const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+ const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
+
+ CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+ CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf113877_blank_bold_on)
+{
+ mergeDocs("tdf113877_blank_bold_on.odt", "tdf113877_insert_numbered_list_abcd.odt");
+
+ const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+ const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+ const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
+
+ CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+ CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf113877_blank_bold_off)
+{
+ mergeDocs("tdf113877_blank_bold_off.odt", "tdf113877_insert_numbered_list_abcd.odt");
+
+ const OUString listId1 = getProperty<OUString>(getParagraph(1), "ListId");
+ const OUString listId2 = getProperty<OUString>(getParagraph(2), "ListId");
+ const OUString listId3 = getProperty<OUString>(getParagraph(3), "ListId");
+
+ CPPUNIT_ASSERT_EQUAL(listId1, listId2);
+ CPPUNIT_ASSERT_EQUAL(listId1, listId3);
+}
+
+// just care that this does crash/assert
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRhbz1810732) { mergeDocs(nullptr, "rhbz1810732.docx"); }
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf142157)
+{
+ mergeDocs(nullptr, "tdf142157.odt");
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1
+ // - Actual : 0
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx
new file mode 100644
index 000000000..5b5e1d147
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter5.cxx
@@ -0,0 +1,2992 @@
+/* -*- 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 <boost/property_tree/json_parser.hpp>
+
+#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/chart/XChartDocument.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <comphelper/propertysequence.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/configuration.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <vcl/scheduler.hxx>
+#include <vcl/settings.hxx>
+#include <ndtxt.hxx>
+#include <swdtflvr.hxx>
+#include <wrtsh.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <flyfrm.hxx>
+#include <fmtanchr.hxx>
+#include <UndoManager.hxx>
+#include <sortedobjs.hxx>
+#include <xmloff/odffields.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <comphelper/lok.hxx>
+#include <txtfrm.hxx>
+#include <view.hxx>
+#include <cmdid.h>
+#include <AnnotationWin.hxx>
+#include <PostItMgr.hxx>
+#include <fmtcntnt.hxx>
+#include <frameformats.hxx>
+#include <shellio.hxx>
+#include <editeng/fontitem.hxx>
+#include <tools/json_writer.hxx>
+#include <unotxdoc.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
+} // namespace
+
+/// Second set of tests asserting the behavior of Writer user interface shells.
+class SwUiWriterTest5 : public SwModelTestBase
+{
+public:
+ virtual std::unique_ptr<Resetter> preTest(const char* filename) override
+ {
+ m_aSavedSettings = Application::GetSettings();
+ if (OString(filename).indexOf("LocaleArabic") != -1)
+ {
+ std::unique_ptr<Resetter> pResetter(
+ new Resetter([this]() { Application::SetSettings(this->m_aSavedSettings); }));
+ AllSettings aSettings(m_aSavedSettings);
+ aSettings.SetLanguageTag(LanguageTag("ar"));
+ Application::SetSettings(aSettings);
+ return pResetter;
+ }
+ return nullptr;
+ }
+
+protected:
+ AllSettings m_aSavedSettings;
+};
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf139127)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf139127.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // two pages
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ // delete the last two characters with a page break at the end of the document
+ dispatchCommand(mxComponent, ".uno:GoToEndOfDoc", {});
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ dispatchCommand(mxComponent, ".uno:SwBackspace", {});
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ CPPUNIT_ASSERT_EQUAL(OUString("First page"), pTextDoc->getText()->getString());
+
+ // Undo
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ // this would crash due to bad redline range
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(OUString("First page"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("B"), getParagraph(2)->getString());
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf138479)
+{
+ SwDoc* const pDoc = createSwDoc();
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("Lorem");
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem"), getParagraph(1)->getString());
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE("redlines shouldn't be visible",
+ !IDocumentRedlineAccess::IsShowChanges(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ // delete "r" in "Lorem"
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 3, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("Loem"), getParagraph(1)->getString());
+
+ // delete "oe" in "Loem"
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 2, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("Lm"), getParagraph(1)->getString());
+
+ // test embedded Undo in ChangesInMargin mode
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("Loem"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem"), getParagraph(1)->getString());
+
+ // this would crash due to bad redline range
+ for (int i = 0; i < 5; ++i)
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+ CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf138666)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf39721.fodt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // show deletions inline
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("dolor sit"), getParagraph(2)->getString());
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ // show deletions in margin
+ CPPUNIT_ASSERT_EQUAL(OUString("Loremm"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("dolsit"), getParagraph(2)->getString());
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ // show deletions inline again
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("dolor sit"), getParagraph(2)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf140982)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf115815.odt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // show deletions inline
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum dolor sit amet..."), getParagraph(1)->getString());
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ // show deletions in margin
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem amet..."), getParagraph(1)->getString());
+
+ // switch off "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ // show deletions inline again
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum dolor sit amet..."), getParagraph(1)->getString());
+
+ // Save it and load it back.
+ reload("writer8", "tdf115815.odt");
+
+ // Test comment range feature on tracked deletion.
+ 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();
+ bool bAnnotationStart = false;
+ bool bBeforeAnnotation = true;
+ OUString sTextBeforeAnnotation;
+ while (xRunEnum->hasMoreElements())
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
+ OUString aType = getProperty<OUString>(xPropertySet, "TextPortionType");
+ // there is no AnnotationEnd with preceding AnnotationStart,
+ // i.e. annotation with lost range
+ CPPUNIT_ASSERT(aType != "AnnotationEnd" || !bAnnotationStart);
+
+ bAnnotationStart = (aType == "Annotation");
+
+ // collect paragraph text before the first annotation
+ if (bBeforeAnnotation)
+ {
+ if (bAnnotationStart)
+ bBeforeAnnotation = false;
+ else if (aType == "Text")
+ {
+ uno::Reference<text::XTextRange> xRun(xPropertySet, uno::UNO_QUERY);
+ sTextBeforeAnnotation += xRun->getString();
+ }
+ }
+ }
+
+ // This was "Lorem ipsum" (collapsed annotation range)
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), sTextBeforeAnnotation);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf126206)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf126206.docx");
+
+ // normal text (it was bold)
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 4)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ipsum"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xCursor, "CharWeight"));
+ }
+
+ // reject tracked changes
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // bold text again
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 3)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ipsum"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf50447)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf126206.docx");
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // bold text
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+
+ // remove bold formatting with change tracking
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Bold", {});
+
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 2)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xCursor, "CharWeight"));
+ }
+
+ // reject tracked changes
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // bold text again
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), xCursor->getString());
+ // This was NORMAL
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143918)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf126206.docx");
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // bold text
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+
+ // remove bold formatting with change tracking and after that, apply underline, too
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Bold", {});
+ dispatchCommand(mxComponent, ".uno:Underline", {});
+
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 2)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xCursor, "CharWeight"));
+ }
+
+ // reject tracked changes
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // bold text again
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), xCursor->getString());
+ // This was NORMAL (only underlining was removed)
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143938)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf54819.fodt");
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // select first paragraph, add underline without change tracking
+ pWrtShell->EndPara(/*bSelect=*/true);
+ dispatchCommand(mxComponent, ".uno:Underline", {});
+
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+ }
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // apply italic with change tracking
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:Italic", {});
+
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ // (first empty run is associated to the redline)
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 2)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+ }
+
+ // reject tracked changes
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // no italic, but still underline direct formatting
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum"), xCursor->getString());
+ // This wasn't underlined (lost direct formatting)
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143939)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf126206.docx");
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // bold text
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+
+ // positionate the text cursor inside the first word
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ // remove bold formatting with change tracking without selection
+ dispatchCommand(mxComponent, ".uno:Bold", {});
+
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 2)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::NORMAL, getProperty<float>(xCursor, "CharWeight"));
+ }
+
+ // reject tracked changes
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // bold text again
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem"), xCursor->getString());
+ // This was NORMAL
+ CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf50447_keep_hints)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf50447.fodt");
+
+ // first paragraph (_Lorem_ /ipsum/)
+
+ auto xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(1), 2));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(1), 3));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ipsum"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+ }
+
+ // second paragraph (_dolor_ sit /amet/.)
+
+ xText = getParagraph(2)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(2), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("dolor"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(2), 2));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString(" sit "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(2), 3));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("amet"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+ }
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // modify character formatting of the all the text
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SuperScript", {});
+
+ // multiple format redlines for the multiple hints
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // This was 1.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(7), pEditShell->GetRedlineCount());
+
+ // reject tracked changes
+
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // all hints and text portions between them got back the original formatting
+
+ xText = getParagraph(1)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem"), xCursor->getString());
+ // This was NONE
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(1), 2));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString(" "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(1), 3));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ipsum"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ // This was NONE
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+ }
+
+ // second paragraph (_dolor_ sit /amet/.)
+
+ xText = getParagraph(2)->getText();
+ CPPUNIT_ASSERT(xText.is());
+ {
+ auto xCursor(xText->createTextCursorByRange(getRun(getParagraph(2), 1)));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("dolor"), xCursor->getString());
+ // This was NONE
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::SINGLE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(2), 2));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString(" sit "), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+
+ xCursor = xText->createTextCursorByRange(getRun(getParagraph(2), 3));
+ CPPUNIT_ASSERT(xCursor.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("amet"), xCursor->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(awt::FontUnderline::NONE),
+ getProperty<sal_Int16>(xCursor, "CharUnderline"));
+ // This was NONE
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC,
+ getProperty<awt::FontSlant>(xCursor, "CharPosture"));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf144272)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf50447.fodt");
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // paragraph style of the first paragraph: Heading 1, second paragraph: Standard
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ // modify with track changes: Standard and Heading 2
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Standard")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+ pWrtShell->Down(/*bSelect=*/false);
+ aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 2")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ // reject tracked changes
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // This was Standard (missing reject)
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ // This was Heading 2 (missing reject)
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf101873)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // Insert some content.
+ pWrtShell->Insert("something");
+
+ // Search for something which does not exist, twice.
+ uno::Sequence<beans::PropertyValue> aFirst(comphelper::InitPropertySequence({
+ { "SearchItem.SearchString", uno::Any(OUString("fig")) },
+ { "SearchItem.Backward", uno::Any(false) },
+ }));
+ dispatchCommand(mxComponent, ".uno:ExecuteSearch", aFirst);
+ dispatchCommand(mxComponent, ".uno:ExecuteSearch", aFirst);
+
+ uno::Sequence<beans::PropertyValue> aSecond(comphelper::InitPropertySequence({
+ { "SearchItem.SearchString", uno::Any(OUString("something")) },
+ { "SearchItem.Backward", uno::Any(false) },
+ }));
+ dispatchCommand(mxComponent, ".uno:ExecuteSearch", aSecond);
+
+ // Without the accompanying fix in place, this test would have failed with "Expected: something;
+ // Actual:", i.e. searching for "something" failed, even if it was inserted above.
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+ CPPUNIT_ASSERT_EQUAL(OUString("something"), pShellCursor->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTextFormFieldInsertion)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert a text form field
+ dispatchCommand(mxComponent, ".uno:TextFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ // Check whether the fieldmark is created
+ auto aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ ::sw::mark::IFieldmark* pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMTEXT), pFieldmark->GetFieldname());
+
+ // The text form field has the placeholder text in it
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ sal_Unicode vEnSpaces[5] = { 8194, 8194, 8194, 8194, 8194 };
+ CPPUNIT_ASSERT_EQUAL(OUString(vEnSpaces, 5), xPara->getString());
+
+ // Undo insertion
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+ xPara.set(getParagraph(1));
+ CPPUNIT_ASSERT(xPara->getString().isEmpty());
+
+ // Redo insertion
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ xPara.set(getParagraph(1));
+ CPPUNIT_ASSERT_EQUAL(OUString(vEnSpaces, 5), xPara->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testCheckboxFormFieldInsertion)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert a checkbox form field
+ dispatchCommand(mxComponent, ".uno:CheckBoxFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ // Check whether the fieldmark is created
+ auto aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ ::sw::mark::IFieldmark* pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMCHECKBOX), pFieldmark->GetFieldname());
+ // The checkbox is not checked by default
+ ::sw::mark::ICheckboxFieldmark* pCheckBox
+ = dynamic_cast<::sw::mark::ICheckboxFieldmark*>(pFieldmark);
+ CPPUNIT_ASSERT(pCheckBox);
+ CPPUNIT_ASSERT(!pCheckBox->IsChecked());
+
+ // Undo insertion
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Redo insertion
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMCHECKBOX), pFieldmark->GetFieldname());
+
+ // tdf#147008 this would crash
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->StartOfSection(false);
+ pWrtShell->SplitNode();
+ CPPUNIT_ASSERT_EQUAL(pFieldmark->GetMarkPos().nNode, pFieldmark->GetOtherMarkPos().nNode);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(pFieldmark->GetMarkPos().nContent.GetIndex() + 1),
+ pFieldmark->GetOtherMarkPos().nContent.GetIndex());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testDropDownFormFieldInsertion)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert a drop-down form field
+ dispatchCommand(mxComponent, ".uno:DropDownFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ // Check whether the fieldmark is created
+ auto aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ ::sw::mark::IFieldmark* pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMDROPDOWN), pFieldmark->GetFieldname());
+ // Check drop down field's parameters. By default these params are not set
+ const sw::mark::IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
+ auto pListEntries = pParameters->find(ODF_FORMDROPDOWN_LISTENTRY);
+ CPPUNIT_ASSERT(bool(pListEntries == pParameters->end()));
+ auto pResult = pParameters->find(ODF_FORMDROPDOWN_RESULT);
+ CPPUNIT_ASSERT(bool(pResult == pParameters->end()));
+
+ // Undo insertion
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Redo insertion
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMDROPDOWN), pFieldmark->GetFieldname());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testMixedFormFieldInsertion)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert fields
+ dispatchCommand(mxComponent, ".uno:TextFormField", {});
+ dispatchCommand(mxComponent, ".uno:CheckBoxFormField", {});
+ dispatchCommand(mxComponent, ".uno:DropDownFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMarkAccess->getAllMarksCount());
+
+ // Undo insertion
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Redo insertion
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMarkAccess->getAllMarksCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf147723)
+{
+ SwDoc* const pDoc = createSwDoc(DATA_DIRECTORY, "tdf147723.docx");
+
+ IDocumentMarkAccess& rIDMA(*pDoc->getIDocumentMarkAccess());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), rIDMA.getAllMarksCount());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), rIDMA.getAllMarksCount());
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), rIDMA.getAllMarksCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), rIDMA.getAllMarksCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), rIDMA.getAllMarksCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf147006)
+{
+ SwDoc* const pDoc = createSwDoc(DATA_DIRECTORY, "tdf147006.rtf");
+
+ IDocumentMarkAccess& rIDMA(*pDoc->getIDocumentMarkAccess());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(std::iterator_traits<IDocumentMarkAccess::iterator>::difference_type(1),
+ std::distance(rIDMA.getFieldmarksBegin(), rIDMA.getFieldmarksEnd()));
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ // this crashed
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), rIDMA.getAllMarksCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getAllMarksCount());
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), rIDMA.getAllMarksCount());
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rIDMA.getAllMarksCount());
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), rIDMA.getAllMarksCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testDocxAttributeTableExport)
+{
+ createSwDoc(DATA_DIRECTORY, "floating-table-position.docx");
+
+ // get the table frame, set new values and dismiss the references
+ {
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+
+ // change the properties
+ // 8133 -> 8000
+ xShape->setPropertyValue("VertOrientPosition", uno::Any(static_cast<sal_Int32>(8000)));
+ // 5964 -> 5000
+ xShape->setPropertyValue("HoriOrientPosition", uno::Any(static_cast<sal_Int32>(5000)));
+ // 0 (frame) -> 8 (page print area)
+ xShape->setPropertyValue("VertOrientRelation", uno::Any(static_cast<sal_Int16>(8)));
+ // 8 (page print area) -> 0 (frame)
+ xShape->setPropertyValue("HoriOrientRelation", uno::Any(static_cast<sal_Int16>(0)));
+ }
+ // save it to docx
+ reload("Office Open XML Text", "floating-table-position.docx");
+
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+
+ // test the new values
+ sal_Int32 nValue = getProperty<sal_Int32>(xShape, "VertOrientPosition");
+ CPPUNIT_ASSERT(sal_Int32(7999) <= nValue);
+ CPPUNIT_ASSERT(nValue <= sal_Int32(8001));
+ nValue = getProperty<sal_Int32>(xShape, "HoriOrientPosition");
+ CPPUNIT_ASSERT(sal_Int32(4999) <= nValue);
+ CPPUNIT_ASSERT(nValue <= sal_Int32(5001));
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(8), getProperty<sal_Int16>(xShape, "VertOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf118699_redline_numbering)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118699.docx");
+
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+
+ uno::Reference<beans::XPropertySet> xProps(getParagraph(2), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("first paragraph after the first deletion: erroneous numbering",
+ !xProps->getPropertyValue("NumberingRules").hasValue());
+
+ CPPUNIT_ASSERT_MESSAGE(
+ "first paragraph after the second deletion: missing numbering",
+ getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(5), "NumberingRules")
+ .is());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf125881_redline_list_level)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf125881.docx");
+
+ uno::Reference<beans::XPropertySet> xProps(getParagraph(8), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("deleted paragraph: erroneous numbering",
+ !xProps->getPropertyValue("NumberingRules").hasValue());
+
+ // deleted paragraph gets the numbering of the next paragraph
+ uno::Reference<beans::XPropertySet> xProps2(getParagraph(9), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("first paragraph after the first deletion: missing numbering",
+ xProps2->getPropertyValue("NumberingRules").hasValue());
+
+ // check numbering level at deletion (1 instead of 0)
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(getParagraph(9), "NumberingLevel"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf125916_redline_restart_numbering)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf125916.docx");
+
+ // moveFrom/moveTo are imported as separated redlines from fixing tdf#145718.
+ // Accept the first inline moveFrom redline before accepting the remaining ones
+ // to leave a paragraph long deletion to test the fix for tdf#125916.
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT(pEditShell->GetRedlineCount() > 0);
+ pEditShell->AcceptRedline(0);
+
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+
+ // check unnecessary numbering
+ uno::Reference<beans::XPropertySet> xProps(getParagraph(3), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_MESSAGE("first paragraph after the first deletion: erroneous numbering",
+ !xProps->getPropertyValue("NumberingRules").hasValue());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf125310)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf125310.fodt");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // paragraph join
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // copied paragraph style
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+
+ // without copying the page break
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf125310b)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf125310b.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ // remove second paragraph with the page break
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Up(/*bSelect=*/true);
+ pWrtShell->DelLeft();
+
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+
+ // losing the page break, as without redlining
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf120336)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf120336.docx");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+
+ // keep page break, as without redlining
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf106843)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf106843.docx");
+
+ // try to turn off red-lining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ // but the protection doesn't allow it
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testImageComment)
+{
+ // Load a document with an as-char image in it.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "image-comment.odt");
+ SwView* pView = pDoc->GetDocShell()->GetView();
+
+ // Test document has "before<image>after", remove the content before the image.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStart=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, /*bBasicCall=*/false);
+ pWrtShell->Delete();
+
+ // Select the image.
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+
+ // Insert a comment while the image is selected.
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT, SfxCallMode::SYNCHRON);
+
+ // Verify that the comment is around the image.
+ // Without the accompanying fix in place, this test would have failed, as FN_POSTIT was disabled
+ // in the frame shell.
+ // Then this test would have failed, as in case the as-char anchored image was at the start of
+ // the paragraph, the comment of the image covered the character after the image, not the image.
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Annotation"),
+ getProperty<OUString>(getRun(xPara, 1), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Frame"),
+ getProperty<OUString>(getRun(xPara, 2), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("AnnotationEnd"),
+ getProperty<OUString>(getRun(xPara, 3), "TextPortionType"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),
+ getProperty<OUString>(getRun(xPara, 4), "TextPortionType"));
+
+ // Insert content to the comment, and select the image again.
+ SfxStringItem aItem(FN_INSERT_STRING, "x");
+ pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_STRING, SfxCallMode::SYNCHRON,
+ { &aItem });
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+
+#if !defined(MACOSX)
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ // Calc the left edge of the as-char frame.
+ SwRootFrame* pLayout = pWrtShell->GetLayout();
+ SwFrame* pPage = pLayout->GetLower();
+ SwFrame* pBody = pPage->GetLower();
+ SwFrame* pTextFrame = pBody->GetLower();
+ CPPUNIT_ASSERT(pTextFrame->GetDrawObjs());
+ const SwSortedObjs& rAnchored = *pTextFrame->GetDrawObjs();
+ CPPUNIT_ASSERT_GREATER(static_cast<size_t>(0), rAnchored.size());
+ SwAnchoredObject* pObject = rAnchored[0];
+ tools::Long nFrameLeft = pObject->GetObjRect().Left();
+ tools::Long nFrameTop = pObject->GetObjRect().Top();
+
+ // Make sure that the anchor points to the bottom left corner of the image.
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected less or equal than: 1418
+ // - Actual: 2442
+ // The anchor pointed to the bottom right corner, so as-char and at-char was inconsistent.
+ Scheduler::ProcessEventsToIdle();
+ SwPostItMgr* pPostItMgr = pView->GetPostItMgr();
+ for (const auto& pItem : *pPostItMgr)
+ {
+ const SwRect& rAnchor = pItem->mpPostIt->GetAnchorRect();
+ CPPUNIT_ASSERT_EQUAL(nFrameLeft, rAnchor.Left());
+ }
+
+ // Test the comment anchor we expose via the LOK API.
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1418, 1418, 0, 0
+ // - Actual : 1418, 1418, 1024, 1024
+ // I.e. the anchor position had a non-empty size, which meant different rendering via tiled
+ // rendering and on the desktop.
+ tools::JsonWriter aJsonWriter;
+ pTextDoc->getPostIts(aJsonWriter);
+ char* pChar = aJsonWriter.extractData();
+ std::stringstream aStream(pChar);
+ free(pChar);
+ boost::property_tree::ptree aTree;
+ boost::property_tree::read_json(aStream, aTree);
+ for (const boost::property_tree::ptree::value_type& rValue : aTree.get_child("comments"))
+ {
+ const boost::property_tree::ptree& rComment = rValue.second;
+ OString aAnchorPos(rComment.get<std::string>("anchorPos").c_str());
+ OString aExpected
+ = OString::number(nFrameLeft) + ", " + OString::number(nFrameTop) + ", 0, 0";
+ CPPUNIT_ASSERT_EQUAL(aExpected, aAnchorPos);
+ }
+
+#endif
+
+ // Now delete the image.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 0; Actual:
+ // 1', i.e. the comment of the image was not deleted when the image was deleted.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ pDoc->getIDocumentMarkAccess()->getAnnotationMarksCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testImageCommentAtChar)
+{
+ // Load a document with an at-char image in it.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "image-comment-at-char.odt");
+ SwView* pView = pDoc->GetDocShell()->GetView();
+
+ // Select the image.
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+
+ // Insert a comment while the image is selected.
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT, SfxCallMode::SYNCHRON);
+
+ // Verify that the comment is around the image.
+ // Without the accompanying fix in place, this test would have failed, as the comment was
+ // anchored at the end of the paragraph, it was not around the image.
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"),
+ getProperty<OUString>(getRun(xPara, 1), "TextPortionType"));
+ 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"));
+
+ // Insert content to the comment, and select the image again.
+ SfxStringItem aItem(FN_INSERT_STRING, "x");
+ pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_STRING, SfxCallMode::SYNCHRON,
+ { &aItem });
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ // Now delete the image.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 0; Actual:
+ // 1', i.e. the comment of the image was not deleted when the image was deleted.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ pDoc->getIDocumentMarkAccess()->getAnnotationMarksCount());
+
+ // Undo the deletion and move the image down, so the anchor changes.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
+ pDoc->getIDocumentMarkAccess()->getAnnotationMarksCount());
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ Point aNewAnchor = pWrtShell->GetFlyRect().TopLeft();
+ aNewAnchor.Move(0, 600);
+ pWrtShell->SetFlyPos(aNewAnchor);
+
+ // Get the image anchor doc model position.
+ SwFlyFrame* pFly = pWrtShell->GetCurrFlyFrame(false);
+ CPPUNIT_ASSERT(pFly);
+ SwFrameFormat& rFlyFormat = pFly->GetFrameFormat();
+ const SwPosition* pImageAnchor = rFlyFormat.GetAnchor().GetContentAnchor();
+ CPPUNIT_ASSERT(pImageAnchor);
+
+ // Get the annotation mark doc model start.
+ auto it = pDoc->getIDocumentMarkAccess()->getAnnotationMarksBegin();
+ CPPUNIT_ASSERT(it != pDoc->getIDocumentMarkAccess()->getAnnotationMarksEnd());
+ const sw::mark::IMark* pMark = *it;
+ const SwPosition& rAnnotationMarkStart = pMark->GetMarkPos();
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: SwPosition (node 14, offset 15)
+ // - Actual : SwPosition (node 12, offset 3)
+ // This means moving the image anchor did not move the comment anchor / annotation mark, so the
+ // image and its comment got out of sync.
+ CPPUNIT_ASSERT_EQUAL(*pImageAnchor, rAnnotationMarkStart);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTrackImageDeletion)
+{
+ // load a document with an image anchored to paragraph in it
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "image.odt");
+ SwView* pView = pDoc->GetDocShell()->GetView();
+
+ // select the image
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+
+ // turn on red-lining and show changes
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+
+ rIDRA.SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // now delete the image with track changes
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON);
+
+ const SwRedlineTable& rTable = rIDRA.GetRedlineTable();
+ // this was 0 (missing recording of deletion of images)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(1), rTable.size());
+
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ // tdf#142701 this was AS_CHARACTER (convert AT_PARA to AT_CHAR to keep the layout)
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty<text::TextContentAnchorType>(xShape, "AnchorType"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTrackImageInsertion)
+{
+ SwDoc* pDoc = createSwDoc();
+
+ // turn on red-lining and show changes
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+
+ rIDRA.SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // Insert an image with change tracking
+ OUString aImageURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "ole2.png";
+ uno::Sequence<beans::PropertyValue> aArgs = {
+ comphelper::makePropertyValue("FileName", aImageURL),
+ };
+ dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
+
+ const SwRedlineTable& rTable = rIDRA.GetRedlineTable();
+ // this was 0 (missing recording of insertion of images)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(1), rTable.size());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf120338)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf120338.docx");
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1),
+ getProperty<sal_Int32>(getParagraph(2), "ParaAdjust")); // right
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1),
+ getProperty<sal_Int32>(getParagraph(3), "ParaAdjust")); // right
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(4), "ParaAdjust")); // left
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1),
+ getProperty<sal_Int32>(getParagraph(5), "ParaAdjust")); // right
+
+ CPPUNIT_ASSERT_EQUAL(OUString(""),
+ getProperty<OUString>(getParagraph(7), "NumberingStyleName"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("WWNum2"),
+ getProperty<OUString>(getParagraph(8), "NumberingStyleName"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(10), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(11), "ParaStyleName"));
+
+ // reject tracked paragraph adjustments
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(2), "ParaAdjust")); // left
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3),
+ getProperty<sal_Int32>(getParagraph(3), "ParaAdjust")); // center
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3),
+ getProperty<sal_Int32>(getParagraph(4), "ParaAdjust")); // center
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(5), "ParaAdjust")); // left
+
+ // tdf#126245 revert numbering changes
+ CPPUNIT_ASSERT_EQUAL(OUString("WWNum2"),
+ getProperty<OUString>(getParagraph(7), "NumberingStyleName"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString(""),
+ getProperty<OUString>(getParagraph(8), "NumberingStyleName"));
+
+ // tdf#126243 revert paragraph styles
+ CPPUNIT_ASSERT_EQUAL(OUString("Standard"),
+ getProperty<OUString>(getParagraph(10), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 3"),
+ getProperty<OUString>(getParagraph(11), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf120338_multiple_paragraph_join)
+{
+ createSwDoc(DATA_DIRECTORY, "redline-para-join.docx");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+
+ // reject tracked paragraph styles
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"),
+ getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 2"),
+ getProperty<OUString>(getParagraph(2), "ParaStyleName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading 3"),
+ getProperty<OUString>(getParagraph(3), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testShapePageMove)
+{
+ // Load a document with 2 pages, shape on the first page.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "shape-page-move.odt");
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ // Make sure that the 2nd page is below the 1st one.
+ pView->SetViewLayout(/*nColumns=*/1, /*bBookMode=*/false);
+ calcLayout();
+
+ // Select the shape.
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ // Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
+ // SwView ctor.
+ pView->StopShellTimer();
+
+ // Move the shape down to the 2nd page.
+ SfxInt32Item aXItem(SID_ATTR_TRANSFORM_POS_X, 4000);
+ SfxInt32Item aYItem(SID_ATTR_TRANSFORM_POS_Y, 12000);
+ pView->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, SfxCallMode::SYNCHRON,
+ { &aXItem, &aYItem });
+
+ // Check if the shape anchor was moved to the 2nd page as well.
+ SwFrameFormats* pShapeFormats = pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(!pShapeFormats->empty());
+ auto it = pShapeFormats->begin();
+ SwFrameFormat* pShapeFormat = *it;
+ const SwPosition* pAnchor = pShapeFormat->GetAnchor().GetContentAnchor();
+ CPPUNIT_ASSERT(pAnchor);
+
+ // Find out the node index of the 1st para on the 2nd page.
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ SwFrame* pFirstPage = pLayout->Lower();
+ SwFrame* pSecondPage = pFirstPage->GetNext();
+ CPPUNIT_ASSERT(pSecondPage->IsLayoutFrame());
+ SwFrame* pBodyFrame = static_cast<SwLayoutFrame*>(pSecondPage)->GetLower();
+ CPPUNIT_ASSERT(pBodyFrame->IsLayoutFrame());
+ SwFrame* pTextFrame = static_cast<SwLayoutFrame*>(pBodyFrame)->GetLower();
+ CPPUNIT_ASSERT(pTextFrame->IsTextFrame());
+ SwNodeOffset nNodeIndex = static_cast<SwTextFrame*>(pTextFrame)->GetTextNodeFirst()->GetIndex();
+
+ // Without the accompanying fix in place, this test would have failed with "Expected: 13;
+ // Actual: 12", i.e. the shape was anchored to the last paragraph of the 1st page, not to a
+ // paragraph on the 2nd page.
+ CPPUNIT_ASSERT_EQUAL(nNodeIndex, pAnchor->nNode.GetIndex());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testDateFormFieldInsertion)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert a date form field
+ dispatchCommand(mxComponent, ".uno:DatePickerFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ // Check whether the fieldmark is created
+ auto aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ ::sw::mark::IFieldmark* pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMDATE), pFieldmark->GetFieldname());
+
+ // The date form field has the placeholder text in it
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ sal_Unicode vEnSpaces[5] = { 8194, 8194, 8194, 8194, 8194 };
+ CPPUNIT_ASSERT_EQUAL(OUString(vEnSpaces, 5), xPara->getString());
+
+ // Undo insertion
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Redo insertion
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMDATE), pFieldmark->GetFieldname());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testDateFormFieldContentOperations)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert a date form field
+ dispatchCommand(mxComponent, ".uno:DatePickerFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ // Check whether the fieldmark is created
+ auto aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ ::sw::mark::IDateFieldmark* pFieldmark = dynamic_cast<::sw::mark::IDateFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMDATE), pFieldmark->GetFieldname());
+
+ // Check the default content added by insertion
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ sal_Unicode vEnSpaces[5] = { 8194, 8194, 8194, 8194, 8194 };
+ CPPUNIT_ASSERT_EQUAL(OUString(vEnSpaces, 5), pFieldmark->GetContent());
+
+ // Set content to empty string
+ pFieldmark->ReplaceContent("");
+ CPPUNIT_ASSERT_EQUAL(OUString(""), pFieldmark->GetContent());
+
+ // Replace empty string with a valid content
+ pFieldmark->ReplaceContent("2019-10-23");
+ CPPUNIT_ASSERT_EQUAL(OUString("2019-10-23"), pFieldmark->GetContent());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testDateFormFieldCurrentDateHandling)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert a date form field
+ dispatchCommand(mxComponent, ".uno:DatePickerFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ // Check whether the fieldmark is created
+ auto aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ ::sw::mark::IDateFieldmark* pFieldmark = dynamic_cast<::sw::mark::IDateFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMDATE), pFieldmark->GetFieldname());
+
+ // The default content is not a valid date
+ uno::Reference<text::XTextRange> xPara = getParagraph(1);
+ sal_Unicode vEnSpaces[5] = { 8194, 8194, 8194, 8194, 8194 };
+ CPPUNIT_ASSERT_EQUAL(OUString(vEnSpaces, 5), pFieldmark->GetContent());
+ std::pair<bool, double> aResult = pFieldmark->GetCurrentDate();
+ CPPUNIT_ASSERT(!aResult.first);
+
+ // Check empty string
+ pFieldmark->ReplaceContent("");
+ aResult = pFieldmark->GetCurrentDate();
+ CPPUNIT_ASSERT(!aResult.first);
+
+ // Check valid date
+ // Set date format first
+ sw::mark::IFieldmark::parameter_map_t* pParameters = pFieldmark->GetParameters();
+ (*pParameters)[ODF_FORMDATE_DATEFORMAT] <<= OUString("YYYY/MM/DD");
+ (*pParameters)[ODF_FORMDATE_DATEFORMAT_LANGUAGE] <<= OUString("en-US");
+
+ // Set date value and check whether the content is formatted correctly
+ pFieldmark->SetCurrentDate(48000.0);
+ aResult = pFieldmark->GetCurrentDate();
+ CPPUNIT_ASSERT(aResult.first);
+ CPPUNIT_ASSERT_EQUAL(48000.0, aResult.second);
+ CPPUNIT_ASSERT_EQUAL(OUString("2031/06/01"), pFieldmark->GetContent());
+ // Current date param contains date in a "standard format"
+ OUString sCurrentDate;
+ auto pResult = pParameters->find(ODF_FORMDATE_CURRENTDATE);
+ if (pResult != pParameters->end())
+ {
+ pResult->second >>= sCurrentDate;
+ }
+ CPPUNIT_ASSERT_EQUAL(OUString("2031-06-01"), sCurrentDate);
+}
+
+#if !defined(_WIN32)
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testDateFormFieldCurrentDateInvalidation)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
+ CPPUNIT_ASSERT(pMarkAccess);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
+
+ // Insert a date form field
+ dispatchCommand(mxComponent, ".uno:DatePickerFormField", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+
+ // Check whether the fieldmark is created
+ auto aIter = pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT(aIter != pMarkAccess->getAllMarksEnd());
+ ::sw::mark::IDateFieldmark* pFieldmark = dynamic_cast<::sw::mark::IDateFieldmark*>(*aIter);
+ CPPUNIT_ASSERT(pFieldmark);
+ CPPUNIT_ASSERT_EQUAL(OUString(ODF_FORMDATE), pFieldmark->GetFieldname());
+
+ // Set a date first
+ sw::mark::IFieldmark::parameter_map_t* pParameters = pFieldmark->GetParameters();
+ pFieldmark->SetCurrentDate(48000.0);
+ std::pair<bool, double> aResult = pFieldmark->GetCurrentDate();
+ CPPUNIT_ASSERT(aResult.first);
+ CPPUNIT_ASSERT_EQUAL(48000.0, aResult.second);
+
+ // Do the layouting to trigger invalidation
+ // Since we have the current date consistent with the field content
+ // This invalidation won't change anything
+ calcLayout();
+ Scheduler::ProcessEventsToIdle();
+
+ // Current date param contains date in a "standard format"
+ OUString sCurrentDate;
+ auto pResult = pParameters->find(ODF_FORMDATE_CURRENTDATE);
+ if (pResult != pParameters->end())
+ {
+ pResult->second >>= sCurrentDate;
+ }
+ // We have the current date parameter set
+ CPPUNIT_ASSERT_EQUAL(OUString("2031-06-01"), sCurrentDate);
+
+ // Now change the content of the field
+ pFieldmark->ReplaceContent("[select date]");
+ // Do the layouting to trigger invalidation
+ calcLayout();
+ Scheduler::ProcessEventsToIdle();
+
+ sCurrentDate.clear();
+ pResult = pParameters->find(ODF_FORMDATE_CURRENTDATE);
+ if (pResult != pParameters->end())
+ {
+ pResult->second >>= sCurrentDate;
+ }
+ CPPUNIT_ASSERT_EQUAL(OUString(""), sCurrentDate);
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testOleSaveWhileEdit)
+{
+ // Enable LOK mode, otherwise OCommonEmbeddedObject::SwitchStateTo_Impl() will throw when it
+ // finds out that the test runs headless.
+ comphelper::LibreOfficeKit::setActive();
+
+ // Load a document with a Draw doc in it.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "ole-save-while-edit.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->GotoObj(/*bNext=*/true, GotoObjFlags::Any);
+
+ // Select the frame and switch to the frame shell.
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ pView->StopShellTimer();
+
+ // Start editing the OLE object.
+ pWrtShell->LaunchOLEObj();
+
+ // Save the document without existing the OLE edit.
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ xStorable->storeToURL(maTempFile.GetURL(), {});
+
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
+ = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
+ maTempFile.GetURL());
+ // Without the accompanying fix in place, this test would have failed: the OLE object lost its
+ // replacement on save if the edit was active while saving.
+ CPPUNIT_ASSERT(xNameAccess->hasByName("ObjectReplacements/Object 1"));
+
+ // Dispose the document while LOK is still active to avoid leaks.
+ mxComponent->dispose();
+ mxComponent.clear();
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf105330)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf105330.odt");
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SfxUInt16Item aRows(SID_ATTR_TABLE_ROW, 1);
+ SfxUInt16Item aColumns(SID_ATTR_TABLE_COLUMN, 1);
+ pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_TABLE, SfxCallMode::SYNCHRON,
+ { &aRows, &aColumns });
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+
+ // Without the accompanying fix in place, height was only 1 twips (practically invisible).
+ // Require at least 12pt height (font size under the cursor), in twips.
+ CPPUNIT_ASSERT_GREATEREQUAL(
+ static_cast<tools::Long>(240),
+ pWrtShell->GetVisibleCursor()->GetTextCursor().GetSize().getHeight());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf118311)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // Jump to the first cell, selecting its content
+ uno::Sequence<beans::PropertyValue> aSearch(comphelper::InitPropertySequence({
+ { "SearchItem.SearchString", uno::Any(OUString("a")) },
+ { "SearchItem.Backward", uno::Any(false) },
+ }));
+ dispatchCommand(mxComponent, ".uno:ExecuteSearch", aSearch);
+
+ // .uno:Cut doesn't remove the table, only the selected content of the first cell
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // .uno:SelectAll selects the whole table, and UNO command Cut cuts it
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowDeletion)
+{
+ // load a 1-row table, and delete the row with enabled change tracking:
+ // now the row is not deleted silently, but keeps the deleted cell contents,
+ // and only accepting all of them will result the deletion of the table row.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // delete table row with enabled change tracking
+ // (HasTextChangesOnly property of the row will be false)
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // This was deleted without change tracking
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // accept the deletion of the content of the first cell
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+ pEditShell->AcceptRedline(0);
+
+ // table row was still not deleted
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // accept last redline
+ pEditShell->AcceptRedline(0);
+
+ // table row (and the 1-row table) was deleted finally
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
+
+ // Undo, and repeat the previous test, but only with deletion of the text content of the cells
+ // (HasTextChangesOnly property will be removed by Undo)
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // table exists again
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // delete table row with enabled change tracking
+ dispatchCommand(mxComponent, ".uno:SelectRow", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+
+ // Table row still exists
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // accept the deletion of the content of the first cell
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+ pEditShell->AcceptRedline(0);
+
+ // table row was still not deleted
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // accept last redline
+ pEditShell->AcceptRedline(0);
+
+ // table row (and the 1-row table) still exists
+ // (HasTextChangesOnly property wasn't set for table row deletion)
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // Undo, and delete the row without change tracking
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // table exists again
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // disable change tracking
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ // delete table row without change tracking
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // the table (row) was deleted
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowDeletionWithExport)
+{
+ // load a 1-row table, and delete the row with enabled change tracking:
+ // now the row is not deleted silently, but keeps the deleted cell contents,
+ // and only accepting all of them will result the deletion of the table row.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // delete table row with enabled change tracking
+ // (HasTextChangesOnly property of the row will be false)
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // Deleted text content with change tracking,
+ // but not table deletion
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // Save it and load it back.
+ reload("writer8", "tdf60382_tracked_table_deletion.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pDoc = pTextDoc->GetDocShell()->GetWrtShell()->GetDoc();
+
+ // accept the deletion of the content of the first cell
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+ pEditShell->AcceptRedline(0);
+
+ // table row was still not deleted
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // accept last redline
+ pEditShell->AcceptRedline(0);
+
+ // table row (and the 1-row table) was deleted finally
+ // (working export/import of HasTextChangesOnly)
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowDeletionWithDOCXExport)
+{
+ // load a 1-row table, and delete the row with enabled change tracking:
+ // now the row is not deleted silently, but keeps the deleted cell contents,
+ // and only accepting all of them will result the deletion of the table row.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // delete table row with enabled change tracking
+ // (HasTextChangesOnly property of the row will be false)
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // Deleted text content with change tracking,
+ // but not table deletion
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // Save it to a DOCX and load it back.
+ // Exporting change tracking of the row wasn't supported.
+ // Also Manage Changes for the import.
+ reload("Office Open XML Text", "tdf79069_tracked_table_deletion.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pDoc = pTextDoc->GetDocShell()->GetWrtShell()->GetDoc();
+
+ // accept the deletion of the content of the first cell
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+ pEditShell->AcceptRedline(0);
+
+ // table row was still not deleted
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // accept last redline
+ pEditShell->AcceptRedline(0);
+
+ // table row (and the 1-row table) was deleted finally
+ // (working export/import of HasTextChangesOnly)
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineDOCXTableInsertion)
+{
+ // load a 3-row table inserted with change tracking by text to table conversion
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-converttotable.docx");
+
+ // check table count (1)
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // reject the text insertions of the table cells (also reject deletion of the tabulated
+ // text source of the table, which was used by the tracked text to table conversion)
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(10), pEditShell->GetRedlineCount());
+ while (pEditShell->GetRedlineCount())
+ pEditShell->RejectRedline(0);
+
+ // rejecting all text insertions must undo the table insertion
+ // This was 1 (remaining empty table after rejecting all table text insertions)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineDOCXTableMoveToFrame)
+{
+ // load a table with tracked drag & drop: Table1 is the moveFrom,
+ // Table2 is the moveTo - and framed - table
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-DnD-move.docx");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xTableNames = xTextTablesSupplier->getTextTables();
+ // check table count (2)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+
+ // accept tracked table moving, remaining table is Table2
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table2"));
+ CPPUNIT_ASSERT(!xTableNames->hasByName("Table1"));
+
+ // Undo and reject tracked table moving, remaining table is Table1
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ rIDRA.AcceptAllRedline(false);
+ // This was 2 (not deleted Table2 – framed)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
+ CPPUNIT_ASSERT(!xTableNames->hasByName("Table2"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143215)
+{
+ // load a table with tracked insertion of an empty row
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-rowadd.docx");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // check table count
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // check table row count
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+ // reject insertion of the empty table row
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(false);
+ // This was 4 (remained empty row)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+
+ // Undo and accept insertion of the table row
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ rIDRA.AcceptAllRedline(true);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+ // delete it with change tracking, and accept the deletion
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+ rIDRA.AcceptAllRedline(true);
+ // This was 4 (remained empty row)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf150666)
+{
+ // load a table with tracked insertion of an empty row
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-rowadd.docx");
+
+ // check table count
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // check table row count
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+ // select the second row (tracked table row insertion)
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+
+ // delete it, and accept all tracked changes
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+ // This was 4 (it was not possible to delete only the tracked row insertions)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+
+ // insert a new table row with track changes
+ dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+ // select and delete it
+ pWrtShell->Down(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+ // This was 4 (it was not possible to delete own tracked row insertions)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf150666_regression)
+{
+ // load a table with tracked insertion of an empty row
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "TC-table-rowadd.docx");
+
+ // check table count
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // check table row count
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+ // select the second row (tracked table row insertion)
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+
+ // insert a new table row with track changes
+ dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTable->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+
+ // This was 4 (the inserted table row wasn't tracked)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf144748)
+{
+ // load a table with an empty row, and an empty line before the table
+ // (to allow the easy selection of the full text with the table)
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf144748.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ // there is a table in the text
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // delete full text with the table and check Undo
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ // this crashed LibreOffice
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // redo and check redline usage
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // This was 2 (bad extra redline for the empty row of the deleted table)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(1), pEditShell->GetRedlineCount());
+
+ // accept deletion of the text, including the table with the empty row
+
+ IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
+ rIDRA.AcceptAllRedline(true);
+
+ // no table left in the text
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf128335)
+{
+ // Load the bugdoc, which has 3 textboxes.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf128335.odt");
+
+ // Select the 3rd textbox.
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ // Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
+ // SwView ctor.
+ pView->StopShellTimer();
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+
+ // Cut it.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
+
+ // Paste it: this makes the 3rd textbox anchored in the 2nd one.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_PASTE, SfxCallMode::SYNCHRON);
+
+ // Select all shapes.
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XSelectionSupplier> xSelectionSupplier(xModel->getCurrentController(),
+ uno::UNO_QUERY);
+ xSelectionSupplier->select(pXTextDocument->getDrawPages()->getByIndex(0));
+
+ // Cut them.
+ // Without the accompanying fix in place, this test would have crashed as the textboxes were
+ // deleted in an incorrect order.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowDeletionWithReject)
+{
+ // load a 1-row table, and delete the row with enabled change tracking:
+ // now the row is not deleted silently, but keeps the deleted cell contents,
+ // and only accepting all of them will result the deletion of the table row.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // delete table row with enabled change tracking
+ // (HasTextChangesOnly property of the row will be false)
+ dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+ // Deleted text content with change tracking,
+ // but not table deletion
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // Save it and load it back.
+ reload("writer8", "tdf60382_tracked_table_deletion.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pDoc = pTextDoc->GetDocShell()->GetWrtShell()->GetDoc();
+
+ // reject the deletion of the content of the first cell
+ // HasTextChangesOnly property of the table row will be true
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+ pEditShell->RejectRedline(0);
+
+ // Select and delete the content of the first cell
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+
+ // table row was still not deleted
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // accept all redlines
+ while (pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+
+ // This was table row deletion instead of remaining the empty row
+ // (HasTextChangesOnly was false)
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // restore HasTextChangesOnly = false
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // accept all redlines
+ while (pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+
+ // table row (and the 1-row table) was deleted finally
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableRowInsertionWithReject)
+{
+ // load a 1-row table, and insert a row with enabled change tracking
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table and its single row
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 1);
+
+ // insert rows before and after with enabled change tracking
+ // (HasTextChangesOnly property of the row will be false, and
+ // add dummy characters CH_TXT_TRACKED_DUMMY_CHAR)
+ dispatchCommand(mxComponent, ".uno:InsertRowsBefore", {});
+ dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // This was 0 (not tracked row insertion)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 3);
+
+ // reject redlines
+ pEditShell->RejectRedline(0);
+ pEditShell->RejectRedline(0);
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+ // This was 3 (not rejected row insertion)
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145089_RedlineTableRowInsertionDOCX)
+{
+ // load a 1-row table, and insert a row with enabled change tracking
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table and its single row
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 1);
+
+ // insert rows before and after with enabled change tracking
+ // (HasTextChangesOnly property of the row will be false, and
+ // add dummy characters CH_TXT_TRACKED_DUMMY_CHAR)
+ dispatchCommand(mxComponent, ".uno:InsertRowsBefore", {});
+ dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+
+ // save it to DOCX
+ reload("Office Open XML Text", "tdf145089.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwViewShell* pViewShell
+ = pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
+ pViewShell->Reformat();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 3);
+
+ // reject redlines
+ SwDoc* pDOCXDoc(pTextDoc->GetDocShell()->GetDoc());
+ SwEditShell* const pEditShell(pDOCXDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount());
+ pEditShell->RejectRedline(0);
+ pEditShell->RejectRedline(0);
+
+ discardDumpedLayout();
+
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+ // This was 3 (not rejected row insertion)
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testPasteTrackedTableRow)
+{
+ // load a 1-row table
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table count
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // check table row count
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+
+ // copy table row and paste it by Paste Special->Rows Above
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, ".uno:Escape", {});
+ dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
+
+ // 2-row table
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+
+ // This was 2 (inserted as a nested table in the first cell of the new row)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // Is it a tracked row insertion? Its rejection results the original 1-row table
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testPasteTrackedTableRowInHideChangesMode)
+{
+ // load a 1-row table
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118311.fodt");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE("redlines should be invisible",
+ !IDocumentRedlineAccess::IsShowChanges(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check table count
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // check table row count
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+
+ // copy table row and paste it by Paste Special->Rows Above
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, ".uno:Escape", {});
+
+ // This resulted freezing
+ dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
+
+ // 2-row table
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+
+ // This was 2 (inserted as a nested table in the first cell of the new row)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {}); // FIXME Why 3 Undos?
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf146966)
+{
+ // load a 4-row table, select more than 1 row and copy them
+ // to check insertion of unnecessary empty rows
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf144748.fodt");
+
+ // check table row count
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+ // copy table row and paste it by Paste Special->Rows Above
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, ".uno:Escape", {});
+ dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
+
+ // This was 35 (extra empty rows)
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8), xTable->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {}); // FIXME Why 3 Undos?
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable->getRows()->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8), xTable->getRows()->getCount());
+ // dispatchCommand(mxComponent, ".uno:Redo", {}); // FIXME assert
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145091)
+{
+ // load a deleted table, reject them, and delete only its text and export to DOCX
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf145091.docx");
+
+ // turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // reject all redlines
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(3), pEditShell->GetRedlineCount());
+ while (pEditShell->GetRedlineCount() > 0)
+ pEditShell->RejectRedline(0);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), pEditShell->GetRedlineCount());
+
+ // delete only table text, but not table
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+ CPPUNIT_ASSERT(pEditShell->GetRedlineCount() > 0);
+
+ // save it to DOCX
+ reload("Office Open XML Text", "tdf145091.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwViewShell* pViewShell
+ = pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
+ pViewShell->Reformat();
+ discardDumpedLayout();
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 3);
+
+ // accept all redlines
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+ discardDumpedLayout();
+
+ pXmlDoc = parseLayoutDump();
+ // This was false (deleted table with accepting deletions)
+ assertXPath(pXmlDoc, "//page[1]//body/tab");
+ assertXPath(pXmlDoc, "//page[1]//body/tab/row", 3);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf128603)
+{
+ // Load the bugdoc, which has 3 textboxes.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf128603.odt");
+
+ // Select the 3rd textbox.
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
+ // Make sure SwTextShell is replaced with SwDrawShell right now, not after 120 ms, as set in the
+ // SwView ctor.
+ pView->StopShellTimer();
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_TAB);
+ Scheduler::ProcessEventsToIdle();
+
+ // Cut it.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_CUT, SfxCallMode::SYNCHRON);
+
+ // Paste it: this makes the 3rd textbox anchored in the 2nd one.
+ pView->GetViewFrame()->GetDispatcher()->Execute(SID_PASTE, SfxCallMode::SYNCHRON);
+
+ // Undo all of this.
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+ rUndoManager.Undo();
+
+ // Make sure the content indexes still match.
+ const SwFrameFormats& rSpzFrameFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(6), rSpzFrameFormats.size());
+ const SwNodeIndex* pIndex4 = rSpzFrameFormats[4]->GetContent().GetContentIdx();
+ CPPUNIT_ASSERT(pIndex4);
+ const SwNodeIndex* pIndex5 = rSpzFrameFormats[5]->GetContent().GetContentIdx();
+ CPPUNIT_ASSERT(pIndex5);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 11
+ // - Actual : 14
+ // i.e. the shape content index and the frame content index did not match after undo, even if
+ // their "other text box format" pointers pointed to each other.
+ CPPUNIT_ASSERT_EQUAL(pIndex4->GetIndex(), pIndex5->GetIndex());
+}
+
+// only care that it doesn't assert/crash
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testOfz18563)
+{
+ OUString sURL(m_directories.getURLFromSrc(u"/sw/qa/extras/uiwriter/data/ofz18563.docx"));
+ SvFileStream aFileStream(sURL, StreamMode::READ);
+ TestImportDOCX(aFileStream);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143904)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf143904.odt");
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+
+ dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+ pWrtShell->Down(false);
+ pWrtShell->Insert("foo");
+
+ SwTextNode* pTextNodeA1 = static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex]);
+ CPPUNIT_ASSERT(pTextNodeA1->GetText().startsWith("Insert"));
+ nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ SwTextNode* pTextNodeA2 = static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex]);
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pTextNodeA2->GetText());
+ CPPUNIT_ASSERT_EQUAL(false, pTextNodeA2->GetSwAttrSet().HasItem(RES_CHRATR_FONT));
+ OUString sFontName = pTextNodeA2->GetSwAttrSet().GetItem(RES_CHRATR_FONT)->GetFamilyName();
+ CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sFontName);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf90069)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf90069.docx");
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+
+ dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {});
+ pWrtShell->Down(false);
+ pWrtShell->Insert("foo");
+
+ SwTextNode* pTextNodeA1 = static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex]);
+ CPPUNIT_ASSERT(pTextNodeA1->GetText().startsWith("Insert"));
+ nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ SwTextNode* pTextNodeA2 = static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex]);
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"), pTextNodeA2->GetText());
+ CPPUNIT_ASSERT_EQUAL(true, pTextNodeA2->GetSwAttrSet().HasItem(RES_CHRATR_FONT));
+ OUString sFontName = pTextNodeA2->GetSwAttrSet().GetItem(RES_CHRATR_FONT)->GetFamilyName();
+ CPPUNIT_ASSERT_EQUAL(OUString("Lohit Devanagari"), sFontName);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf109266)
+{
+ // transliteration with redlining
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "lorem.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ SwTextNode* pTextNode = static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex]);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum..."), pTextNode->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum..."), pTextNode->GetRedlineText());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToTitleCase", {});
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem Ipsum..."), pTextNode->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem Ipsum..."), pTextNode->GetRedlineText());
+
+ //turn on red-lining and show changes
+ RedlineFlags const mode(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ CPPUNIT_ASSERT(mode & (RedlineFlags::ShowDelete | RedlineFlags::ShowInsert));
+ pWrtShell->SetRedlineFlags(mode);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToTitleCase", {});
+
+ // This was "Lorem Ipsum..." (missing redlining)
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsumIpsum..."), pTextNode->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem Ipsum..."), pTextNode->GetRedlineText());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToUpper", {});
+
+ // This was "LOREM IPSUM..." (missing redlining)
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum...LOREM IPSUM..."), pTextNode->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("LOREM IPSUM..."), pTextNode->GetRedlineText());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToLower", {});
+
+ // This was "lorem ipsum..." (missing redlining)
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum...lorem ipsum..."), pTextNode->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("lorem ipsum..."), pTextNode->GetRedlineText());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:ChangeCaseToToggleCase", {});
+
+ // This was "lOREM IPSUM..." (missing redlining)
+ CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum...lOREM IPSUM..."), pTextNode->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("lOREM IPSUM..."), pTextNode->GetRedlineText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf129655)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf129655-vtextbox.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//anchored/fly/txt[@WritingMode='Vertical']", 1);
+}
+
+static uno::Reference<text::XTextRange> getAssociatedTextRange(uno::Any object)
+{
+ // possible cases:
+ // 1. a container of other objects - e.g. selection of 0 to n text portions, or 1 to n drawing objects
+ try
+ {
+ uno::Reference<container::XIndexAccess> xIndexAccess(object, uno::UNO_QUERY_THROW);
+ if (xIndexAccess.is() && xIndexAccess->getCount() > 0)
+ {
+ for (int i = 0; i < xIndexAccess->getCount(); ++i)
+ {
+ uno::Reference<text::XTextRange> xRange
+ = getAssociatedTextRange(xIndexAccess->getByIndex(i));
+ if (xRange.is())
+ return xRange;
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ }
+
+ // 2. another TextContent, having an anchor we can use
+ try
+ {
+ uno::Reference<text::XTextContent> xTextContent(object, uno::UNO_QUERY_THROW);
+ if (xTextContent.is())
+ {
+ uno::Reference<text::XTextRange> xRange = xTextContent->getAnchor();
+ if (xRange.is())
+ return xRange;
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ }
+
+ // an object which supports XTextRange directly
+ try
+ {
+ uno::Reference<text::XTextRange> xRange(object, uno::UNO_QUERY_THROW);
+ if (xRange.is())
+ return xRange;
+ }
+ catch (const uno::Exception&)
+ {
+ }
+
+ return nullptr;
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf123218)
+{
+ struct ReverseXAxisOrientationDoughnutChart
+ : public comphelper::ConfigurationProperty<ReverseXAxisOrientationDoughnutChart, bool>
+ {
+ static OUString path()
+ {
+ return "/org.openoffice.Office.Compatibility/View/ReverseXAxisOrientationDoughnutChart";
+ }
+ ~ReverseXAxisOrientationDoughnutChart() = delete;
+ };
+
+ struct ClockwisePieChartDirection
+ : public comphelper::ConfigurationProperty<ClockwisePieChartDirection, bool>
+ {
+ static OUString path()
+ {
+ return "/org.openoffice.Office.Compatibility/View/ClockwisePieChartDirection";
+ }
+ ~ClockwisePieChartDirection() = delete;
+ };
+ auto batch = comphelper::ConfigurationChanges::create();
+
+ ReverseXAxisOrientationDoughnutChart::set(false, batch);
+ ClockwisePieChartDirection::set(true, batch);
+ batch->commit();
+
+ createSwDoc();
+
+ // create an OLE shape in the document
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xMSF);
+ uno::Reference<beans::XPropertySet> xShapeProps(
+ xMSF->createInstance("com.sun.star.text.TextEmbeddedObject"), uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("CLSID",
+ uno::Any(OUString("12dcae26-281f-416f-a234-c3086127382e")));
+ uno::Reference<drawing::XShape> xShape(xShapeProps, uno::UNO_QUERY_THROW);
+ xShape->setSize(awt::Size(16000, 9000));
+ uno::Reference<text::XTextContent> chartTextContent(xShapeProps, uno::UNO_QUERY_THROW);
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XSelectionSupplier> xSelSupplier(xModel->getCurrentController(),
+ uno::UNO_QUERY_THROW);
+ uno::Any aSelection = xSelSupplier->getSelection();
+ uno::Reference<text::XTextRange> xTextRange = getAssociatedTextRange(aSelection);
+ CPPUNIT_ASSERT(xTextRange);
+ xTextRange->getText()->insertTextContent(xTextRange, chartTextContent, false);
+
+ // insert a doughnut chart
+ uno::Reference<frame::XModel> xDocModel;
+ xShapeProps->getPropertyValue("Model") >>= xDocModel;
+ CPPUNIT_ASSERT(xDocModel);
+ uno::Reference<chart::XChartDocument> xChartDoc(xDocModel, uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartDoc);
+ uno::Reference<lang::XMultiServiceFactory> xChartMSF(xChartDoc, uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartMSF);
+ uno::Reference<chart::XDiagram> xDiagram(
+ xChartMSF->createInstance("com.sun.star.chart.DonutDiagram"), uno::UNO_QUERY);
+ xChartDoc->setDiagram(xDiagram);
+
+ // test primary X axis Orientation value
+ uno::Reference<chart2::XChartDocument> xChartDoc2(xChartDoc, uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartDoc2);
+ uno::Reference<chart2::XCoordinateSystemContainer> xCooSysContainer(
+ xChartDoc2->getFirstDiagram(), uno::UNO_QUERY_THROW);
+ uno::Sequence<uno::Reference<chart2::XCoordinateSystem>> xCooSysSequence
+ = xCooSysContainer->getCoordinateSystems();
+ uno::Reference<chart2::XCoordinateSystem> xCoord = xCooSysSequence[0];
+ CPPUNIT_ASSERT(xCoord.is());
+ uno::Reference<chart2::XAxis> xAxis = xCoord->getAxisByDimension(0, 0);
+ CPPUNIT_ASSERT(xAxis.is());
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ CPPUNIT_ASSERT_EQUAL(chart2::AxisOrientation_MATHEMATICAL, aScaleData.Orientation);
+
+ // tdf#108059 test primary Y axis Orientation value
+ uno::Reference<chart2::XAxis> xYAxis = xCoord->getAxisByDimension(1, 0);
+ CPPUNIT_ASSERT(xYAxis.is());
+ aScaleData = xYAxis->getScaleData();
+ CPPUNIT_ASSERT_EQUAL(chart2::AxisOrientation_REVERSE, aScaleData.Orientation);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf93747)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ pWrtSh->Insert("Col1");
+
+ // Move the cursor to B1
+ pWrtSh->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ pWrtSh->Insert("Col2");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Col1"), xCellA1->getString());
+
+ uno::Reference<text::XTextRange> xCellB1(xTextTable->getCellByName("B1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Col2"), xCellB1->getString());
+
+ // Select backwards B1 and A1
+ pWrtSh->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 5, /*bBasicCall=*/false);
+
+ // Just select the whole B1
+ pWrtSh->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Style", uno::Any(OUString("Heading 1")) },
+ { "FamilyName", uno::Any(OUString("ParagraphStyles")) },
+ });
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Table Contents
+ // - Actual : Heading 1
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Table Contents"),
+ getProperty<OUString>(getParagraphOfText(1, xCellA1->getText()), "ParaStyleName"));
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Heading 1"),
+ getProperty<OUString>(getParagraphOfText(1, xCellB1->getText()), "ParaStyleName"));
+
+ // Now select A1 again
+ pWrtSh->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Heading 1"),
+ getProperty<OUString>(getParagraphOfText(1, xCellA1->getText()), "ParaStyleName"));
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Heading 1"),
+ getProperty<OUString>(getParagraphOfText(1, xCellB1->getText()), "ParaStyleName"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Table Contents"),
+ getProperty<OUString>(getParagraphOfText(1, xCellA1->getText()), "ParaStyleName"));
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Heading 1"),
+ getProperty<OUString>(getParagraphOfText(1, xCellB1->getText()), "ParaStyleName"));
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Table Contents"),
+ getProperty<OUString>(getParagraphOfText(1, xCellA1->getText()), "ParaStyleName"));
+
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Table Contents"),
+ getProperty<OUString>(getParagraphOfText(1, xCellB1->getText()), "ParaStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf126735)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf39721.fodt");
+
+ //turn on red-lining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // check next selected tracked change
+ dispatchCommand(mxComponent, ".uno:NextTrackedChange", {});
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XSelectionSupplier> xSelSupplier(xModel->getCurrentController(),
+ uno::UNO_QUERY_THROW);
+ uno::Any aSelection = xSelSupplier->getSelection();
+ uno::Reference<text::XTextRange> xTextRange = getAssociatedTextRange(aSelection);
+ CPPUNIT_ASSERT(xTextRange);
+ CPPUNIT_ASSERT_EQUAL(OUString(" ipsu"), xTextRange->getString());
+
+ // check next selected tracked change
+ dispatchCommand(mxComponent, ".uno:NextTrackedChange", {});
+ aSelection = xSelSupplier->getSelection();
+ xTextRange = getAssociatedTextRange(aSelection);
+ CPPUNIT_ASSERT(xTextRange);
+ CPPUNIT_ASSERT_EQUAL(OUString("or "), xTextRange->getString());
+
+ // check next selected tracked change at the end of the document:
+ // select the first tracked change of the document
+ dispatchCommand(mxComponent, ".uno:NextTrackedChange", {});
+ aSelection = xSelSupplier->getSelection();
+ xTextRange = getAssociatedTextRange(aSelection);
+ CPPUNIT_ASSERT(xTextRange);
+ // This was empty (collapsing at the end of the last tracked change)
+ CPPUNIT_ASSERT_EQUAL(OUString(" ipsu"), xTextRange->getString());
+
+ // check the previous tracked change at the start of the document:
+ // select the last tracked change of the document
+ dispatchCommand(mxComponent, ".uno:PreviousTrackedChange", {});
+ aSelection = xSelSupplier->getSelection();
+ xTextRange = getAssociatedTextRange(aSelection);
+ CPPUNIT_ASSERT(xTextRange);
+ // This was empty (collapsing at the start of the last tracked change)
+ CPPUNIT_ASSERT_EQUAL(OUString("or "), xTextRange->getString());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx
new file mode 100644
index 000000000..f12f8b57e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -0,0 +1,2352 @@
+/* -*- 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 <com/sun/star/drawing/FillStyle.hpp>
+#include <swmodeltestbase.hxx>
+#include <cntfrm.hxx>
+#include <itabenum.hxx>
+#include <ndtxt.hxx>
+#include <wrtsh.hxx>
+#include <drawdoc.hxx>
+#include <view.hxx>
+#include <com/sun/star/text/XTextColumns.hpp>
+
+#include <svx/svdpage.hxx>
+#include <svx/svdview.hxx>
+#include <svl/itemiter.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
+
+#include <dbfld.hxx>
+#include <txatbase.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <UndoManager.hxx>
+#include <unotools/syslocaleoptions.hxx>
+
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <o3tl/cppunittraitshelper.hxx>
+#include <swdtflvr.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <vcl/scheduler.hxx>
+#include <config_fonts.h>
+#include <test/htmltesttools.hxx>
+#include <wrthtml.hxx>
+#include <dbmgr.hxx>
+#include <rootfrm.hxx>
+#include <unotxdoc.hxx>
+#include <wrong.hxx>
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
+
+sal_Int32 lcl_getAttributeIDFromHints(const SwpHints& hints)
+{
+ for (size_t i = 0; i < hints.Count(); ++i)
+ {
+ const SwTextAttr* hint = hints.Get(i);
+ if (hint->Which() == RES_TXTATR_AUTOFMT)
+ {
+ const SwFormatAutoFormat& rFmt = hint->GetAutoFormat();
+ SfxItemIter aIter(*rFmt.GetStyleHandle());
+ return aIter.GetCurItem()->Which();
+ }
+ }
+ return -1;
+}
+
+void emulateTyping(SwXTextDocument& rXTextDocument, const std::u16string_view& rStr)
+{
+ for (const char16_t c : rStr)
+ {
+ rXTextDocument.postKeyEvent(LOK_KEYEVENT_KEYINPUT, c, 0);
+ rXTextDocument.postKeyEvent(LOK_KEYEVENT_KEYUP, c, 0);
+ Scheduler::ProcessEventsToIdle();
+ }
+}
+} //namespace
+
+class SwUiWriterTest6 : public SwModelTestBase, public HtmlTestTools
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf116640)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "Columns", uno::Any(sal_Int32(2)) } }));
+
+ dispatchCommand(mxComponent, ".uno:InsertSection", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextSection(xSections->getByIndex(0), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+ uno::Reference<text::XTextColumns> xTextColumns
+ = getProperty<uno::Reference<text::XTextColumns>>(xTextSection, "TextColumns");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Redo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf108524)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf108524.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // In total we expect two cells containing a section.
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/section", 2);
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell/section", 1);
+ // This was 0, section wasn't split, instead it was only on the first page
+ // and it was cut off.
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell/section", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testLinesInSectionInTable)
+{
+ // This is similar to testTdf108524(), but the page boundary now is not in
+ // the middle of a multi-line paragraph: the section only contains oneliner
+ // paragraphs instead.
+ createSwDoc(DATA_DIRECTORY, "lines-in-section-in-table.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // In total we expect two cells containing a section.
+ assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/section", 2);
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell/section", 1);
+ // This was 0, section wasn't split, instead it was only on the first page
+ // and it was cut off.
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell/section", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testLinesMoveBackwardsInSectionInTable)
+{
+#if HAVE_MORE_FONTS
+ // Assert that paragraph "4" is on page 1 and "5" is on page 2.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "lines-in-section-in-table.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page", 2);
+ SwNodeOffset nPara4Node(
+ getXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell[1]/section/txt[last()]", "txtNodeIndex")
+ .toUInt32());
+ CPPUNIT_ASSERT_EQUAL(OUString("4"), pDoc->GetNodes()[nPara4Node]->GetTextNode()->GetText());
+ SwNodeOffset nPara5Node(
+ getXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell[1]/section/txt[1]", "txtNodeIndex")
+ .toUInt32());
+ CPPUNIT_ASSERT_EQUAL(OUString("5"), pDoc->GetNodes()[nPara5Node]->GetTextNode()->GetText());
+
+ // Remove paragraph "4".
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ while (pWrtShell->GetCursor()->GetNode().GetIndex() < nPara4Node)
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara();
+ pWrtShell->Up(/*bSelect=*/true);
+ pWrtShell->DelLeft();
+
+ // Assert that paragraph "5" is now moved back to page 1 and is the last paragraph there.
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ SwNodeOffset nPage1LastNode(
+ getXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell[1]/section/txt[last()]", "txtNodeIndex")
+ .toUInt32());
+ // This was "3", paragraph "4" was deleted, but "5" was not moved backwards from page 2.
+ CPPUNIT_ASSERT_EQUAL(OUString("5"), pDoc->GetNodes()[nPage1LastNode]->GetTextNode()->GetText());
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTableInSection)
+{
+#if HAVE_MORE_FONTS
+ // The document has a section, containing a table that spans over 2 pages.
+ createSwDoc(DATA_DIRECTORY, "table-in-sect.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // In total we expect 4 cells.
+ assertXPath(pXmlDoc, "/root/page/body/section/tab/row/cell", 4);
+
+ // Assert that on both pages the section contains 2 cells.
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/tab/row/cell", 2);
+ assertXPath(pXmlDoc, "/root/page[2]/body/section/tab/row/cell", 2);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTableInNestedSection)
+{
+#if HAVE_MORE_FONTS
+ // The document has a nested section, containing a table that spans over 2 pages.
+ // This crashed the layout.
+ createSwDoc(DATA_DIRECTORY, "rhbz739252-3.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Make sure the table is inside a section and spans over 2 pages.
+ assertXPath(pXmlDoc, "//page[1]//section/tab", 1);
+ assertXPath(pXmlDoc, "//page[2]//section/tab", 1);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf112741)
+{
+#if HAVE_MORE_FONTS
+ createSwDoc(DATA_DIRECTORY, "tdf112741.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // This was 5 pages.
+ assertXPath(pXmlDoc, "//page", 4);
+ assertXPath(pXmlDoc, "//page[1]/body/tab/row/cell/tab/row/cell/section", 1);
+ assertXPath(pXmlDoc, "//page[2]/body/tab/row/cell/tab/row/cell/section", 1);
+ // This failed, 3rd page contained no sections.
+ assertXPath(pXmlDoc, "//page[3]/body/tab/row/cell/tab/row/cell/section", 1);
+ assertXPath(pXmlDoc, "//page[4]/body/tab/row/cell/tab/row/cell/section", 1);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf112860)
+{
+#if HAVE_MORE_FONTS
+ // The document has a split section inside a nested table, and also a table
+ // in the footer.
+ // This crashed the layout.
+ createSwDoc(DATA_DIRECTORY, "tdf112860.fodt");
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf113287)
+{
+#if HAVE_MORE_FONTS
+ createSwDoc(DATA_DIRECTORY, "tdf113287.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page", 2);
+ sal_uInt32 nCellTop
+ = getXPath(pXmlDoc, "//page[2]/body/tab/row/cell[1]/infos/bounds", "top").toUInt32();
+ sal_uInt32 nSectionTop
+ = getXPath(pXmlDoc, "//page[2]/body/tab/row/cell[1]/section/infos/bounds", "top")
+ .toUInt32();
+ // Make sure section frame is inside the cell frame.
+ // Expected greater than 4593, was only 3714.
+ CPPUNIT_ASSERT_GREATER(nCellTop, nSectionTop);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf113445)
+{
+#if HAVE_MORE_FONTS
+ // Force multiple-page view.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf113445.fodt");
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwView* pView = pDocShell->GetView();
+ pView->SetViewLayout(/*nColumns=*/2, /*bBookMode=*/false);
+ calcLayout();
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page", 2);
+ sal_uInt32 nPage1Left = getXPath(pXmlDoc, "//page[1]/infos/bounds", "left").toUInt32();
+ sal_uInt32 nPage2Left = getXPath(pXmlDoc, "//page[2]/infos/bounds", "left").toUInt32();
+ // Make sure that page 2 is on the right hand side of page 1, not below it.
+ CPPUNIT_ASSERT_GREATER(nPage1Left, nPage2Left);
+
+ // Insert a new paragraph at the start of the document.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->StartOfSection();
+ pWrtShell->SplitNode();
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+
+ // Make sure that Table2:C5 and Table2:D5 has its section frame inside the cell frame.
+ sal_uInt32 nCell3Top
+ = getXPath(pXmlDoc, "//page[2]/body/tab/row/cell/tab/row[4]/cell[3]/infos/bounds", "top")
+ .toUInt32();
+ sal_uInt32 nSection3Top
+ = getXPath(pXmlDoc, "//page[2]/body/tab/row/cell/tab/row[4]/cell[3]/section/infos/bounds",
+ "top")
+ .toUInt32();
+ CPPUNIT_ASSERT_GREATER(nCell3Top, nSection3Top);
+ sal_uInt32 nCell4Top
+ = getXPath(pXmlDoc, "//page[2]/body/tab/row/cell/tab/row[4]/cell[4]/infos/bounds", "top")
+ .toUInt32();
+ sal_uInt32 nSection4Top
+ = getXPath(pXmlDoc, "//page[2]/body/tab/row/cell/tab/row[4]/cell[4]/section/infos/bounds",
+ "top")
+ .toUInt32();
+ CPPUNIT_ASSERT_GREATER(nCell4Top, nSection4Top);
+ // Also check if the two cells in the same row have the same top position.
+ // This was 4818, expected only 1672.
+ CPPUNIT_ASSERT_EQUAL(nCell3Top, nCell4Top);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf113686)
+{
+#if HAVE_MORE_FONTS
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf113686.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page", 2);
+ SwNodeOffset nPage1LastNode(
+ getXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell[1]/tab/row/cell[1]/txt[last()]",
+ "txtNodeIndex")
+ .toUInt32());
+ CPPUNIT_ASSERT_EQUAL(OUString("Table2:A1-P10"),
+ pDoc->GetNodes()[nPage1LastNode]->GetTextNode()->GetText());
+ SwNodeOffset nPage2FirstNode(
+ getXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell[1]/section/txt[1]", "txtNodeIndex")
+ .toUInt32());
+ CPPUNIT_ASSERT_EQUAL(OUString("Table1:A1"),
+ pDoc->GetNodes()[nPage2FirstNode]->GetTextNode()->GetText());
+
+ // Remove page 2.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ while (pWrtShell->GetCursor()->Start()->nNode.GetIndex() < nPage1LastNode)
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara();
+ for (int i = 0; i < 3; ++i)
+ pWrtShell->Up(/*bSelect=*/true);
+ pWrtShell->DelLeft();
+
+ // Assert that the second page is removed.
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was still 2, content from 2nd page was not moved.
+ assertXPath(pXmlDoc, "/root/page", 1);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTableInSectionInTable)
+{
+#if HAVE_MORE_FONTS
+ // The document has a table, containing a section, containing a nested
+ // table.
+ // This crashed the layout.
+ createSwDoc(DATA_DIRECTORY, "i95698.odt");
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testSectionInTableInTable)
+{
+#if HAVE_MORE_FONTS
+ // The document has a nested table, containing a multi-line section at a
+ // page boundary.
+ // This crashed the layout later in SwFrame::IsFootnoteAllowed().
+ createSwDoc(DATA_DIRECTORY, "tdf112109.fodt");
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testSectionInTableInTable2)
+{
+#if HAVE_MORE_FONTS
+ createSwDoc(DATA_DIRECTORY, "split-section-in-nested-table.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_uInt32 nSection1
+ = getXPath(pXmlDoc, "//page[1]//body/tab/row/cell/tab/row/cell/section", "id").toUInt32();
+ sal_uInt32 nSection1Follow
+ = getXPath(pXmlDoc, "//page[1]//body/tab/row/cell/tab/row/cell/section", "follow")
+ .toUInt32();
+ // This failed, the section wasn't split inside a nested table.
+ sal_uInt32 nSection2
+ = getXPath(pXmlDoc, "//page[2]//body/tab/row/cell/tab/row/cell/section", "id").toUInt32();
+ sal_uInt32 nSection2Precede
+ = getXPath(pXmlDoc, "//page[2]//body/tab/row/cell/tab/row/cell/section", "precede")
+ .toUInt32();
+
+ // Make sure that the first's follow and the second's precede is correct.
+ CPPUNIT_ASSERT_EQUAL(nSection2, nSection1Follow);
+ CPPUNIT_ASSERT_EQUAL(nSection1, nSection2Precede);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testSectionInTableInTable3)
+{
+#if HAVE_MORE_FONTS
+ createSwDoc(DATA_DIRECTORY, "tdf113153.fodt");
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xTable(xTables->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Table16"), xTable->getName());
+
+ uno::Reference<text::XTextTable> xRowSupplier(xTable, uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xRows = xRowSupplier->getRows();
+ uno::Reference<beans::XPropertySet> xRow(xRows->getByIndex(1), uno::UNO_QUERY);
+ xRow->setPropertyValue("IsSplitAllowed", uno::Any(true));
+ // This never returned.
+ calcLayout();
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_uInt32 nTable1 = getXPath(pXmlDoc, "//page[1]//body/tab", "id").toUInt32();
+ sal_uInt32 nTable1Follow = getXPath(pXmlDoc, "//page[1]//body/tab", "follow").toUInt32();
+ sal_uInt32 nTable2 = getXPath(pXmlDoc, "//page[2]//body/tab", "id").toUInt32();
+ sal_uInt32 nTable2Precede = getXPath(pXmlDoc, "//page[2]//body/tab", "precede").toUInt32();
+ sal_uInt32 nTable2Follow = getXPath(pXmlDoc, "//page[2]//body/tab", "follow").toUInt32();
+ sal_uInt32 nTable3 = getXPath(pXmlDoc, "//page[3]//body/tab", "id").toUInt32();
+ sal_uInt32 nTable3Precede = getXPath(pXmlDoc, "//page[3]//body/tab", "precede").toUInt32();
+
+ // Make sure the outer table frames are linked together properly.
+ CPPUNIT_ASSERT_EQUAL(nTable2, nTable1Follow);
+ CPPUNIT_ASSERT_EQUAL(nTable1, nTable2Precede);
+ CPPUNIT_ASSERT_EQUAL(nTable3, nTable2Follow);
+ CPPUNIT_ASSERT_EQUAL(nTable2, nTable3Precede);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testSectionInTableInTable4)
+{
+#if HAVE_MORE_FONTS
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf113520.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page", 3);
+ SwNodeOffset nPage1LastNode(
+ getXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell[1]/tab/row/cell[1]/section/txt[last()]",
+ "txtNodeIndex")
+ .toUInt32());
+ CPPUNIT_ASSERT_EQUAL(OUString("Section1:P10"),
+ pDoc->GetNodes()[nPage1LastNode]->GetTextNode()->GetText());
+ SwNodeOffset nPage3FirstNode(
+ getXPath(pXmlDoc, "/root/page[3]/body/tab/row/cell[1]/tab/row/cell[1]/section/txt[1]",
+ "txtNodeIndex")
+ .toUInt32());
+ CPPUNIT_ASSERT_EQUAL(OUString("Section1:P23"),
+ pDoc->GetNodes()[nPage3FirstNode]->GetTextNode()->GetText());
+
+ // Remove page 2.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ while (pWrtShell->GetCursor()->Start()->nNode.GetIndex() < nPage1LastNode)
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara();
+ while (pWrtShell->GetCursor()->End()->nNode.GetIndex() < nPage3FirstNode)
+ pWrtShell->Down(/*bSelect=*/true);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ pWrtShell->DelLeft();
+
+ // Assert that the page is removed.
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ // This was 3, page 2 was emptied, but it wasn't removed.
+ assertXPath(pXmlDoc, "/root/page", 2);
+
+ // Make sure the outer table frames are linked together properly.
+ sal_uInt32 nTable1 = getXPath(pXmlDoc, "//page[1]//body/tab", "id").toUInt32();
+ sal_uInt32 nTable1Follow = getXPath(pXmlDoc, "//page[1]//body/tab", "follow").toUInt32();
+ sal_uInt32 nTable2 = getXPath(pXmlDoc, "//page[2]//body/tab", "id").toUInt32();
+ sal_uInt32 nTable2Precede = getXPath(pXmlDoc, "//page[2]//body/tab", "precede").toUInt32();
+ CPPUNIT_ASSERT_EQUAL(nTable2, nTable1Follow);
+ CPPUNIT_ASSERT_EQUAL(nTable1, nTable2Precede);
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf112160)
+{
+#if HAVE_MORE_FONTS
+ // Assert that the A2 cell is on page 1.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf112160.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ SwNodeOffset nA2CellNode(getXPath(pXmlDoc,
+ "/root/page[1]/body/tab/row[2]/cell[1]/section/txt[last()]",
+ "txtNodeIndex")
+ .toUInt32());
+ CPPUNIT_ASSERT_EQUAL(OUString("Table1.A2"),
+ pDoc->GetNodes()[nA2CellNode]->GetTextNode()->GetText());
+
+ // Append a new paragraph to the end of the A2 cell.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ while (pWrtShell->GetCursor()->GetNode().GetIndex() < nA2CellNode)
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->EndPara();
+ pWrtShell->SplitNode();
+
+ // Assert that after A2 got extended, D2 stays on page 1.
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ sal_uInt32 nD2CellNode
+ = getXPath(pXmlDoc, "/root/page[1]/body/tab/row[2]/cell[last()]/section/txt[last()]",
+ "txtNodeIndex")
+ .toUInt32();
+ // This was Table1.C2, Table1.D2 was moved to the next page, unexpected.
+ CPPUNIT_ASSERT_EQUAL(OUString("Table1.D2"),
+ pDoc->GetNodes()[SwNodeOffset(nD2CellNode)]->GetTextNode()->GetText());
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf114536)
+{
+ // This crashed in SwTextFormatter::MergeCharacterBorder() due to a
+ // use after free.
+ createSwDoc(DATA_DIRECTORY, "tdf114536.odt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testParagraphOfTextRange)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "paragraph-of-text-range.odt");
+
+ // Enter the table.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ CPPUNIT_ASSERT(pWrtShell->IsCursorInTable());
+ // Enter the section.
+ pWrtShell->Down(/*bSelect=*/false);
+ CPPUNIT_ASSERT(pWrtShell->IsDirectlyInSection());
+
+ // Assert that we get the right paragraph object.
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xController(xModel->getCurrentController(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xViewCursor = xController->getViewCursor();
+ // This failed as there were no TextParagraph property.
+ auto xParagraph
+ = getProperty<uno::Reference<text::XTextRange>>(xViewCursor->getStart(), "TextParagraph");
+ CPPUNIT_ASSERT_EQUAL(OUString("In section"), xParagraph->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf99689TableOfContents)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf99689.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->GotoNextTOXBase();
+ const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX();
+ pWrtShell->UpdateTableOf(*pTOXBase);
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode();
+ SwNodeIndex aIdx(*pTitleNode);
+ // skip the title
+ pDoc->GetNodes().GoNext(&aIdx);
+
+ // skip the first header. No attributes there.
+ // next node should contain superscript
+ SwTextNode* pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT(pNext->HasHints());
+ sal_uInt16 nAttrType = lcl_getAttributeIDFromHints(pNext->GetSwpHints());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_CHRATR_ESCAPEMENT), nAttrType);
+
+ // next node should contain subscript
+ pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT(pNext->HasHints());
+ nAttrType = lcl_getAttributeIDFromHints(pNext->GetSwpHints());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_CHRATR_ESCAPEMENT), nAttrType);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf99689TableOfFigures)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf99689_figures.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->GotoNextTOXBase();
+ const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX();
+ pWrtShell->UpdateTableOf(*pTOXBase);
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode();
+ SwNodeIndex aIdx(*pTitleNode);
+
+ // skip the title
+ // next node should contain subscript
+ SwTextNode* pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT(pNext->HasHints());
+ sal_uInt16 nAttrType = lcl_getAttributeIDFromHints(pNext->GetSwpHints());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_CHRATR_ESCAPEMENT), nAttrType);
+
+ // next node should contain superscript
+ pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT(pNext->HasHints());
+ nAttrType = lcl_getAttributeIDFromHints(pNext->GetSwpHints());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_CHRATR_ESCAPEMENT), nAttrType);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf99689TableOfTables)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf99689_tables.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->GotoNextTOXBase();
+ const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX();
+ pWrtShell->UpdateTableOf(*pTOXBase);
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode();
+ SwNodeIndex aIdx(*pTitleNode);
+
+ // skip the title
+ // next node should contain superscript
+ SwTextNode* pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT(pNext->HasHints());
+ sal_uInt16 nAttrType = lcl_getAttributeIDFromHints(pNext->GetSwpHints());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_CHRATR_ESCAPEMENT), nAttrType);
+
+ // next node should contain subscript
+ pNext = static_cast<SwTextNode*>(pDoc->GetNodes().GoNext(&aIdx));
+ CPPUNIT_ASSERT(pNext->HasHints());
+ nAttrType = lcl_getAttributeIDFromHints(pNext->GetSwpHints());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(RES_CHRATR_ESCAPEMENT), nAttrType);
+}
+
+// tdf#112448: Fix: take correct line height
+//
+// When line metrics is not calculated we need to call CalcRealHeight()
+// before usage of the Height() and GetRealHeight().
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf112448)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf112448.odt");
+
+ // check actual number of line breaks in the paragraph
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/txt/LineBreak", 2);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf113790)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf113790.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // Create the clipboard document.
+ SwDoc aClipboard;
+ aClipboard.SetClipBoard(true);
+
+ // Go to fourth line - to "ABCD" bulleted list item
+ pWrtShell->Down(/*bSelect=*/false, 4);
+ pWrtShell->SelPara(nullptr);
+ CPPUNIT_ASSERT_EQUAL(OUString("ABCD"), pWrtShell->GetSelText());
+ pWrtShell->Copy(aClipboard);
+
+ // Go down to next-to-last (empty) line above "Title3"
+ pWrtShell->Down(/*bSelect=*/false, 4);
+ pWrtShell->Paste(aClipboard);
+
+ // Save it as DOCX & load it again
+ reload("Office Open XML Text", "tdf113790.docx");
+ CPPUNIT_ASSERT(dynamic_cast<SwXTextDocument*>(mxComponent.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf108048)
+{
+ createSwDoc();
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
+ { "Kind", uno::Any(sal_Int16(3)) },
+ { "TemplateName", uno::Any(OUString("Default Page Style")) },
+ { "PageNumber", uno::Any(sal_uInt16(6)) }, // Even number to avoid auto-inserted blank page
+ { "PageNumberFilled", uno::Any(true) },
+ });
+ dispatchCommand(mxComponent, ".uno:InsertBreak", aPropertyValues);
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ // The inserted page must have page number set to 6
+ uno::Reference<text::XTextRange> xPara = getParagraph(2);
+ sal_uInt16 nPageNumber = getProperty<sal_uInt16>(xPara, "PageNumberOffset");
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(6), nPageNumber);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf113481)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf113481-IVS.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // One backspace should completely remove the CJK ideograph variation sequence
+ pWrtShell->EndPara();
+ // Before: U+8FBA U+E0102. After: empty
+ pWrtShell->DelLeft();
+ const uno::Reference<text::XTextRange> xPara1 = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xPara1->getString().getLength());
+
+ // In case that weak script is treated as CJK script, remove one character.
+ pWrtShell->Down(false);
+ pWrtShell->EndPara();
+ // Before: U+4E2D U+2205 U+FE00. After: U+4E2D U+2205
+ if (pWrtShell->GetScriptType() == SvtScriptType::ASIAN)
+ {
+ pWrtShell->DelLeft();
+ const uno::Reference<text::XTextRange> xPara2 = getParagraph(2);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xPara2->getString().getLength());
+ CPPUNIT_ASSERT_EQUAL(u'\x2205', xPara2->getString()[1]);
+ }
+
+ // Characters of other scripts, remove one character.
+ pWrtShell->Down(false);
+ pWrtShell->EndPara();
+ // Before: U+1820 U+180B. After: U+1820
+ pWrtShell->DelLeft();
+ const uno::Reference<text::XTextRange> xPara3 = getParagraph(3);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPara3->getString().getLength());
+ CPPUNIT_ASSERT_EQUAL(u'\x1820', xPara3->getString()[0]);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115013)
+{
+ const OUString sColumnName("Name with spaces, \"quotes\" and \\backslashes");
+
+ utl::TempFile aTempDir(nullptr, true);
+ aTempDir.EnableKillingFile();
+ const OUString aWorkDir = aTempDir.GetURL();
+
+ //create new writer document
+ SwDoc* pDoc = createSwDoc();
+
+ {
+ // Load and register data source
+ const OUString aDataSourceURI(m_directories.getURLFromSrc(DATA_DIRECTORY)
+ + "datasource.ods");
+ OUString sDataSource = SwDBManager::LoadAndRegisterDataSource(aDataSourceURI, &aWorkDir);
+ CPPUNIT_ASSERT(!sDataSource.isEmpty());
+
+ // Insert a new field type for the mailmerge field
+ SwDBData aDBData;
+ aDBData.sDataSource = sDataSource;
+ aDBData.sCommand = "Sheet1";
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwDBFieldType* pFieldType = static_cast<SwDBFieldType*>(
+ pWrtShell->InsertFieldType(SwDBFieldType(pDoc, sColumnName, aDBData)));
+ CPPUNIT_ASSERT(pFieldType);
+
+ // Insert the field into document
+ SwDBField aField(pFieldType);
+ pWrtShell->InsertField2(aField);
+ }
+ // Save it as DOCX & load it again
+ reload("Office Open XML Text", "mm-field.docx");
+
+ auto pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pDoc = pXTextDocument->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ CPPUNIT_ASSERT(pCursor);
+
+ // Get the field at the beginning of the document
+ SwDBField* pField = dynamic_cast<SwDBField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT(pField);
+ OUString sColumn = static_cast<SwDBFieldType*>(pField->GetTyp())->GetColumnName();
+ // The column name must come correct after round trip
+ CPPUNIT_ASSERT_EQUAL(sColumnName, sColumn);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115065)
+{
+ // In the document, the tables have table style assigned
+ // Source table (first one) has two rows;
+ // destination (second one) has only one row
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf115065.odt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ pWrtShell->GotoTable("Table2");
+ SwRect aRect = pWrtShell->GetCurrFrame()->getFrameArea();
+ // Destination point is the middle of the first cell of second table
+ Point ptTo(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2);
+
+ pWrtShell->GotoTable("Table1");
+ aRect = pWrtShell->GetCurrFrame()->getFrameArea();
+ // Source point is the middle of the first cell of first table
+ Point ptFrom(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2);
+
+ pWrtShell->SelTableCol();
+ // The copy operation (or closing document after that) segfaulted
+ pWrtShell->Copy(*pWrtShell, ptFrom, ptTo);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf84806_MovingMultipleTableRows)
+{
+ // Moving of multiple table rows.
+ // Source table (first one) has two rows;
+ // destination (second one) has only one row
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf115065.odt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ 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());
+ uno::Reference<container::XNameAccess> xTableNames = xTablesSupplier->getTextTables();
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table2"));
+ uno::Reference<text::XTextTable> xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable2(xTableNames->getByName("Table2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable2->getRows()->getCount());
+
+ // without redlining
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ pWrtShell->GotoTable("Table2");
+ SwRect aRect = pWrtShell->GetCurrFrame()->getFrameArea();
+ // Destination point is the middle of the first cell of second table
+ Point ptTo(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2);
+
+ // Move rows of the first table into the second table
+ pWrtShell->GotoTable("Table1");
+ pWrtShell->SelTable();
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->PrivateDrop(*pWrtShell, ptTo, /*bMove=*/true, /*bXSelection=*/true);
+
+ // This was 2 tables
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable2->getRows()->getCount());
+
+ // Undo results 2 tables
+ rUndoManager.Undo();
+ uno::Reference<container::XIndexAccess> xTables2(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables2->getCount());
+ uno::Reference<text::XTextTable> xTable1b(xTableNames->getByName("Table1"), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable2b(xTableNames->getByName("Table2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1b->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable2b->getRows()->getCount());
+
+ // FIXME assert with Redo()
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf147181_TrackedMovingOfMultipleTableRows)
+{
+ // Tracked moving of multiple table rows.
+ // Source table (first one) has two rows;
+ // destination (second one) has only one row
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf115065.odt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ 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());
+ uno::Reference<container::XNameAccess> xTableNames = xTablesSupplier->getTextTables();
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table2"));
+ uno::Reference<text::XTextTable> xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable2(xTableNames->getByName("Table2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable2->getRows()->getCount());
+
+ // FIXME: doesn't work with empty rows, yet
+ pWrtShell->Insert("x");
+ pWrtShell->Down(false);
+ pWrtShell->Insert("x");
+
+ // enable redlining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ // show changes
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ pWrtShell->GotoTable("Table2");
+ SwRect aRect = pWrtShell->GetCurrFrame()->getFrameArea();
+ // Destination point is the middle of the first cell of second table
+ Point ptTo(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2);
+
+ // Move rows of the first table into the second table
+ pWrtShell->GotoTable("Table1");
+ pWrtShell->SelTable();
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->PrivateDrop(*pWrtShell, ptTo, /*bMove=*/true, /*bXSelection=*/true);
+
+ // still 2 tables, but the second one has got 3 rows
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable2->getRows()->getCount());
+
+ // accept changes results 1 table (removing moved table)
+ dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+ Scheduler::ProcessEventsToIdle();
+ uno::Reference<container::XIndexAccess> xTables2(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables2->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable2->getRows()->getCount());
+
+ // Undo results 2 tables
+ rUndoManager.Undo();
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables2->getCount());
+ uno::Reference<text::XTextTable> xTable1b(xTableNames->getByName("Table1"), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable2b(xTableNames->getByName("Table2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1b->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable2b->getRows()->getCount());
+
+ // reject changes results 2 table again, with the original row counts
+ dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
+ uno::Reference<container::XIndexAccess> xTables3(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables3->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1b->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable2b->getRows()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf154599_MovingColumn)
+{
+ //create new writer document
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // Create a table with less columns, than row
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ (void)&pWrtShell->InsertTable(TableOpt, 4, 3);
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xTableNames = xTablesSupplier->getTextTables();
+ CPPUNIT_ASSERT(xTableNames->hasByName("Table1"));
+ uno::Reference<text::XTextTable> xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable1->getColumns()->getCount());
+
+ // without redlining
+ CPPUNIT_ASSERT_MESSAGE("redlining should be off",
+ !pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ // Move first column of the table before the third column by drag & drop
+
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ SwFrame* pPage = pLayout->Lower();
+ SwFrame* pBody = pPage->GetLower();
+ SwFrame* pTable = pBody->GetLower();
+ SwFrame* pRow1 = pTable->GetLower();
+ SwFrame* pCellA1 = pRow1->GetLower();
+ SwFrame* pCellC1 = pCellA1->GetNext()->GetNext();
+ const SwRect& rCellA1Rect = pCellA1->getFrameArea();
+ const SwRect& rCellC1Rect = pCellC1->getFrameArea();
+ Point ptTo(rCellC1Rect.Left() + rCellC1Rect.Width() / 2,
+ rCellC1Rect.Top() + rCellC1Rect.Height() / 2);
+ // select first table column by using the middle point of the top border of column A
+ Point ptColumn(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() - 5);
+ pWrtShell->SelectTableRowCol(ptColumn);
+
+ // This crashed here before the fix.
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+
+ xTransfer->PrivateDrop(*pWrtShell, ptTo, /*bMove=*/true, /*bXSelection=*/true);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable1->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132)
+{
+ SwDoc* pDoc = createSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ std::vector<OUString> vTestTableNames;
+
+ // Create an empty paragraph that will separate first table from the rest
+ pWrtShell->SplitNode();
+ pWrtShell->StartOfSection();
+ // Create a table at the start of document body
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ const SwTable* pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+ const SwTableFormat* pFormat = pTable->GetFrameFormat();
+ CPPUNIT_ASSERT(pFormat);
+ vTestTableNames.push_back(pFormat->GetName());
+ pWrtShell->EndOfSection();
+ // Create a table after a paragraph
+ pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+ pFormat = pTable->GetFrameFormat();
+ CPPUNIT_ASSERT(pFormat);
+ vTestTableNames.push_back(pFormat->GetName());
+ // Create a table immediately after the previous
+ pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+ pFormat = pTable->GetFrameFormat();
+ CPPUNIT_ASSERT(pFormat);
+ vTestTableNames.push_back(pFormat->GetName());
+ // Create a nested table in the middle of last row
+ pWrtShell->GotoTable(vTestTableNames.back());
+ for (int i = 0; i < 4; ++i)
+ pWrtShell->GoNextCell(false);
+ pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+ pFormat = pTable->GetFrameFormat();
+ CPPUNIT_ASSERT(pFormat);
+ vTestTableNames.push_back(pFormat->GetName());
+
+ // Now check that in any cell in all tables we don't go out of a cell
+ // using Delete or Backspace. We test cases when a table is the first node;
+ // when we are in a first/middle/last cell in a row; when there's a paragraph
+ // before/after this cell; when there's another table before/after this cell;
+ // in nested table.
+ for (const auto& rTableName : vTestTableNames)
+ {
+ pWrtShell->GotoTable(rTableName);
+ do
+ {
+ const SwStartNode* pNd = pWrtShell->GetCursor()->GetNode().FindTableBoxStartNode();
+ pWrtShell->DelRight();
+ CPPUNIT_ASSERT_EQUAL(pNd, pWrtShell->GetCursor()->GetNode().FindTableBoxStartNode());
+ pWrtShell->DelLeft();
+ CPPUNIT_ASSERT_EQUAL(pNd, pWrtShell->GetCursor()->GetNode().FindTableBoxStartNode());
+ } while (pWrtShell->GoNextCell(false));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testXDrawPagesSupplier)
+{
+ createSwDoc();
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_MESSAGE("XDrawPagesSupplier interface is unavailable", xDrawPagesSupplier.is());
+ uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSupplier->getDrawPages();
+ CPPUNIT_ASSERT(xDrawPages.is());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("There must be only a single DrawPage in Writer documents",
+ sal_Int32(1), xDrawPages->getCount());
+ uno::Any aDrawPage = xDrawPages->getByIndex(0);
+ uno::Reference<drawing::XDrawPage> xDrawPageFromXDrawPages(aDrawPage, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDrawPageFromXDrawPages.is());
+
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ "The DrawPage accessed using XDrawPages must be the same as using XDrawPageSupplier",
+ xDrawPage.get(), xDrawPageFromXDrawPages.get());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf116403)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf116403-considerborders.odt");
+ // Check that before ToX update, the tab stop position is the old one
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(2, "1\t1");
+ auto aTabs = getProperty<uno::Sequence<style::TabStop>>(xParagraph, "ParaTabStops");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aTabs.getLength());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(17000), aTabs[0].Position);
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ const SwTOXBase* pTOX = pWrtShell->GetTOX(0);
+ CPPUNIT_ASSERT(pTOX);
+ pWrtShell->UpdateTableOf(*pTOX);
+
+ xParagraph = getParagraph(2, "1\t1");
+ aTabs = getProperty<uno::Sequence<style::TabStop>>(xParagraph, "ParaTabStops");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aTabs.getLength());
+ // This was still 17000, refreshing ToX didn't take borders spacings and widths into account
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Page borders must be considered for right-aligned tabstop",
+ static_cast<sal_Int32>(17000 - 2 * 500 - 2 * 1),
+ aTabs[0].Position);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testHtmlCopyImages)
+{
+ // Load a document with an image.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "image.odt");
+
+ // Trigger the copy part of HTML copy&paste.
+ WriterRef xWrt = new SwHTMLWriter(/*rBaseURL=*/OUString());
+ CPPUNIT_ASSERT(xWrt.is());
+
+ xWrt->m_bWriteClipboardDoc = true;
+ xWrt->m_bWriteOnlyFirstTable = false;
+ xWrt->SetShowProgress(false);
+ {
+ SvFileStream aStream(maTempFile.GetURL(), StreamMode::WRITE | StreamMode::TRUNC);
+ SwWriter aWrt(aStream, *pDoc);
+ aWrt.Write(xWrt);
+ }
+ htmlDocUniquePtr pHtmlDoc = parseHtml(maTempFile);
+ CPPUNIT_ASSERT(pHtmlDoc);
+
+ // This failed, image was lost during HTML copy.
+ OUString aImage = getXPath(pHtmlDoc, "/html/body/p/img", "src");
+ // Also make sure that the image is not embedded (e.g. Word doesn't handle
+ // embedded images).
+ CPPUNIT_ASSERT(aImage.startsWith("file:///"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf116789)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf116789.fodt");
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText1;
+ uno::Reference<text::XText> xText2;
+ {
+ uno::Reference<text::XTextContent> xBookmark(
+ xBookmarksSupplier->getBookmarks()->getByName("Bookmark 1"), uno::UNO_QUERY);
+ xText1 = xBookmark->getAnchor()->getText();
+ }
+ {
+ uno::Reference<text::XTextContent> xBookmark(
+ xBookmarksSupplier->getBookmarks()->getByName("Bookmark 1"), uno::UNO_QUERY);
+ xText2 = xBookmark->getAnchor()->getText();
+ }
+ // This failed, we got two different SwXCell for the same bookmark anchor text.
+ CPPUNIT_ASSERT_EQUAL(xText1, xText2);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf91801)
+{
+ // Tests calculation with several user field variables without prior user fields
+ createSwDoc(DATA_DIRECTORY, "tdf91801.fodt");
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<table::XCell> xCell(xTable->getCellByName("A1"));
+ CPPUNIT_ASSERT_EQUAL(555.0, xCell->getValue());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf51223)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ pWrtShell->Insert("i");
+ pWrtShell->SplitNode(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("I"),
+ static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(OUString("i"),
+ static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testFontEmbedding)
+{
+#if HAVE_MORE_FONTS && !defined(MACOSX)
+ createSwDoc(DATA_DIRECTORY, "testFontEmbedding.odt");
+
+ OString aContentBaseXpath("/office:document-content/office:font-face-decls");
+ OString aSettingsBaseXpath("/office:document-settings/office:settings/config:config-item-set");
+
+ xmlDocUniquePtr pXmlDoc;
+ uno::Sequence<beans::PropertyValue> aDescriptor;
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+
+ // Get document settings
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xProps(
+ xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW);
+
+ // Check font embedding state
+ CPPUNIT_ASSERT_EQUAL(false, xProps->getPropertyValue("EmbedFonts").get<bool>());
+ CPPUNIT_ASSERT_EQUAL(false, xProps->getPropertyValue("EmbedOnlyUsedFonts").get<bool>());
+ // Font scripts should be enabled by default, however this has no effect unless "EmbedOnlyUsedFonts" is enabled
+ CPPUNIT_ASSERT_EQUAL(true, xProps->getPropertyValue("EmbedLatinScriptFonts").get<bool>());
+ CPPUNIT_ASSERT_EQUAL(true, xProps->getPropertyValue("EmbedAsianScriptFonts").get<bool>());
+ CPPUNIT_ASSERT_EQUAL(true, xProps->getPropertyValue("EmbedComplexScriptFonts").get<bool>());
+
+ // CASE 1 - no font embedding enabled
+
+ // Save the document
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+ CPPUNIT_ASSERT(aTempFile.IsValid());
+
+ // Check setting - No font embedding should be enabled
+ pXmlDoc = parseExportInternal(aTempFile.GetURL(), "settings.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedFonts']", "false");
+
+ // Check content - No font-face-src nodes should be present
+ pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face", 6);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans']");
+ assertXPath(
+ pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans']/svg:font-face-src", 0);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans1']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Sans1']/svg:font-face-src",
+ 0);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Serif']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Serif']/svg:font-face-src",
+ 0);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Serif1']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Serif1']/svg:font-face-src",
+ 0);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Carlito']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Carlito']/svg:font-face-src", 0);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Caladea']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Caladea']/svg:font-face-src", 0);
+
+ // CASE 2 - font embedding enabled, but embed used fonts disabled
+
+ // Enable font embedding, disable embedding used font only
+ xProps->setPropertyValue("EmbedFonts", uno::Any(true));
+ xProps->setPropertyValue("EmbedOnlyUsedFonts", uno::Any(false));
+
+ // Save the document again
+ xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+ CPPUNIT_ASSERT(aTempFile.IsValid());
+
+ // Check setting - font embedding should be enabled + embed only used fonts and scripts
+ pXmlDoc = parseExportInternal(aTempFile.GetURL(), "settings.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedFonts']", "true");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedOnlyUsedFonts']",
+ "false");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedLatinScriptFonts']",
+ "true");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedAsianScriptFonts']",
+ "true");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedComplexScriptFonts']",
+ "true");
+
+ // Check content - font-face-src should be present only for "Liberation Sans" fonts
+
+ pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face", 6);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans']");
+ assertXPath(
+ pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans']/svg:font-face-src", 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans1']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Sans1']/svg:font-face-src",
+ 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Serif']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Serif']/svg:font-face-src",
+ 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Serif1']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Serif1']/svg:font-face-src",
+ 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Carlito']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Carlito']/svg:font-face-src", 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Caladea']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Caladea']/svg:font-face-src", 1);
+
+ // CASE 3 - font embedding enabled, embed only used fonts enabled
+
+ // Enable font embedding and setting to embed used fonts only
+ xProps->setPropertyValue("EmbedFonts", uno::Any(true));
+ xProps->setPropertyValue("EmbedOnlyUsedFonts", uno::Any(true));
+ xProps->setPropertyValue("EmbedLatinScriptFonts", uno::Any(true));
+ xProps->setPropertyValue("EmbedAsianScriptFonts", uno::Any(true));
+ xProps->setPropertyValue("EmbedComplexScriptFonts", uno::Any(true));
+
+ // Save the document again
+ xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+ CPPUNIT_ASSERT(aTempFile.IsValid());
+
+ // Check setting - font embedding should be enabled + embed only used fonts and scripts
+ pXmlDoc = parseExportInternal(aTempFile.GetURL(), "settings.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedFonts']", "true");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedOnlyUsedFonts']",
+ "true");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedLatinScriptFonts']",
+ "true");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedAsianScriptFonts']",
+ "true");
+ assertXPathContent(
+ pXmlDoc, aSettingsBaseXpath + "/config:config-item[@config:name='EmbedComplexScriptFonts']",
+ "true");
+
+ // Check content - font-face-src should be present only for "Liberation Sans" fonts
+
+ pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face", 6);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans']");
+ assertXPath(
+ pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans']/svg:font-face-src", 0);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Sans1']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Sans1']/svg:font-face-src",
+ 0);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Serif']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Serif']/svg:font-face-src",
+ 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Liberation Serif1']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath
+ + "/style:font-face[@style:name='Liberation Serif1']/svg:font-face-src",
+ 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Carlito']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Carlito']/svg:font-face-src", 1);
+ assertXPath(pXmlDoc, aContentBaseXpath + "/style:font-face[@style:name='Caladea']");
+ assertXPath(pXmlDoc,
+ aContentBaseXpath + "/style:font-face[@style:name='Caladea']/svg:font-face-src", 0);
+#endif
+}
+
+// Unit test for fix inconsistent bookmark behavior around at-char/as-char anchored frames
+//
+// We have a placeholder character in the sw doc model for as-char anchored frames,
+// so it's possible to have a bookmark before/after the frame or a non-collapsed bookmark
+// which covers the frame. The same is not true for at-char anchored frames,
+// where the anchor points to a doc model position, but there is no placeholder character.
+// If a bookmark is created covering the start and end of the anchor of the frame,
+// internally we create a collapsed bookmark which has the same position as the anchor of the frame.
+// When this doc model is handled by SwXParagraph::createEnumeration(),
+// first the frame and then the bookmark is appended to the text portion enumeration,
+// so your bookmark around the frame is turned into a collapsed bookmark after the frame.
+// (The same happens when we roundtrip an ODT document representing this doc model.)
+//
+// Fix the problem by inserting collapsed bookmarks with affected anchor positions
+// (same position is the anchor for an at-char frame) into the enumeration in two stages:
+// first the start of them before frames and then the end of them + other bookmarks.
+// This way UNO API users get their non-collapsed bookmarks around at-char anchored frames,
+// similar to as-char ones.
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testInconsistentBookmark)
+{
+ // create test document with text and bookmark
+ {
+ SwDoc* pDoc(createSwDoc(DATA_DIRECTORY, "testInconsistentBookmark.ott"));
+ IDocumentMarkAccess& rIDMA(*pDoc->getIDocumentMarkAccess());
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwCursor aPaM(SwPosition(aIdx), nullptr);
+ aPaM.SetMark();
+ aPaM.MovePara(GoCurrPara, fnParaStart);
+ aPaM.MovePara(GoCurrPara, fnParaEnd);
+ rIDMA.makeMark(aPaM, "Mark", IDocumentMarkAccess::MarkType::BOOKMARK,
+ ::sw::mark::InsertMode::New);
+ aPaM.Exchange();
+ aPaM.DeleteMark();
+ }
+
+ // save document and verify the bookmark scoup
+ {
+ // save document
+ utl::TempFile aTempFile;
+ save("writer8", aTempFile);
+
+ // load only content.xml
+ if (xmlDocUniquePtr pXmlDoc = parseExportInternal(aTempFile.GetURL(), "content.xml"))
+ {
+ const OString aPath("/office:document-content/office:body/office:text/text:p");
+
+ const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark-start");
+ const int pos2 = getXPathPosition(pXmlDoc, aPath, "control");
+ const int pos3 = getXPathPosition(pXmlDoc, aPath, "bookmark-end");
+
+ CPPUNIT_ASSERT_GREATER(pos1, pos2);
+ CPPUNIT_ASSERT_GREATER(pos2, pos3);
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testSpellOnlineParameter)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ const SwViewOption* pOpt = pWrtShell->GetViewOptions();
+ bool bSet = pOpt->IsOnlineSpell();
+
+ uno::Sequence<beans::PropertyValue> params
+ = comphelper::InitPropertySequence({ { "Enable", uno::Any(!bSet) } });
+ dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+ CPPUNIT_ASSERT_EQUAL(!bSet, pOpt->IsOnlineSpell());
+
+ // set the same state as now and we don't expect any change (no-toggle)
+ params = comphelper::InitPropertySequence({ { "Enable", uno::Any(!bSet) } });
+ dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+ CPPUNIT_ASSERT_EQUAL(!bSet, pOpt->IsOnlineSpell());
+}
+
+// missing spelling dictionary on Windows test platform?
+#if !defined(_WIN32)
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf124603)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ const SwViewOption* pOpt = pWrtShell->GetViewOptions();
+ uno::Sequence<beans::PropertyValue> params
+ = comphelper::InitPropertySequence({ { "Enable", uno::Any(true) } });
+ dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+
+ // Automatic Spell Checking is enabled
+
+ CPPUNIT_ASSERT(pOpt->IsOnlineSpell());
+
+ // Type a correct word
+
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ emulateTyping(*pXTextDocument, u"the ");
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SwTextNode* pNode = pShell->GetCursor()->GetNode().GetTextNode();
+ // no bad word
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwWrongList*>(nullptr), pNode->GetWrong());
+
+ // Create a bad word from the good: "the" -> "thex"
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ emulateTyping(*pXTextDocument, u"x");
+ CPPUNIT_ASSERT(pNode->GetWrong());
+ // tdf#92036 pending spell checking
+ bool bPending = !pNode->GetWrong() || !pNode->GetWrong()->Count();
+ CPPUNIT_ASSERT(bPending);
+
+ // Move right, leave the bad word
+
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ CPPUNIT_ASSERT(pNode->GetWrong());
+ // tdf#92036 still pending spell checking
+ bPending = !pNode->GetWrong() || !pNode->GetWrong()->Count();
+ CPPUNIT_ASSERT(bPending);
+
+ // Move down to trigger spell checking
+
+ pWrtShell->Down(/*bSelect=*/false, 1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(pNode->GetWrong());
+ // This was 0 (pending spell checking)
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pNode->GetWrong()->Count());
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testRedlineAutoCorrect)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "redline-autocorrect.fodt");
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfDoc", {});
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ // show tracked deletion with enabled change tracking
+ RedlineFlags const nMode(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ CPPUNIT_ASSERT(nMode & (RedlineFlags::ShowDelete | RedlineFlags::ShowInsert));
+ pWrtShell->SetRedlineFlags(nMode);
+ CPPUNIT_ASSERT(nMode & RedlineFlags::ShowDelete);
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+
+ emulateTyping(*pXTextDocument, u" ");
+
+ // tdf#83419 This was "Ts " removing the deletion of "t" silently by sentence capitalization
+ OUString sReplaced("ts ");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // hide delete redlines
+ pWrtShell->SetRedlineFlags(nMode & ~RedlineFlags::ShowDelete);
+
+ // repeat it with not visible redlining
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ emulateTyping(*pXTextDocument, u" ");
+
+ sReplaced = "S ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // show delete redlines
+ pWrtShell->SetRedlineFlags(nMode);
+
+ // This still keep the tracked deletion, capitalize only the visible text "s"
+ // with tracked deletion of the original character
+ sReplaced = "tsS ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // repeat it with visible redlining and word auto replacement of "tset"
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ emulateTyping(*pXTextDocument, u"et ");
+ // This was "Ttest" removing the tracked deletion silently.
+ // Don't replace, if a redline starts or ends within the text.
+ sReplaced = "tset ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // Otherwise replace it
+ emulateTyping(*pXTextDocument, u"tset ");
+ sReplaced = "tset test ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // Including capitalization
+ emulateTyping(*pXTextDocument, u"end. word ");
+ sReplaced = "tset test end. Word ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // tracked deletions after the correction point doesn't affect autocorrect
+ dispatchCommand(mxComponent, ".uno:GoToStartOfDoc", {});
+ emulateTyping(*pXTextDocument, u"a ");
+ sReplaced = "A tset test end. Word ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testRedlineAutoCorrect2)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "redline-autocorrect2.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ dispatchCommand(mxComponent, ".uno:GoToEndOfDoc", {});
+
+ // show tracked deletion
+ RedlineFlags const nMode(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ CPPUNIT_ASSERT(nMode & (RedlineFlags::ShowDelete | RedlineFlags::ShowInsert));
+ pWrtShell->SetRedlineFlags(nMode);
+ CPPUNIT_ASSERT(nMode & RedlineFlags::ShowDelete);
+
+ emulateTyping(*pXTextDocument, u"... ");
+
+ // This was "LoremLorem,…," (duplicating the deleted comma, but without deletion)
+ // Don't replace, if a redline starts or ends within the text.
+ OUString sReplaced = "Lorem,... ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // Continue it:
+ emulateTyping(*pXTextDocument, u"Lorem,... ");
+ sReplaced = u"Lorem,... Lorem,… ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testEmojiAutoCorrect)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "redline-autocorrect2.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ // Emoji replacement (:snowman: -> ☃)
+
+ // without change tracking
+ CPPUNIT_ASSERT(!(pWrtShell->GetRedlineFlags() & RedlineFlags::On));
+ emulateTyping(*pXTextDocument, u":snowman:");
+ OUString sReplaced = u"☃Lorem,";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // with change tracking (showing redlines)
+ RedlineFlags const nMode(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ CPPUNIT_ASSERT(nMode & (RedlineFlags::ShowDelete | RedlineFlags::ShowInsert));
+ pWrtShell->SetRedlineFlags(nMode);
+ CPPUNIT_ASSERT(nMode & RedlineFlags::On);
+ CPPUNIT_ASSERT(nMode & RedlineFlags::ShowDelete);
+
+ emulateTyping(*pXTextDocument, u":snowman:");
+ sReplaced = u"☃☃Lorem,";
+
+ // tdf#140674 This was ":snowman:" instead of autocorrect
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf108423)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // testing autocorrect of i' -> I' on start of first paragraph
+ emulateTyping(*pXTextDocument, u"i'");
+ // The word "i" should be capitalized due to autocorrect, followed by a typographical apostrophe
+ OUString sIApostrophe(u"I\u2019");
+ CPPUNIT_ASSERT_EQUAL(sIApostrophe, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u" i'");
+ OUString sText(sIApostrophe + u" " + sIApostrophe);
+ CPPUNIT_ASSERT_EQUAL(sText, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf106164)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // testing autocorrect of we're -> We're on start of first paragraph
+ emulateTyping(*pXTextDocument, u"we're ");
+ CPPUNIT_ASSERT_EQUAL(OUString(u"We\u2019re "), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf54409)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // testing autocorrect of "tset -> "test with typographical double quotation mark U+201C
+ emulateTyping(*pXTextDocument, u"\"test ");
+ OUString sReplaced(u"\u201Ctest ");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // testing autocorrect of test" -> test" with typographical double quotation mark U+201D
+ emulateTyping(*pXTextDocument, u"and tset\" ");
+ OUString sReplaced2(sReplaced + u"and test\u201D ");
+ CPPUNIT_ASSERT_EQUAL(sReplaced2, getParagraph(1)->getString());
+ // testing autocorrect of "tset" -> "test" with typographical double quotation mark U+201C and U+201D
+ emulateTyping(*pXTextDocument, u"\"tset\" ");
+ OUString sReplaced3(sReplaced2 + u"\u201Ctest\u201D ");
+ CPPUNIT_ASSERT_EQUAL(sReplaced3, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf38394)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf38394.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // testing autocorrect of French l'" -> l'« (instead of l'»)
+ emulateTyping(*pXTextDocument, u"l'\"");
+ OUString sReplaced(u"l\u2019« ");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // tdf#132301 autocorrect of qu'«
+ emulateTyping(*pXTextDocument, u" qu'\"");
+ sReplaced += u" qu\u2019« ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf59666)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // testing missing autocorrect of single Greek letters
+ emulateTyping(*pXTextDocument, u"Ï€ ");
+ CPPUNIT_ASSERT_EQUAL(OUString(u"\u03C0 "), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf133524)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf133524.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // 1. Testing autocorrect of >> and <<
+ // Example: »word«
+ emulateTyping(*pXTextDocument, u">>");
+ OUString sReplaced(u"»");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // <<
+ emulateTyping(*pXTextDocument, u"word<<");
+ sReplaced += u"word«";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // 2. Testing autocorrect of " to >> and << inside „...â€
+ // Example: „Sentence and »word«.â€
+ // opening primary level quote
+ emulateTyping(*pXTextDocument, u" \"");
+ sReplaced += u" „";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // opening second level quote
+ emulateTyping(*pXTextDocument, u"Sentence and \"");
+ sReplaced += u"Sentence and »";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // closing second level quote
+ emulateTyping(*pXTextDocument, u"word\"");
+ sReplaced += u"word«";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // closing primary level quote
+ emulateTyping(*pXTextDocument, u".\"");
+ sReplaced += u".â€";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // tdf#134940 avoid premature replacement of "--" in "-->"
+ emulateTyping(*pXTextDocument, u" -->");
+ OUString sReplaced2(sReplaced + u" -->");
+ // This was "–>" instead of "-->"
+ CPPUNIT_ASSERT_EQUAL(sReplaced2, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u" ");
+ sReplaced += u" → ";
+ // This was "–>" instead of "→"
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // tdf#83037
+ emulateTyping(*pXTextDocument, u"-> ");
+ sReplaced += u"→ ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u"<- ");
+ sReplaced += u"↠";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u"<-- ");
+ sReplaced += u"↠";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u"<--> ");
+ sReplaced += u"↔ ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf133524_Romanian)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf133524_ro.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // 1. Testing autocorrect of " to << and >> inside „...â€
+ // Example: „Sentence and «word».â€
+ // opening primary level quote
+ emulateTyping(*pXTextDocument, u"\"");
+ OUString sReplaced(u"„");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // opening second level quote
+ emulateTyping(*pXTextDocument, u"Sentence and \"");
+ sReplaced += u"Sentence and «";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // closing second level quote
+ emulateTyping(*pXTextDocument, u"word\"");
+ sReplaced += u"word»";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // closing primary level quote
+ emulateTyping(*pXTextDocument, u".\"");
+ sReplaced += u".â€";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // 2. Testing recognition of closing double quotation mark â€
+ emulateTyping(*pXTextDocument, u" \"");
+ sReplaced += u" „";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // 3. Testing recognition of alternative closing double quotation mark “
+ emulateTyping(*pXTextDocument, u"Alternative.“ \"");
+ sReplaced += u"Alternative.“ „";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf128860)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf128860.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // Second level ending quote: ‚word' -> ,word‘
+ emulateTyping(*pXTextDocument, u",word'");
+ OUString sReplaced(u",word\u2019");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // Us apostrophe without preceding starting quote: word' -> word’
+ emulateTyping(*pXTextDocument, u" word'");
+ sReplaced += u" word\u2019";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // But only after letters: word.' -> word.‘
+ emulateTyping(*pXTextDocument, u" word.'");
+ sReplaced += u" word.‘";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf123786)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf123786.fodt");
+
+ // On Windows, it will detect that system input language is en-US (despite "typing" e.g. Cyrillic characters),
+ // and will change Russian into English (US); in the latter language,
+ // the replacement from single quote will not become “, but ’.
+ SvtSysLocaleOptions aOptions;
+ aOptions.SetIgnoreLanguageChange(true);
+ aOptions.Commit();
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // Second level ending quote: „word' -> „word“
+ emulateTyping(*pXTextDocument, u"„Ñлово'");
+ OUString sReplaced(u"„Ñлово“");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // Us apostrophe without preceding starting quote: word' -> word’
+ emulateTyping(*pXTextDocument, u" Ñлово'");
+ sReplaced += u" Ñлово’";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // But only after letters: word.' -> word.“
+ emulateTyping(*pXTextDocument, u" Ñлово.'");
+ sReplaced += u" Ñлово.“";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf133589)
+{
+ // Hungarian test document with right-to-left paragraph setting
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf133589.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ // translitere words to Old Hungarian
+ emulateTyping(*pXTextDocument, u"székely ");
+ OUString sReplaced(u"ð³¥ð³‹ð³“ð³‰ð³— ");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // disambiguate consonants: asszony -> asz|szony
+ emulateTyping(*pXTextDocument, u"asszony ");
+ sReplaced += u"ð³€ð³¥ð³¥ð³›ð³š ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // disambiguate consonants: kosszarv -> kos|szarv
+ // (add explicit ZWSP temporarily for consonant disambiguation, because the requested
+ // hu_HU hyphenation dictionary isn't installed on all testing platform)
+ // pWrtShell->Insert(u"kosszarv");
+ emulateTyping(*pXTextDocument, u"kos\u200Bszarv ");
+ sReplaced += u"ð³“ð³›ð³¤ð³¥ð³€ð³¢ð³® ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // transliterate numbers to Old Hungarian
+ emulateTyping(*pXTextDocument, u"2020 ");
+ sReplaced += u"ð³ºð³ºð³¿ð³¼ð³¼ ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // tdf#147546 transliterate punctuation marks
+
+ // question mark
+ emulateTyping(*pXTextDocument, u"Kérdőjel?");
+ sReplaced += u"ð²“ð³‹ð³¢ð³‡ð³Ÿð³’ð³‰ð³–";
+ OUString sReplaced2(sReplaced + "?");
+ CPPUNIT_ASSERT_EQUAL(sReplaced2, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u" ");
+ sReplaced += u"⸮ ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // comma
+ emulateTyping(*pXTextDocument, u"Vessző,");
+ sReplaced += u"ð²®ð³‰ð³¥ð³¥ð³Ÿ";
+ sReplaced2 = sReplaced + ",";
+ CPPUNIT_ASSERT_EQUAL(sReplaced2, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u" ");
+ sReplaced += u"â¹ ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // semicolon
+ emulateTyping(*pXTextDocument, u"pontosvessző;");
+ sReplaced += u"ð³ ð³›ð³™ð³¦ð³›ð³¤ð³®ð³‰ð³¥ð³¥ð³Ÿ";
+ sReplaced2 = sReplaced + ";";
+ CPPUNIT_ASSERT_EQUAL(sReplaced2, getParagraph(1)->getString());
+ emulateTyping(*pXTextDocument, u" ");
+ sReplaced += u"â ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+ // quotation marks
+ emulateTyping(*pXTextDocument, u"„idézőjel†");
+ sReplaced += u"⹂ð³ð³‡ð³‹ð³¯ð³Ÿð³’ð³‰ð³–‟ ";
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // tdf#148672 transliterate word with closing bracket
+ emulateTyping(*pXTextDocument, u"word] ");
+ sReplaced += u"ð³®ð³›ð³¢ð³‡] "; // This was "word]" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ // tdf#148672 transliterate words with parenthesis (libnumbertext 1.0.11)
+ emulateTyping(*pXTextDocument, u"(word) ");
+ sReplaced += u"(ð³®ð³›ð³¢ð³‡) "; // This was "(word)" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ emulateTyping(*pXTextDocument, u"(word ");
+ sReplaced += u"(ð³®ð³›ð³¢ð³‡ "; // This was "(word" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ emulateTyping(*pXTextDocument, u"word) ");
+ sReplaced += u"ð³®ð³›ð³¢ð³‡) "; // This was "word)" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ emulateTyping(*pXTextDocument, u"{word} ");
+ sReplaced += u"{ð³®ð³›ð³¢ð³‡} "; // This was "(word)" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ emulateTyping(*pXTextDocument, u"{word ");
+ sReplaced += u"{ð³®ð³›ð³¢ð³‡ "; // This was "(word" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ emulateTyping(*pXTextDocument, u"word} ");
+ sReplaced += u"ð³®ð³›ð³¢ð³‡} "; // This was "word)" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ emulateTyping(*pXTextDocument, u"[word] ");
+ sReplaced += u"[ð³®ð³›ð³¢ð³‡] "; // This was "(word)" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+
+ emulateTyping(*pXTextDocument, u"[word ");
+ sReplaced += u"[ð³®ð³›ð³¢ð³‡ "; // This was "(word" (no transliteration)
+ CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testAutoCorr)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ //Normal AutoCorrect
+ emulateTyping(*pXTextDocument, u"tset ");
+ CPPUNIT_ASSERT_EQUAL(OUString("Test "), getParagraph(1)->getString());
+
+ //AutoCorrect with change style to bolt
+ emulateTyping(*pXTextDocument, u"Bolt ");
+ const uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 2);
+ CPPUNIT_ASSERT_EQUAL(OUString("Bolt"), xRun->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(xRun, "CharFontName"));
+
+ //AutoCorrect inserts Table with 2 rows and 3 columns
+ emulateTyping(*pXTextDocument, u"4xx ");
+ const uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf130274)
+{
+ SwDoc* const pDoc(createSwDoc());
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ CPPUNIT_ASSERT(!pWrtShell->GetLayout()->IsHideRedlines());
+ CPPUNIT_ASSERT(
+ !IDocumentRedlineAccess::IsRedlineOn(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // "tset" may be replaced by the AutoCorrect in the test profile
+ emulateTyping(*pXTextDocument, u"tset");
+ // select from left to right
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 4, /*bBasicCall=*/false);
+
+ pWrtShell->SetRedlineFlags(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ // this would crash in AutoCorrect
+ emulateTyping(*pXTextDocument, u".");
+
+ CPPUNIT_ASSERT(!pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf83260)
+{
+ SwDoc* const pDoc(createSwDoc(DATA_DIRECTORY, "tdf83260-1.odt"));
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ // enabled but not shown
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+#if 0
+ CPPUNIT_ASSERT(IDocumentRedlineAccess::IsHideChanges(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+#endif
+ CPPUNIT_ASSERT(
+ IDocumentRedlineAccess::IsRedlineOn(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(!pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty());
+
+ // the document contains redlines that are combined with CompressRedlines()
+ // if that happens during AutoCorrect then indexes in Undo are off -> crash
+ emulateTyping(*pXTextDocument, u"tset ");
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ auto const nActions(rUndoManager.GetUndoActionCount());
+ for (auto i = nActions; 0 < i; --i)
+ {
+ rUndoManager.Undo();
+ }
+ // check that every text node has a layout frame
+ for (SwNodeOffset i(0); i < pDoc->GetNodes().Count(); ++i)
+ {
+ if (SwTextNode const* const pNode = pDoc->GetNodes()[i]->GetTextNode())
+ {
+ CPPUNIT_ASSERT(pNode->getLayoutFrame(nullptr, nullptr, nullptr));
+ }
+ }
+ for (auto i = nActions; 0 < i; --i)
+ {
+ rUndoManager.Redo();
+ }
+ for (SwNodeOffset i(0); i < pDoc->GetNodes().Count(); ++i)
+ {
+ if (SwTextNode const* const pNode = pDoc->GetNodes()[i]->GetTextNode())
+ {
+ CPPUNIT_ASSERT(pNode->getLayoutFrame(nullptr, nullptr, nullptr));
+ }
+ }
+ for (auto i = nActions; 0 < i; --i)
+ {
+ rUndoManager.Undo();
+ }
+ for (SwNodeOffset i(0); i < pDoc->GetNodes().Count(); ++i)
+ {
+ if (SwTextNode const* const pNode = pDoc->GetNodes()[i]->GetTextNode())
+ {
+ CPPUNIT_ASSERT(pNode->getLayoutFrame(nullptr, nullptr, nullptr));
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf74363)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ //testing autocorrect of initial capitals on start of first paragraph
+ //Inserting one all-lowercase word into the first paragraph
+ emulateTyping(*pXTextDocument, u"testing ");
+ //The word should be capitalized due to autocorrect
+ CPPUNIT_ASSERT_EQUAL(OUString("Testing "), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf139922)
+{
+ createSwDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ emulateTyping(*pTextDoc, u"this is a SEntence. this is a SEntence.");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: This is a Sentence. This is a Sentence.
+ // - Actual : this is a Sentence. This is a Sentence.
+ CPPUNIT_ASSERT_EQUAL(OUString("This is a Sentence. This is a Sentence."),
+ getParagraph(2)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf143176)
+{
+ // Hungarian test document with right-to-left paragraph setting
+ createSwDoc(DATA_DIRECTORY, "tdf143176.fodt");
+
+ // transliterate the document to Old Hungarian (note: it only works
+ // with right-to-left text direction and Default Paragraph Style)
+ dispatchCommand(mxComponent, ".uno:AutoFormatApply", {});
+
+ // This was the original "Lorem ipsum..."
+ CPPUNIT_ASSERT_EQUAL(OUString(u"ð²–ð³›ð³¢ð³‰ð³˜ ð³ð³ ð³¤ð³ªð³˜ ð³‡ð³›ð³–ð³›ð³¢ "
+ u"ð³¤ð³ð³¦ ð³€ð³˜ð³‰ð³¦â¹"),
+ getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"ð³„ð³›ð³™ð³¤ð³‰ð³„ð³¦ð³‰ð³¦ð³ªð³¢ "
+ u"ð³€ð³‡ð³ð³ ð³ð³¤ð³„ð³ð³™ð³ ð³‰ð³–ð³ð³¦."),
+ getParagraph(2)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testInsertLongDateFormat)
+{
+ // only for Hungarian, yet
+ createSwDoc(DATA_DIRECTORY, "tdf133524.fodt");
+ dispatchCommand(mxComponent, ".uno:InsertDateField", {});
+ // Make sure that the document starts with a field now, and its expanded string value contains space
+ const uno::Reference<text::XTextRange> xField = getRun(getParagraph(1), 1);
+ CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty<OUString>(xField, "TextPortionType"));
+ // the date format was "YYYY-MM-DD", but now "YYYY. MMM DD."
+ CPPUNIT_ASSERT(xField->getString().indexOf(" ") > -1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf129270)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf129270.odt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ // Go to document end
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+
+ // Press enter
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // Numbering for previous outline should remain the same "2"
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(getParagraph(4), "ListLabelString"));
+
+ // Numbering for newly created outline should be "2.1"
+ CPPUNIT_ASSERT_EQUAL(OUString("2.1"),
+ getProperty<OUString>(getParagraph(5), "ListLabelString"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testInsertPdf)
+{
+ auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPdfium)
+ {
+ return;
+ }
+
+ createSwDoc();
+
+ // insert the PDF into the document
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ { { "FileName",
+ uno::Any(m_directories.getURLFromSrc(DATA_DIRECTORY) + "hello-world.pdf") } }));
+ dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
+
+ // Save and load cycle
+ reload("writer8", "testInsertPdf.odt");
+
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // Assert that we have a replacement graphics
+ auto xReplacementGraphic
+ = getProperty<uno::Reference<graphic::XGraphic>>(xShape, "ReplacementGraphic");
+ CPPUNIT_ASSERT(xReplacementGraphic.is());
+
+ auto xGraphic = getProperty<uno::Reference<graphic::XGraphic>>(xShape, "Graphic");
+ CPPUNIT_ASSERT(xGraphic.is());
+ // Assert that the graphic is a PDF
+ CPPUNIT_ASSERT_EQUAL(OUString("application/pdf"), getProperty<OUString>(xGraphic, "MimeType"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf143760WrapContourToOff)
+{
+ // Actually, this is an ooxmlexport test. It is here because here is a ready environment
+ // to change a shape by dispatchCommand.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf143760_ContourToWrapOff.docx");
+ CPPUNIT_ASSERT(pDoc);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "SurroundContour"));
+
+ // Mark the object
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(0);
+ CPPUNIT_ASSERT(pObject);
+ SdrView* pView = pWrtShell->GetDrawView();
+ pView->MarkObj(pObject, pView->GetSdrPageView());
+
+ // Set "wrap off"
+ dispatchCommand(mxComponent, ".uno:WrapOff", {});
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(1), "SurroundContour"));
+
+ // Without fix this had failed, because the shape was written to file with contour.
+ reload("Office Open XML Text", "tdf143760_ContourToWrapOff.docx");
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(1), "SurroundContour"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testHatchFill)
+{
+ createSwDoc();
+
+ // Add a rectangle shape to the document.
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xShape->setSize(awt::Size(10000, 10000));
+ xShape->setPosition(awt::Point(1000, 1000));
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_HATCH));
+ xShapeProps->setPropertyValue("FillHatchName", uno::Any(OUString("Black 0 Degrees")));
+ xShapeProps->setPropertyValue("FillBackground", uno::Any(false));
+ xShapeProps->setPropertyValue("FillTransparence", uno::Any(sal_Int32(30)));
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ xDrawPage->add(xShape);
+
+ // Save it as DOCX and load it again.
+ reload("Office Open XML Text", "hatchFill.docx");
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ // tdf#127989 Without fix this had failed, because the background of the hatch was not set as 'no background'.
+ CPPUNIT_ASSERT(!getProperty<bool>(getShape(1), "FillBackground"));
+
+ // tdf#146822 Without fix this had failed, because the transparency value of the hatch was not exported.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(30), getProperty<sal_Int32>(getShape(1), "FillTransparence"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testNestedGroupTextBoxCopyCrash)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf149550.docx");
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+ // This crashed here before the fix.
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_ESCAPE);
+ Scheduler::ProcessEventsToIdle();
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_MESSAGE("Where is the doc, it crashed, isn't it?!", mxComponent);
+
+ auto pLayout = parseLayoutDump();
+ // There must be 2 textboxes!
+ assertXPath(pLayout, "/root/page/body/txt/anchored/fly[2]");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCrashOnExit)
+{
+ // Load the bugdoc with a table and a textbox shape inside.
+ CPPUNIT_ASSERT(createSwDoc(DATA_DIRECTORY, "tdf142715.odt"));
+
+ // Get the textbox selected
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ auto xShape = getShape(1);
+ CPPUNIT_ASSERT(xShape);
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xModel);
+ uno::Reference<frame::XController> xController = xModel->getCurrentController();
+ CPPUNIT_ASSERT(xController);
+ uno::Reference<view::XSelectionSupplier> xSelection(xController, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xSelection);
+ CPPUNIT_ASSERT(xSelection->select(uno::Any(xShape)));
+ CPPUNIT_ASSERT(xSelection->getSelection().hasValue());
+ uno::Reference<beans::XPropertySet> xProperties(xShape, uno::UNO_QUERY);
+
+ // Check if the textbox is selected
+ CPPUNIT_ASSERT_EQUAL(true, xProperties->getPropertyValue("TextBox").get<bool>());
+
+ // Remove the textbox
+ dispatchCommand(mxComponent, ".uno:RemoveTextBox", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(false, xProperties->getPropertyValue("TextBox").get<bool>());
+
+ // Readd the textbox (to run the textboxhelper::create() method)
+ dispatchCommand(mxComponent, ".uno:AddTextBox", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(true, xProperties->getPropertyValue("TextBox").get<bool>());
+
+ // save and reload
+ reload("writer8", "tdf142715_.odt");
+
+ // Before the fix this crashed here and could not reopen.
+ CPPUNIT_ASSERT_MESSAGE("Crash on exit, isn't it?", mxComponent);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCaptionShape)
+{
+ createSwDoc();
+
+ // Add a caption shape to the document.
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.CaptionShape"), uno::UNO_QUERY);
+ xShape->setSize(awt::Size(10000, 10000));
+ xShape->setPosition(awt::Point(1000, 1000));
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ xDrawPage->add(xShape);
+
+ // Save it as DOCX and load it again.
+ reload("Office Open XML Text", "captionshape.docx");
+
+ // Without fix in place, the shape was lost on export.
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf148799)
+{
+ // load a document with table formulas with comma delimiter,
+ // but with a document language with default point delimiter
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf148799.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // check formula update
+ // put cursor in the first table row
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
+ // These were "** Expression is faulty **"
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("D3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2.3"), xCellA1->getString());
+ uno::Reference<text::XTextRange> xCellA3(xTextTable->getCellByName("D4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2345"), xCellA3->getString());
+ uno::Reference<text::XTextRange> xCellA4(xTextTable->getCellByName("D5"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("23684.5"), xCellA4->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151993)
+{
+ // load a document with table formulas with comma delimiter
+ // (with a document language with default comma delimiter)
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf151993.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // check formula update
+
+ // put cursor in the first table row
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+
+ // This was 0
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("A2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("30"), xCellA1->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151462)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf151462.odt");
+ // xmlDocUniquePtr pLayout = parseLayoutDump();
+ dispatchCommand(mxComponent, ".uno:UpdateAllIndexes", {});
+ Scheduler::ProcessEventsToIdle();
+ xmlDocUniquePtr pLayout = parseLayoutDump();
+ // tdf#151462 - without the fix in place, there would be just the first index entry
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[2]/anchored/fly/section/txt[1]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "sub one");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[2]/anchored/fly/section/txt[2]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "sub two");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[2]/anchored/fly/section/txt[3]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "sub three");
+ // tdf#151462 - without the fix in place, there would be just the first index entry
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[6]/anchored/fly/section/txt[1]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "another sub one");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[6]/anchored/fly/section/txt[2]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "another sub two");
+ assertXPath(pLayout,
+ "/root/page[1]/body/txt[6]/anchored/fly/section/txt[3]/SwParaPortion/"
+ "SwLineLayout[1]/SwLinePortion[1]",
+ "portion", "another sub three");
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx b/sw/qa/extras/uiwriter/uiwriter7.cxx
new file mode 100644
index 000000000..833a35f97
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter7.cxx
@@ -0,0 +1,2818 @@
+/* -*- 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 <com/sun/star/awt/FontWeight.hpp>
+#include <swmodeltestbase.hxx>
+#include <itabenum.hxx>
+#include <ndtxt.hxx>
+#include <wrtsh.hxx>
+#include <expfld.hxx>
+#include <drawdoc.hxx>
+#include <view.hxx>
+#include <swacorr.hxx>
+#include <swmodule.hxx>
+#include <charatr.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <unotbl.hxx>
+#include <PostItMgr.hxx>
+#include <AnnotationWin.hxx>
+#include <com/sun/star/awt/FontUnderline.hpp>
+
+#include <svx/hdft.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdview.hxx>
+#include <svx/svxids.hrc>
+
+#include <i18nutil/searchopt.hxx>
+#include <txtftn.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <IDocumentFieldsAccess.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <IDocumentState.hxx>
+#include <unofldmid.h>
+#include <UndoManager.hxx>
+#include <textsh.hxx>
+#include <frmatr.hxx>
+#include <frmmgr.hxx>
+
+#include <com/sun/star/util/XNumberFormatTypes.hpp>
+#include <com/sun/star/util/NumberFormat.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/util/SearchAlgorithms2.hpp>
+#include <com/sun/star/util/SearchFlags.hpp>
+#include <com/sun/star/sdb/DatabaseContext.hpp>
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/text/XParagraphCursor.hpp>
+#include <com/sun/star/util/XPropertyReplace.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
+#include <osl/file.hxx>
+#include <drawfont.hxx>
+#include <txtfrm.hxx>
+#include <txttypes.hxx>
+#include <SwPortionHandler.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <sfx2/docfilt.hxx>
+#include <vcl/scheduler.hxx>
+#include <config_features.h>
+#include <config_fonts.h>
+#include <sfx2/fcontnr.hxx>
+#include <sfx2/docfile.hxx>
+#include <frameformats.hxx>
+#include <unotxdoc.hxx>
+#include <rootfrm.hxx>
+#include <officecfg/Office/Writer.hxx>
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
+
+int CountFilesInDirectory(const OUString& rURL)
+{
+ int nRet = 0;
+
+ osl::Directory aDir(rURL);
+ CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, aDir.open());
+
+ osl::DirectoryItem aItem;
+ osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileURL | osl_FileStatus_Mask_Type);
+ while (aDir.getNextItem(aItem) == osl::FileBase::E_None)
+ {
+ aItem.getFileStatus(aFileStatus);
+ if (aFileStatus.getFileType() != osl::FileStatus::Directory)
+ ++nRet;
+ }
+
+ return nRet;
+}
+
+} //namespace
+
+class SwUiWriterTest7 : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testExportToPicture)
+{
+ createSwDoc();
+ uno::Sequence<beans::PropertyValue> aFilterData(
+ comphelper::InitPropertySequence({ { "PixelWidth", uno::Any(sal_Int32(610)) },
+ { "PixelHeight", uno::Any(sal_Int32(610)) } }));
+ uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence(
+ { { "FilterName", uno::Any(OUString("writer_png_Export")) },
+ { "FilterData", uno::Any(aFilterData) } }));
+ utl::TempFile aTempFile;
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+ bool extchk = aTempFile.IsValid();
+ CPPUNIT_ASSERT_EQUAL(true, extchk);
+ osl::File tmpFile(aTempFile.GetURL());
+ tmpFile.open(sal_uInt32(osl_File_OpenFlag_Read));
+ sal_uInt64 val;
+ CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, tmpFile.getSize(val));
+ CPPUNIT_ASSERT(val > 100);
+ aTempFile.EnableKillingFile();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77340)
+{
+ createSwDoc();
+ //Getting some paragraph style in our document
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<style::XStyle> xStyle(
+ xFactory->createInstance("com.sun.star.style.ParagraphStyle"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropSet(xStyle, uno::UNO_QUERY_THROW);
+ xPropSet->setPropertyValue("ParaBackColor", uno::Any(sal_Int32(0xFF00FF)));
+ uno::Reference<style::XStyleFamiliesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xNameAccess(xSupplier->getStyleFamilies());
+ uno::Reference<container::XNameContainer> xNameCont;
+ xNameAccess->getByName("ParagraphStyles") >>= xNameCont;
+ xNameCont->insertByName("myStyle", uno::Any(xStyle));
+ CPPUNIT_ASSERT_EQUAL(OUString("myStyle"), xStyle->getName());
+ //Setting the properties with proper values
+ xPropSet->setPropertyValue("PageDescName", uno::Any(OUString("First Page")));
+ xPropSet->setPropertyValue("PageNumberOffset", uno::Any(sal_Int16(3)));
+ //Getting the properties and checking that they have proper values
+ CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("First Page")),
+ xPropSet->getPropertyValue("PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(3)), xPropSet->getPropertyValue("PageNumberOffset"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf153819)
+{
+ // copy a table before a deleted table in Hide Changes mode
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf153819.fodt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ // hide changes
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+ dispatchCommand(mxComponent, ".uno:SelectTable", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, ".uno:GoDown", {});
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ // FIXME: Show Changes, otherwise ~SwTableNode() would have crashed
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236)
+{
+ SwDoc* pDoc = createSwDoc();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ //Getting some paragraph style
+ SwTextFormatColl* pTextFormat = pDoc->FindTextFormatCollByName(u"Text Body");
+ const SwAttrSet& rAttrSet = pTextFormat->GetAttrSet();
+ std::unique_ptr<SfxItemSet> pNewSet = rAttrSet.Clone();
+ sal_uInt16 initialCount = pNewSet->Count();
+ SvxAdjustItem AdjustItem = rAttrSet.GetAdjust();
+ SvxAdjust initialAdjust = AdjustItem.GetAdjust();
+ //By default the adjust is LEFT
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, initialAdjust);
+ //Changing the adjust to RIGHT
+ AdjustItem.SetAdjust(SvxAdjust::Right);
+ //Checking whether the change is made or not
+ SvxAdjust modifiedAdjust = AdjustItem.GetAdjust();
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, modifiedAdjust);
+ //Modifying the itemset, putting *one* item
+ pNewSet->Put(AdjustItem);
+ //The count should increment by 1
+ sal_uInt16 modifiedCount = pNewSet->Count();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(initialCount + 1), modifiedCount);
+ //Setting the updated item set on the style
+ pDoc->ChgFormat(*pTextFormat, *pNewSet);
+ //Checking the Changes
+ SwTextFormatColl* pTextFormat2 = pDoc->FindTextFormatCollByName(u"Text Body");
+ const SwAttrSet& rAttrSet2 = pTextFormat2->GetAttrSet();
+ const SvxAdjustItem& rAdjustItem2 = rAttrSet2.GetAdjust();
+ SvxAdjust Adjust2 = rAdjustItem2.GetAdjust();
+ //The adjust should be RIGHT as per the modifications made
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust2);
+ //Undo the changes
+ rUndoManager.Undo();
+ SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName(u"Text Body");
+ const SwAttrSet& rAttrSet3 = pTextFormat3->GetAttrSet();
+ const SvxAdjustItem& rAdjustItem3 = rAttrSet3.GetAdjust();
+ SvxAdjust Adjust3 = rAdjustItem3.GetAdjust();
+ //The adjust should be back to default, LEFT
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust3);
+ //Redo the changes
+ rUndoManager.Redo();
+ SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName(u"Text Body");
+ const SwAttrSet& rAttrSet4 = pTextFormat4->GetAttrSet();
+ const SvxAdjustItem& rAdjustItem4 = rAttrSet4.GetAdjust();
+ SvxAdjust Adjust4 = rAdjustItem4.GetAdjust();
+ //The adjust should be RIGHT as per the modifications made
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust4);
+ //Undo the changes
+ rUndoManager.Undo();
+ SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName(u"Text Body");
+ const SwAttrSet& rAttrSet5 = pTextFormat5->GetAttrSet();
+ const SvxAdjustItem& rAdjustItem5 = rAttrSet5.GetAdjust();
+ SvxAdjust Adjust5 = rAdjustItem5.GetAdjust();
+ //The adjust should be back to default, LEFT
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust5);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch)
+{
+ // Create a new empty Writer document
+ SwDoc* pDoc = createSwDoc();
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ IDocumentContentOperations& rIDCO(pDoc->getIDocumentContentOperations());
+ // Insert some text
+ rIDCO.InsertString(*pCursor, "Hello World This is a test");
+ // Use cursor to select part of text
+ for (int i = 0; i < 10; i++)
+ {
+ pCursor->Move(fnMoveBackward);
+ }
+ pCursor->SetMark();
+ for (int i = 0; i < 4; i++)
+ {
+ pCursor->Move(fnMoveBackward);
+ }
+ //Checking that the proper selection is made
+ CPPUNIT_ASSERT_EQUAL(OUString("This"), pCursor->GetText());
+ // Apply a "Bold" attribute to selection
+ SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
+ rIDCO.InsertPoolItem(*pCursor, aWeightItem);
+ //making another selection of text
+ for (int i = 0; i < 7; i++)
+ {
+ pCursor->Move(fnMoveBackward);
+ }
+ pCursor->SetMark();
+ for (int i = 0; i < 5; i++)
+ {
+ pCursor->Move(fnMoveBackward);
+ }
+ //Checking that the proper selection is made
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello"), pCursor->GetText());
+ // Apply a "Bold" attribute to selection
+ rIDCO.InsertPoolItem(*pCursor, aWeightItem);
+ //Performing Search Operation and also covering the UNO coverage for setProperty
+ uno::Reference<util::XSearchable> xSearch(mxComponent, uno::UNO_QUERY);
+ uno::Reference<util::XSearchDescriptor> xSearchDes = xSearch->createSearchDescriptor();
+ uno::Reference<util::XPropertyReplace> xProp(xSearchDes, uno::UNO_QUERY);
+ //setting some properties
+ uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence(
+ { { "CharWeight", uno::Any(float(css::awt::FontWeight::BOLD)) } }));
+ xProp->setSearchAttributes(aDescriptor);
+ //receiving the defined properties and asserting them with expected values, covering UNO
+ uno::Sequence<beans::PropertyValue> aPropVal2(xProp->getSearchAttributes());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aPropVal2.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("CharWeight"), aPropVal2[0].Name);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(float(css::awt::FontWeight::BOLD)), aPropVal2[0].Value);
+ //specifying the search attributes
+ uno::Reference<beans::XPropertySet> xPropSet(xSearchDes, uno::UNO_QUERY_THROW);
+ xPropSet->setPropertyValue("SearchWords", uno::Any(true));
+ xPropSet->setPropertyValue("SearchCaseSensitive", uno::Any(true));
+ //this will search all the BOLD words
+ uno::Reference<container::XIndexAccess> xIndex(xSearch->findAll(xSearchDes));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndex->getCount());
+ //Replacing the searched string via XReplaceable
+ uno::Reference<util::XReplaceable> xReplace(mxComponent, uno::UNO_QUERY);
+ uno::Reference<util::XReplaceDescriptor> xReplaceDes = xReplace->createReplaceDescriptor();
+ uno::Reference<util::XPropertyReplace> xProp2(xReplaceDes, uno::UNO_QUERY);
+ xProp2->setReplaceAttributes(aDescriptor);
+ //checking that the proper attributes are there or not
+ uno::Sequence<beans::PropertyValue> aRepProp(xProp2->getReplaceAttributes());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRepProp.getLength());
+ CPPUNIT_ASSERT_EQUAL(OUString("CharWeight"), aRepProp[0].Name);
+ CPPUNIT_ASSERT_EQUAL(uno::Any(float(css::awt::FontWeight::BOLD)), aRepProp[0].Value);
+ //setting strings for replacement
+ xReplaceDes->setSearchString("test");
+ xReplaceDes->setReplaceString("task");
+ //checking the replaceString
+ CPPUNIT_ASSERT_EQUAL(OUString("task"), xReplaceDes->getReplaceString());
+ //this will replace *normal*test to *bold*task
+ sal_Int32 ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ //There should be only 1 replacement since there is only one occurrence of "test" in the document
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount);
+ //Now performing search again for BOLD words, count should be 3 due to replacement
+ uno::Reference<container::XIndexAccess> xIndex2(xReplace->findAll(xSearchDes));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndex2->getCount());
+ // regex tests
+ xSearchDes->setPropertyValue("SearchRegularExpression", uno::Any(true));
+ // regex: test correct matching combined with attributes like BOLD
+ xSearchDes->setSearchString(".*"); // should match all bold words in the text
+ xIndex.set(xReplace->findAll(xSearchDes), uno::UNO_SET_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndex->getCount());
+ uno::Reference<text::XTextRange> xFound(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xFound->getString());
+ xFound.set(xIndex->getByIndex(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("This"), xFound->getString());
+ xFound.set(xIndex->getByIndex(2), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("task"), xFound->getString());
+ // regex: test anchor combined with attributes like BOLD
+ xSearchDes->setSearchString("^.*|.*$"); // should match first and last words (they are bold)
+ xIndex.set(xReplace->findAll(xSearchDes), uno::UNO_SET_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndex->getCount());
+ xFound.set(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xFound->getString());
+ xFound.set(xIndex->getByIndex(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("task"), xFound->getString());
+ // regex: test look-ahead/look-behind assertions outside of the bold text
+ xSearchDes->setSearchString("(?<= ).*(?= )"); // should match second bold word
+ xIndex.set(xReplace->findAll(xSearchDes), uno::UNO_SET_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndex->getCount());
+ xFound.set(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("This"), xFound->getString());
+ xReplaceDes->setPropertyValue("SearchRegularExpression", uno::Any(true));
+ // regex: test correct match of paragraph start
+ xReplaceDes->setSearchString("^."); // should only match first character of the paragraph
+ xReplaceDes->setReplaceString("C");
+ ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount);
+ // regex: test correct match of word start
+ xReplaceDes->setSearchString("\\b\\w"); // should match all words' first characters
+ xReplaceDes->setReplaceString("x&");
+ ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), ReplaceCount);
+ // regex: test negative look-behind assertion
+ xReplaceDes->setSearchString("(?<!xCelly xW)o"); // only "o" in "xCello", not in "xWorld"
+ xReplaceDes->setReplaceString("y");
+ ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount);
+ // regex: test positive look-behind assertion
+ xReplaceDes->setSearchString("(?<=xCelly xWorld xTh)i"); // only "i" in "xThis", not in "xis"
+ xReplaceDes->setReplaceString("z");
+ ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount);
+ // regex: use capturing group to test reference
+ xReplaceDes->setSearchString("\\b(\\w\\w\\w\\w)\\w");
+ xReplaceDes->setReplaceString("$1q"); // only fifth characters in words should change
+ ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), ReplaceCount);
+ // check of the end result
+ CPPUNIT_ASSERT_EQUAL(OUString("xCelqy xWorqd xThzq xis xa xtasq"),
+ pCursor->GetNode().GetTextNode()->GetText());
+ // regex: use positive look-ahead assertion
+ xReplaceDes->setSearchString("Wor(?=qd xThzq xis xa xtasq)");
+ xReplaceDes->setReplaceString("&p"); // testing & reference
+ ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount);
+ // regex: use negative look-ahead assertion
+ xReplaceDes->setSearchString("x(?!Worpqd xThzq xis xa xtasq)");
+ xReplaceDes->setReplaceString("m");
+ ReplaceCount = xReplace->replaceAll(xReplaceDes);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), ReplaceCount); // one of the 6 "x" must not be replaced
+ // check of the end result
+ CPPUNIT_ASSERT_EQUAL(OUString("mCelqy xWorpqd mThzq mis ma mtasq"),
+ pCursor->GetNode().GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf69282)
+{
+ SwDoc* source = createSwDoc();
+ uno::Reference<lang::XComponent> xSourceDoc = mxComponent;
+ mxComponent.clear();
+ SwDoc* target = createSwDoc();
+ SwPageDesc* sPageDesc = source->MakePageDesc("SourceStyle");
+ SwPageDesc* tPageDesc = target->MakePageDesc("TargetStyle");
+ sPageDesc->ChgFirstShare(false);
+ CPPUNIT_ASSERT(!sPageDesc->IsFirstShared());
+ SwFrameFormat& rSourceMasterFormat = sPageDesc->GetMaster();
+ //Setting horizontal spaces on master
+ SvxLRSpaceItem horizontalSpace(RES_LR_SPACE);
+ horizontalSpace.SetLeft(11);
+ horizontalSpace.SetRight(12);
+ rSourceMasterFormat.SetFormatAttr(horizontalSpace);
+ //Setting vertical spaces on master
+ SvxULSpaceItem verticalSpace(RES_UL_SPACE);
+ verticalSpace.SetUpper(13);
+ verticalSpace.SetLower(14);
+ rSourceMasterFormat.SetFormatAttr(verticalSpace);
+ //Changing the style and copying it to target
+ source->ChgPageDesc("SourceStyle", *sPageDesc);
+ target->CopyPageDesc(*sPageDesc, *tPageDesc);
+ //Checking the set values on all Formats in target
+ SwFrameFormat& rTargetMasterFormat = tPageDesc->GetMaster();
+ SwFrameFormat& rTargetLeftFormat = tPageDesc->GetLeft();
+ SwFrameFormat& rTargetFirstMasterFormat = tPageDesc->GetFirstMaster();
+ SwFrameFormat& rTargetFirstLeftFormat = tPageDesc->GetFirstLeft();
+ //Checking horizontal spaces
+ const SvxLRSpaceItem MasterLRSpace = rTargetMasterFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), MasterLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), MasterLRSpace.GetRight());
+ const SvxLRSpaceItem LeftLRSpace = rTargetLeftFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), LeftLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), LeftLRSpace.GetRight());
+ const SvxLRSpaceItem FirstMasterLRSpace = rTargetFirstMasterFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), FirstMasterLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), FirstMasterLRSpace.GetRight());
+ const SvxLRSpaceItem FirstLeftLRSpace = rTargetFirstLeftFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), FirstLeftLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), FirstLeftLRSpace.GetRight());
+ //Checking vertical spaces
+ const SvxULSpaceItem MasterULSpace = rTargetMasterFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), MasterULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), MasterULSpace.GetLower());
+ const SvxULSpaceItem LeftULSpace = rTargetLeftFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), LeftULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), LeftULSpace.GetLower());
+ const SvxULSpaceItem FirstMasterULSpace = rTargetFirstMasterFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), FirstMasterULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), FirstMasterULSpace.GetLower());
+ const SvxULSpaceItem FirstLeftULSpace = rTargetFirstLeftFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), FirstLeftULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), FirstLeftULSpace.GetLower());
+ xSourceDoc->dispose();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf69282WithMirror)
+{
+ SwDoc* source = createSwDoc();
+ uno::Reference<lang::XComponent> xSourceDoc = mxComponent;
+ mxComponent.clear();
+ SwDoc* target = createSwDoc();
+ SwPageDesc* sPageDesc = source->MakePageDesc("SourceStyle");
+ SwPageDesc* tPageDesc = target->MakePageDesc("TargetStyle");
+ //Enabling Mirror
+ sPageDesc->SetUseOn(UseOnPage::Mirror);
+ SwFrameFormat& rSourceMasterFormat = sPageDesc->GetMaster();
+ //Setting horizontal spaces on master
+ SvxLRSpaceItem horizontalSpace(RES_LR_SPACE);
+ horizontalSpace.SetLeft(11);
+ horizontalSpace.SetRight(12);
+ rSourceMasterFormat.SetFormatAttr(horizontalSpace);
+ //Setting vertical spaces on master
+ SvxULSpaceItem verticalSpace(RES_UL_SPACE);
+ verticalSpace.SetUpper(13);
+ verticalSpace.SetLower(14);
+ rSourceMasterFormat.SetFormatAttr(verticalSpace);
+ //Changing the style and copying it to target
+ source->ChgPageDesc("SourceStyle", *sPageDesc);
+ target->CopyPageDesc(*sPageDesc, *tPageDesc);
+ //Checking the set values on all Formats in target
+ SwFrameFormat& rTargetMasterFormat = tPageDesc->GetMaster();
+ SwFrameFormat& rTargetLeftFormat = tPageDesc->GetLeft();
+ SwFrameFormat& rTargetFirstMasterFormat = tPageDesc->GetFirstMaster();
+ SwFrameFormat& rTargetFirstLeftFormat = tPageDesc->GetFirstLeft();
+ //Checking horizontal spaces
+ const SvxLRSpaceItem MasterLRSpace = rTargetMasterFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), MasterLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), MasterLRSpace.GetRight());
+ //mirror effect should be present
+ const SvxLRSpaceItem LeftLRSpace = rTargetLeftFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), LeftLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), LeftLRSpace.GetRight());
+ const SvxLRSpaceItem FirstMasterLRSpace = rTargetFirstMasterFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), FirstMasterLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), FirstMasterLRSpace.GetRight());
+ //mirror effect should be present
+ const SvxLRSpaceItem FirstLeftLRSpace = rTargetFirstLeftFormat.GetLRSpace();
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetRight(), FirstLeftLRSpace.GetLeft());
+ CPPUNIT_ASSERT_EQUAL(horizontalSpace.GetLeft(), FirstLeftLRSpace.GetRight());
+ //Checking vertical spaces
+ const SvxULSpaceItem MasterULSpace = rTargetMasterFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), MasterULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), MasterULSpace.GetLower());
+ const SvxULSpaceItem LeftULSpace = rTargetLeftFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), LeftULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), LeftULSpace.GetLower());
+ const SvxULSpaceItem FirstMasterULSpace = rTargetFirstMasterFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), FirstMasterULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), FirstMasterULSpace.GetLower());
+ const SvxULSpaceItem FirstLeftULSpace = rTargetFirstLeftFormat.GetULSpace();
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetUpper(), FirstLeftULSpace.GetUpper());
+ CPPUNIT_ASSERT_EQUAL(verticalSpace.GetLower(), FirstLeftULSpace.GetLower());
+ xSourceDoc->dispose();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf78742)
+{
+ //testing with service type and any .ods file
+ OUString path = m_directories.getURLFromSrc(DATA_DIRECTORY) + "calc-data-source.ods";
+ SfxMedium aMedium(path, StreamMode::READ | StreamMode::SHARE_DENYWRITE);
+ SfxFilterMatcher aMatcher("com.sun.star.text.TextDocument");
+ std::shared_ptr<const SfxFilter> pFilter;
+ ErrCode filter = aMatcher.DetectFilter(aMedium, pFilter);
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_IO_ABORT, filter);
+ //it should not return any Filter
+ CPPUNIT_ASSERT(!pFilter);
+ //testing without service type and any .ods file
+ SfxMedium aMedium2(path, StreamMode::READ | StreamMode::SHARE_DENYWRITE);
+ SfxFilterMatcher aMatcher2;
+ std::shared_ptr<const SfxFilter> pFilter2;
+ ErrCode filter2 = aMatcher2.DetectFilter(aMedium2, pFilter2);
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, filter2);
+ //Filter should be returned with proper Name
+ CPPUNIT_ASSERT_EQUAL(OUString("calc8"), pFilter2->GetFilterName());
+ //testing with service type and any .odt file
+ OUString path2 = m_directories.getURLFromSrc(DATA_DIRECTORY) + "fdo69893.odt";
+ SfxMedium aMedium3(path2, StreamMode::READ | StreamMode::SHARE_DENYWRITE);
+ SfxFilterMatcher aMatcher3("com.sun.star.text.TextDocument");
+ std::shared_ptr<const SfxFilter> pFilter3;
+ ErrCode filter3 = aMatcher3.DetectFilter(aMedium3, pFilter3);
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, filter3);
+ //Filter should be returned with proper Name
+ CPPUNIT_ASSERT_EQUAL(OUString("writer8"), pFilter3->GetFilterName());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUnoParagraph)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ //Inserting some text content in the document
+ pWrtShell->Insert("This is initial text in paragraph one");
+ pWrtShell->SplitNode();
+ //Inserting second paragraph
+ pWrtShell->Insert("This is initial text in paragraph two");
+ //now testing the SwXParagraph
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText(xTextDocument->getText());
+ uno::Reference<container::XEnumerationAccess> xParaAccess(xText, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPara(xParaAccess->createEnumeration());
+ //getting first paragraph
+ uno::Reference<text::XTextContent> xFirstParaContent(xPara->nextElement(), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xFirstPara(xFirstParaContent, uno::UNO_QUERY);
+ //testing the initial text
+ CPPUNIT_ASSERT_EQUAL(OUString("This is initial text in paragraph one"),
+ xFirstPara->getString());
+ //changing the text content in first paragraph
+ xFirstPara->setString("This is modified text in paragraph one");
+ //testing the changes
+ CPPUNIT_ASSERT_EQUAL(OUString("This is modified text in paragraph one"),
+ xFirstPara->getString());
+ //getting second paragraph
+ uno::Reference<text::XTextContent> xSecondParaContent(xPara->nextElement(), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xSecondPara(xSecondParaContent, uno::UNO_QUERY);
+ //testing the initial text
+ CPPUNIT_ASSERT_EQUAL(OUString("This is initial text in paragraph two"),
+ xSecondPara->getString());
+ //changing the text content in second paragraph
+ xSecondPara->setString("This is modified text in paragraph two");
+ //testing the changes
+ CPPUNIT_ASSERT_EQUAL(OUString("This is modified text in paragraph two"),
+ xSecondPara->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf72788)
+{
+ //Create a new empty Writer document
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ IDocumentContentOperations& rIDCO(pDoc->getIDocumentContentOperations());
+ //Insert some text - two paragraphs
+ rIDCO.InsertString(*pCursor, "this is text");
+ //Position of word 9876543210
+ //Position of word 0123456789
+ //Change Paragraph
+ pWrtShell->SplitNode();
+ //Insert second paragraph
+ rIDCO.InsertString(*pCursor, "more text");
+ //Position of word 012345678
+ //Make the following selection *bold*
+ //this[is text
+ //more] text
+ //Move cursor back
+ for (int i = 0; i < 5; i++)
+ {
+ pCursor->Move(fnMoveBackward);
+ }
+ //Start selection
+ pCursor->SetMark();
+ for (int i = 0; i < 12; i++)
+ {
+ pCursor->Move(fnMoveBackward);
+ }
+ //Check the text selection
+ CPPUNIT_ASSERT_EQUAL(OUString(u"is text" + OUStringChar(CH_TXTATR_NEWLINE) + u"more"),
+ pCursor->GetText());
+ //Apply a *Bold* attribute to selection
+ SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
+ rIDCO.InsertPoolItem(*pCursor, aWeightItem);
+ SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT>);
+ //Add selected text's attributes to aSet
+ pCursor->GetNode().GetTextNode()->GetParaAttr(aSet, 5, 12);
+ SfxPoolItem const* pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT);
+ //Check that bold is active on the selection and it's in aSet
+ CPPUNIT_ASSERT_EQUAL(true, (*pPoolItem == aWeightItem));
+ //Make selection to remove formatting in first paragraph
+ //[this is text
+ //]more text
+ pWrtShell->StartOfSection();
+ //Start selection
+ pCursor->SetMark();
+ for (int i = 0; i < 13; i++)
+ {
+ pCursor->Move(fnMoveForward);
+ }
+ //Clear all the Direct Formatting ( Ctrl + M )
+ SwTextNode* pTextNode = pCursor->GetNode().GetTextNode();
+ SwIndex aSt(pTextNode, 0);
+ sal_Int32 nEnd = pTextNode->Len();
+ pTextNode->RstTextAttr(aSt, nEnd - aSt.GetIndex());
+ //In case of Regression RstTextAttr() call will result to infinite recursion
+ //Check that bold is removed in first paragraph
+ aSet.ClearItem();
+ pTextNode->GetParaAttr(aSet, 5, 12);
+ SfxPoolItem const* pPoolItem2 = aSet.GetItem(RES_CHRATR_WEIGHT);
+ CPPUNIT_ASSERT_EQUAL(true, (*pPoolItem2 != aWeightItem));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf60967)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ pWrtShell->ChangeHeaderOrFooter(u"Default Page Style", true, true, true);
+ //Inserting table
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(TableOpt, 2, 2);
+ //getting the cursor's position just after the table insert
+ SwPosition aPosAfterTable(*(pCursor->GetPoint()));
+ //moving cursor to B2 (bottom right cell)
+ pCursor->Move(fnMoveBackward);
+ SwPosition aPosInTable(*(pCursor->GetPoint()));
+ //deleting paragraph following table with Ctrl+Shift+Del
+ bool val = pWrtShell->DelToEndOfSentence();
+ CPPUNIT_ASSERT_EQUAL(true, val);
+ //getting the cursor's position just after the paragraph deletion
+ SwPosition aPosAfterDel(*(pCursor->GetPoint()));
+ //moving cursor forward to check whether there is any node following the table, BTW there should not be any such node
+ pCursor->Move(fnMoveForward);
+ SwPosition aPosMoveAfterDel(*(pCursor->GetPoint()));
+ //checking the positions to verify that the paragraph is actually deleted
+ CPPUNIT_ASSERT_EQUAL(aPosAfterDel, aPosInTable);
+ CPPUNIT_ASSERT_EQUAL(aPosMoveAfterDel, aPosInTable);
+ //Undo the changes
+ rUndoManager.Undo();
+ {
+ //paragraph *text node* should be back
+ SwPosition aPosAfterUndo(*(pCursor->GetPoint()));
+ //after undo aPosAfterTable increases the node position by one, since this contains the position *text node* so aPosAfterUndo should be less than aPosAfterTable
+ CPPUNIT_ASSERT(aPosAfterTable > aPosAfterUndo);
+ //moving cursor forward to check whether there is any node following the paragraph, BTW there should not be any such node as paragraph node is the last one in header
+ pCursor->Move(fnMoveForward);
+ SwPosition aPosMoveAfterUndo(*(pCursor->GetPoint()));
+ //checking positions to verify that paragraph node is the last one and we are paragraph node only
+ CPPUNIT_ASSERT(aPosAfterTable > aPosMoveAfterUndo);
+ CPPUNIT_ASSERT_EQUAL(aPosAfterUndo, aPosMoveAfterUndo);
+ }
+ //Redo the changes
+ rUndoManager.Redo();
+ //paragraph *text node* should not be there
+ SwPosition aPosAfterRedo(*(pCursor->GetPoint()));
+ //position should be exactly same as it was after deletion of *text node*
+ CPPUNIT_ASSERT_EQUAL(aPosAfterRedo, aPosMoveAfterDel);
+ //moving the cursor forward, but it should not actually move as there is no *text node* after the table due to this same position is expected after move as it was before move
+ pCursor->Move(fnMoveForward);
+ SwPosition aPosAfterUndoMove(*(pCursor->GetPoint()));
+ CPPUNIT_ASSERT_EQUAL(aPosAfterRedo, aPosAfterUndoMove);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testSearchWithTransliterate)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, "This is paragraph one");
+ pWrtShell->SplitNode();
+ }
+ {
+ SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
+ SwPaM aPaM(aIdx);
+ pDoc->getIDocumentContentOperations().InsertString(aPaM, "This is Other PARAGRAPH");
+ }
+ i18nutil::SearchOptions2 SearchOpt;
+ SearchOpt.algorithmType = css::util::SearchAlgorithms_ABSOLUTE;
+ SearchOpt.searchFlag = css::util::SearchFlags::ALL_IGNORE_CASE;
+ SearchOpt.searchString = "other";
+ SearchOpt.replaceString.clear();
+ SearchOpt.changedChars = 0;
+ SearchOpt.deletedChars = 0;
+ SearchOpt.insertedChars = 0;
+ SearchOpt.transliterateFlags = TransliterationFlags::IGNORE_DIACRITICS_CTL;
+ SearchOpt.AlgorithmType2 = css::util::SearchAlgorithms2::ABSOLUTE;
+ SearchOpt.WildcardEscapeCharacter = 0;
+ //transliteration option set so that at least one of the search strings is not found
+ sal_uLong case1
+ = pWrtShell->SearchPattern(SearchOpt, true, SwDocPositions::Start, SwDocPositions::End);
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true);
+ CPPUNIT_ASSERT_EQUAL(OUString(), pShellCursor->GetText());
+ CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(case1));
+ SearchOpt.searchString = "paragraph";
+ SearchOpt.transliterateFlags = TransliterationFlags::IGNORE_KASHIDA_CTL;
+ //transliteration option set so that all search strings are found
+ sal_uLong case2
+ = pWrtShell->SearchPattern(SearchOpt, true, SwDocPositions::Start, SwDocPositions::End);
+ pShellCursor = pWrtShell->getShellCursor(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("paragraph"), pShellCursor->GetText());
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(case2));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf73660)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ OUString aData1 = "First" + OUStringChar(CHAR_SOFTHYPHEN) + "Word";
+ OUString aData2 = "Seco" + OUStringChar(CHAR_SOFTHYPHEN) + "nd";
+ OUString aData3 = OUStringChar(CHAR_SOFTHYPHEN) + "Third";
+ OUString aData4 = "Fourth" + OUStringChar(CHAR_SOFTHYPHEN);
+ pWrtShell->Insert("We are inserting some text in the document to check the search feature ");
+ pWrtShell->Insert(aData1 + " ");
+ pWrtShell->Insert(aData2 + " ");
+ pWrtShell->Insert(aData3 + " ");
+ pWrtShell->Insert(aData4 + " ");
+ pWrtShell->Insert("Fifth ");
+ pWrtShell->Insert("Now we have enough text let's test search for all the cases");
+ //searching for all 5 strings entered with soft-hyphen, search string contains no soft-hyphen
+ i18nutil::SearchOptions2 searchOpt;
+ searchOpt.algorithmType = css::util::SearchAlgorithms_REGEXP;
+ searchOpt.searchFlag = css::util::SearchFlags::NORM_WORD_ONLY;
+ //case 1
+ searchOpt.searchString = "First";
+ CPPUNIT_ASSERT_EQUAL(
+ sal_uLong(1),
+ pWrtShell->SearchPattern(searchOpt, true, SwDocPositions::Start, SwDocPositions::End));
+ //case 2
+ searchOpt.searchString = "Second";
+ CPPUNIT_ASSERT_EQUAL(
+ sal_uLong(1),
+ pWrtShell->SearchPattern(searchOpt, true, SwDocPositions::Start, SwDocPositions::End));
+ //case 3
+ searchOpt.searchString = "Third";
+ CPPUNIT_ASSERT_EQUAL(
+ sal_uLong(1),
+ pWrtShell->SearchPattern(searchOpt, true, SwDocPositions::Start, SwDocPositions::End));
+ //case 4
+ searchOpt.searchString = "Fourth";
+ CPPUNIT_ASSERT_EQUAL(
+ sal_uLong(1),
+ pWrtShell->SearchPattern(searchOpt, true, SwDocPositions::Start, SwDocPositions::End));
+ //case 5
+ searchOpt.searchString = "Fifth";
+ CPPUNIT_ASSERT_EQUAL(
+ sal_uLong(1),
+ pWrtShell->SearchPattern(searchOpt, true, SwDocPositions::Start, SwDocPositions::End));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testNewDocModifiedState)
+{
+ //creating a new doc
+ SwDoc* pDoc = new SwDoc();
+ //getting the state of the document via IDocumentState
+ IDocumentState& rState(pDoc->getIDocumentState());
+ //the state should not be modified, no modifications yet
+ CPPUNIT_ASSERT(!(rState.IsModified()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ //inserting first footnote
+ pWrtShell->InsertFootnote("");
+ SwFieldType* pField = pWrtShell->GetFieldType(0, SwFieldIds::GetRef);
+ SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pField);
+ //moving cursor to the starting of document
+ pWrtShell->StartOfSection();
+ //inserting reference field 1
+ SwGetRefField aField1(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(0), REF_CONTENT);
+ pWrtShell->InsertField2(aField1);
+ //inserting second footnote
+ pWrtShell->InsertFootnote("");
+ pWrtShell->StartOfSection();
+ pCursor->Move(fnMoveForward);
+ //inserting reference field 2
+ SwGetRefField aField2(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT);
+ pWrtShell->InsertField2(aField2);
+ //inserting third footnote
+ pWrtShell->InsertFootnote("");
+ pWrtShell->StartOfSection();
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ //inserting reference field 3
+ SwGetRefField aField3(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(2), REF_CONTENT);
+ pWrtShell->InsertField2(aField3);
+ //updating the fields
+ IDocumentFieldsAccess& rField(pDoc->getIDocumentFieldsAccess());
+ rField.UpdateExpFields(nullptr, true);
+ //creating new clipboard doc
+ rtl::Reference<SwDoc> xClpDoc(new SwDoc());
+ xClpDoc->SetClipBoard(true);
+ xClpDoc->getIDocumentFieldsAccess().LockExpFields();
+ //selecting reference field 2 and reference field 3 and footnote 1 and footnote 2
+ //selection is such that more than one and not all footnotes and ref fields are selected
+ pCursor->Move(fnMoveBackward);
+ pCursor->Move(fnMoveBackward);
+ //start marking
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ //copying the selection to clipboard
+ pWrtShell->Copy(*xClpDoc);
+ //deleting selection mark after copy
+ pCursor->DeleteMark();
+ //checking that the footnotes reference fields have same values after copy operation
+ uno::Any aAny;
+ sal_uInt16 aFormat;
+ //reference field 1
+ pWrtShell->StartOfSection();
+ SwField* pRef1 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pRef1->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pRef1->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny);
+ //reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pRef2 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pRef2->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pRef2->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //reference field 3
+ pCursor->Move(fnMoveForward);
+ SwField* pRef3 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pRef3->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pRef3->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //moving cursor to the end of the document
+ pWrtShell->EndOfSection();
+ //pasting the copied selection at current cursor position
+ pWrtShell->Paste(*xClpDoc);
+ //checking the fields, both new and old, for proper values
+ pWrtShell->StartOfSection();
+ //old reference field 1
+ SwField* pOldRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef11->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny);
+ //old reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef12->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //old reference field 3
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef13 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef13->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef13->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //old footnote 1
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd1 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote1
+ = pTextNd1->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote1(pFootnote1->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnote1.GetNumber());
+ SwTextFootnote* pTFNote1 = static_cast<SwTextFootnote*>(pFootnote1);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pTFNote1->GetSeqRefNo());
+ //old footnote 2
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd2 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote2
+ = pTextNd2->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote2(pFootnote2->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnote2.GetNumber());
+ SwTextFootnote* pTFNote2 = static_cast<SwTextFootnote*>(pFootnote2);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pTFNote2->GetSeqRefNo());
+ //old footnote 3
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd3 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote3
+ = pTextNd3->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote3(pFootnote3->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rFootnote3.GetNumber());
+ SwTextFootnote* pTFNote3 = static_cast<SwTextFootnote*>(pFootnote3);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pTFNote3->GetSeqRefNo());
+ //new reference field 1
+ pCursor->Move(fnMoveForward);
+ SwField* pNewRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef11->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //new reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pNewRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef12->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(3)), aAny);
+ //new footnote 1
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd4 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote4
+ = pTextNd4->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote4(pFootnote4->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), rFootnote4.GetNumber());
+ SwTextFootnote* pTFNote4 = static_cast<SwTextFootnote*>(pFootnote4);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pTFNote4->GetSeqRefNo());
+ //moving the cursor to the starting of document
+ pWrtShell->StartOfSection();
+ //pasting the selection again at current cursor position
+ pWrtShell->Paste(*xClpDoc);
+ //checking the fields, both new and old, for proper values
+ pWrtShell->StartOfSection();
+ //new reference field 1
+ SwField* pNewRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef21->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //new reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pNewRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef22->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(4)), aAny);
+ //new footnote 1
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd11 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote11
+ = pTextNd11->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote11(pFootnote11->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnote11.GetNumber());
+ SwTextFootnote* pTFNote11 = static_cast<SwTextFootnote*>(pFootnote11);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), pTFNote11->GetSeqRefNo());
+ //old reference field 1
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef21->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny);
+ //old reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef22->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //old reference field 3
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef23 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef23->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef23->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //old footnote 1
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd12 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote12
+ = pTextNd12->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote12(pFootnote12->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnote12.GetNumber());
+ SwTextFootnote* pTFNote12 = static_cast<SwTextFootnote*>(pFootnote12);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pTFNote12->GetSeqRefNo());
+ //old footnote 2
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd13 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote13
+ = pTextNd13->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote13(pFootnote13->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), rFootnote13.GetNumber());
+ SwTextFootnote* pTFNote13 = static_cast<SwTextFootnote*>(pFootnote13);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pTFNote13->GetSeqRefNo());
+ //old footnote 3
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd14 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote14
+ = pTextNd14->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote14(pFootnote14->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), rFootnote14.GetNumber());
+ SwTextFootnote* pTFNote14 = static_cast<SwTextFootnote*>(pFootnote14);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pTFNote14->GetSeqRefNo());
+ //old reference field 4
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef24 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef24->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef24->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //old reference field 5
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef25 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef25->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef25->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(3)), aAny);
+ //old footnote 4
+ pCursor->Move(fnMoveForward);
+ SwTextNode* pTextNd15 = pCursor->GetNode().GetTextNode();
+ SwTextAttr* const pFootnote15
+ = pTextNd15->GetTextAttrForCharAt(pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ const SwFormatFootnote& rFootnote15(pFootnote15->GetFootnote());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(5), rFootnote15.GetNumber());
+ SwTextFootnote* pTFNote15 = static_cast<SwTextFootnote*>(pFootnote15);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pTFNote15->GetSeqRefNo());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ //inserting sequence field 1
+ SwSetExpFieldType* pSeqType = static_cast<SwSetExpFieldType*>(
+ pWrtShell->GetFieldType(SwFieldIds::SetExp, "Illustration"));
+ SwSetExpField aSetField1(pSeqType, "", SVX_NUM_ARABIC);
+ pWrtShell->InsertField2(aSetField1);
+ SwGetRefFieldType* pRefType
+ = static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::GetRef));
+ //moving cursor to the starting of document
+ pWrtShell->StartOfSection();
+ //inserting reference field 1
+ SwGetRefField aGetField1(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(0),
+ REF_CONTENT);
+ pWrtShell->InsertField2(aGetField1);
+ //now we have ref1-seq1
+ //moving the cursor
+ pCursor->Move(fnMoveForward);
+ //inserting sequence field 2
+ SwSetExpField aSetField2(pSeqType, "", SVX_NUM_ARABIC);
+ pWrtShell->InsertField2(aSetField2);
+ //moving the cursor
+ pWrtShell->StartOfSection();
+ pCursor->Move(fnMoveForward);
+ //inserting reference field 2
+ SwGetRefField aGetField2(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(1),
+ REF_CONTENT);
+ pWrtShell->InsertField2(aGetField2);
+ //now we have ref1-ref2-seq1-seq2
+ //moving the cursor
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ //inserting sequence field 3
+ SwSetExpField aSetField3(pSeqType, "", SVX_NUM_ARABIC);
+ pWrtShell->InsertField2(aSetField3);
+ pWrtShell->StartOfSection();
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ //inserting reference field 3
+ SwGetRefField aGetField3(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(2),
+ REF_CONTENT);
+ pWrtShell->InsertField2(aGetField3);
+ //now after insertion we have ref1-ref2-ref3-seq1-seq2-seq3
+ //updating the fields
+ IDocumentFieldsAccess& rField(pDoc->getIDocumentFieldsAccess());
+ rField.UpdateExpFields(nullptr, true);
+ //creating new clipboard doc
+ rtl::Reference<SwDoc> xClpDoc(new SwDoc());
+ xClpDoc->SetClipBoard(true);
+ xClpDoc->getIDocumentFieldsAccess().LockExpFields();
+ //selecting reference field 2 and 3 and sequence field 1 and 2
+ //selection is such that more than one and not all sequence fields and reference fields are selected
+ //ref1-[ref2-ref3-seq1-seq2]-seq3
+ pWrtShell->StartOfSection();
+ pCursor->Move(fnMoveForward);
+ //start marking
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ pCursor->Move(fnMoveForward);
+ //copying the selection to clipboard
+ pWrtShell->Copy(*xClpDoc);
+ //deleting selection mark after copy
+ pCursor->DeleteMark();
+ //checking whether the sequence and reference fields have same values after copy operation
+ uno::Any aAny;
+ sal_uInt16 aFormat;
+ //reference field 1
+ pWrtShell->StartOfSection();
+ SwField* pRef1 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pRef1->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pRef1->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny);
+ //reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pRef2 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pRef2->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pRef2->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //reference field 3
+ pCursor->Move(fnMoveForward);
+ SwField* pRef3 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pRef3->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pRef3->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //sequence field 1
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pSeqF1
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pSeqF1->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pSeqF1->GetFieldName());
+ //sequence field 2
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pSeqF2
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pSeqF2->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pSeqF2->GetFieldName());
+ //sequence field 3
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pSeqF3
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pSeqF3->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pSeqF3->GetFieldName());
+ //moving cursor to the end of the document
+ pWrtShell->EndOfSection();
+ //pasting the copied selection at current cursor position
+ pWrtShell->Paste(*xClpDoc);
+ //checking the fields, both new and old, for proper values
+ pWrtShell->StartOfSection();
+ //now we have ref1-ref2-ref3-seq1-seq2-seq3-nref1-nref2-nseq1-nseq2
+ //old reference field 1
+ SwField* pOldRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef11->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny);
+ //old reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef12->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //old reference field 3
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef13 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef13->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef13->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //old sequence field 1
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pSeq1
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pSeq1->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pSeq1->GetFieldName());
+ //old sequence field 2
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pSeq2
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pSeq2->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pSeq2->GetFieldName());
+ //old sequence field 3
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pSeq3
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pSeq3->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pSeq3->GetFieldName());
+ //new reference field 1
+ pCursor->Move(fnMoveForward);
+ SwField* pNewRef11 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef11->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(4)), aAny);
+ //new reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pNewRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef12->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //new sequence field 1
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pNewSeq1
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pNewSeq1->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pNewSeq1->GetFieldName());
+ //new sequence field 2
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pNewSeq2
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), pNewSeq2->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pNewSeq2->GetFieldName());
+ //moving the cursor to the starting of document
+ pWrtShell->StartOfSection();
+ //pasting the selection again at current cursor position
+ pWrtShell->Paste(*xClpDoc);
+ //checking the fields, both new and old, for proper values
+ pWrtShell->StartOfSection();
+ //now we have [nnref1-nnref2-nnseq1-nnseq2]-ref1-[ref2-ref3-seq1-seq2]-seq3-[nref1-nref2-nseq1-nseq2]
+ //new reference field 1
+ SwField* pNewRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef21->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(6)), aAny);
+ //new reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pNewRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pNewRef22->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pNewRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //new sequence field 1
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pNewSeq11
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(5), pNewSeq11->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pNewSeq11->GetFieldName());
+ //new sequence field 2
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pNewSeq12
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(6), pNewSeq12->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pNewSeq12->GetFieldName());
+ //old reference field 1
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef21 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef21->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny);
+ //old reference field 2
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef22->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny);
+ //old reference field 3
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef23 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef23->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef23->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //old sequence field 1
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pOldSeq11
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(0), pOldSeq11->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pOldSeq11->GetFieldName());
+ //old sequence field 2
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pOldSeq12
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pOldSeq12->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pOldSeq12->GetFieldName());
+ //old sequence field 3
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pOldSeq13
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pOldSeq13->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pOldSeq13->GetFieldName());
+ //old reference field 4
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef24 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef24->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef24->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(4)), aAny);
+ //old reference field 5
+ pCursor->Move(fnMoveForward);
+ SwField* pOldRef25 = SwCursorShell::GetFieldAtCursor(pCursor, true);
+ aFormat = pOldRef25->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat);
+ pOldRef25->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny);
+ //old sequence field 4
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pOldSeq14
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pOldSeq14->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pOldSeq14->GetFieldName());
+ //old sequence field 5
+ pCursor->Move(fnMoveForward);
+ SwSetExpField* pOldSeq15
+ = static_cast<SwSetExpField*>(SwCursorShell::GetFieldAtCursor(pCursor, true));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), pOldSeq15->GetSeqNumber());
+ CPPUNIT_ASSERT_EQUAL(OUString("Number range Illustration"), pOldSeq15->GetFieldName());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf74230)
+{
+ createSwDoc();
+ //exporting the empty document to ODT via TempFile
+ uno::Sequence<beans::PropertyValue> aDescriptor;
+ utl::TempFile aTempFile;
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+ CPPUNIT_ASSERT(aTempFile.IsValid());
+ //loading an XML DOM of the "styles.xml" of the TempFile
+ xmlDocUniquePtr pXmlDoc = parseExportInternal(aTempFile.GetURL(), "styles.xml");
+ //pXmlDoc should not be null
+ CPPUNIT_ASSERT(pXmlDoc);
+ //asserting XPath in loaded XML DOM
+ assertXPath(pXmlDoc, "//office:styles/style:default-style[@style:family='graphic']/"
+ "style:graphic-properties[@svg:stroke-color='#3465a4']");
+ assertXPath(pXmlDoc, "//office:styles/style:default-style[@style:family='graphic']/"
+ "style:graphic-properties[@draw:fill-color='#729fcf']");
+ //deleting the TempFile
+ aTempFile.EnableKillingFile();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf80663)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ //Inserting 2x2 Table
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(TableOpt, 2, 2);
+ //Checking for the number of rows and columns
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Deleting the first row
+ pWrtShell->StartOfSection(); //moves the cursor to the start of Doc
+ pWrtShell->SelTableRow(); //selects the first row
+ pWrtShell->DeleteRow();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Deleting the second row
+ pWrtShell->GoNextCell(); //moves the cursor to next cell
+ pWrtShell->SelTableRow(); //selects the second row
+ pWrtShell->DeleteRow();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Deleting the first column
+ pWrtShell->StartOfSection(); //moves the cursor to the start of Doc
+ pWrtShell->SelTableCol(); //selects first column
+ pWrtShell->DeleteCol();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Deleting the second column
+ pWrtShell->StartOfSection(); //moves the cursor to the start of Doc
+ pWrtShell->GoNextCell(); //moves the cursor to next cell
+ pWrtShell->SelTableCol(); //selects second column
+ pWrtShell->DeleteCol();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf57197)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ //Inserting 1x1 Table
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(TableOpt, 1, 1);
+ //Checking for the number of rows and columns
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Inserting one row before the existing row
+ pWrtShell->StartOfSection(); //moves the cursor to the start of Doc
+ pWrtShell->InsertRow(1, false);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Inserting one row after the existing row
+ pWrtShell->StartOfSection(); //moves the cursor to the start of Doc
+ pWrtShell->InsertRow(1, true);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Inserting one column before the existing column
+ pWrtShell->StartOfSection(); //moves the cursor to the start of Doc
+ pWrtShell->InsertCol(1, false);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Inserting one column after the existing column
+ pWrtShell->StartOfSection(); //moves the cursor to the start of Doc
+ pWrtShell->InsertCol(1, true);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ //Redo changes
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable->getColumns()->getCount());
+ //Undo changes
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf131990)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT(!pWrtShell->Up(false, 1, true));
+ CPPUNIT_ASSERT(!pWrtShell->Down(false, 1, true));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf90808)
+{
+ createSwDoc();
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange = xTextDocument->getText();
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ uno::Reference<text::XParagraphCursor> xCursor(xText->createTextCursor(), uno::UNO_QUERY);
+ //inserting text into document so that the paragraph is not empty
+ xText->setString("Hello World!");
+ uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY);
+ //creating bookmark 1
+ uno::Reference<text::XTextContent> xHeadingBookmark1(
+ xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xHeadingName1(xHeadingBookmark1, uno::UNO_QUERY);
+ xHeadingName1->setName("__RefHeading__1");
+ //moving cursor to the starting of paragraph
+ xCursor->gotoStartOfParagraph(false);
+ //inserting the bookmark in paragraph
+ xText->insertTextContent(xCursor, xHeadingBookmark1, true);
+ //creating bookmark 2
+ uno::Reference<text::XTextContent> xHeadingBookmark2(
+ xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xHeadingName2(xHeadingBookmark2, uno::UNO_QUERY);
+ xHeadingName2->setName("__RefHeading__2");
+ //inserting the bookmark in same paragraph, at the end
+ //only one bookmark of this type is allowed in each paragraph an exception of com.sun.star.lang.IllegalArgumentException must be thrown when inserting the other bookmark in same paragraph
+ xCursor->gotoEndOfParagraph(true);
+ CPPUNIT_ASSERT_THROW(xText->insertTextContent(xCursor, xHeadingBookmark2, true),
+ css::lang::IllegalArgumentException);
+ //now testing for __RefNumPara__
+ //creating bookmark 1
+ uno::Reference<text::XTextContent> xNumBookmark1(
+ xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xNumName1(xNumBookmark1, uno::UNO_QUERY);
+ xNumName1->setName("__RefNumPara__1");
+ //moving cursor to the starting of paragraph
+ xCursor->gotoStartOfParagraph(false);
+ //inserting the bookmark in paragraph
+ xText->insertTextContent(xCursor, xNumBookmark1, true);
+ //creating bookmark 2
+ uno::Reference<text::XTextContent> xNumBookmark2(
+ xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xNumName2(xNumBookmark2, uno::UNO_QUERY);
+ xNumName2->setName("__RefNumPara__2");
+ //inserting the bookmark in same paragraph, at the end
+ //only one bookmark of this type is allowed in each paragraph an exception of com.sun.star.lang.IllegalArgumentException must be thrown when inserting the other bookmark in same paragraph
+ xCursor->gotoEndOfParagraph(true);
+ CPPUNIT_ASSERT_THROW(xText->insertTextContent(xCursor, xNumBookmark2, true),
+ css::lang::IllegalArgumentException);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf97601)
+{
+ // Instructions from the bugreport to trigger an infinite loop.
+ createSwDoc(DATA_DIRECTORY, "tdf97601.odt");
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xEmbeddedObjectsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xEmbeddedObjects
+ = xEmbeddedObjectsSupplier->getEmbeddedObjects();
+ uno::Reference<beans::XPropertySet> xChart;
+ xEmbeddedObjects->getByName("myChart") >>= xChart;
+ uno::Reference<chart2::data::XDataSource> xChartComponent;
+ xChart->getPropertyValue("Component") >>= xChartComponent;
+ uno::Sequence<uno::Reference<chart2::data::XLabeledDataSequence>> aDataSequences
+ = xChartComponent->getDataSequences();
+ uno::Reference<document::XEmbeddedObjectSupplier2> xChartState(xChart, uno::UNO_QUERY);
+ xChartState->getExtendedControlOverEmbeddedObject()->changeState(1);
+ uno::Reference<util::XModifiable> xDataSequenceModifiable(aDataSequences[2]->getValues(),
+ uno::UNO_QUERY);
+ xDataSequenceModifiable->setModified(true);
+
+ // Make sure that the chart is marked as modified.
+ uno::Reference<util::XModifiable> xModifiable(xChartComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xModifiable->isModified()));
+ calcLayout();
+ // This never returned.
+ Scheduler::ProcessEventsToIdle();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf75137)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true);
+ pWrtShell->InsertFootnote("This is first footnote");
+ SwNodeOffset firstIndex = pShellCursor->GetNode().GetIndex();
+ pShellCursor->GotoFootnoteAnchor();
+ pWrtShell->InsertFootnote("This is second footnote");
+ pWrtShell->Up(false);
+ SwNodeOffset secondIndex = pShellCursor->GetNode().GetIndex();
+ pWrtShell->Down(false);
+ SwNodeOffset thirdIndex = pShellCursor->GetNode().GetIndex();
+ CPPUNIT_ASSERT_EQUAL(firstIndex, thirdIndex);
+ CPPUNIT_ASSERT(firstIndex != secondIndex);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf83798)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf83798.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->GotoNextTOXBase();
+ const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX();
+ pWrtShell->UpdateTableOf(*pTOXBase);
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward, GoInNode);
+ pCursor->Move(fnMoveBackward, GoInContent);
+ CPPUNIT_ASSERT_EQUAL(OUString("Table of Contents"), pCursor->GetText());
+ pCursor->Move(fnMoveForward, GoInContent);
+ pCursor->DeleteMark();
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward, GoInContent);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), pCursor->GetText());
+ pCursor->DeleteMark();
+ pCursor->Move(fnMoveForward, GoInNode);
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward, GoInContent);
+ pCursor->Move(fnMoveForward, GoInContent);
+ pCursor->Move(fnMoveForward, GoInContent);
+ CPPUNIT_ASSERT_EQUAL(OUString("1.A"), pCursor->GetText());
+ pCursor->DeleteMark();
+ pCursor->Move(fnMoveForward, GoInNode);
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward, GoInContent);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), pCursor->GetText());
+ pCursor->DeleteMark();
+ pCursor->Move(fnMoveForward, GoInNode);
+ pCursor->SetMark();
+ pCursor->Move(fnMoveForward, GoInContent);
+ pCursor->Move(fnMoveForward, GoInContent);
+ pCursor->Move(fnMoveForward, GoInContent);
+ CPPUNIT_ASSERT_EQUAL(OUString("2.A"), pCursor->GetText());
+ pCursor->DeleteMark();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf89714)
+{
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY);
+ uno::Reference<uno::XInterface> xInterface(xFact->createInstance("com.sun.star.text.Defaults"),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertyState> xPropState(xInterface, uno::UNO_QUERY);
+ //enabled Paragraph Orphan and Widows by default starting in LO5.1
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int8(2)), xPropState->getPropertyDefault("ParaOrphans"));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int8(2)), xPropState->getPropertyDefault("ParaWidows"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf130287)
+{
+ //create a new writer document
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ //insert a 1-cell table in the newly created document
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(TableOpt, 1, 1);
+ //checking for the row and column
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getColumns()->getCount());
+ uno::Reference<table::XCell> xCell = xTable->getCellByName("A1");
+ uno::Reference<text::XText> xCellText(xCell, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xCellText);
+ // they were 2 (orphan/widow control enabled unnecessarily in Table Contents paragraph style)
+ CPPUNIT_ASSERT_EQUAL(sal_Int8(0), getProperty<sal_Int8>(xParagraph, "ParaOrphans"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int8(0), getProperty<sal_Int8>(xParagraph, "ParaWidows"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testPropertyDefaults)
+{
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY);
+ uno::Reference<uno::XInterface> xInterface(xFact->createInstance("com.sun.star.text.Defaults"),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropSet(xInterface, uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertyState> xPropState(xInterface, uno::UNO_QUERY);
+ //testing CharFontName from style::CharacterProperties
+ //getting property default
+ uno::Any aCharFontName = xPropState->getPropertyDefault("CharFontName");
+ //asserting property default and defaults received from "css.text.Defaults" service
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharFontName"), aCharFontName);
+ //changing the default value
+ xPropSet->setPropertyValue("CharFontName", uno::Any(OUString("Symbol")));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Symbol")), xPropSet->getPropertyValue("CharFontName"));
+ //resetting the value to default
+ xPropState->setPropertyToDefault("CharFontName");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharFontName"), aCharFontName);
+ //testing CharHeight from style::CharacterProperties
+ //getting property default
+ uno::Any aCharHeight = xPropState->getPropertyDefault("CharHeight");
+ //asserting property default and defaults received from "css.text.Defaults" service
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharHeight"), aCharHeight);
+ //changing the default value
+ xPropSet->setPropertyValue("CharHeight", uno::Any(float(14)));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(float(14)), xPropSet->getPropertyValue("CharHeight"));
+ //resetting the value to default
+ xPropState->setPropertyToDefault("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharHeight"), aCharHeight);
+ //testing CharWeight from style::CharacterProperties
+ uno::Any aCharWeight = xPropSet->getPropertyValue("CharWeight");
+ //changing the default value
+ xPropSet->setPropertyValue("CharWeight", uno::Any(float(awt::FontWeight::BOLD)));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(float(awt::FontWeight::BOLD)),
+ xPropSet->getPropertyValue("CharWeight"));
+ //resetting the value to default
+ xPropState->setPropertyToDefault("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharWeight"), aCharWeight);
+ //testing CharUnderline from style::CharacterProperties
+ uno::Any aCharUnderline = xPropSet->getPropertyValue("CharUnderline");
+ //changing the default value
+ xPropSet->setPropertyValue("CharUnderline", uno::Any(sal_Int16(awt::FontUnderline::SINGLE)));
+ CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(awt::FontUnderline::SINGLE)),
+ xPropSet->getPropertyValue("CharUnderline"));
+ //resetting the value to default
+ xPropState->setPropertyToDefault("CharUnderline");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharUnderline"), aCharUnderline);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTableBackgroundColor)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(TableOpt, 3, 3); //Inserting Table
+ //Checking Rows and Columns of Inserted Table
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRows()->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getColumns()->getCount());
+ pWrtShell->StartOfSection();
+ pWrtShell->SelTableRow(); //Selecting First Row
+ pWrtShell->ClearMark();
+ //Modifying the color of Table Box
+ pWrtShell->SetBoxBackground(
+ SvxBrushItem(Color(sal_Int32(0xFF00FF)), sal_Int16(RES_BACKGROUND)));
+ //Checking cells for background color only A1 should be modified
+ uno::Reference<table::XCell> xCell;
+ xCell = xTable->getCellByName("A1");
+ CPPUNIT_ASSERT_EQUAL(Color(0xFF00FF), getProperty<Color>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("A2");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("A3");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("B1");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("B2");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("B3");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("C1");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("C2");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+ xCell = xTable->getCellByName("C3");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xCell, "BackColor"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf88899)
+{
+ createSwDoc();
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(
+ mxComponent, uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xProps(
+ xDocumentPropertiesSupplier->getDocumentProperties());
+ uno::Reference<beans::XPropertyContainer> xUserProps = xProps->getUserDefinedProperties();
+ css::util::DateTime aDateTime
+ = { sal_uInt32(1234567), sal_uInt16(3), sal_uInt16(3), sal_uInt16(3),
+ sal_uInt16(10), sal_uInt16(11), sal_uInt16(2014), true };
+ xUserProps->addProperty("dateTime", sal_Int16(beans::PropertyAttribute::OPTIONAL),
+ uno::Any(aDateTime));
+ uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextField> xTextField(
+ xFact->createInstance("com.sun.star.text.textfield.docinfo.Custom"), uno::UNO_QUERY);
+ //Setting Name Property
+ uno::Reference<beans::XPropertySet> xPropSet(xTextField, uno::UNO_QUERY_THROW);
+ xPropSet->setPropertyValue("Name", uno::Any(OUString("dateTime")));
+ //Setting NumberFormat
+ uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<util::XNumberFormatTypes> xNumFormat(xNumberFormatsSupplier->getNumberFormats(),
+ uno::UNO_QUERY);
+ css::lang::Locale alocale;
+ alocale.Language = "en";
+ alocale.Country = "US";
+ sal_Int16 key = xNumFormat->getStandardFormat(util::NumberFormat::DATETIME, alocale);
+ xPropSet->setPropertyValue("NumberFormat", uno::Any(key));
+ //Inserting Text Content
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange = xTextDocument->getText();
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ xText->insertTextContent(xTextRange, xTextField, true);
+ //Retrieving the contents for verification
+ CPPUNIT_ASSERT_EQUAL(OUString("11/10/14 03:03 AM"), xTextField->getPresentation(false));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf90362)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf90362.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // Ensure correct initial setting
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Writer::Cursor::Option::IgnoreProtectedArea::set(false, batch);
+ batch->commit();
+ // First check if the end of the second paragraph is indeed protected.
+ pWrtShell->EndPara();
+ pWrtShell->Down(/*bSelect=*/false);
+ CPPUNIT_ASSERT_EQUAL(true, pWrtShell->HasReadonlySel());
+
+ // Then enable ignoring of protected areas and make sure that this time the cursor is read-write.
+ officecfg::Office::Writer::Cursor::Option::IgnoreProtectedArea::set(true, batch);
+ batch->commit();
+ CPPUNIT_ASSERT_EQUAL(false, pWrtShell->HasReadonlySel());
+ // Clean up, otherwise following tests will have that option set
+ officecfg::Office::Writer::Cursor::Option::IgnoreProtectedArea::set(false, batch);
+ batch->commit();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoDelAsCharTdf107512)
+{
+ SwDoc* pDoc(createSwDoc());
+ sw::UndoManager& rUndoManager(pDoc->GetUndoManager());
+ IDocumentContentOperations& rIDCO(pDoc->getIDocumentContentOperations());
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SfxItemSet frameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>);
+ SfxItemSet grfSet(pDoc->GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, RES_GRFATR_END - 1>);
+ rIDCO.InsertString(*pShell->GetCursor(), "foo");
+ pShell->ClearMark();
+ SwFormatAnchor anchor(RndStdIds::FLY_AS_CHAR);
+ frameSet.Put(anchor);
+ GraphicObject grf;
+ pShell->SttEndDoc(true);
+ CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet));
+ pShell->SttEndDoc(false);
+ CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet));
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ SvxCharHiddenItem hidden(true, RES_CHRATR_HIDDEN);
+ pShell->SelectTextModel(1, 4);
+ rIDCO.InsertPoolItem(*pShell->GetCursor(), hidden);
+ // now we have "\1foo\1" with the "foo" hidden
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)),
+ pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ SfxPoolItem const* pItem;
+ SfxItemSet query(pDoc->GetAttrPool(), svl::Items<RES_CHRATR_HIDDEN, RES_CHRATR_HIDDEN>);
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ CPPUNIT_ASSERT(static_cast<SvxCharHiddenItem const*>(pItem)->GetValue());
+ query.ClearItem(RES_CHRATR_HIDDEN);
+
+ // delete from the start
+ pShell->SelectTextModel(0, 4);
+ rIDCO.DeleteAndJoin(*pShell->GetCursor());
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)),
+ pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ CPPUNIT_ASSERT(static_cast<SvxCharHiddenItem const*>(pItem)->GetValue());
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)),
+ pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ CPPUNIT_ASSERT(static_cast<SvxCharHiddenItem const*>(pItem)->GetValue());
+ query.ClearItem(RES_CHRATR_HIDDEN);
+
+ // delete from the end
+ pShell->SelectTextModel(1, 5);
+ rIDCO.DeleteAndJoin(*pShell->GetCursor());
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)),
+ pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ CPPUNIT_ASSERT(static_cast<SvxCharHiddenItem const*>(pItem)->GetValue());
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT(
+ pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)),
+ pShell->GetCursor()->GetNode().GetTextNode()->GetText());
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT,
+ query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ query.ClearItem(RES_CHRATR_HIDDEN);
+ pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
+ CPPUNIT_ASSERT(static_cast<SvxCharHiddenItem const*>(pItem)->GetValue());
+ query.ClearItem(RES_CHRATR_HIDDEN);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoCharAttribute)
+{
+ // Create a new empty Writer document
+ SwDoc* pDoc = createSwDoc();
+ SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ IDocumentContentOperations& rIDCO(pDoc->getIDocumentContentOperations());
+ // Insert some text
+ rIDCO.InsertString(*pCursor, "This will be bolded");
+ // Position of word 9876543210
+ // Use cursor to select part of text
+ pCursor->SetMark();
+ for (int i = 0; i < 9; i++)
+ {
+ pCursor->Move(fnMoveBackward);
+ }
+ // Check that correct text was selected
+ CPPUNIT_ASSERT_EQUAL(OUString("be bolded"), pCursor->GetText());
+ // Apply a "Bold" attribute to selection
+ SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
+ rIDCO.InsertPoolItem(*pCursor, aWeightItem);
+ SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT>);
+ // Adds selected text's attributes to aSet
+ pCursor->GetNode().GetTextNode()->GetParaAttr(aSet, 10, 19);
+ SfxPoolItem const* pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT);
+ // Check that bold is active on the selection; checks if it's in aSet
+ CPPUNIT_ASSERT_EQUAL(true, (*pPoolItem == aWeightItem));
+ // Invoke Undo
+ rUndoManager.Undo();
+ // Check that bold is no longer active
+ aSet.ClearItem(RES_CHRATR_WEIGHT);
+ pCursor->GetNode().GetTextNode()->GetParaAttr(aSet, 10, 19);
+ pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT);
+ CPPUNIT_ASSERT_EQUAL(false, (*pPoolItem == aWeightItem));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoDelAsChar)
+{
+ SwDoc* pDoc(createSwDoc());
+ sw::UndoManager& rUndoManager(pDoc->GetUndoManager());
+ IDocumentContentOperations& rIDCO(pDoc->getIDocumentContentOperations());
+ SwCursorShell* pShell(pDoc->GetEditShell());
+ SfxItemSet frameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>);
+ SfxItemSet grfSet(pDoc->GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, RES_GRFATR_END - 1>);
+ SwFormatAnchor anchor(RndStdIds::FLY_AS_CHAR);
+ frameSet.Put(anchor);
+ GraphicObject grf;
+ CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ pShell->SetMark();
+ pShell->Left(1, CRSR_SKIP_CHARS);
+ rIDCO.DeleteAndJoin(*pShell->GetCursor());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT(!pShell->GetCursor()->GetNode().GetTextNode()->HasHints());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->HasHints());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ rUndoManager.Redo();
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT(!pShell->GetCursor()->GetNode().GetTextNode()->HasHints());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+ rUndoManager.Undo();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
+ CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->HasHints());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf86639)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf86639.rtf");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwTextFormatColl* pColl = pDoc->FindTextFormatCollByName(u"Heading");
+ pWrtShell->SetTextFormatColl(pColl);
+ OUString aExpected = pColl->GetAttrSet().GetFont().GetFamilyName();
+ // This was Calibri, should be Liberation Sans.
+ CPPUNIT_ASSERT_EQUAL(aExpected,
+ getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf90883TableBoxGetCoordinates)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf90883.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(true);
+ SwSelBoxes aBoxes;
+ ::GetTableSel(*pWrtShell, aBoxes);
+ CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(aBoxes.size()));
+ Point pos(aBoxes[0]->GetCoordinates());
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(pos.X()));
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(pos.Y()));
+ pos = aBoxes[1]->GetCoordinates();
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(pos.X()));
+ CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(pos.Y()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testEmbeddedDataSource)
+{
+ // Initially no data source.
+ uno::Reference<uno::XComponentContext> xComponentContext(
+ comphelper::getProcessComponentContext());
+ uno::Reference<sdb::XDatabaseContext> xDatabaseContext
+ = sdb::DatabaseContext::create(xComponentContext);
+ CPPUNIT_ASSERT(!xDatabaseContext->hasByName("calc-data-source"));
+
+ // Load: should have a component and a data source, too.
+ // Path with "#" must not cause issues
+ createSwDoc(OUStringConcatenation(DATA_DIRECTORY + OUString::Concat(u"hash%23path/")),
+ "embedded-data-source.odt");
+ CPPUNIT_ASSERT(xDatabaseContext->hasByName("calc-data-source"));
+
+ // Data source has a table named Sheet1.
+ uno::Reference<sdbc::XDataSource> xDataSource(xDatabaseContext->getByName("calc-data-source"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDataSource.is());
+ auto xConnection = xDataSource->getConnection("", "");
+ uno::Reference<container::XNameAccess> xTables
+ = css::uno::Reference<css::sdbcx::XTablesSupplier>(xConnection, uno::UNO_QUERY_THROW)
+ ->getTables();
+ CPPUNIT_ASSERT(xTables.is());
+ CPPUNIT_ASSERT(xTables->hasByName("Sheet1"));
+ xConnection->close();
+
+ // Reload: should still have a component and a data source, too.
+ reload("writer8", "embedded-data-source.odt");
+ CPPUNIT_ASSERT(mxComponent.is());
+ CPPUNIT_ASSERT(xDatabaseContext->hasByName("calc-data-source"));
+
+ // Data source has a table named Sheet1 after saving to a different directory.
+ xDataSource.set(xDatabaseContext->getByName("calc-data-source"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDataSource.is());
+ xConnection = xDataSource->getConnection("", "");
+ xTables = css::uno::Reference<css::sdbcx::XTablesSupplier>(xConnection, uno::UNO_QUERY_THROW)
+ ->getTables();
+ CPPUNIT_ASSERT(xTables.is());
+ CPPUNIT_ASSERT(xTables->hasByName("Sheet1"));
+ xConnection->close();
+
+ // Close: should not have a data source anymore.
+ mxComponent->dispose();
+ mxComponent.clear();
+ CPPUNIT_ASSERT(!xDatabaseContext->hasByName("calc-data-source"));
+
+ // Now open again the saved result, and instead of 'save as', just 'save'.
+ mxComponent = loadFromDesktop(maTempFile.GetURL(), "com.sun.star.text.TextDocument");
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ xStorable->store();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUnoCursorPointer)
+{
+ auto xDocComponent(
+ loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"));
+ auto pxDocDocument(dynamic_cast<SwXTextDocument*>(xDocComponent.get()));
+ CPPUNIT_ASSERT(pxDocDocument);
+ SwDoc* const pDoc(pxDocDocument->GetDocShell()->GetDoc());
+ std::unique_ptr<SwNodeIndex> pIdx(new SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1));
+ std::unique_ptr<SwPosition> pPos(new SwPosition(*pIdx));
+ sw::UnoCursorPointer pCursor(pDoc->CreateUnoCursor(*pPos));
+ CPPUNIT_ASSERT(static_cast<bool>(pCursor));
+ pPos.reset(); // we need to kill the SwPosition before disposing
+ pIdx.reset(); // we need to kill the SwNodeIndex before disposing
+ xDocComponent->dispose();
+ CPPUNIT_ASSERT(!static_cast<bool>(pCursor));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextTableCellNames)
+{
+ sal_Int32 nCol, nRow2;
+ SwXTextTable::GetCellPosition("z1", nCol, nRow2);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(51), nCol);
+ SwXTextTable::GetCellPosition("AA1", nCol, nRow2);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(52), nCol);
+ SwXTextTable::GetCellPosition("AB1", nCol, nRow2);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(53), nCol);
+ SwXTextTable::GetCellPosition("BB1", nCol, nRow2);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(105), nCol);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testShapeAnchorUndo)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "draw-anchor-undo.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(0);
+ tools::Rectangle aOrigLogicRect(pObject->GetLogicRect());
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.StartUndo(SwUndoId::START, nullptr);
+
+ pWrtShell->SelectObj(Point(), 0, pObject);
+
+ pWrtShell->GetDrawView()->MoveMarkedObj(Size(100, 100));
+ pWrtShell->ChgAnchor(RndStdIds::FLY_AT_PARA, true);
+
+ rUndoManager.EndUndo(SwUndoId::END, nullptr);
+
+ CPPUNIT_ASSERT(aOrigLogicRect != pObject->GetLogicRect());
+
+ rUndoManager.Undo();
+
+ CPPUNIT_ASSERT_EQUAL(pObject->GetLogicRect(), aOrigLogicRect);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf127635)
+{
+ SwDoc* pDoc = createSwDoc();
+
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, ' ', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'b', 0);
+ Scheduler::ProcessEventsToIdle();
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+
+ //Select 'a'
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+
+ // enable redlining
+ dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ // hide
+ dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'c', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, ' ', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'd', 0);
+ Scheduler::ProcessEventsToIdle();
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // accept all redlines
+ while (pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: C d b
+ // - Actual : Cd b
+ CPPUNIT_ASSERT_EQUAL(OUString("C d b"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testDde)
+{
+#if HAVE_FEATURE_UI
+ // Type asdf and copy it.
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("asdf");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 4, /*bBasicCall=*/false);
+ uno::Sequence<beans::PropertyValue> aPropertyValues;
+ dispatchCommand(mxComponent, ".uno:Copy", aPropertyValues);
+
+ // Go before the selection and paste as a DDE link.
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::LINK)) } });
+ dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
+
+ // Make sure that the document starts with a field now, and its expanded string value contains asdf.
+ const uno::Reference<text::XTextRange> xField = getRun(getParagraph(1), 1);
+ CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty<OUString>(xField, "TextPortionType"));
+ CPPUNIT_ASSERT(xField->getString().endsWith("asdf"));
+#endif
+}
+
+namespace
+{
+//IdleTask class to add a low priority Idle task
+class IdleTask
+{
+public:
+ bool GetFlag() const;
+ IdleTask();
+ DECL_LINK(FlipFlag, Timer*, void);
+
+private:
+ bool flag;
+ Idle maIdle{ "sw uiwriter IdleTask" };
+};
+}
+
+//constructor of IdleTask Class
+IdleTask::IdleTask()
+ : flag(false)
+{
+ //setting the Priority of Idle task to LOW, LOWEST
+ maIdle.SetPriority(TaskPriority::LOWEST);
+ //set idle for callback
+ maIdle.SetInvokeHandler(LINK(this, IdleTask, FlipFlag));
+ //starting the idle
+ maIdle.Start();
+}
+
+//GetFlag() of IdleTask Class
+bool IdleTask::GetFlag() const
+{
+ //returning the status of current flag
+ return flag;
+}
+
+//Callback function of IdleTask Class
+IMPL_LINK(IdleTask, FlipFlag, Timer*, , void)
+{
+ //setting the flag to make sure that low priority idle task has been dispatched
+ flag = true;
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testDocModState)
+{
+ //creating a new writer document via the XDesktop(to have more shells etc.)
+ SwDoc* pDoc = createSwDoc();
+ //creating instance of IdleTask Class
+ IdleTask idleTask;
+ //checking the state of the document via IDocumentState
+ IDocumentState& rState(pDoc->getIDocumentState());
+ //the state should not be modified
+ CPPUNIT_ASSERT(!(rState.IsModified()));
+ //checking the state of the document via SfxObjectShell
+ SwDocShell* pShell(pDoc->GetDocShell());
+ CPPUNIT_ASSERT(!(pShell->IsModified()));
+ //looping around yield until low priority idle task is dispatched and flag is flipped
+ while (!idleTask.GetFlag())
+ {
+ //dispatching all the events via VCL main-loop
+ Application::Yield();
+ }
+ //again checking for the state via IDocumentState
+ CPPUNIT_ASSERT(!(rState.IsModified()));
+ //again checking for the state via SfxObjectShell
+ CPPUNIT_ASSERT(!(pShell->IsModified()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf94804)
+{
+ //create new writer document
+ SwDoc* pDoc = createSwDoc();
+ //get cursor for making bookmark at a particular location
+ SwPaM* pCrsr = pDoc->GetEditShell()->GetCursor();
+ IDocumentMarkAccess* pIDMAccess(pDoc->getIDocumentMarkAccess());
+ //make first bookmark, CROSSREF_HEADING, with *empty* name
+ sw::mark::IMark* pMark1(
+ pIDMAccess->makeMark(*pCrsr, "", IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK,
+ ::sw::mark::InsertMode::New));
+ //get the new(autogenerated) bookmark name
+ OUString bookmark1name = pMark1->GetName();
+ //match the bookmark name, it should be like "__RefHeading__**"
+ CPPUNIT_ASSERT(bookmark1name.match("__RefHeading__"));
+ //make second bookmark, CROSSREF_NUMITEM, with *empty* name
+ sw::mark::IMark* pMark2(
+ pIDMAccess->makeMark(*pCrsr, "", IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK,
+ ::sw::mark::InsertMode::New));
+ //get the new(autogenerated) bookmark name
+ OUString bookmark2name = pMark2->GetName();
+ //match the bookmark name, it should be like "__RefNumPara__**"
+ CPPUNIT_ASSERT(bookmark2name.match("__RefNumPara__"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUnicodeNotationToggle)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "unicodeAltX.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ OUString sOriginalDocString;
+ OUString sDocString;
+ OUString sExpectedString;
+ uno::Sequence<beans::PropertyValue> aPropertyValues;
+
+ pWrtShell->EndPara();
+ sOriginalDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText();
+ CPPUNIT_ASSERT_EQUAL(OUString("uU+002b"), sOriginalDocString);
+
+ dispatchCommand(mxComponent, ".uno:UnicodeNotationToggle", aPropertyValues);
+ sExpectedString = "u+";
+ sDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText();
+ CPPUNIT_ASSERT_EQUAL(sDocString, sExpectedString);
+
+ dispatchCommand(mxComponent, ".uno:UnicodeNotationToggle", aPropertyValues);
+ sDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText();
+ CPPUNIT_ASSERT_EQUAL(sDocString, sOriginalDocString);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf34957)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf34957.odt");
+ // table with "keep with next" always started on a new page if the table was large,
+ // regardless of whether it was already kept with the previous paragraph,
+ // or whether the following paragraph actually fit on the same page (MAB 3.6 - 5.0)
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 1"),
+ parseDump("/root/page[2]/body/tab[1]/row[2]/cell[1]/txt"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Row 1"),
+ parseDump("/root/page[4]/body/tab[1]/row[2]/cell[1]/txt"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf89954)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf89954.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->EndPara();
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 't', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'e', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 's', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 't', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, '.', 0);
+ Scheduler::ProcessEventsToIdle();
+
+ SwNodeIndex aNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1);
+ // Placeholder character for the comment anchor was ^A (CH_TXTATR_BREAKWORD), not <fff9> (CH_TXTATR_INWORD).
+ // As a result, autocorrect did not turn the 't' input into 'T'.
+ CPPUNIT_ASSERT_EQUAL(OUString(u"Tes\uFFF9t. Test."),
+ aNodeIndex.GetNode().GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf89720)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf89720.odt");
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SwPostItMgr* pPostItMgr = pView->GetPostItMgr();
+ for (std::unique_ptr<SwSidebarItem> const& pItem : *pPostItMgr)
+ {
+ if (pItem->mpPostIt->IsFollow())
+ // This was non-0: reply comments had a text range overlay,
+ // resulting in unexpected dark color.
+ CPPUNIT_ASSERT(!pItem->mpPostIt->TextRange());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf88986)
+{
+ // Create a text shell.
+ SwDoc* pDoc = createSwDoc();
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SwTextShell aShell(*pView);
+
+ // Create the item set that is normally passed to the insert frame dialog.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ SfxItemSet aSet = aShell.CreateInsertFrameItemSet(aMgr);
+
+ // This was missing along with the gradient and other tables.
+ CPPUNIT_ASSERT(aSet.HasItem(SID_COLOR_TABLE));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf78150)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("foobar");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("foobar"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:DelToStartOfWord", {});
+
+ // Without the fix, test fails with:
+ // equality assertion failed
+ // - Expected:
+ // - Actual : f
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf138873)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("A B C");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("A B C"), getParagraph(1)->getString());
+
+ // Select B
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+
+ pWrtShell->Insert("DDD");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("A DDD C"), getParagraph(1)->getString());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("A B C"), getParagraph(1)->getString());
+
+ // Select B and C
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 2, /*bBasicCall=*/false);
+
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: A B C
+ // - Actual : A CB CB
+ CPPUNIT_ASSERT_EQUAL(OUString("A B C"), getParagraph(1)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf87922)
+{
+ // Create an SwDrawTextInfo.
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf87922.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwScriptInfo* pScriptInfo = nullptr;
+ // Get access to the single paragraph in the document.
+ SwNodeIndex aNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1);
+ const OUString& rText = aNodeIndex.GetNode().GetTextNode()->GetText();
+ sal_Int32 nLength = rText.getLength();
+ SwDrawTextInfo aDrawTextInfo(pWrtShell, *pWrtShell->GetOut(), pScriptInfo, rText,
+ TextFrameIndex(0), TextFrameIndex(nLength));
+ // Root -> page -> body -> text.
+ SwTextFrame* pTextFrame
+ = static_cast<SwTextFrame*>(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower());
+ aDrawTextInfo.SetFrame(pTextFrame);
+
+ // If no color background color is found, assume white.
+ Color* pColor = sw::GetActiveRetoucheColor();
+ *pColor = COL_WHITE;
+
+ // Make sure that automatic color on black background is white, not black.
+ vcl::Font aFont;
+ aDrawTextInfo.ApplyAutoColor(&aFont);
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, aFont.GetColor());
+}
+
+#if HAVE_MORE_FONTS
+namespace
+{
+struct PortionItem
+{
+ PortionItem(OUString const& sItemType, sal_Int32 nLength, PortionType nTextType)
+ : msItemType(sItemType)
+ , mnLength(nLength)
+ , mnTextType(nTextType)
+ {
+ }
+
+ OUString msItemType;
+ sal_Int32 mnLength;
+ PortionType mnTextType;
+};
+
+class PortionHandler : public SwPortionHandler
+{
+public:
+ std::vector<PortionItem> mPortionItems;
+ explicit PortionHandler()
+ : SwPortionHandler()
+ {
+ }
+
+ void clear() { mPortionItems.clear(); }
+
+ virtual void Text(TextFrameIndex nLength, PortionType nType, sal_Int32 /*nHeight*/,
+ sal_Int32 /*nWidth*/) override
+ {
+ mPortionItems.emplace_back("text", sal_Int32(nLength), nType);
+ }
+
+ virtual void Special(TextFrameIndex nLength, const OUString& /*rText*/, PortionType nType,
+ sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/,
+ const SwFont* /*pFont*/) override
+ {
+ mPortionItems.emplace_back("special", sal_Int32(nLength), nType);
+ }
+
+ virtual void LineBreak(sal_Int32 /*nWidth*/) override
+ {
+ mPortionItems.emplace_back("line_break", 0, PortionType::NONE);
+ }
+
+ virtual void Skip(TextFrameIndex nLength) override
+ {
+ mPortionItems.emplace_back("skip", sal_Int32(nLength), PortionType::NONE);
+ }
+
+ virtual void Finish() override { mPortionItems.emplace_back("finish", 0, PortionType::NONE); }
+};
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77014)
+{
+#if HAVE_MORE_FONTS
+ // The problem described in the bug tdf#77014 is that the input
+ // field text ("ThisIsAllOneWord") is broken up on linebreak, but
+ // it should be in one piece (like normal text).
+
+ // This test checks that the input field is in one piece and if the
+ // input field has more words, it is broken up at the correct place.
+
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf77014.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ SwTextFrame* pTextFrame
+ = static_cast<SwTextFrame*>(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower());
+
+ PortionHandler aHandler;
+ pTextFrame->VisitPortions(aHandler);
+
+ {
+ // Input Field - "One Two Three Four Five" = 25 chars
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), aHandler.mPortionItems[0].msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(25), aHandler.mPortionItems[0].mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::InputField, aHandler.mPortionItems[0].mnTextType);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("line_break"), aHandler.mPortionItems[1].msItemType);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("finish"), aHandler.mPortionItems[2].msItemType);
+ }
+
+ aHandler.clear();
+
+ pTextFrame = static_cast<SwTextFrame*>(pTextFrame->GetNext());
+ pTextFrame->VisitPortions(aHandler);
+
+ {
+ // Input Field - "ThisIsAllOneWord" = 18 chars
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), aHandler.mPortionItems[0].msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(18), aHandler.mPortionItems[0].mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::InputField, aHandler.mPortionItems[0].mnTextType);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("line_break"), aHandler.mPortionItems[1].msItemType);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("finish"), aHandler.mPortionItems[2].msItemType);
+ }
+
+ aHandler.clear();
+
+ // skip empty paragraph
+ pTextFrame = static_cast<SwTextFrame*>(pTextFrame->GetNext());
+
+ pTextFrame = static_cast<SwTextFrame*>(pTextFrame->GetNext());
+ pTextFrame->VisitPortions(aHandler);
+
+ {
+ // Text "The purpose of this report is to summarize the results of the existing bug in the LO suite"
+ // = 91 chars
+ auto& rPortionItem = aHandler.mPortionItems[0];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(91), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::Text, rPortionItem.mnTextType);
+
+ // NEW LINE
+ rPortionItem = aHandler.mPortionItems[1];
+ CPPUNIT_ASSERT_EQUAL(OUString("line_break"), rPortionItem.msItemType);
+
+ // Input Field: "ThisIsAllOneWord" = 18 chars
+ // which is 16 chars + 2 hidden chars (start & end input field) = 18 chars
+ // If this is correct then the input field is in one piece
+ rPortionItem = aHandler.mPortionItems[2];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(18), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::InputField, rPortionItem.mnTextType);
+
+ // Text "."
+ rPortionItem = aHandler.mPortionItems[3];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::Text, rPortionItem.mnTextType);
+
+ // NEW LINE
+ rPortionItem = aHandler.mPortionItems[4];
+ CPPUNIT_ASSERT_EQUAL(OUString("line_break"), rPortionItem.msItemType);
+
+ rPortionItem = aHandler.mPortionItems[5];
+ CPPUNIT_ASSERT_EQUAL(OUString("finish"), rPortionItem.msItemType);
+ }
+
+ aHandler.clear();
+
+ pTextFrame = static_cast<SwTextFrame*>(pTextFrame->GetNext());
+ pTextFrame->VisitPortions(aHandler);
+ {
+ printf("Portions:\n");
+
+ for (const auto& rPortionItem : aHandler.mPortionItems)
+ {
+ printf("-- Type: %s length: %" SAL_PRIdINT32 " text type: %d\n",
+ rPortionItem.msItemType.toUtf8().getStr(), rPortionItem.mnLength,
+ sal_uInt16(rPortionItem.mnTextType));
+ }
+
+ // Text "The purpose of this report is to summarize the results of the existing bug in the LO suite"
+ // 91 chars
+ auto& rPortionItem = aHandler.mPortionItems[0];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(91), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::Text, rPortionItem.mnTextType);
+
+ // The input field here has more words ("One Two Three Four Five")
+ // and it should break after "Two".
+ // Input Field: "One Two" = 7 chars + 1 start input field hidden character = 8 chars
+ rPortionItem = aHandler.mPortionItems[1];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::InputField, rPortionItem.mnTextType);
+
+ rPortionItem = aHandler.mPortionItems[2];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::Hole, rPortionItem.mnTextType);
+
+ // NEW LINE
+ rPortionItem = aHandler.mPortionItems[3];
+ CPPUNIT_ASSERT_EQUAL(OUString("line_break"), rPortionItem.msItemType);
+
+ // Input Field: "Three Four Five" = 16 chars + 1 end input field hidden character = 16 chars
+ rPortionItem = aHandler.mPortionItems[4];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::InputField, rPortionItem.mnTextType);
+
+ // Text "."
+ rPortionItem = aHandler.mPortionItems[5];
+ CPPUNIT_ASSERT_EQUAL(OUString("text"), rPortionItem.msItemType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), rPortionItem.mnLength);
+ CPPUNIT_ASSERT_EQUAL(PortionType::Text, rPortionItem.mnTextType);
+
+ // NEW LINE
+ rPortionItem = aHandler.mPortionItems[6];
+ CPPUNIT_ASSERT_EQUAL(OUString("line_break"), rPortionItem.msItemType);
+
+ rPortionItem = aHandler.mPortionItems[7];
+ CPPUNIT_ASSERT_EQUAL(OUString("finish"), rPortionItem.msItemType);
+ }
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf92648)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf92648.docx");
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ // Make sure we have ten draw shapes.
+ // Yes, we have if the left/right pages have different header/footer,
+ // but if not we have only nine of them:
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9), SwTextBoxHelper::getCount(pPage));
+ // and the text boxes haven't got zero height
+ sal_Int32 nCount = 0;
+ for (const SwFrameFormat* pFormat : *pDoc->GetSpzFrameFormats())
+ {
+ if (!SwTextBoxHelper::isTextBox(pFormat, RES_FLYFRMFMT))
+ continue;
+ SwFormatFrameSize aSize(pFormat->GetFrameSize());
+ CPPUNIT_ASSERT(aSize.GetHeight() != 0);
+ ++nCount;
+ }
+ // and we have had five of them.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), nCount);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf103978_backgroundTextShape)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf103978_backgroundTextShape.docx");
+
+ // there is only one shape. It has an attached textbox
+ bool bShapeIsOpaque = getProperty<bool>(getShape(1), "Opaque");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in the foreground", false, bShapeIsOpaque);
+ sal_Int32 nCount = 0;
+ for (const SwFrameFormat* pFormat : *pDoc->GetSpzFrameFormats())
+ {
+ if (!SwTextBoxHelper::isTextBox(pFormat, RES_FLYFRMFMT))
+ continue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox syncs the shape's transparency", bShapeIsOpaque,
+ pFormat->GetOpaque().GetValue());
+ ++nCount;
+ }
+ //ensure that we don't skip the for loop without an error
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of TextBoxes", sal_Int32(1), nCount);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf117225)
+{
+ // Test that saving a document with an embedded object does not leak
+ // tempfiles in the directory of the target file.
+ OUString aTargetDirectory
+ = m_directories.getURLFromWorkdir(u"/CppunitTest/sw_uiwriter7.test.user/");
+ OUString aTargetFile = aTargetDirectory + "tdf117225.odt";
+ OUString aSourceFile = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf117225.odt";
+ osl::File::copy(aSourceFile, aTargetFile);
+ mxComponent = loadFromDesktop(aTargetFile);
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ int nExpected = CountFilesInDirectory(aTargetDirectory);
+ xStorable->store();
+ int nActual = CountFilesInDirectory(aTargetDirectory);
+ // nActual was nExpected + 1, i.e. we leaked a tempfile.
+ CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
+
+ OUString aTargetFileSaveAs = aTargetDirectory + "tdf117225-save-as.odt";
+ xStorable->storeAsURL(aTargetFileSaveAs, {});
+ ++nExpected;
+ nActual = CountFilesInDirectory(aTargetDirectory);
+ // nActual was nExpected + 1, i.e. we leaked a tempfile.
+ CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf149184)
+{
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "simplefooter.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Removing the footer for all styles
+ pWrtShell->ChangeHeaderOrFooter(u"", false, false, false);
+
+ // export to simplefooter.doc
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aStoreProps = comphelper::InitPropertySequence({
+ { "FilterName", uno::Any(OUString("MS Word 97")) },
+ });
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+
+ // Without the fix in place, the test fails with:
+ // [CUT] sw_uiwriter7
+ // Segmentation fault (core dumped)
+ // [_RUN_____] testTdf149184::TestBody
+ xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf149089)
+{
+ createSwDoc(DATA_DIRECTORY, "tdf149089.odt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nPorLen1 = getXPath(pXmlDoc, "(//SwLinePortion)[1]", "length").toInt32();
+ sal_Int32 nPorLen2 = getXPath(pXmlDoc, "(//SwLinePortion)[2]", "length").toInt32();
+ sal_Int32 nPorLen3 = getXPath(pXmlDoc, "(//SwLinePortion)[3]", "length").toInt32();
+ // Two SwTextPortion and one SwKernPortion
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), nPorLen1); // SwTextPortion "&#x4E00;&#x4E00; "
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12), nPorLen2); // SwTextPortion "BUG 11111111"
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nPorLen3); // SwKernPortion
+
+ sal_Int32 nPorWidth1 = getXPath(pXmlDoc, "(//SwLinePortion)[1]", "width").toInt32();
+ sal_Int32 nPorWidth2 = getXPath(pXmlDoc, "(//SwLinePortion)[2]", "width").toInt32();
+ sal_Int32 nPorWidth3 = getXPath(pXmlDoc, "(//SwLinePortion)[3]", "width").toInt32();
+ sal_Int32 nGridWidth1 = nPorWidth1 / 3;
+ sal_Int32 nGridWidth2 = (nPorWidth2 + nPorWidth3) / 7;
+ CPPUNIT_ASSERT_EQUAL(nGridWidth1, nGridWidth2);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */