summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/core/data/README16
-rw-r--r--sw/qa/core/draw/data/textbox-undo-ordnum.docxbin0 -> 21223 bytes
-rw-r--r--sw/qa/core/draw/draw.cxx53
-rw-r--r--sw/qa/core/layout/data/tdf122894-4.docbin0 -> 214528 bytes
-rw-r--r--sw/qa/core/layout/data/tdf45908_invoice.odtbin0 -> 8555 bytes
-rw-r--r--sw/qa/core/layout/layout.cxx36
-rw-r--r--sw/qa/core/macros-test.cxx1
-rw-r--r--sw/qa/core/objectpositioning/data/inside-outside-vert-align.docxbin15838 -> 17252 bytes
-rw-r--r--sw/qa/core/objectpositioning/objectpositioning.cxx4
-rw-r--r--sw/qa/core/text/data/tabovermargin-section.fodt50
-rw-r--r--sw/qa/core/text/text.cxx66
-rw-r--r--sw/qa/core/tox/tox.cxx91
-rw-r--r--sw/qa/core/undo/data/table-copy-redline.odtbin0 -> 32554 bytes
-rw-r--r--sw/qa/core/undo/undo.cxx19
-rw-r--r--sw/qa/core/unocore/unocore.cxx14
-rw-r--r--sw/qa/core/uwriter.cxx6
-rw-r--r--sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odtbin0 -> 41595 bytes
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx126
-rw-r--r--sw/qa/extras/layout/data/tdf116486.docxbin22455 -> 22470 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf141079.odtbin0 -> 8787 bytes
-rw-r--r--sw/qa/extras/layout/layout2.cxx36
-rw-r--r--sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odtbin0 -> 25828 bytes
-rw-r--r--sw/qa/extras/odfexport/data/MadeByLO7.odtbin0 -> 17354 bytes
-rw-r--r--sw/qa/extras/odfexport/data/gutter-left.odtbin19355 -> 8519 bytes
-rw-r--r--sw/qa/extras/odfexport/data/pagestyle_background_lo64.odtbin0 -> 9947 bytes
-rw-r--r--sw/qa/extras/odfexport/data/pagestyle_background_lo70.odtbin0 -> 10125 bytes
-rw-r--r--sw/qa/extras/odfexport/data/pagestyle_background_ooo33.odtbin0 -> 9127 bytes
-rw-r--r--sw/qa/extras/odfexport/data/tdf95806.docxbin0 -> 16907 bytes
-rw-r--r--sw/qa/extras/odfexport/data/testTdf52065_centerTabs.odtbin0 -> 11274 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx323
-rw-r--r--sw/qa/extras/odfexport/odfexport2.cxx45
-rw-r--r--sw/qa/extras/odfimport/data/tdf128737.odtbin0 -> 18111 bytes
-rw-r--r--sw/qa/extras/odfimport/data/vmerge-cell-border.odtbin0 -> 8996 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx41
-rw-r--r--sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docxbin0 -> 23257 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/effectextent-margin.docxbin13219 -> 13144 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt60
-rw-r--r--sw/qa/extras/ooxmlexport/data/rtl-gutter.docxbin0 -> 8843 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118535.odtbin0 -> 12032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docxbin0 -> 25589 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docxbin19650 -> 19805 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136841.docxbin0 -> 15697 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docxbin0 -> 34729 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odtbin0 -> 10529 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140597.docxbin0 -> 13966 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141172.docxbin0 -> 16286 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf61
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docxbin0 -> 20367 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textframe-gradient.docxbin10916 -> 13655 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx8
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx11
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx3
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx11
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx11
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport16.cxx110
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx13
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx6
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx12
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf118693.docxbin0 -> 26072 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf122717.docxbin0 -> 4940 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx33
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx37
-rw-r--r--sw/qa/extras/rtfexport/data/rtl-gutter.rtf4
-rw-r--r--sw/qa/extras/rtfexport/rtfexport3.cxx17
-rw-r--r--sw/qa/extras/tiledrendering/data/cond-coll-copy.odtbin0 -> 7351 bytes
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx26
-rw-r--r--sw/qa/extras/uiwriter/data/AsCharTxBxTest.docx (renamed from sw/qa/extras/uiwriter/data3/AsCharTxBxTest.docx)bin19888 -> 19888 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/AtPageTextBoxCrash.odt (renamed from sw/qa/extras/uiwriter/data3/AtPageTextBoxCrash.odt)bin9880 -> 9880 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/floating-table-position.docx (renamed from sw/qa/extras/uiwriter/data2/floating-table-position.docx)bin13236 -> 13236 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/frame_size_export.docx (renamed from sw/qa/extras/uiwriter/data2/frame_size_export.docx)bin13929 -> 13929 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/image-comment-at-char.odt (renamed from sw/qa/extras/uiwriter/data2/image-comment-at-char.odt)bin9985 -> 9985 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/image-comment.odt (renamed from sw/qa/extras/uiwriter/data2/image-comment.odt)bin9847 -> 9847 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/lorem.fodt (renamed from sw/qa/extras/uiwriter/data2/lorem.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/num-parent-style.docx (renamed from sw/qa/extras/uiwriter/data2/num-parent-style.docx)bin14002 -> 14002 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/ofz18563.docx (renamed from sw/qa/extras/uiwriter/data2/ofz18563.docx)bin7102 -> 7102 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/ole-save-while-edit.odt (renamed from sw/qa/extras/uiwriter/data2/ole-save-while-edit.odt)bin14547 -> 14547 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/redline-para-join.docx (renamed from sw/qa/extras/uiwriter/data2/redline-para-join.docx)bin13090 -> 13090 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/shape-page-move.odt (renamed from sw/qa/extras/uiwriter/data2/shape-page-move.odt)bin10137 -> 10137 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf100018-1.odt (renamed from sw/qa/extras/uiwriter/data3/tdf100018-1.odt)bin18795 -> 18795 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf100691.fodt (renamed from sw/qa/extras/uiwriter/data3/tdf100691.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf101534.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf101534.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf104649.docx (renamed from sw/qa/extras/uiwriter/data3/tdf104649.docx)bin75971 -> 75971 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf105330.odt (renamed from sw/qa/extras/uiwriter/data2/tdf105330.odt)bin8970 -> 8970 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf105413.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf105413.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf106843.docx (renamed from sw/qa/extras/uiwriter/data2/tdf106843.docx)bin13936 -> 13936 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf107893.odt (renamed from sw/qa/extras/uiwriter/data3/tdf107893.odt)bin9133 -> 9133 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf107975.odt (renamed from sw/qa/extras/uiwriter/data3/tdf107975.odt)bin10312 -> 10312 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf108124.odt (renamed from sw/qa/extras/uiwriter/data3/tdf108124.odt)bin21575 -> 21575 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf108687_tabstop.odt (renamed from sw/qa/extras/uiwriter/data2/tdf108687_tabstop.odt)bin12847 -> 12847 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf112342.docx (renamed from sw/qa/extras/uiwriter/data3/tdf112342.docx)bin19601 -> 19601 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf115815.odtbin0 -> 9809 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf117923.docx (renamed from sw/qa/extras/uiwriter/data2/tdf117923.docx)bin21227 -> 21227 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf118311.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf118311.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf118699.docx (renamed from sw/qa/extras/uiwriter/data2/tdf118699.docx)bin21417 -> 21417 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf119019.docx (renamed from sw/qa/extras/uiwriter/data2/tdf119019.docx)bin13665 -> 13665 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf120336.docx (renamed from sw/qa/extras/uiwriter/data2/tdf120336.docx)bin21892 -> 21892 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf120338.docx (renamed from sw/qa/extras/uiwriter/data2/tdf120338.docx)bin14898 -> 14898 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf122942.odt (renamed from sw/qa/extras/uiwriter/data2/tdf122942.odt)bin9864 -> 9864 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf123102.odt (renamed from sw/qa/extras/uiwriter/data2/tdf123102.odt)bin13674 -> 13674 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf123285.odt (renamed from sw/qa/extras/uiwriter/data3/tdf123285.odt)bin11762 -> 11762 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf124261.docx (renamed from sw/qa/extras/uiwriter/data2/tdf124261.docx)bin22327 -> 22327 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf124397.docx (renamed from sw/qa/extras/uiwriter/data3/tdf124397.docx)bin29518 -> 29518 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf124722.rtf (renamed from sw/qa/extras/uiwriter/data3/tdf124722.rtf)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125261.odt (renamed from sw/qa/extras/uiwriter/data3/tdf125261.odt)bin8900 -> 8900 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125310.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf125310.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125310b.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf125310b.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125881.docx (renamed from sw/qa/extras/uiwriter/data2/tdf125881.docx)bin34448 -> 34448 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125916.docx (renamed from sw/qa/extras/uiwriter/data2/tdf125916.docx)bin40570 -> 40570 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126206.docx (renamed from sw/qa/extras/uiwriter/data2/tdf126206.docx)bin12509 -> 12509 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126340.odt (renamed from sw/qa/extras/uiwriter/data3/tdf126340.odt)bin9910 -> 9910 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126504.odt (renamed from sw/qa/extras/uiwriter/data3/tdf126504.odt)bin9266 -> 9266 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126626.docx (renamed from sw/qa/extras/uiwriter/data3/tdf126626.docx)bin16513 -> 16513 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf126784_distributeSelectedColumns.odt (renamed from sw/qa/extras/uiwriter/data2/tdf126784_distributeSelectedColumns.odt)bin21302 -> 21302 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf127652.odt (renamed from sw/qa/extras/uiwriter/data3/tdf127652.odt)bin26963 -> 26963 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128335.odt (renamed from sw/qa/extras/uiwriter/data2/tdf128335.odt)bin10391 -> 10391 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128603.odt (renamed from sw/qa/extras/uiwriter/data2/tdf128603.odt)bin10391 -> 10391 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128739.docx (renamed from sw/qa/extras/uiwriter/data3/tdf128739.docx)bin4375 -> 4375 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf128782.odt (renamed from sw/qa/extras/uiwriter/data3/tdf128782.odt)bin8817 -> 8817 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf129382.docx (renamed from sw/qa/extras/uiwriter/data3/tdf129382.docx)bin112383 -> 112383 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf129655-vtextbox.odt (renamed from sw/qa/extras/uiwriter/data2/tdf129655-vtextbox.odt)bin9958 -> 9958 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf129805.docx (renamed from sw/qa/extras/uiwriter/data3/tdf129805.docx)bin20783 -> 20783 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130680.odt (renamed from sw/qa/extras/uiwriter/data3/tdf130680.odt)bin97412 -> 97412 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130685.odt (renamed from sw/qa/extras/uiwriter/data3/tdf130685.odt)bin24714 -> 24714 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130746.odt (renamed from sw/qa/extras/uiwriter/data3/tdf130746.odt)bin9378 -> 9378 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf130805.odt (renamed from sw/qa/extras/uiwriter/data3/tdf130805.odt)bin9392 -> 9392 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf131684.docx (renamed from sw/qa/extras/uiwriter/data3/tdf131684.docx)bin6506 -> 6506 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf131963.docx (renamed from sw/qa/extras/uiwriter/data3/tdf131963.docx)bin34251 -> 34251 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132160.odt (renamed from sw/qa/extras/uiwriter/data2/tdf132160.odt)bin9501 -> 9501 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132187.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132187.odt)bin10580 -> 10580 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132236.odt (renamed from sw/qa/extras/uiwriter/data2/tdf132236.odt)bin10140 -> 10140 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132321.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132321.odt)bin9045 -> 9045 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132420.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132420.odt)bin11766 -> 11766 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132596.docx (renamed from sw/qa/extras/uiwriter/data3/tdf132596.docx)bin11062 -> 11062 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132597.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132597.odt)bin132875 -> 132875 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132637_protectTrackChanges.doc (renamed from sw/qa/extras/uiwriter/data3/tdf132637_protectTrackChanges.doc)bin26624 -> 26624 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132725.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132725.odt)bin73108 -> 73108 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132744.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132744.odt)bin465501 -> 465501 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132911.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132911.odt)bin10980 -> 10980 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf132944.odt (renamed from sw/qa/extras/uiwriter/data3/tdf132944.odt)bin9682 -> 9682 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133477.fodt (renamed from sw/qa/extras/uiwriter/data3/tdf133477.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133490.odt (renamed from sw/qa/extras/uiwriter/data3/tdf133490.odt)bin9606 -> 9606 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133967.odt (renamed from sw/qa/extras/uiwriter/data3/tdf133967.odt)bin16689 -> 16689 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133982.docx (renamed from sw/qa/extras/uiwriter/data3/tdf133982.docx)bin11705 -> 11705 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133990.odt (renamed from sw/qa/extras/uiwriter/data3/tdf133990.odt)bin17859 -> 17859 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134021.docx (renamed from sw/qa/extras/uiwriter/data3/tdf134021.docx)bin23096 -> 23096 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134227.docx (renamed from sw/qa/extras/uiwriter/data3/tdf134227.docx)bin19455 -> 19455 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134253.odt (renamed from sw/qa/extras/uiwriter/data3/tdf134253.odt)bin46144 -> 46144 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134404.odt (renamed from sw/qa/extras/uiwriter/data3/tdf134404.odt)bin9928 -> 9928 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134626.odt (renamed from sw/qa/extras/uiwriter/data3/tdf134626.odt)bin9136 -> 9136 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134931.odt (renamed from sw/qa/extras/uiwriter/data3/tdf134931.odt)bin9962 -> 9962 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135056.odt (renamed from sw/qa/extras/uiwriter/data3/tdf135056.odt)bin19293 -> 19293 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135412.docx (renamed from sw/qa/extras/uiwriter/data3/tdf135412.docx)bin22923 -> 22923 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135623.docx (renamed from sw/qa/extras/uiwriter/data3/tdf135623.docx)bin25768 -> 25768 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135661.odt (renamed from sw/qa/extras/uiwriter/data3/tdf135661.odt)bin10800 -> 10800 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135662.odtbin0 -> 13627 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf135733.odt (renamed from sw/qa/extras/uiwriter/data3/tdf135733.odt)bin11211 -> 11211 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf136385.odt (renamed from sw/qa/extras/uiwriter/data3/tdf136385.odt)bin8759 -> 8759 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf136778.docxbin0 -> 11761 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf137964.odt (renamed from sw/qa/extras/uiwriter/data3/tdf137964.odt)bin9332 -> 9332 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf138130.docx (renamed from sw/qa/extras/uiwriter/data3/tdf138130.docx)bin8977 -> 8977 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf138482.docx (renamed from sw/qa/extras/uiwriter/data3/tdf138482.docx)bin18955 -> 18955 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf139127.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf139127.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf140828.docxbin0 -> 5393 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf39721.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf39721.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf47471_paraStyleBackground.odt (renamed from sw/qa/extras/uiwriter/data2/tdf47471_paraStyleBackground.odt)bin13816 -> 13816 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf52391.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf52391.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf54819.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf54819.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf54819b.odt (renamed from sw/qa/extras/uiwriter/data2/tdf54819b.odt)bin17538 -> 17538 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf61154.fodt (renamed from sw/qa/extras/uiwriter/data3/tdf61154.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf64242_optimizeTable.odt (renamed from sw/qa/extras/uiwriter/data2/tdf64242_optimizeTable.odt)bin11060 -> 11060 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf76636.doc (renamed from sw/qa/extras/uiwriter/data3/tdf76636.doc)bin13824 -> 13824 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf76817.docx (renamed from sw/qa/extras/uiwriter/data2/tdf76817.docx)bin18584 -> 18584 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf76817.fodt (renamed from sw/qa/extras/uiwriter/data2/tdf76817.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/tdf90069.docx (renamed from sw/qa/extras/uiwriter/data2/tdf90069.docx)bin4737 -> 4737 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/try2.fodt (renamed from sw/qa/extras/uiwriter/data2/try2.fodt)0
-rw-r--r--sw/qa/extras/uiwriter/data/txbx_crash.odt (renamed from sw/qa/extras/uiwriter/data3/txbx_crash.odt)bin9369 -> 9369 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/udindex3.odt (renamed from sw/qa/extras/uiwriter/data3/udindex3.odt)bin11068 -> 11068 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx56
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx180
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx136
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx12
-rw-r--r--sw/qa/extras/ww8export/data/rtl-gutter.docbin0 -> 22528 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf139495_tinyHeader.docbin0 -> 22016 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf81705_outlineLevel.docbin0 -> 29696 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx16
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx31
-rw-r--r--sw/qa/extras/ww8import/data/tdf120768_zOrder.docbin0 -> 53760 bytes
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx12
-rw-r--r--sw/qa/python/check_cross_references.py11
-rw-r--r--sw/qa/python/check_indexed_property_values.py3
-rw-r--r--sw/qa/python/check_named_property_values.py4
-rw-r--r--sw/qa/python/check_range_properties.py5
-rw-r--r--sw/qa/python/check_styles.py3
-rw-r--r--sw/qa/python/check_xautotextcontainer.py1
-rw-r--r--sw/qa/python/check_xautotextgroup.py1
-rw-r--r--sw/qa/python/check_xmodel.py2
-rw-r--r--sw/qa/python/text_portion_enumeration_test.py4
-rw-r--r--sw/qa/python/xcontrolshape.py2
-rw-r--r--sw/qa/python/xstyleloader.py3
-rw-r--r--sw/qa/python/xtext.py1
-rw-r--r--sw/qa/python/xtextcursor.py3
-rwxr-xr-xsw/qa/python/xtextfieldssupplier.py2
-rw-r--r--sw/qa/python/xtextrange.py3
-rw-r--r--sw/qa/uibase/shells/shells.cxx40
-rw-r--r--sw/qa/uibase/uno/uno.cxx43
-rw-r--r--sw/qa/uitest/chapterNumbering/chapterNumbering.py24
-rw-r--r--sw/qa/uitest/chapterNumbering/tdf123547.py4
-rw-r--r--sw/qa/uitest/classification/classification.py20
-rw-r--r--sw/qa/uitest/data/TestHiddenHeadersFooters.docxbin0 -> 18063 bytes
-rw-r--r--sw/qa/uitest/data/metadata.odtbin0 -> 10066 bytes
-rw-r--r--sw/qa/uitest/data/tdf140661.odtbin0 -> 13854 bytes
-rw-r--r--sw/qa/uitest/data/tdf40427_SectionPositions.odtbin0 -> 11351 bytes
-rw-r--r--sw/qa/uitest/data/tdf46561.odtbin0 -> 8798 bytes
-rw-r--r--sw/qa/uitest/findBar/findbar.py14
-rw-r--r--sw/qa/uitest/findBar/tdf136941.py8
-rw-r--r--sw/qa/uitest/findBar/tdf138232.py4
-rw-r--r--sw/qa/uitest/findBar/tdf88608.py4
-rw-r--r--sw/qa/uitest/findReplace/findReplace.py3
-rw-r--r--sw/qa/uitest/findReplace/tdf106099.py12
-rw-r--r--sw/qa/uitest/findReplace/tdf118208.py6
-rw-r--r--sw/qa/uitest/findReplace/tdf119462.py6
-rw-r--r--sw/qa/uitest/findSimilarity/findSimilarity.py5
-rw-r--r--sw/qa/uitest/librelogo/compile.py7
-rw-r--r--sw/qa/uitest/librelogo/run.py8
-rw-r--r--sw/qa/uitest/navigator/tdf114724.py30
-rw-r--r--sw/qa/uitest/navigator/tdf137274.py2
-rw-r--r--sw/qa/uitest/navigator/tdf140257.py9
-rw-r--r--sw/qa/uitest/navigator/tdf140661.py61
-rw-r--r--sw/qa/uitest/navigator/tdf40427.py81
-rw-r--r--sw/qa/uitest/options/tdf78133.py2
-rw-r--r--sw/qa/uitest/sidebar/stylesSidebar.py5
-rw-r--r--sw/qa/uitest/sidebar/tdf135590.py3
-rw-r--r--sw/qa/uitest/styleInspector/styleInspector.py58
-rw-r--r--sw/qa/uitest/table/sheetToTable.py3
-rw-r--r--sw/qa/uitest/table/splitTable.py6
-rw-r--r--sw/qa/uitest/table/tableProperties.py17
-rw-r--r--sw/qa/uitest/table/tableToText.py5
-rw-r--r--sw/qa/uitest/table/tdf115026.py1
-rw-r--r--sw/qa/uitest/table/tdf116737.py2
-rwxr-xr-xsw/qa/uitest/table/tdf128593.py1
-rw-r--r--sw/qa/uitest/table/tdf134881_colProportionalAdjust.py2
-rw-r--r--sw/qa/uitest/table/tdf81292.py3
-rw-r--r--sw/qa/uitest/table/tdf99334.py3
-rw-r--r--sw/qa/uitest/table/textToTable.py5
-rw-r--r--sw/qa/uitest/ui/fmtui/fmtui.py2
-rw-r--r--sw/qa/uitest/writer_dialogs/openDialogs.py3
-rw-r--r--sw/qa/uitest/writer_tests/comments.py5
-rw-r--r--sw/qa/uitest/writer_tests/insertCaption.py3
-rw-r--r--sw/qa/uitest/writer_tests/tdf134734.py92
-rw-r--r--sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py2
-rw-r--r--sw/qa/uitest/writer_tests/tdf53460.py1
-rw-r--r--sw/qa/uitest/writer_tests/tdf78068.py8
-rw-r--r--sw/qa/uitest/writer_tests/tdf81457.py3
-rw-r--r--sw/qa/uitest/writer_tests/watermark.py3
-rw-r--r--sw/qa/uitest/writer_tests2/asianPhoneticGuide.py17
-rw-r--r--sw/qa/uitest/writer_tests2/bookmark.py2
-rw-r--r--sw/qa/uitest/writer_tests2/deleteAllComments.py6
-rw-r--r--sw/qa/uitest/writer_tests2/exchangeDatabase.py5
-rw-r--r--sw/qa/uitest/writer_tests2/fontworks.py5
-rw-r--r--sw/qa/uitest/writer_tests2/formatBulletsNumbering.py22
-rw-r--r--sw/qa/uitest/writer_tests2/formatCharacter.py14
-rw-r--r--sw/qa/uitest/writer_tests2/formatParagraph.py47
-rw-r--r--sw/qa/uitest/writer_tests2/horizontalLine.py2
-rw-r--r--sw/qa/uitest/writer_tests2/insertFootnote.py5
-rw-r--r--sw/qa/uitest/writer_tests2/tdf116474.py3
-rw-r--r--sw/qa/uitest/writer_tests3/autoredactDialog.py4
-rw-r--r--sw/qa/uitest/writer_tests3/hyperlinkdialog.py35
-rw-r--r--sw/qa/uitest/writer_tests3/insertEndnote.py5
-rw-r--r--sw/qa/uitest/writer_tests3/insertEnvelope.py2
-rw-r--r--sw/qa/uitest/writer_tests3/insertFootEndnote.py4
-rw-r--r--sw/qa/uitest/writer_tests3/insertQrCodeGen.py7
-rw-r--r--sw/qa/uitest/writer_tests3/insertSignatureLine.py2
-rw-r--r--sw/qa/uitest/writer_tests3/lineNumbering.py20
-rw-r--r--sw/qa/uitest/writer_tests3/pageDialog.py2
-rw-r--r--sw/qa/uitest/writer_tests3/sort.py12
-rw-r--r--sw/qa/uitest/writer_tests3/specialCharacter.py98
-rw-r--r--sw/qa/uitest/writer_tests3/tdf79236.py3
-rw-r--r--sw/qa/uitest/writer_tests4/start.py2
-rw-r--r--sw/qa/uitest/writer_tests4/tdf113252.py7
-rw-r--r--sw/qa/uitest/writer_tests4/tdf115088.py4
-rw-r--r--sw/qa/uitest/writer_tests4/tdf115572.py5
-rw-r--r--sw/qa/uitest/writer_tests4/tdf115573.py5
-rw-r--r--sw/qa/uitest/writer_tests4/tdf122449.py2
-rw-r--r--sw/qa/uitest/writer_tests4/tdf134439.py3
-rw-r--r--sw/qa/uitest/writer_tests4/tdf136578.py2
-rw-r--r--sw/qa/uitest/writer_tests4/tdf138546.py8
-rw-r--r--sw/qa/uitest/writer_tests4/tdf51352.py1
-rw-r--r--sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py1
-rw-r--r--sw/qa/uitest/writer_tests5/autocorrectOptions.py2
-rw-r--r--sw/qa/uitest/writer_tests5/columns.py4
-rw-r--r--sw/qa/uitest/writer_tests5/tdf107494.py5
-rw-r--r--sw/qa/uitest/writer_tests5/tdf117039.py3
-rw-r--r--sw/qa/uitest/writer_tests5/tdf118540.py3
-rw-r--r--sw/qa/uitest/writer_tests5/tdf122045.py1
-rw-r--r--sw/qa/uitest/writer_tests5/tdf122722.py4
-rw-r--r--sw/qa/uitest/writer_tests5/tdf123378.py2
-rw-r--r--sw/qa/uitest/writer_tests5/tdf123446.py5
-rw-r--r--sw/qa/uitest/writer_tests5/titlePage.py5
-rw-r--r--sw/qa/uitest/writer_tests5/titlePageWizard.py3
-rw-r--r--sw/qa/uitest/writer_tests5/titlePageWizard2.py3
-rw-r--r--sw/qa/uitest/writer_tests5/xwindow.py3
-rw-r--r--sw/qa/uitest/writer_tests5/zoom.py3
-rw-r--r--sw/qa/uitest/writer_tests6/tdf107847.py4
-rw-r--r--sw/qa/uitest/writer_tests6/tdf120731.py6
-rw-r--r--sw/qa/uitest/writer_tests6/tdf124586.py11
-rw-r--r--sw/qa/uitest/writer_tests6/tdf124675.py5
-rw-r--r--sw/qa/uitest/writer_tests6/tdf125104.py5
-rw-r--r--sw/qa/uitest/writer_tests6/tdf126017.py5
-rw-r--r--sw/qa/uitest/writer_tests6/tdf126168.py4
-rw-r--r--sw/qa/uitest/writer_tests6/tdf126627.py5
-rw-r--r--sw/qa/uitest/writer_tests6/tdf128431.py7
-rw-r--r--sw/qa/uitest/writer_tests6/tdf44837.py4
-rw-r--r--sw/qa/uitest/writer_tests7/forms.py24
-rw-r--r--sw/qa/uitest/writer_tests7/tdf104795.py1
-rw-r--r--sw/qa/uitest/writer_tests7/tdf119661.py93
-rw-r--r--sw/qa/uitest/writer_tests7/tdf122780.py1
-rw-r--r--sw/qa/uitest/writer_tests7/tdf131936.py1
-rw-r--r--sw/qa/uitest/writer_tests7/tdf132169.py1
-rw-r--r--sw/qa/uitest/writer_tests7/tdf137802.py2
-rw-r--r--sw/qa/uitest/writer_tests7/tdf137803.py11
-rw-r--r--sw/qa/uitest/writer_tests7/tdf140117.py9
-rw-r--r--sw/qa/uitest/writer_tests7/tdf140863.py75
-rw-r--r--sw/qa/uitest/writer_tests7/tdf141158.py41
-rw-r--r--sw/qa/uitest/writer_tests7/tdf46561.py100
-rw-r--r--sw/qa/unit/swmodeltestbase.cxx75
327 files changed, 2661 insertions, 715 deletions
diff --git a/sw/qa/core/data/README b/sw/qa/core/data/README
index 2cc9fb3cb58f..a147d4be4c6a 100644
--- a/sw/qa/core/data/README
+++ b/sw/qa/core/data/README
@@ -5,3 +5,19 @@ mdecrypt --bare -a arcfour -o hex -k 435645 -s 3 foo.doc # to unencrypt
mcrypt --bare -a arcfour -o hex -k 435645 -s 3 foo.doc # to create new tests
to get access to the plain files for manual testing.
+
+
+The files in these subdirectories are tested to
+ensure that they import without crashing or hanging.
+Files that crash during export should go into exportdata.
+
+Both data and exportdata are tested with
+make CppunitTest_sw_filters_test or
+make CppunitTest_sw_filters_test2 for ww6.
+
+Files that hang interactively, but pass filters_test
+might be failing because of layout issues. See core/layout.
+
+pass: these files now load - without the fix they crashed or hung.
+fail: these files still fail to load, but not because of crashing or hanging.
+indeterminate: untested temporary holding area - to be sorted as pass/fail.
diff --git a/sw/qa/core/draw/data/textbox-undo-ordnum.docx b/sw/qa/core/draw/data/textbox-undo-ordnum.docx
new file mode 100644
index 000000000000..96b00973289a
--- /dev/null
+++ b/sw/qa/core/draw/data/textbox-undo-ordnum.docx
Binary files differ
diff --git a/sw/qa/core/draw/draw.cxx b/sw/qa/core/draw/draw.cxx
index b8544022589a..c4654dde8127 100644
--- a/sw/qa/core/draw/draw.cxx
+++ b/sw/qa/core/draw/draw.cxx
@@ -10,11 +10,14 @@
#include <swmodeltestbase.hxx>
#include <svx/svdpage.hxx>
+#include <vcl/scheduler.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <docsh.hxx>
#include <drawdoc.hxx>
#include <wrtsh.hxx>
+#include <frameformats.hxx>
+#include <textboxhelper.hxx>
constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/draw/data/";
@@ -46,6 +49,56 @@ CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTextboxDeleteAsChar)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nActual);
}
+CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTextboxUndoOrdNum)
+{
+ // Given a document with 5 frame formats:
+ // - picture
+ // - draw format + fly format and a picture in it
+ // - picture
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "textbox-undo-ordnum.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ // Test the state before del + undo.
+ for (const auto& pFormat : rFormats)
+ {
+ const SwFrameFormat* pFlyFormat
+ = SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+ if (!pFlyFormat)
+ {
+ continue;
+ }
+
+ sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+ sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+ CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+ }
+
+ // When selecting the first page, deleting the selection and undoing:
+ pWrtShell->Down(true, 3);
+ pWrtShell->DelLeft();
+ pWrtShell->Undo();
+
+ // Then the z-order of the fly format should be still the z-order of the draw format + 1, when
+ // the fly and draw formats form a textbox pair.
+ for (const auto& pFormat : rFormats)
+ {
+ const SwFrameFormat* pFlyFormat
+ = SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+ if (!pFlyFormat)
+ {
+ continue;
+ }
+
+ sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+ sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4
+ // - Actual : 2
+ // i.e. the fly format was behind the draw format, not visible.
+ CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+ }
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/data/tdf122894-4.doc b/sw/qa/core/layout/data/tdf122894-4.doc
new file mode 100644
index 000000000000..4ebdb53de04f
--- /dev/null
+++ b/sw/qa/core/layout/data/tdf122894-4.doc
Binary files differ
diff --git a/sw/qa/core/layout/data/tdf45908_invoice.odt b/sw/qa/core/layout/data/tdf45908_invoice.odt
new file mode 100644
index 000000000000..37b76928cbf9
--- /dev/null
+++ b/sw/qa/core/layout/data/tdf45908_invoice.odt
Binary files differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 7c899aa31d63..794752206035 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -357,6 +357,31 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMirrorMargin)
CPPUNIT_ASSERT_EQUAL(nGutterTwips, nOldRight - nNewRight);
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testRtlGutterMargin)
+{
+ // Given a document with a right margin:
+ SwDoc* pDoc = createSwDoc();
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ SwFrame* pPage = pLayout->GetLower();
+ tools::Long nOldRight = pPage->getFramePrintArea().Right();
+
+ // When setting enable RTL gutter mode and setting a gutter margin:
+ xStandard->setPropertyValue("RtlGutter", uno::makeAny(true));
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+ // Then make sure the new right edge of the print area is decreased:
+ tools::Long nNewRight = pPage->getFramePrintArea().Right();
+ tools::Long nGutterTwips = convertMm100ToTwip(nGutterMm100);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1134
+ // - Actual : 0
+ // i.e. the gutter was missing on the right side.
+ CPPUNIT_ASSERT_EQUAL(nGutterTwips, nOldRight - nNewRight);
+}
+
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMarginPageBorder)
{
// FIXME this is 3369 on macOS -- calculate this number dynamically?
@@ -389,6 +414,12 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMarginPageBorder)
#endif
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTdf45908_invoice)
+{
+ // without the fix, this was hanging (and slowly consuming memory) on fileopen.
+ load(DATA_DIRECTORY, "tdf45908_invoice.odt");
+}
+
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testVerticallyMergedCellBorder)
{
// Given a document with a table: 2 columns, 5 rows. B2 -> B5 is merged:
@@ -463,6 +494,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testVerticallyMergedCellBorder)
}
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testCrashRemoveFromLayout)
+{
+ load(DATA_DIRECTORY, "tdf122894-4.doc");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index 3a693af4ab0d..66f2dd9b2794 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -206,7 +206,6 @@ void SwMacrosTest::testControlShapeGrouping()
createFileURL(u"testControlShapeGrouping.", u"odt", aFileName);
Reference< css::lang::XComponent > xComponent(
loadFromDesktop(aFileName, "com.sun.star.text.TextDocument"));
- CPPUNIT_ASSERT(xComponent.is());
uno::Reference<frame::XModel> const xModel(xComponent, UNO_QUERY);
CPPUNIT_ASSERT(xModel.is());
diff --git a/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx b/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx
index 15d2dca0775e..1308e1f6a8a5 100644
--- a/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx
+++ b/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx
Binary files differ
diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx
index 7b9a3eca2831..9817b9b05233 100644
--- a/sw/qa/core/objectpositioning/objectpositioning.cxx
+++ b/sw/qa/core/objectpositioning/objectpositioning.cxx
@@ -227,9 +227,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testInsideOutsideVertAlignBott
= getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15694
// Verify that the distance between the bottom of page and bottom of first shape is around 0cm. (align=outside)
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(23), nPageBottom - nFirstShapeOutside);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), nPageBottom - nFirstShapeOutside);
// Verify that the distance between the bottom of body and top of second shape is around 0cm. (align=inside)
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(10), nBodyBottom - nSecondShapeInside);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nBodyBottom - nSecondShapeInside);
}
CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVMLVertAlignBottomMargin)
diff --git a/sw/qa/core/text/data/tabovermargin-section.fodt b/sw/qa/core/text/data/tabovermargin-section.fodt
new file mode 100644
index 000000000000..6fd39c471228
--- /dev/null
+++ b/sw/qa/core/text/data/tabovermargin-section.fodt
@@ -0,0 +1,50 @@
+<?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:settings>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="TabOverMargin" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ </style:default-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Index_20_1">
+ <style:paragraph-properties>
+ <style:tab-stops>
+ <style:tab-stop style:position="17.59cm" style:type="right" style:leader-style="dotted" style:leader-text="."/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="2" fo:column-gap="0cm">
+ <style:column style:rel-width="32767*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+ <style:column style:rel-width="32768*" fo:start-indent="0cm" fo:end-indent="0cm"/>
+ </style:columns>
+ </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" fo:background-color="#ffffff" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="37" 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" draw:fill="solid" draw:fill-color="#ffffff" draw:opacity="0%" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ </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:fill="solid" draw:background-size="full" draw:fill-color="#ffffff" draw:opacity="0%"/>
+ </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>before</text:p>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="P1">hello<text:tab/>1</text:p>
+ </text:section>
+ <text:p>after</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 8b4c6ae336bb..4db880e687f4 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -9,7 +9,14 @@
#include <swmodeltestbase.hxx>
+#include <memory>
+
+#include <com/sun/star/text/BibliographyDataType.hpp>
+
#include <vcl/gdimtf.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <unotools/mediadescriptor.hxx>
#include <docsh.hxx>
#include <unotxdoc.hxx>
@@ -69,6 +76,65 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testSemiTransparentText)
assertXPath(pXmlDoc, "//floattransparent");
}
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport)
+{
+ // Given a document with a bibliography entry field:
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ {
+ return;
+ }
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aFields = {
+ comphelper::makePropertyValue("BibiliographicType", text::BibliographyDataType::WWW),
+ comphelper::makePropertyValue("Identifier", OUString("AT")),
+ comphelper::makePropertyValue("Author", OUString("Author")),
+ comphelper::makePropertyValue("Title", OUString("Title")),
+ comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")),
+ };
+ xField->setPropertyValue("Fields", uno::makeAny(aFields));
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<text::XTextContent> xContent(xField, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
+
+ // When exporting to PDF:
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ // Then make sure the field links the source.
+ SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+ SvMemoryStream aMemory;
+ aMemory.WriteStream(aFile);
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize());
+ CPPUNIT_ASSERT(pPdfDocument);
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ // Without the accompanying fix in place, this test would have failed, the field was not
+ // clickable (while it was clickable on the UI).
+ CPPUNIT_ASSERT(pPdfPage->hasLinks());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTabOverMarginSection)
+{
+ createSwDoc(DATA_DIRECTORY, "tabovermargin-section.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nWidth
+ = getXPath(pXmlDoc, "//Text[@nType='PortionType::TabRight']", "nWidth").toInt32();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected less than: 5000
+ // - Actual : 9372
+ // i.e. the tab portion width was not the expected 4386, but much larger, so the number after
+ // the tab portion was not visible.
+ CPPUNIT_ASSERT_LESS(static_cast<sal_Int32>(5000), nWidth);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/tox/tox.cxx b/sw/qa/core/tox/tox.cxx
index 127cb4b06e7f..1ac8764a0574 100644
--- a/sw/qa/core/tox/tox.cxx
+++ b/sw/qa/core/tox/tox.cxx
@@ -9,6 +9,7 @@
#include <swmodeltestbase.hxx>
+#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/text/BibliographyDataType.hpp>
#include <com/sun/star/text/ControlCharacter.hpp>
#include <com/sun/star/text/XDocumentIndex.hpp>
@@ -16,6 +17,10 @@
#include <comphelper/propertyvalue.hxx>
+#include <IDocumentFieldsAccess.hxx>
+#include <authfld.hxx>
+#include <fmtfld.hxx>
+
namespace
{
/// Covers sw/source/core/tox/ fixes.
@@ -108,6 +113,92 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryURL)
CPPUNIT_ASSERT_EQUAL(OUString("http://www.example.com/test.pdf"), aActual);
}
+CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryClick)
+{
+ // Given an empty document:
+ SwDoc* pDoc = createSwDoc();
+
+ // When inserting a biblio entry field with an URL:
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aFields = {
+ comphelper::makePropertyValue("BibiliographicType", text::BibliographyDataType::WWW),
+ comphelper::makePropertyValue("Identifier", OUString("AT")),
+ comphelper::makePropertyValue("Author", OUString("Author")),
+ comphelper::makePropertyValue("Title", OUString("Title")),
+ comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")),
+ };
+ xField->setPropertyValue("Fields", uno::makeAny(aFields));
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<text::XTextContent> xContent(xField, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
+
+ // Then make sure that the field is clickable, since the page part will not be part of the
+ // bibliography table:
+ const SwFieldTypes* pTypes = pDoc->getIDocumentFieldsAccess().GetFieldTypes();
+ auto it = std::find_if(pTypes->begin(), pTypes->end(),
+ [](const std::unique_ptr<SwFieldType>& pType) {
+ return pType->Which() == SwFieldIds::TableOfAuthorities;
+ });
+ CPPUNIT_ASSERT(it != pTypes->end());
+ const SwFieldType* pType = it->get();
+ std::vector<SwFormatField*> aFormatFields;
+ pType->GatherFields(aFormatFields);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aFormatFields.size());
+ SwField* pField = aFormatFields[0]->GetField();
+ // Without the accompanying fix in place, this test would have failed, as the field was not
+ // clickable.
+ CPPUNIT_ASSERT(pField->IsClickable());
+ // This is needed, so the mouse has the correct RefHand pointer style.
+ CPPUNIT_ASSERT(pField->HasClickHdl());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryRelClick)
+{
+ // Given an empty document with a file:// base URL:
+ SwDoc* pDoc = createSwDoc();
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aArgs = {
+ comphelper::makePropertyValue("FilterName", OUString("writer8")),
+ };
+ xStorable->storeAsURL(maTempFile.GetURL(), aArgs);
+
+ // When inserting a biblio entry field with a relative URL:
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aFields = {
+ comphelper::makePropertyValue("BibiliographicType", text::BibliographyDataType::WWW),
+ comphelper::makePropertyValue("Identifier", OUString("AT")),
+ comphelper::makePropertyValue("Author", OUString("Author")),
+ comphelper::makePropertyValue("Title", OUString("Title")),
+ comphelper::makePropertyValue("URL", OUString("test.pdf#page=1")),
+ };
+ xField->setPropertyValue("Fields", uno::makeAny(aFields));
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<text::XTextContent> xContent(xField, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
+
+ // Then make sure that the field is clickable:
+ const SwFieldTypes* pTypes = pDoc->getIDocumentFieldsAccess().GetFieldTypes();
+ auto it = std::find_if(pTypes->begin(), pTypes->end(),
+ [](const std::unique_ptr<SwFieldType>& pType) {
+ return pType->Which() == SwFieldIds::TableOfAuthorities;
+ });
+ CPPUNIT_ASSERT(it != pTypes->end());
+ const SwFieldType* pType = it->get();
+ std::vector<SwFormatField*> aFormatFields;
+ pType->GatherFields(aFormatFields);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aFormatFields.size());
+ auto pField = static_cast<SwAuthorityField*>(aFormatFields[0]->GetField());
+ CPPUNIT_ASSERT(pField->GetAbsoluteURL().startsWith("file://"));
+}
+
CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableURLDeduplication)
{
// Given a document with 3 bibliography references (of type WWW) in it:
diff --git a/sw/qa/core/undo/data/table-copy-redline.odt b/sw/qa/core/undo/data/table-copy-redline.odt
new file mode 100644
index 000000000000..f391687823aa
--- /dev/null
+++ b/sw/qa/core/undo/data/table-copy-redline.odt
Binary files differ
diff --git a/sw/qa/core/undo/undo.cxx b/sw/qa/core/undo/undo.cxx
index fd1069e64ae0..0e9ef5b0231e 100644
--- a/sw/qa/core/undo/undo.cxx
+++ b/sw/qa/core/undo/undo.cxx
@@ -84,6 +84,25 @@ CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTextboxCutUndo)
CPPUNIT_ASSERT_EQUAL(pIndex1->GetIndex(), pIndex2->GetIndex());
}
+CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTableCopyRedline)
+{
+ // Given a document with two table cells and redlining enabled:
+ load(DATA_DIRECTORY, "table-copy-redline.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pDocShell = pTextDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+
+ // When doing select-all, copy, paste and undo:
+ pWrtShell->SelAll();
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Copy();
+ TransferableDataHelper aHelper(pTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ // Without the accompanying fix in place, this test would have crashed.
+ pWrtShell->Undo();
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 62c3f439c4e5..cf701a25d423 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -82,6 +82,20 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor)
xText->insertTextContent(xAnchor, xFieldmark, false);
}
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testRtlGutter)
+{
+ mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Unknown property: RtlGutter
+ auto bRtlGutter = getProperty<bool>(xPageStyle, "RtlGutter");
+ CPPUNIT_ASSERT(!bRtlGutter);
+ xPageStyle->setPropertyValue("RtlGutter", uno::makeAny(true));
+ bRtlGutter = getProperty<bool>(xPageStyle, "RtlGutter");
+ CPPUNIT_ASSERT(bRtlGutter);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 5c872bb5ebf5..ade0a9d8170b 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -1185,9 +1185,9 @@ void SwDocTest::randomTest()
xmlTextWriterPtr writer;
writer = xmlNewTextWriterFilename( aBuffer.makeStringAndClear().getStr(), 0 );
- xmlTextWriterStartDocument( writer, NULL, NULL, NULL );
+ (void)xmlTextWriterStartDocument( writer, NULL, NULL, NULL );
m_pDoc->dumpAsXml(writer);
- xmlTextWriterEndDocument( writer );
+ (void)xmlTextWriterEndDocument( writer );
xmlFreeTextWriter( writer );
#endif
}
@@ -2013,7 +2013,7 @@ void SwDocTest::test64kPageDescs()
CPPUNIT_ASSERT_EQUAL( OUString("Page65535"), rDesc.GetName() );
SwPageDesc aDesc( rDesc );
- const OUString aChanged("Changed01");
+ static const OUStringLiteral aChanged(u"Changed01");
aDesc.SetName( aChanged );
m_pDoc->ChgPageDesc( nPageDescCount, aDesc );
diff --git a/sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odt b/sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odt
new file mode 100644
index 000000000000..9bcca729bc52
--- /dev/null
+++ b/sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odt
Binary files differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index f749c363880e..52eb25978a10 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -119,6 +119,43 @@ bool TestReqIfRtfReader::WriteObjectData(SvStream& rOLE)
rOLE.WriteStream(aStream);
return true;
}
+
+/// Parser for [MS-OLEDS] 2.2.5 EmbeddedObject, aka OLE1.
+struct OLE1Reader
+{
+ sal_uInt32 m_nNativeDataSize;
+ sal_uInt32 m_nPresentationDataSize;
+
+ OLE1Reader(SvStream& rStream);
+};
+
+OLE1Reader::OLE1Reader(SvStream& rStream)
+{
+ // Skip ObjectHeader, see [MS-OLEDS] 2.2.4.
+ rStream.Seek(0);
+ sal_uInt32 nData;
+ rStream.ReadUInt32(nData); // OLEVersion
+ rStream.ReadUInt32(nData); // FormatID
+ rStream.ReadUInt32(nData); // ClassName
+ rStream.SeekRel(nData);
+ rStream.ReadUInt32(nData); // TopicName
+ rStream.SeekRel(nData);
+ rStream.ReadUInt32(nData); // ItemName
+ rStream.SeekRel(nData);
+
+ rStream.ReadUInt32(m_nNativeDataSize);
+ rStream.SeekRel(m_nNativeDataSize);
+
+ rStream.ReadUInt32(nData); // OLEVersion for presentation data
+ CPPUNIT_ASSERT(rStream.good());
+ rStream.ReadUInt32(nData); // FormatID
+ rStream.ReadUInt32(nData); // ClassName
+ rStream.SeekRel(nData);
+ rStream.ReadUInt32(nData); // Width
+ rStream.ReadUInt32(nData); // Height
+ rStream.ReadUInt32(nData); // PresentationDataSize
+ m_nPresentationDataSize = nData;
+}
}
class HtmlExportTest : public SwModelTestBase, public HtmlTestTools
@@ -703,6 +740,39 @@ DECLARE_HTMLEXPORT_TEST(testReqIfTable2, "reqif-table2.odt")
CPPUNIT_ASSERT(aStream.indexOf("<reqif-xhtml:td>") != -1);
}
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIfTableHeight)
+{
+ // Given a document with a table in it, with an explicit row height:
+ loadURL("private:factory/swriter", nullptr);
+ uno::Sequence<beans::PropertyValue> aTableProperties = {
+ comphelper::makePropertyValue("Rows", static_cast<sal_Int32>(1)),
+ comphelper::makePropertyValue("Columns", static_cast<sal_Int32>(1)),
+ };
+ dispatchCommand(mxComponent, ".uno:InsertTable", aTableProperties);
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xRow(xTable->getRows()->getByIndex(0), uno::UNO_QUERY);
+ xRow->setPropertyValue("Height", uno::makeAny(static_cast<sal_Int32>(1000)));
+
+ // When exporting to reqif-xhtml:
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aStoreProperties = {
+ comphelper::makePropertyValue("FilterName", OUString("HTML (StarWriter)")),
+ comphelper::makePropertyValue("FilterOptions", OUString("xhtmlns=reqif-xhtml")),
+ };
+ xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+
+ // Then make sure that the explicit cell height is omitted from the output:
+ SvMemoryStream aStream;
+ HtmlExportTest::wrapFragment(maTempFile, aStream);
+ xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
+ // Without the accompanying fix in place, this test would have failed, explicit height was
+ // written, which is not valid reqif-xhtml.
+ assertXPathNoAttribute(pDoc, "//reqif-xhtml:td", "height");
+}
+
DECLARE_HTMLEXPORT_TEST(testXHTMLUseCSS, "xhtml-css.odt")
{
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
@@ -1080,25 +1150,14 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PDF)
ParseOle1FromRtfUrl(aRtfUrl, aOle1);
// Check the content of the ole1 data.
- // Skip ObjectHeader, see [MS-OLEDS] 2.2.4.
- aOle1.Seek(0);
- sal_uInt32 nData;
- aOle1.ReadUInt32(nData); // OLEVersion
- aOle1.ReadUInt32(nData); // FormatID
- aOle1.ReadUInt32(nData); // ClassName
- aOle1.SeekRel(nData);
- aOle1.ReadUInt32(nData); // TopicName
- aOle1.SeekRel(nData);
- aOle1.ReadUInt32(nData); // ItemName
- aOle1.SeekRel(nData);
- aOle1.ReadUInt32(nData); // NativeDataSize
+ OLE1Reader aOle1Reader(aOle1);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 39405
// - Actual : 43008
// i.e. we did not work with the Ole10Native stream, rather created an OLE1 wrapper around the
// OLE1-in-OLE2 data, resulting in additional size.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0x99ed), nData);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0x99ed), aOle1Reader.m_nNativeDataSize);
// Now import this back and check the ODT result.
mxComponent->dispose();
@@ -1285,26 +1344,33 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PresDataNoOle2)
ParseOle1FromRtfUrl(aRtfUrl, aOle1);
// Check the content of the ole1 data.
- // Skip ObjectHeader, see [MS-OLEDS] 2.2.4.
- aOle1.Seek(0);
- sal_uInt32 nData;
- aOle1.ReadUInt32(nData); // OLEVersion
- aOle1.ReadUInt32(nData); // FormatID
- aOle1.ReadUInt32(nData); // ClassName
- aOle1.SeekRel(nData);
- aOle1.ReadUInt32(nData); // TopicName
- aOle1.SeekRel(nData);
- aOle1.ReadUInt32(nData); // ItemName
- aOle1.SeekRel(nData);
- aOle1.ReadUInt32(nData); // NativeDataSize
- aOle1.SeekRel(nData);
-
- aOle1.ReadUInt32(nData); // OLEVersion for presentation data
-
// Without the accompanying fix in place, this test would have failed as there was no
// presentation data after the native data in the OLE1 container. The result was not editable in
// Word.
- CPPUNIT_ASSERT(aOle1.good());
+ OLE1Reader aOle1Reader(aOle1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PresDataWmfOnly)
+{
+ // Save to reqif-xhtml.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "ole1-pres-data-wmf.odt";
+ mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", {});
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aStoreProperties = {
+ comphelper::makePropertyValue("FilterName", OUString("HTML (StarWriter)")),
+ comphelper::makePropertyValue("FilterOptions", OUString("xhtmlns=reqif-xhtml")),
+ };
+ xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+ OUString aRtfUrl = GetOlePath();
+ SvMemoryStream aOle1;
+ ParseOle1FromRtfUrl(aRtfUrl, aOle1);
+
+ OLE1Reader aOle1Reader(aOle1);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 135660
+ // - Actual : 272376
+ // i.e. we wrote some additional EMF data into the WMF output, which broke Word.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(135660), aOle1Reader.m_nPresentationDataSize);
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/layout/data/tdf116486.docx b/sw/qa/extras/layout/data/tdf116486.docx
index c6a4891b0cf4..825b0ef33a55 100644
--- a/sw/qa/extras/layout/data/tdf116486.docx
+++ b/sw/qa/extras/layout/data/tdf116486.docx
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf141079.odt b/sw/qa/extras/layout/data/tdf141079.odt
new file mode 100644
index 000000000000..65dfcb4a296f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf141079.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 12eb3b77e9c0..aff883cff4b8 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -26,7 +26,6 @@
#include <comphelper/sequence.hxx>
#include <fmtfsize.hxx>
-#include <fmtornt.hxx>
#include <wrtsh.hxx>
#include <edtwin.hxx>
#include <view.hxx>
@@ -2067,6 +2066,39 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testImageComment)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5), aPosition.nContent.GetIndex());
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testScriptField)
+{
+ // Test clicking script field inside table ( tdf#141079 )
+ SwDoc* pDoc = createDoc("tdf141079.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Look up layout position which is the first cell in the table
+ SwRootFrame* pRoot = pWrtShell->GetLayout();
+ CPPUNIT_ASSERT(pRoot->GetLower()->IsPageFrame());
+ SwPageFrame* pPage = static_cast<SwPageFrame*>(pRoot->GetLower());
+ CPPUNIT_ASSERT(pPage->GetLower()->IsBodyFrame());
+ SwBodyFrame* pBody = static_cast<SwBodyFrame*>(pPage->GetLower());
+ CPPUNIT_ASSERT(pBody->GetLower()->IsTextFrame());
+ SwTextFrame* pTextFrame = static_cast<SwTextFrame*>(pBody->GetLower());
+ CPPUNIT_ASSERT(pTextFrame->GetNext()->IsTabFrame());
+ SwFrame* pTable = pTextFrame->GetNext();
+ SwFrame* pRow1 = pTable->GetLower();
+ CPPUNIT_ASSERT(pRow1->GetLower()->IsCellFrame());
+ SwFrame* pCell1 = pRow1->GetLower();
+ CPPUNIT_ASSERT(pCell1->GetLower()->IsTextFrame());
+ SwTextFrame* pCellTextFrame = static_cast<SwTextFrame*>(pCell1->GetLower());
+ const SwRect& rCellRect = pCell1->getFrameArea();
+ Point aPoint = rCellRect.Center();
+ aPoint.setX(aPoint.getX() - rCellRect.Width() / 2);
+
+ // Ask for the doc model pos of this layout point.
+ SwPosition aPosition(*pCellTextFrame->GetTextNodeForFirstText());
+ pCellTextFrame->GetModelPositionForViewPoint(&aPosition, aPoint);
+
+ // Position was 1 without the fix from tdf#141079
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aPosition.nContent.GetIndex());
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testCommentCursorPosition)
{
// Load a document that has "aaa" in it, followed by three comments.
@@ -2737,7 +2769,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf137185)
auto pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
CPPUNIT_ASSERT(pModel);
auto pPage = pModel->GetPage(0);
- CPPUNIT_ASSERT(pModel);
+ CPPUNIT_ASSERT(pPage);
auto pObj = pPage->GetObj(0);
CPPUNIT_ASSERT(pObj);
diff --git a/sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odt b/sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odt
new file mode 100644
index 000000000000..4b03bd7fd197
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/MadeByLO7.odt b/sw/qa/extras/odfexport/data/MadeByLO7.odt
new file mode 100644
index 000000000000..9587fffe6470
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/MadeByLO7.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/gutter-left.odt b/sw/qa/extras/odfexport/data/gutter-left.odt
index a5ce541ef078..a047ecaa3353 100644
--- a/sw/qa/extras/odfexport/data/gutter-left.odt
+++ b/sw/qa/extras/odfexport/data/gutter-left.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/pagestyle_background_lo64.odt b/sw/qa/extras/odfexport/data/pagestyle_background_lo64.odt
new file mode 100644
index 000000000000..c8b3c3fdd056
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/pagestyle_background_lo64.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/pagestyle_background_lo70.odt b/sw/qa/extras/odfexport/data/pagestyle_background_lo70.odt
new file mode 100644
index 000000000000..eb8b4a0e72aa
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/pagestyle_background_lo70.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/pagestyle_background_ooo33.odt b/sw/qa/extras/odfexport/data/pagestyle_background_ooo33.odt
new file mode 100644
index 000000000000..92098d0bcfc3
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/pagestyle_background_ooo33.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/tdf95806.docx b/sw/qa/extras/odfexport/data/tdf95806.docx
new file mode 100644
index 000000000000..65bfaae3e423
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf95806.docx
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/testTdf52065_centerTabs.odt b/sw/qa/extras/odfexport/data/testTdf52065_centerTabs.odt
new file mode 100644
index 000000000000..8cdaf3eb9f31
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/testTdf52065_centerTabs.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 7e49bbd1b048..6dc67ca58a1d 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -10,7 +10,6 @@
#include <algorithm>
#include <memory>
#include <swmodeltestbase.hxx>
-#include <config_features.h>
#include <com/sun/star/awt/FontSlant.hpp>
#include <com/sun/star/awt/Gradient.hpp>
@@ -50,6 +49,7 @@
#include <unotools/streamwrap.hxx>
#include <svl/PasswordHelper.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
#include <docufld.hxx> // for SwHiddenTextField::ParseIfFieldDefinition() method call
#include <unoprnms.hxx>
@@ -232,6 +232,32 @@ DECLARE_ODFEXPORT_TEST(testTdf130314, "tdf130314.docx")
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
+DECLARE_ODFEXPORT_EXPORTONLY_TEST(testTdf133487, "MadeByLO7.odt")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ // shape in background has lowest index
+ assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[2]/draw:custom-shape", "z-index", "0");
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[2]/draw:custom-shape[@draw:z-index = '0']/attribute::draw:style-name]/style:graphic-properties", "run-through", "background");
+ // shape in foreground, previously index 1
+ assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[1]/draw:custom-shape", "z-index", "2");
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[1]/draw:custom-shape[@draw:z-index = '2']/attribute::draw:style-name]/style:graphic-properties", "run-through", "foreground");
+ // shape in foreground, previously index 0
+ assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[3]/draw:custom-shape", "z-index", "1");
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[3]/draw:custom-shape[@draw:z-index = '1']/attribute::draw:style-name]/style:graphic-properties", "run-through", "foreground");
+}
+
+DECLARE_ODFEXPORT_EXPORTONLY_TEST(testTdf141467, "Formcontrol needs high z-index.odt")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ // shape in foreground has lowest index
+ assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[2]/draw:custom-shape", "z-index", "0");
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[2]/draw:custom-shape[@draw:z-index = '0']/attribute::draw:style-name]/style:graphic-properties", "run-through", "foreground");
+ // form control, previously index 0
+ assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[2]/draw:control", "z-index", "1");
+ // no run-through on form's style
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[2]/draw:control[@draw:z-index = '1']/attribute::draw:style-name]/style:graphic-properties/attribute::run-through", 0);
+}
+
DECLARE_ODFEXPORT_TEST(testTdf139126, "tdf139126.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -249,6 +275,23 @@ DECLARE_ODFEXPORT_TEST(testTdf139126, "tdf139126.odt")
CPPUNIT_ASSERT_EQUAL(OUString("** Expression is faulty **"), xE2->getString());
}
+DECLARE_ODFEXPORT_TEST(testTdf125877, "tdf95806.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<text::XTextTablesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+
+ // This was 0 (lost table during ODT export in footnotes)
+ // Note: fix also tdf#95806: painting table layout is correct
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ // floating table: there is a frame now
+ 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());
+}
+
DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getShapes());
@@ -1873,6 +1916,276 @@ DECLARE_ODFEXPORT_TEST(testMasterPageWithDrawingPage, "sw_hatch.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int16(0), getProperty<sal_Int16>(xStyle, "FillTransparence"));
}
+DECLARE_ODFEXPORT_EXPORTONLY_TEST(testPageStyleBackgroundFullSizeOOo, "pagestyle_background_ooo33.odt")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ // Standard
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "border");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "solid");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-color", "#99ccff");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "opacity", "100%");
+ // Endnote
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "border");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "repeat");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+ // Footnote
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "border");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "stretch");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+}
+
+DECLARE_ODFEXPORT_EXPORTONLY_TEST(testPageStyleBackgroundFullSizeLO64, "pagestyle_background_lo64.odt")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ // Standard
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "solid");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-color", "#99ccff");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "opacity", "100%");
+ // Endnote
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "repeat");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+ // Footnote
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "border");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "stretch");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+ // Landscape
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "border");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "no-repeat");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+ // Index
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "gradient");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "gradient-step-count", "0");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "opacity", "100%");
+ // First Page
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "hatch");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-hatch-solid", "false");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "opacity", "100%");
+}
+
+DECLARE_ODFEXPORT_EXPORTONLY_TEST(testPageStyleBackgroundFullSizeLO70, "pagestyle_background_lo70.odt")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
+ // Standard
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "solid");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-color", "#99ccff");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Standard']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "opacity", "100%");
+ // Endnote
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "repeat");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Endnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+ // Footnote
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "border");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "stretch");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Footnote']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+ // Landscape
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "border");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "bitmap");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "repeat", "no-repeat");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Landscape']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-image-ref-point", "top-left");
+ // Index
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "gradient");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "gradient-step-count", "0");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='Index']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "opacity", "100%");
+ // First Page
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "background-size", "full");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill", "hatch");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "fill-hatch-solid", "false");
+ assertXPath(pXmlDoc,
+ "/office:document-styles/office:automatic-styles/style:style[@style:family='drawing-page' and @style:name = "
+ "/office:document-styles/office:master-styles/style:master-page[@style:name='First_20_Page']/attribute::draw:style-name"
+ "]/style:drawing-page-properties", "opacity", "100%");
+}
+
DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -1885,9 +2198,14 @@ DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt")
getUserDefineAttribute(uno::makeAny(xCellC1), "proName", "v3");
}
-#if HAVE_FEATURE_PDFIUM
DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
{
+ auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPdfium)
+ {
+ return;
+ }
+
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
@@ -1919,7 +2237,6 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
CPPUNIT_ASSERT(bHasBitmap);
}
}
-#endif
DECLARE_ODFEXPORT_TEST(testTableStyles1, "table_styles_1.odt")
{
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx
new file mode 100644
index 000000000000..21455b9d343d
--- /dev/null
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -0,0 +1,45 @@
+/* -*- 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>
+
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase("/sw/qa/extras/odfexport/data/", "writer8") {}
+
+ /**
+ * Denylist handling
+ */
+ bool mustTestImportOf(const char* filename) const override {
+ // Only test import of .odt document
+ return OString(filename).endsWith(".odt");
+ }
+
+ bool mustValidate(const char* /*filename*/) const override
+ {
+ return true;
+ }
+
+};
+
+DECLARE_ODFEXPORT_TEST(testTdf52065_centerTabs, "testTdf52065_centerTabs.odt")
+{
+ sal_Int32 nTabStop = parseDump("//body/txt[4]/Text[3]", "nWidth").toInt32();
+ // Without the fix, the text was unseen, with a tabstop width of 64057. It should be 3057
+ CPPUNIT_ASSERT(nTabStop < 4000);
+ CPPUNIT_ASSERT(3000 < nTabStop);
+ CPPUNIT_ASSERT_EQUAL(OUString(u"Pečiatka zamestnávateľa"), parseDump("//body/txt[4]/Text[4]", "Portion"));
+}
+
+// This test started in LO 7.2. Use the odfexport.cxx if you intend to backport to 7.1.
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/odfimport/data/tdf128737.odt b/sw/qa/extras/odfimport/data/tdf128737.odt
new file mode 100644
index 000000000000..85f2c32c603e
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf128737.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/data/vmerge-cell-border.odt b/sw/qa/extras/odfimport/data/vmerge-cell-border.odt
new file mode 100644
index 000000000000..bf387bcb183e
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/vmerge-cell-border.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 6ab87d07a3de..33018abf1a4c 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <comphelper/propertysequence.hxx>
+#include <editeng/boxitem.hxx>
#include <IDocumentSettingAccess.hxx>
#include <wrtsh.hxx>
@@ -54,6 +55,7 @@
#include <hintids.hxx>
#include <docsh.hxx>
#include <unotxdoc.hxx>
+#include <frmatr.hxx>
typedef std::map<OUString, css::uno::Sequence< css::table::BorderLine> > AllBordersMap;
typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > StringSequencePair;
@@ -558,6 +560,13 @@ DECLARE_ODFIMPORT_TEST(testFdo56272, "fdo56272.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371
}
+DECLARE_ODFIMPORT_TEST(testTdf128737, "tdf128737.odt")
+{
+ // Without the fix in place, this test would have crashed
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+ CPPUNIT_ASSERT_EQUAL(8, getShapes());
+}
+
DECLARE_ODFIMPORT_TEST(testCalcFootnoteContent, "ooo32780-1.odt")
{
//this was a CalcFootnoteContent crash
@@ -1158,5 +1167,37 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteFirstParaDirectFormat)
getProperty<sal_Int16>(xParagraph, "ParaAdjust"));
}
+CPPUNIT_TEST_FIXTURE(Test, testVerticallyMergedCellBorder)
+{
+ // Given a document with two cells, vertically merged, when loading the document:
+ SwDoc* pDoc = createSwDoc(mpTestDocumentPath, "vmerge-cell-border.odt");
+
+ // Then make sure that the first cell has a right border while the second has no right border:
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(/*bBlock=*/false);
+ SwStartNode* pA1 = pShellCursor->Start()->nNode.GetNode().StartOfSectionNode();
+ const SwAttrSet& rA1Set = pA1->GetTableBox()->GetFrameFormat()->GetAttrSet();
+ CPPUNIT_ASSERT(rA1Set.GetBox().GetRight());
+ SwNodeIndex aA2(*pA1->EndOfSectionNode(), 1);
+ const SwAttrSet& rA2Set = aA2.GetNode().GetTableBox()->GetFrameFormat()->GetAttrSet();
+
+ // Without the accompanying fix in place, this test would have failed, as the A2 cell also had a
+ // right border, even if <table:covered-table-cell table:style-name="..."> explicitly disabled
+ // it.
+ CPPUNIT_ASSERT(!rA2Set.GetBox().GetRight());
+
+ // Given this document model, when exporting to ODT:
+ save("writer8", maTempFile);
+ mbExported = true;
+
+ // Then make sure the covered cell has a style.
+ xmlDocUniquePtr pXmlSettings = parseExport("content.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - In <...>, XPath '//table:covered-table-cell' no attribute 'style-name' exist
+ assertXPath(pXmlSettings, "//table:covered-table-cell", "style-name", "Table1.A2");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx
new file mode 100644
index 000000000000..5cc4d4e374ee
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx
index 22db162a78b0..5dccf967fe7a 100644
--- a/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx
+++ b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt b/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt
new file mode 100644
index 000000000000..af1ae9a86243
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph">
+ <style:paragraph-properties fo:text-align="center"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.609cm" fo:min-width="1.609cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="2.064cm" fo:min-width="3.44cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="1" draw:z-index="1" draw:name="Shape2" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.276cm" svg:height="2.276cm" svg:x="4.752cm" svg:y="2.902cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:glue-points="10800 0 3163 3163 0 10800 3163 18437 10800 21600 18437 18437 21600 10800 18437 3163" draw:text-areas="3163 3163 18437 18437" draw:type="ellipse" draw:enhanced-path="U 10800 10800 10800 10800 0 360 Z N"/>
+ </draw:custom-shape>
+ <text:p text:style-name="Standard"><draw:custom-shape text:anchor-type="char" draw:z-index="0" draw:name="Shape1" draw:style-name="gr2" svg:width="3.44cm" svg:height="2.065cm" svg:x="-1.337cm" svg:y="0.912cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape><field:fieldmark-start text:name="__Fieldmark__0_1348794289" field:type="vnd.oasis.opendocument.field.FORMTEXT"/>foobar<field:fieldmark-end/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx
new file mode 100644
index 000000000000..d6b28e5cbce2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118535.odt b/sw/qa/extras/ooxmlexport/data/tdf118535.odt
new file mode 100644
index 000000000000..146c6f471a18
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf118535.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx b/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx
new file mode 100644
index 000000000000..eb856fb3b02e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf125936_numberingSuperscript.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
index 2cd299ff211a..aa976e7cc925 100644
--- a/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
+++ b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf136841.docx b/sw/qa/extras/ooxmlexport/data/tdf136841.docx
new file mode 100644
index 000000000000..6f9020ee17f4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf136841.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx b/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx
new file mode 100644
index 000000000000..be47d79c5b0a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt b/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt
new file mode 100644
index 000000000000..c4bd80f1a65c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140597.docx b/sw/qa/extras/ooxmlexport/data/tdf140597.docx
new file mode 100644
index 000000000000..36db7d9bea2b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf140597.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141172.docx b/sw/qa/extras/ooxmlexport/data/tdf141172.docx
new file mode 100644
index 000000000000..0e1647ae27e1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141172.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf b/sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf
new file mode 100644
index 000000000000..6ccc1de58e4b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf
@@ -0,0 +1,61 @@
+{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang3082\deflangfe3082{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
+{\f36\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Frutiger LT 65 Bold;}{\f37\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Frutiger LT 45 Light;}{\f38\fscript\fcharset0\fprq2{\*\panose 00000000000000000000}Comic Sans MS;}
+{\f39\froman\fcharset238\fprq2 Times New Roman CE;}{\f40\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\froman\fcharset162\fprq2 Times New Roman Tur;}
+{\f44\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\f49\fswiss\fcharset238\fprq2 Arial CE;}{\f50\fswiss\fcharset204\fprq2 Arial Cyr;}{\f52\fswiss\fcharset161\fprq2 Arial Greek;}{\f53\fswiss\fcharset162\fprq2 Arial Tur;}{\f54\fswiss\fcharset177\fprq2 Arial (Hebrew);}
+{\f55\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f56\fswiss\fcharset186\fprq2 Arial Baltic;}{\f57\fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f419\fscript\fcharset238\fprq2 Comic Sans MS CE;}{\f420\fscript\fcharset204\fprq2 Comic Sans MS Cyr;}
+{\f422\fscript\fcharset161\fprq2 Comic Sans MS Greek;}{\f423\fscript\fcharset162\fprq2 Comic Sans MS Tur;}{\f426\fscript\fcharset186\fprq2 Comic Sans MS Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
+\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
+\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang3082\langfe3082\cgrid\langnp3082\langfenp3082 \snext0 Normal;}{\*\cs10 \additive \ssemihidden
+Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid10428813\rsid14756311}
+{\*\generator Microsoft Word 11.0.5604;}{\info{\author Crystal Reports}{\doccomm Powered By Crystal}{\operator GESTION}{\creatim\yr2014\mo7\dy4\hr10\min47}{\revtim\yr2014\mo7\dy4\hr11\min19}{\version3}{\edmins7}{\nofpages2}{\nofwords155}{\nofchars857}
+{\*\company Crystal Decisions}{\nofcharsws1010}{\vern24689}}\paperw11904\paperh16836\margl192\margr192\margt240\margb242 \widowctrl\ftnbj\aenddoc\hyphhotz425\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120
+\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\nolnhtadjtbl\rsidroot14756311 \fet0\sectd \sbknone\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
+\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\pvpg\phpg\posx762\posy1182\absh-228\absw1653\faauto\rin0\lin0\itap0 \fs24\lang3082\langfe3082\cgrid\langnp3082\langfenp3082 {
+\lang1024\langfe1024\noproof\insrsid10428813 {\shp{\shprslt{\*\do\dobxpage\dobypage\dodhgt1\dpline\dpptx0\dppty0\dpptx10945\dppty0\dpx306\dpy16065\dpxsize10945\dpysize0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}}{\f36\insrsid14756311
+
+\par }\pard \qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\pvpg\phpg\posx2944\posy3235\absh-1764\absw5927\faauto\rin0\lin0\itap0 {
+\lang1024\langfe1024\noproof\insrsid10428813 {\shp{\*\shpinst\shpleft192\shptop840\shpright670\shpbottom1852\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz3\shplid1028
+{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn pib}{\sv
+}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}}{\shprslt\par\pard
+\ql \li0\ri0\widctlpar\pvpg\phpg\posx191\posy839\dxfrtext180\dfrmtxtx180\dfrmtxty0\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \par}}
+}{\f38\fs23\cf1\insrsid14756311\charrsid14756311 Se convoca CONSEJO ESCOLAR}{\f38\insrsid14756311\charrsid14756311
+\par }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 de car\'e1cter ORDINARIO,}{\f38\insrsid14756311\charrsid14756311
+\par }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 que tendr\'e1 lugar el pr\'f3ximo d\'eda 09/07/2014, }{\f38\fs23\cf1\insrsid14756311 a las 7 de la tarde }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 en SALA DE PROFESORES ,}{
+\f38\insrsid14756311\charrsid14756311
+\par }{\f38\fs23\cf1\insrsid14756311\charrsid14756311 con el siguiente }{\b\f38\fs23\ul\cf1\insrsid14756311\charrsid14756311 ORDEN DEL D\'cdA:}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\pvpg\phpg
+\posx707\posy6035\absh-5856\absw10180\faauto\rin0\lin0\itap0 {\f38\fs28\cf1\insrsid14756311\charrsid14756311 1.- Lectura y aprobaci\'f3n del acta anterior, si procede.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid14756311\charrsid14756311 2.- An\'e1lisis de los resultados de la evaluaci\'f3n Final.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid14756311\charrsid14756311 3.- Resultados de la prueba de diagn\'f3stico de los alumnos de 4\'ba de Primaria.}{\f38\fs28\cf1\insrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 4.- Normativa de biling\'fce para el curso pr\'f3ximo.}{\f38\fs28\insrsid10428813\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 5}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Aprobaci\'f3n de la MEMORIA del curso 2013-2014.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 6}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Proceso de elecci\'f3n de directores.}{\f38\fs28\cf1\insrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 7.- Libros de texto para el curso que viene.}{\f38\fs28\insrsid10428813\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 8}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Implantaci\'f3n de la LOMCE para el curso 2014-2015.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }{\f38\fs28\cf1\insrsid10428813 9}{\f38\fs28\cf1\insrsid14756311\charrsid14756311 .- Ruegos y preguntas.}{\f38\fs28\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\pvpg\phpg\posx621\posy12184\absh-480\absw1869\faauto\rin0\lin0\itap0\pararsid14756311 {\f38\fs19\cf1\insrsid14756311\charrsid14756311 V\'baB\'ba}{\f38\insrsid14756311\charrsid14756311
+
+\par }{\f38\fs19\cf1\insrsid14756311\charrsid14756311 El Director,}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\pvpg\phpg\posx642\posy13627\absh-221\absw4950\faauto\rin0\lin0\itap0 {\f1\fs19\cf1\insrsid14756311 Fdo.: Jose Garcia Ros}{
+\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\pvpg\phpg\posx3981\posy11104\absh-510\absw5120\faauto\rin0\lin0\itap0\pararsid14756311 {
+\f38\fs19\cf1\insrsid14756311\charrsid14756311 ROLDAN, a 4 de julio de 2014}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\pvpg\phpg
+\posx732\posy2715\absh-349\absw10155\faauto\rin0\lin0\itap0 {\b\f1\fs27\ul\cf1\insrsid14756311 Convocatoria de CONSEJO ESCOLAR}{\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\pvpg\phpg\posx6087\posy12551\absh-221\absw1995\faauto\rin0\lin0\itap0 {\f38\fs19\cf1\insrsid14756311\charrsid14756311 La Secretaria,}{\f38\insrsid14756311\charrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\pvpg\phpg\posx6097\posy13616\absh-221\absw5070\faauto\rin0\lin0\itap0 {\f1\fs19\cf1\insrsid14756311
+Fdo.: Luz Maria Ferreiro Fraga}{\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\tx360\tx720\tx1080\pvpg\phpg\posx306\posy16179\absh-221\absw1083\faauto\rin0\lin0\itap0 {\f1\fs17\cf1\insrsid14756311 04/07/2014}{\f36\insrsid14756311
+\par }\pard \qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\pvpg\phpg\posx4695\posy16179\absh-221\absw1710\faauto\rin0\lin0\itap0 {\f1\fs17\cf1\insrsid14756311 2013/14}{\f36\insrsid14756311
+\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\lang1024\langfe1024\noproof\insrsid10428813
+{\shp{\*\shpinst\shpleft741\shptop2464\shpright10955\shpbottom5065\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz0\shplid1029{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 12700}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}
+{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}{\shprslt{\*\do\dobxpage\dobypage\dodhgt0\dprect\dpx741\dpy2464\dpxsize10214\dpysize2601
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}}{\f36\insrsid14756311 \page \sect }\sectd \sbknone\linex0\sectdefaultcl\sftnbj \pard\plain
+\qc \li0\ri0\nowidctlpar\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\pvpg\phpg\posx2093\posy1866\absh-228\absw7011\faauto\rin0\lin0\itap0\pararsid14756311
+\fs24\lang3082\langfe3082\cgrid\langnp3082\langfenp3082 {\insrsid14756311
+\par }}
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docx
new file mode 100644
index 000000000000..01bc2667a195
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx
index e5ed0689d251..edbfe53b1627 100644
--- a/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx
+++ b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 6275ee8948d4..592699c4f666 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -760,10 +760,10 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOOxmlOutlineNumberTypes, "outline-number
assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[2]/w:numFmt", "val", "decimal");
assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[3]/w:numFmt", "val", "decimal");
assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[4]/w:numFmt", "val", "decimal");
- assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[5]/w:numFmt", "val", "decimal");
- assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[6]/w:numFmt", "val", "decimal");
- assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[7]/w:numFmt", "val", "decimal");
- assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[8]/w:numFmt", "val", "decimal");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[5]/w:numFmt", "val", "russianUpper");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[6]/w:numFmt", "val", "russianLower");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[7]/w:numFmt", "val", "russianUpper");
+ assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[2]/w:lvl[8]/w:numFmt", "val", "russianLower");
assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[1]/w:numFmt", "val", "decimal");
assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[3]/w:lvl[2]/w:numFmt", "val", "decimal");
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 45f9a46000e1..ba6a6a6a98e2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -453,10 +453,8 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.d
BitmapEx aBitmap(aVclGraphic.GetBitmapEx());
CPPUNIT_ASSERT_EQUAL(tools::Long(341), aBitmap.GetSizePixel().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(181), aBitmap.GetSizePixel().Height());
- Color aColor(aBitmap.GetPixelColor(120, 30));
- CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xb1, 0xc8, 0xdd ));
- aColor = aBitmap.GetPixelColor(260, 130);
- CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xb1, 0xc8, 0xdd ));
+ CPPUNIT_ASSERT_EQUAL(Color( 0xad, 0xc5, 0xdb ), aBitmap.GetPixelColor(120, 30));
+ CPPUNIT_ASSERT_EQUAL(Color( 0xad, 0xc5, 0xdb ), aBitmap.GetPixelColor(260, 130));
}
DECLARE_OOXMLEXPORT_TEST(testFdo69656, "Table_cell_auto_width_fdo69656.docx")
@@ -690,7 +688,9 @@ DECLARE_OOXMLEXPORT_TEST(testBnc875718, "bnc875718.docx")
// is not SwXBodyText but rather SwXHeadFootText
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
- for( int i = 0;
+ // The sample bugdoc has 3 footer.xml and has a textframe in each. The first one is hidden
+ // and it has no text in its anchored text range: it is anchored to body text. Ignoring...
+ for( int i = 1;
i < xIndexAccess->getCount();
++i )
{
@@ -702,6 +702,7 @@ DECLARE_OOXMLEXPORT_TEST(testBnc875718, "bnc875718.docx")
// Also check that the footer contents are not in the body text.
uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> text = textDocument->getText();
+ CPPUNIT_ASSERT(text); //Do not crash on empty content
CPPUNIT_ASSERT_EQUAL( OUString( "Text" ), text->getString());
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 743671e465b3..3a8530733c76 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -974,6 +974,9 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138899, "tdf138899.docx")
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
// This was 6, not removed empty temporary paragraph at the end of the section
assertXPath(pXmlDocument, "/w:document/w:body/w:p", 5);
+
+ //tdf#134385: Paragraph property to "add space between paragraphs of the same style" was lost
+ assertXPath(pXmlDocument, "//w:p[1]/w:pPr/w:contextualSpacing", "val", "false");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf122563, "tdf122563.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 5ce06fdacb6c..c50a75c6daa1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -96,6 +96,17 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121666_lostPage, "tdf121666_lostPage.
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type", "val", "nextPage");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf140182_extraPagebreak, "tdf140182_extraPagebreak.docx")
+{
+ // Table, page break, section break should be only 2 pages
+ // 2 breaks would normally results in 3 pages, but page break + section break is a special case
+ // that is handled so to break only 1 page that result only 2 pages.
+ // Because of the table, a hack (m_bDummyParaAddedForTableInSection) is set for the entire section,
+ // that canceled the page break + section break special case handling, resulting 3 pages.
+ // The accompanying fix eliminates this cancellation.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf95848, "tdf95848.docx")
{
OUString listId;
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 77fcb3fd1091..951a4d8650f2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -670,7 +670,8 @@ DECLARE_OOXMLEXPORT_TEST(testTdf130167_spilloverHeaderShape, "testTdf130167_spil
uno::Reference<container::XIndexAccess> xNameAccess(
xTextGraphicObjectsSupplier->getGraphicObjects(), uno::UNO_QUERY);
// graphics from discarded headers were being added to the text body. Reduced from 5 to 2 shapes overall.
- CPPUNIT_ASSERT(xNameAccess->getCount() < 4);
+ // CPPUNIT_ASSERT(xNameAccess->getCount() <= 4); -> What about hidden headers?
+ CPPUNIT_ASSERT_LESS(sal_Int32(6), xNameAccess->getCount());
}
DECLARE_OOXMLEXPORT_TEST(testTdf124986, "tdf124986.docx")
@@ -1169,6 +1170,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123757, "tdf123757.docx")
assertXPath(pXml, "/w:document/w:body/w:tbl", 2);
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf141172, "tdf141172.docx")
+{
+ xmlDocUniquePtr pXml = parseExport("word/endnotes.xml");
+ CPPUNIT_ASSERT(pXml);
+ // This was 1 (lost table during copying endnote content)
+ assertXPath(pXml, "/w:endnotes/w:endnote/w:tbl", 2);
+}
+
DECLARE_OOXMLEXPORT_TEST(testContSectBreakHeaderFooter, "cont-sect-break-header-footer.docx")
{
// Load a document with a continuous section break on page 2.
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 5555a819c00e..c272a5878ff6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -15,9 +15,13 @@
#include <svx/svdobj.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+#include <comphelper/configuration.hxx>
#include <editeng/escapementitem.hxx>
#include <unotools/fltrcfg.hxx>
@@ -70,6 +74,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138892_noNumbering, "tdf138892_noNumbering.docx"
CPPUNIT_ASSERT_MESSAGE("Para3: <blank line>", getProperty<OUString>(getParagraph(3), "NumberingStyleName").isEmpty());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf141231_arabicHebrewNumbering, "tdf141231_arabicHebrewNumbering.docx")
+{
+ // The page's numbering type: instead of Hebrew, this was default style::NumberingType::ARABIC (4).
+ auto nActual = getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Standard"), "NumberingType");
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_HEBREW, nActual);
+
+ // The footnote numbering type: instead of arabicAbjad, this was the default style::NumberingType::ARABIC.
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFootnoteSettings = xFootnotesSupplier->getFootnoteSettings();
+ nActual = getProperty<sal_Int16>(xFootnotesSupplier->getFootnoteSettings(), "NumberingType");
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::CHARS_ARABIC_ABJAD, nActual);
+}
+
DECLARE_OOXMLEXPORT_TEST(testGutterLeft, "gutter-left.docx")
{
uno::Reference<beans::XPropertySet> xPageStyle;
@@ -109,6 +126,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138771, "tdf138771.docx")
CPPUNIT_ASSERT_EQUAL(1, getPages());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf125936_numberingSuperscript, "tdf125936_numberingSuperscript.docx")
+{
+ // Without the fix, the first character run was superscripted.
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(0), getProperty<sal_Int16>(getRun(getParagraph(1), 1, "A-570-108"), "CharEscapement") );
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf134619_numberingProps, "tdf134619_numberingProps.doc")
{
// Get the third paragraph's numbering style's 1st level's bullet size
@@ -132,6 +155,24 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf135773_numberingShading, "tdf135774_n
assertXPath(pXmlStyles, "/w:numbering/w:abstractNum[@w:abstractNumId='1']/w:lvl[@w:ilvl='0']/w:rPr/w:shd", "fill", "ED4C05");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf140336_paraNoneShading, "tdf140336_paraNoneShading.odt")
+{
+ // Before the fix, the background from a style was exported to dis-inheriting paragraphs/styles.
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(COL_AUTO), getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor"));
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("CanclledBackground"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
+
+ // sanity check: backgroundColor paragraph style has a golden color(FF7F50), which para2 inherits
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(16744272), getProperty<sal_uInt32>(getParagraph(2), "ParaBackColor"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf141173_missingFrames, "tdf141173_missingFrames.rtf")
+{
+ // Without the fix in place, almost all of the text and textboxes were missing.
+ // Without the fix, there were only 2 shapes (mostly unseen).
+ CPPUNIT_ASSERT_EQUAL(13, getShapes());
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf139580, "tdf139580.odt")
{
// Without the fix in place, this test would have crashed at export time
@@ -149,6 +190,45 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFooterMarginLost, "footer-margin-lost.do
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgMar", "footer", "709");
}
+CPPUNIT_TEST_FIXTURE(Test, testEffectExtentLineWidth)
+{
+ auto verify = [this]() {
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(508),
+ getProperty<sal_Int32>(getShape(1), "TopMargin"));
+ };
+
+ // Given a document with a shape that has a non-zero line width and effect extent:
+ // When loading the document:
+ load(mpTestDocumentPath, "effect-extent-line-width.docx");
+ // Then make sure that the line width is not taken twice (once as part of the margin, and then
+ // also as the line width):
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 508
+ // - Actual : 561
+ // i.e. the upper spacing was too large, the last line of the text moved below the shape.
+ verify();
+ reload(mpFilter, "effect-extent-line-width.docx");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
+{
+ // Given a document with RTL gutter:
+ load(mpTestDocumentPath, "rtl-gutter.docx");
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(getProperty<bool>(xStandard, "RtlGutter"));
+
+ // When saving back to DOCX:
+ reload(mpFilter, "rtl-gutter.docx");
+
+ // Then make sure the section's gutter is still RTL:
+ xmlDocUniquePtr pXmlDoc = parseExport();
+ // Without the accompanying fix in place, this test would have failed as the XML element was
+ // missing.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:rtlGutter", 1);
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140572_docDefault_superscript, "tdf140572_docDefault_superscript.docx")
{
// A round-trip was crashing.
@@ -157,6 +237,25 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140572_docDefault_superscript, "tdf14
CPPUNIT_ASSERT_EQUAL( sal_Int16(0), getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharEscapement") );
}
+DECLARE_OOXMLEXPORT_TEST(testTdf136841, "tdf136841.docx")
+{
+ if (!IsDefaultDPI())
+ return;
+ uno::Reference<drawing::XShape> image = getShape(1);
+ uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> graphic;
+ imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
+ Graphic vclGraphic(graphic);
+ BitmapEx bitmap(vclGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL( tools::Long(76), bitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL( tools::Long(76), bitmap.GetSizePixel().Height());
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: Color: R:228 G:71 B:69 A:0
+ // - Actual : Color: R:0 G:0 B:0 A:0
+ CPPUNIT_ASSERT_EQUAL( Color(228,71,69), bitmap.GetPixelColor(38,38));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf138953, "croppedAndRotated.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getShapes());
@@ -171,6 +270,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138953, "croppedAndRotated.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(8664), frameRect.Width);
}
+DECLARE_OOXMLEXPORT_TEST(testTdf118535, "tdf118535.odt")
+{
+ uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), maTempFile.GetURL());
+ CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("word/media/image1.jpeg")));
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: false
+ // - Actual : true
+ // i.e. the embedded picture would have been saved twice.
+ CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess->hasByName("word/media/image2.jpeg")));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf133473_shadowSize, "tdf133473.docx")
{
uno::Reference<drawing::XShape> xShape = getShape(1);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index c39059e7904d..5289ddf23413 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -683,8 +683,8 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf38778, "tdf38778_properties_in_run_fo
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
- const OUString psz("20");
- const OUString pszCs("20");
+ static const OUStringLiteral psz(u"20");
+ static const OUStringLiteral pszCs(u"20");
// w:fldCharType="begin"
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:sz", "val", psz);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 95f60995f933..404db9c59ef9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -749,6 +749,19 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138612, "tdf138612.docx")
assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[2]/w:tcPr/w:vMerge", 0);
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140597, "tdf140597.docx")
+{
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+ // There were missing tblPrEx table exception borders
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:top");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:tcBorders/w:start");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:top");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:tcPr/w:tcBorders/w:start");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:top");
+ assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:tcPr/w:tcBorders/w:start");
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx")
{
// The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 72dc978a4c8e..935c047dad21 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -1008,9 +1008,9 @@ DECLARE_OOXMLEXPORT_TEST(testRelativeAlignmentFromTopMargin,
return;
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- assertXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top", "1487"); // center
- assertXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top", "2668"); // bottom
- assertXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top", "298"); // top
+ assertXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top", "1502"); // center
+ assertXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top", "2683"); // bottom
+ assertXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top", "313"); // top
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 54540c265977..c443120fecd5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -851,8 +851,8 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79591, "fdo79591.docx")
*/
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr", "name", "");
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", "ID", "");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr", "name", "_x0000_t0");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", "ID", "_x0000_t0");
}
DECLARE_OOXMLEXPORT_TEST(testBnc884615, "bnc884615.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 9c5f05e51534..887ffc7560ad 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -484,6 +484,18 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testEditTime, "fdo81341.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:fldChar", "fldCharType", "end");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFlyFieldmark, "fly_fieldmark.fodt")
+{
+ // the problem was that the flys were written after the field start
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ // run 1 contains 2 shapes, one was at-page, one was at-char
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent", 2);
+ // run 2 contains the field start
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:fldChar", "fldCharType", "begin");
+ // run 3 contains the field instruction text
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:instrText", " FORMTEXT ");
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo81945, "fdo81945.docx")
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/qa/extras/ooxmlimport/data/tdf118693.docx b/sw/qa/extras/ooxmlimport/data/tdf118693.docx
new file mode 100644
index 000000000000..4e832398bcd5
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf118693.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf122717.docx b/sw/qa/extras/ooxmlimport/data/tdf122717.docx
new file mode 100644
index 000000000000..9a2098272c75
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf122717.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 16351d9fcb35..59a2688232c8 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -564,10 +564,10 @@ DECLARE_OOXMLIMPORT_TEST(testN779627, "n779627.docx")
sal_Int32(9), nLeftMargin);
/*
- * Another problem tested with this document is the unnecessary loading of the shapes
- * anchored to a discarded header or footer
+ * Another problem tested with this document is the loading of the shapes
+ * anchored to a hidden header or footer
*/
- CPPUNIT_ASSERT_EQUAL(0, getShapes());
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
}
DECLARE_OOXMLIMPORT_TEST(testN779627b, "n779627b.docx")
@@ -1346,16 +1346,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx")
// Make sure we're not testing the ellipse child.
CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.LineShape"), xShapeDescriptor->getShapeType());
- // tdf#106792 checked that during load of tdf85232.docx the method
- // SvxShapePolyPolygon::setPropertyValueImpl is used three times. In
- // that method, a call to ForceMetricToItemPoolMetric was missing so
- // that the import did not convert the input values from 100thmm
- // to twips what is needed due to the object residing in Writer. The
- // UNO API by definition is in 100thmm. Result is that in SwXShape::getPosition
- // the offset (aOffset) now is (0, 0) instead of an existing offset in
- // the load of the document before (what is plausible for a GroupObject).
- // Thus, I will adapt the result value here to the now (hopefully) correct one.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1630), xShape->getPosition().X); // was: 2267
+ // This was 2900: horizontal position of the line was incorrect, the 3 children were not connected visually.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2267), xShape->getPosition().X);
}
DECLARE_OOXMLIMPORT_TEST(testTdf95755, "tdf95755.docx")
@@ -1437,6 +1429,19 @@ DECLARE_OOXMLIMPORT_TEST(testTdf96674, "tdf96674.docx")
CPPUNIT_ASSERT(aActualSize.Height > 0);
}
+DECLARE_OOXMLIMPORT_TEST(testTdf122717, "tdf122717.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT(xShape.is());
+ awt::Size aActualSize(xShape->getSize());
+ // Without the fix in place, this test would have failed with
+ // - Expected: 2
+ // - Actual : 8160
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aActualSize.Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8160), aActualSize.Height);
+
+}
+
DECLARE_OOXMLIMPORT_TEST(testTdf98882, "tdf98882.docx")
{
sal_Int32 nFlyHeight = parseDump("//fly/infos/bounds", "height").toInt32();
@@ -1624,7 +1629,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108806, "tdf108806.docx")
DECLARE_OOXMLIMPORT_TEST(testTdf87533_bidi, "tdf87533_bidi.docx")
{
// "w:bidi" (specified inside Default paragraph properties) should not be ignored
- const OUString writingMode = "WritingMode"; //getPropertyName(PROP_WRITING_MODE);
+ static const OUStringLiteral writingMode = u"WritingMode"; //getPropertyName(PROP_WRITING_MODE);
// check: "Default Style" master-style has RTL
{
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 474cfbe2b13d..fcfaccafb774 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -196,6 +196,43 @@ DECLARE_OOXMLIMPORT_TEST(testTdf120547, "tdf120547.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(8073), aSizeShape3.Height);
}
+DECLARE_OOXMLIMPORT_TEST(testTdf118693, "tdf118693.docx")
+{
+ uno::Reference<drawing::XShape> xGroupShape = getShape(1);
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xGroup->getCount());
+
+ awt::Point aPosGroup = xGroupShape->getPosition();
+ awt::Size aSizeGroup = xGroupShape->getSize();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(10162), aPosGroup.X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(118), aPosGroup.Y);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6369), aSizeGroup.Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4983), aSizeGroup.Height);
+
+ // Without the fix in place, this test would have failed at many places
+ // as the first shape in the group would have had an incorrect position,
+ // an incorrect width or an incorrect height.
+
+ uno::Reference<drawing::XShape> xShape1(xGroup->getByIndex(0), uno::UNO_QUERY_THROW);
+ awt::Point aPosShape1 = xShape1->getPosition();
+ awt::Size aSizeShape1 = xShape1->getSize();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12863), aPosShape1.X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(146), aPosShape1.Y);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3669), aSizeShape1.Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4914), aSizeShape1.Height);
+
+ uno::Reference<drawing::XShape> xShape2(xGroup->getByIndex(1), uno::UNO_QUERY_THROW);
+ awt::Point aPosShape2 = xShape2->getPosition();
+ awt::Size aSizeShape2 = xShape2->getSize();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(10162), aPosShape2.X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(118), aPosShape2.Y);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4595), aSizeShape2.Width);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4983), aSizeShape2.Height);
+}
+
DECLARE_OOXMLIMPORT_TEST(testGroupShapeFontName, "groupshape-fontname.docx")
{
// Font names inside a group shape were not imported
diff --git a/sw/qa/extras/rtfexport/data/rtl-gutter.rtf b/sw/qa/extras/rtfexport/data/rtl-gutter.rtf
new file mode 100644
index 000000000000..45c7c86b4500
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/rtl-gutter.rtf
@@ -0,0 +1,4 @@
+{\rtf1
+\paperw8395\paperh5947\margl360\margr360\margt720\margb1440\gutter1080\rtlgutter
+\pard\plain hello\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx
index a3b5f6b2779c..6f801bc3f8cc 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -404,6 +404,23 @@ DECLARE_RTFEXPORT_TEST(testTdf128428_dntblnsbdb, "tdf128428_dntblnsbdb.rtf")
CPPUNIT_ASSERT_EQUAL(1, getPages());
}
+CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
+{
+ auto verify = [this]() {
+ uno::Reference<beans::XPropertySet> xStandard(
+ getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(getProperty<bool>(xStandard, "RtlGutter"));
+ };
+
+ // Given a document with RTL gutter, when loading it:
+ load(mpTestDocumentPath, "rtl-gutter.rtf");
+ // Then make sure the section's gutter is still RTL:
+ // Without the accompanying fix in place, this test would have failed as \rtlgutter was missing.
+ verify();
+ reload(mpFilter, "rtl-gutter.rtf");
+ verify();
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/tiledrendering/data/cond-coll-copy.odt b/sw/qa/extras/tiledrendering/data/cond-coll-copy.odt
new file mode 100644
index 000000000000..8fa15f177eb7
--- /dev/null
+++ b/sw/qa/extras/tiledrendering/data/cond-coll-copy.odt
Binary files differ
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 54dd09b7d191..b5d8000c967f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -18,6 +18,7 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/datatransfer/XTransferable2.hpp>
#include <test/helper/transferable.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -45,6 +46,7 @@
#include <tools/json_writer.hxx>
#include <unotools/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <drawdoc.hxx>
#include <ndtxt.hxx>
@@ -153,6 +155,7 @@ public:
void testBulletDeleteInvalidation();
void testBulletNoNumInvalidation();
void testBulletMultiDeleteInvalidation();
+ void testCondCollCopy();
CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
CPPUNIT_TEST(testRegisterCallback);
@@ -231,6 +234,7 @@ public:
CPPUNIT_TEST(testBulletDeleteInvalidation);
CPPUNIT_TEST(testBulletNoNumInvalidation);
CPPUNIT_TEST(testBulletMultiDeleteInvalidation);
+ CPPUNIT_TEST(testCondCollCopy);
CPPUNIT_TEST_SUITE_END();
private:
@@ -3070,6 +3074,28 @@ void SwTiledRenderingTest::testBulletMultiDeleteInvalidation()
CPPUNIT_ASSERT(!aFirstTextRect.IsOver(m_aInvalidations));
}
+void SwTiledRenderingTest::testCondCollCopy()
+{
+ // Given a document with a custom Text Body cond style:
+ SwXTextDocument* pXTextDocument = createDoc("cond-coll-copy.odt");
+ uno::Sequence<beans::PropertyValue> aPropertyValues
+ = { comphelper::makePropertyValue("Style", OUString("Text Body")),
+ comphelper::makePropertyValue("FamilyName", OUString("ParagraphStyles")) };
+ dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
+ SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+ pWrtShell->SelAll();
+
+ // When getting the text selection, then make sure it doesn't crash:
+ uno::Reference<datatransfer::XTransferable2> xTransferable(pXTextDocument->getSelection(),
+ css::uno::UNO_QUERY);
+ datatransfer::DataFlavor aFlavor;
+ aFlavor.MimeType = "text/plain;charset=utf-16";
+ aFlavor.DataType = cppu::UnoType<OUString>::get();
+ CPPUNIT_ASSERT(xTransferable->isDataFlavorSupported(aFlavor));
+ // Without the accompanying fix in place, this test would have crashed.
+ xTransferable->getTransferData(aFlavor);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/uiwriter/data3/AsCharTxBxTest.docx b/sw/qa/extras/uiwriter/data/AsCharTxBxTest.docx
index 7603b80d2c2d..7603b80d2c2d 100644
--- a/sw/qa/extras/uiwriter/data3/AsCharTxBxTest.docx
+++ b/sw/qa/extras/uiwriter/data/AsCharTxBxTest.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/AtPageTextBoxCrash.odt b/sw/qa/extras/uiwriter/data/AtPageTextBoxCrash.odt
index 20e58dfc0670..20e58dfc0670 100644
--- a/sw/qa/extras/uiwriter/data3/AtPageTextBoxCrash.odt
+++ b/sw/qa/extras/uiwriter/data/AtPageTextBoxCrash.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/floating-table-position.docx b/sw/qa/extras/uiwriter/data/floating-table-position.docx
index de7a467aac1b..de7a467aac1b 100644
--- a/sw/qa/extras/uiwriter/data2/floating-table-position.docx
+++ b/sw/qa/extras/uiwriter/data/floating-table-position.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/frame_size_export.docx b/sw/qa/extras/uiwriter/data/frame_size_export.docx
index 86147f311038..86147f311038 100644
--- a/sw/qa/extras/uiwriter/data2/frame_size_export.docx
+++ b/sw/qa/extras/uiwriter/data/frame_size_export.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/image-comment-at-char.odt b/sw/qa/extras/uiwriter/data/image-comment-at-char.odt
index ac6a06780a81..ac6a06780a81 100644
--- a/sw/qa/extras/uiwriter/data2/image-comment-at-char.odt
+++ b/sw/qa/extras/uiwriter/data/image-comment-at-char.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/image-comment.odt b/sw/qa/extras/uiwriter/data/image-comment.odt
index 4f0a520bcca3..4f0a520bcca3 100644
--- a/sw/qa/extras/uiwriter/data2/image-comment.odt
+++ b/sw/qa/extras/uiwriter/data/image-comment.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/lorem.fodt b/sw/qa/extras/uiwriter/data/lorem.fodt
index 1996ef8de580..1996ef8de580 100644
--- a/sw/qa/extras/uiwriter/data2/lorem.fodt
+++ b/sw/qa/extras/uiwriter/data/lorem.fodt
diff --git a/sw/qa/extras/uiwriter/data2/num-parent-style.docx b/sw/qa/extras/uiwriter/data/num-parent-style.docx
index 4b8c657afa3f..4b8c657afa3f 100644
--- a/sw/qa/extras/uiwriter/data2/num-parent-style.docx
+++ b/sw/qa/extras/uiwriter/data/num-parent-style.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/ofz18563.docx b/sw/qa/extras/uiwriter/data/ofz18563.docx
index 6733db44abb7..6733db44abb7 100644
--- a/sw/qa/extras/uiwriter/data2/ofz18563.docx
+++ b/sw/qa/extras/uiwriter/data/ofz18563.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/ole-save-while-edit.odt b/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt
index 33a2284dd314..33a2284dd314 100644
--- a/sw/qa/extras/uiwriter/data2/ole-save-while-edit.odt
+++ b/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/redline-para-join.docx b/sw/qa/extras/uiwriter/data/redline-para-join.docx
index c1ed90f801fb..c1ed90f801fb 100644
--- a/sw/qa/extras/uiwriter/data2/redline-para-join.docx
+++ b/sw/qa/extras/uiwriter/data/redline-para-join.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/shape-page-move.odt b/sw/qa/extras/uiwriter/data/shape-page-move.odt
index 80672b2448a2..80672b2448a2 100644
--- a/sw/qa/extras/uiwriter/data2/shape-page-move.odt
+++ b/sw/qa/extras/uiwriter/data/shape-page-move.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf100018-1.odt b/sw/qa/extras/uiwriter/data/tdf100018-1.odt
index 5cd36efcee77..5cd36efcee77 100644
--- a/sw/qa/extras/uiwriter/data3/tdf100018-1.odt
+++ b/sw/qa/extras/uiwriter/data/tdf100018-1.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf100691.fodt b/sw/qa/extras/uiwriter/data/tdf100691.fodt
index 6488f0b40663..6488f0b40663 100644
--- a/sw/qa/extras/uiwriter/data3/tdf100691.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf100691.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf101534.fodt b/sw/qa/extras/uiwriter/data/tdf101534.fodt
index e1db2f08ee08..e1db2f08ee08 100644
--- a/sw/qa/extras/uiwriter/data2/tdf101534.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf101534.fodt
diff --git a/sw/qa/extras/uiwriter/data3/tdf104649.docx b/sw/qa/extras/uiwriter/data/tdf104649.docx
index 7b1e4fd3cedc..7b1e4fd3cedc 100644
--- a/sw/qa/extras/uiwriter/data3/tdf104649.docx
+++ b/sw/qa/extras/uiwriter/data/tdf104649.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf105330.odt b/sw/qa/extras/uiwriter/data/tdf105330.odt
index bb1a088c38cc..bb1a088c38cc 100644
--- a/sw/qa/extras/uiwriter/data2/tdf105330.odt
+++ b/sw/qa/extras/uiwriter/data/tdf105330.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf105413.fodt b/sw/qa/extras/uiwriter/data/tdf105413.fodt
index f27ee904d82b..f27ee904d82b 100644
--- a/sw/qa/extras/uiwriter/data2/tdf105413.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf105413.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf106843.docx b/sw/qa/extras/uiwriter/data/tdf106843.docx
index 339ebd594168..339ebd594168 100644
--- a/sw/qa/extras/uiwriter/data2/tdf106843.docx
+++ b/sw/qa/extras/uiwriter/data/tdf106843.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf107893.odt b/sw/qa/extras/uiwriter/data/tdf107893.odt
index 9c24eccfa367..9c24eccfa367 100644
--- a/sw/qa/extras/uiwriter/data3/tdf107893.odt
+++ b/sw/qa/extras/uiwriter/data/tdf107893.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf107975.odt b/sw/qa/extras/uiwriter/data/tdf107975.odt
index afcab1814b58..afcab1814b58 100644
--- a/sw/qa/extras/uiwriter/data3/tdf107975.odt
+++ b/sw/qa/extras/uiwriter/data/tdf107975.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf108124.odt b/sw/qa/extras/uiwriter/data/tdf108124.odt
index af0260928b40..af0260928b40 100644
--- a/sw/qa/extras/uiwriter/data3/tdf108124.odt
+++ b/sw/qa/extras/uiwriter/data/tdf108124.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf108687_tabstop.odt b/sw/qa/extras/uiwriter/data/tdf108687_tabstop.odt
index caabc4987c30..caabc4987c30 100644
--- a/sw/qa/extras/uiwriter/data2/tdf108687_tabstop.odt
+++ b/sw/qa/extras/uiwriter/data/tdf108687_tabstop.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf112342.docx b/sw/qa/extras/uiwriter/data/tdf112342.docx
index ab4c7ee07d4d..ab4c7ee07d4d 100644
--- a/sw/qa/extras/uiwriter/data3/tdf112342.docx
+++ b/sw/qa/extras/uiwriter/data/tdf112342.docx
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 000000000000..7c2aad0da638
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf115815.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf117923.docx b/sw/qa/extras/uiwriter/data/tdf117923.docx
index c10ac24050b2..c10ac24050b2 100644
--- a/sw/qa/extras/uiwriter/data2/tdf117923.docx
+++ b/sw/qa/extras/uiwriter/data/tdf117923.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf118311.fodt b/sw/qa/extras/uiwriter/data/tdf118311.fodt
index cf1914e51d34..cf1914e51d34 100644
--- a/sw/qa/extras/uiwriter/data2/tdf118311.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf118311.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf118699.docx b/sw/qa/extras/uiwriter/data/tdf118699.docx
index 6aea0911aef1..6aea0911aef1 100644
--- a/sw/qa/extras/uiwriter/data2/tdf118699.docx
+++ b/sw/qa/extras/uiwriter/data/tdf118699.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf119019.docx b/sw/qa/extras/uiwriter/data/tdf119019.docx
index d38c9e4ae146..d38c9e4ae146 100644
--- a/sw/qa/extras/uiwriter/data2/tdf119019.docx
+++ b/sw/qa/extras/uiwriter/data/tdf119019.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf120336.docx b/sw/qa/extras/uiwriter/data/tdf120336.docx
index a9152bf31d07..a9152bf31d07 100644
--- a/sw/qa/extras/uiwriter/data2/tdf120336.docx
+++ b/sw/qa/extras/uiwriter/data/tdf120336.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf120338.docx b/sw/qa/extras/uiwriter/data/tdf120338.docx
index 94e0023cea7f..94e0023cea7f 100644
--- a/sw/qa/extras/uiwriter/data2/tdf120338.docx
+++ b/sw/qa/extras/uiwriter/data/tdf120338.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf122942.odt b/sw/qa/extras/uiwriter/data/tdf122942.odt
index c56583d305f2..c56583d305f2 100644
--- a/sw/qa/extras/uiwriter/data2/tdf122942.odt
+++ b/sw/qa/extras/uiwriter/data/tdf122942.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf123102.odt b/sw/qa/extras/uiwriter/data/tdf123102.odt
index 731a9b1521c1..731a9b1521c1 100644
--- a/sw/qa/extras/uiwriter/data2/tdf123102.odt
+++ b/sw/qa/extras/uiwriter/data/tdf123102.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf123285.odt b/sw/qa/extras/uiwriter/data/tdf123285.odt
index 1f92e1511a8b..1f92e1511a8b 100644
--- a/sw/qa/extras/uiwriter/data3/tdf123285.odt
+++ b/sw/qa/extras/uiwriter/data/tdf123285.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf124261.docx b/sw/qa/extras/uiwriter/data/tdf124261.docx
index 1d3efa5276f4..1d3efa5276f4 100644
--- a/sw/qa/extras/uiwriter/data2/tdf124261.docx
+++ b/sw/qa/extras/uiwriter/data/tdf124261.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf124397.docx b/sw/qa/extras/uiwriter/data/tdf124397.docx
index 65e2d25bcc62..65e2d25bcc62 100644
--- a/sw/qa/extras/uiwriter/data3/tdf124397.docx
+++ b/sw/qa/extras/uiwriter/data/tdf124397.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf124722.rtf b/sw/qa/extras/uiwriter/data/tdf124722.rtf
index 93f386d00a99..93f386d00a99 100644
--- a/sw/qa/extras/uiwriter/data3/tdf124722.rtf
+++ b/sw/qa/extras/uiwriter/data/tdf124722.rtf
diff --git a/sw/qa/extras/uiwriter/data3/tdf125261.odt b/sw/qa/extras/uiwriter/data/tdf125261.odt
index f89e1b21f518..f89e1b21f518 100644
--- a/sw/qa/extras/uiwriter/data3/tdf125261.odt
+++ b/sw/qa/extras/uiwriter/data/tdf125261.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf125310.fodt b/sw/qa/extras/uiwriter/data/tdf125310.fodt
index cf204e698223..cf204e698223 100644
--- a/sw/qa/extras/uiwriter/data2/tdf125310.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf125310.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf125310b.fodt b/sw/qa/extras/uiwriter/data/tdf125310b.fodt
index 1c131ce99b3a..1c131ce99b3a 100644
--- a/sw/qa/extras/uiwriter/data2/tdf125310b.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf125310b.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf125881.docx b/sw/qa/extras/uiwriter/data/tdf125881.docx
index 569d048eefe3..569d048eefe3 100644
--- a/sw/qa/extras/uiwriter/data2/tdf125881.docx
+++ b/sw/qa/extras/uiwriter/data/tdf125881.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf125916.docx b/sw/qa/extras/uiwriter/data/tdf125916.docx
index 6e1350da9c4a..6e1350da9c4a 100644
--- a/sw/qa/extras/uiwriter/data2/tdf125916.docx
+++ b/sw/qa/extras/uiwriter/data/tdf125916.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf126206.docx b/sw/qa/extras/uiwriter/data/tdf126206.docx
index 166125e7a738..166125e7a738 100644
--- a/sw/qa/extras/uiwriter/data2/tdf126206.docx
+++ b/sw/qa/extras/uiwriter/data/tdf126206.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf126340.odt b/sw/qa/extras/uiwriter/data/tdf126340.odt
index 79b481015093..79b481015093 100644
--- a/sw/qa/extras/uiwriter/data3/tdf126340.odt
+++ b/sw/qa/extras/uiwriter/data/tdf126340.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf126504.odt b/sw/qa/extras/uiwriter/data/tdf126504.odt
index 3f09230f21d5..3f09230f21d5 100644
--- a/sw/qa/extras/uiwriter/data3/tdf126504.odt
+++ b/sw/qa/extras/uiwriter/data/tdf126504.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf126626.docx b/sw/qa/extras/uiwriter/data/tdf126626.docx
index a2a289c2daca..a2a289c2daca 100644
--- a/sw/qa/extras/uiwriter/data3/tdf126626.docx
+++ b/sw/qa/extras/uiwriter/data/tdf126626.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf126784_distributeSelectedColumns.odt b/sw/qa/extras/uiwriter/data/tdf126784_distributeSelectedColumns.odt
index 90c23c56a32d..90c23c56a32d 100644
--- a/sw/qa/extras/uiwriter/data2/tdf126784_distributeSelectedColumns.odt
+++ b/sw/qa/extras/uiwriter/data/tdf126784_distributeSelectedColumns.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf127652.odt b/sw/qa/extras/uiwriter/data/tdf127652.odt
index 12b2b156bd23..12b2b156bd23 100644
--- a/sw/qa/extras/uiwriter/data3/tdf127652.odt
+++ b/sw/qa/extras/uiwriter/data/tdf127652.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf128335.odt b/sw/qa/extras/uiwriter/data/tdf128335.odt
index 6fb758af9168..6fb758af9168 100644
--- a/sw/qa/extras/uiwriter/data2/tdf128335.odt
+++ b/sw/qa/extras/uiwriter/data/tdf128335.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf128603.odt b/sw/qa/extras/uiwriter/data/tdf128603.odt
index 6fb758af9168..6fb758af9168 100644
--- a/sw/qa/extras/uiwriter/data2/tdf128603.odt
+++ b/sw/qa/extras/uiwriter/data/tdf128603.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf128739.docx b/sw/qa/extras/uiwriter/data/tdf128739.docx
index cf5d00f91f28..cf5d00f91f28 100644
--- a/sw/qa/extras/uiwriter/data3/tdf128739.docx
+++ b/sw/qa/extras/uiwriter/data/tdf128739.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf128782.odt b/sw/qa/extras/uiwriter/data/tdf128782.odt
index bb4a7d7f67c9..bb4a7d7f67c9 100644
--- a/sw/qa/extras/uiwriter/data3/tdf128782.odt
+++ b/sw/qa/extras/uiwriter/data/tdf128782.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf129382.docx b/sw/qa/extras/uiwriter/data/tdf129382.docx
index 19da7ef530b7..19da7ef530b7 100644
--- a/sw/qa/extras/uiwriter/data3/tdf129382.docx
+++ b/sw/qa/extras/uiwriter/data/tdf129382.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf129655-vtextbox.odt b/sw/qa/extras/uiwriter/data/tdf129655-vtextbox.odt
index 8d668400c386..8d668400c386 100644
--- a/sw/qa/extras/uiwriter/data2/tdf129655-vtextbox.odt
+++ b/sw/qa/extras/uiwriter/data/tdf129655-vtextbox.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf129805.docx b/sw/qa/extras/uiwriter/data/tdf129805.docx
index 53cb5550df6d..53cb5550df6d 100644
--- a/sw/qa/extras/uiwriter/data3/tdf129805.docx
+++ b/sw/qa/extras/uiwriter/data/tdf129805.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf130680.odt b/sw/qa/extras/uiwriter/data/tdf130680.odt
index 9065433dcdaa..9065433dcdaa 100644
--- a/sw/qa/extras/uiwriter/data3/tdf130680.odt
+++ b/sw/qa/extras/uiwriter/data/tdf130680.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf130685.odt b/sw/qa/extras/uiwriter/data/tdf130685.odt
index f83827ebb7e4..f83827ebb7e4 100644
--- a/sw/qa/extras/uiwriter/data3/tdf130685.odt
+++ b/sw/qa/extras/uiwriter/data/tdf130685.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf130746.odt b/sw/qa/extras/uiwriter/data/tdf130746.odt
index 7fcbec95b0a8..7fcbec95b0a8 100644
--- a/sw/qa/extras/uiwriter/data3/tdf130746.odt
+++ b/sw/qa/extras/uiwriter/data/tdf130746.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf130805.odt b/sw/qa/extras/uiwriter/data/tdf130805.odt
index 12e215123aa3..12e215123aa3 100644
--- a/sw/qa/extras/uiwriter/data3/tdf130805.odt
+++ b/sw/qa/extras/uiwriter/data/tdf130805.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf131684.docx b/sw/qa/extras/uiwriter/data/tdf131684.docx
index 7d3397dfba60..7d3397dfba60 100644
--- a/sw/qa/extras/uiwriter/data3/tdf131684.docx
+++ b/sw/qa/extras/uiwriter/data/tdf131684.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf131963.docx b/sw/qa/extras/uiwriter/data/tdf131963.docx
index 15db34ee9dca..15db34ee9dca 100644
--- a/sw/qa/extras/uiwriter/data3/tdf131963.docx
+++ b/sw/qa/extras/uiwriter/data/tdf131963.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf132160.odt b/sw/qa/extras/uiwriter/data/tdf132160.odt
index 8a8ae7b8b1cb..8a8ae7b8b1cb 100644
--- a/sw/qa/extras/uiwriter/data2/tdf132160.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132160.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132187.odt b/sw/qa/extras/uiwriter/data/tdf132187.odt
index 27bea84b6584..27bea84b6584 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132187.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132187.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf132236.odt b/sw/qa/extras/uiwriter/data/tdf132236.odt
index f37c9befc095..f37c9befc095 100644
--- a/sw/qa/extras/uiwriter/data2/tdf132236.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132236.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132321.odt b/sw/qa/extras/uiwriter/data/tdf132321.odt
index 1b725c072d43..1b725c072d43 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132321.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132321.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132420.odt b/sw/qa/extras/uiwriter/data/tdf132420.odt
index 8e556aa5a2d4..8e556aa5a2d4 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132420.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132420.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132596.docx b/sw/qa/extras/uiwriter/data/tdf132596.docx
index f19213ae1391..f19213ae1391 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132596.docx
+++ b/sw/qa/extras/uiwriter/data/tdf132596.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132597.odt b/sw/qa/extras/uiwriter/data/tdf132597.odt
index 68e9c9dffc77..68e9c9dffc77 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132597.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132597.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132637_protectTrackChanges.doc b/sw/qa/extras/uiwriter/data/tdf132637_protectTrackChanges.doc
index 2f75e60278e1..2f75e60278e1 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132637_protectTrackChanges.doc
+++ b/sw/qa/extras/uiwriter/data/tdf132637_protectTrackChanges.doc
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132725.odt b/sw/qa/extras/uiwriter/data/tdf132725.odt
index b14fc20486ea..b14fc20486ea 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132725.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132725.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132744.odt b/sw/qa/extras/uiwriter/data/tdf132744.odt
index 5681787d7f61..5681787d7f61 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132744.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132744.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132911.odt b/sw/qa/extras/uiwriter/data/tdf132911.odt
index 3c311f3ed36b..3c311f3ed36b 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132911.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132911.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf132944.odt b/sw/qa/extras/uiwriter/data/tdf132944.odt
index 08c3562aeaf1..08c3562aeaf1 100644
--- a/sw/qa/extras/uiwriter/data3/tdf132944.odt
+++ b/sw/qa/extras/uiwriter/data/tdf132944.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf133477.fodt b/sw/qa/extras/uiwriter/data/tdf133477.fodt
index e18a0e458a2d..e18a0e458a2d 100644
--- a/sw/qa/extras/uiwriter/data3/tdf133477.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf133477.fodt
diff --git a/sw/qa/extras/uiwriter/data3/tdf133490.odt b/sw/qa/extras/uiwriter/data/tdf133490.odt
index 98050b58fe46..98050b58fe46 100644
--- a/sw/qa/extras/uiwriter/data3/tdf133490.odt
+++ b/sw/qa/extras/uiwriter/data/tdf133490.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf133967.odt b/sw/qa/extras/uiwriter/data/tdf133967.odt
index 18ed5bfb7844..18ed5bfb7844 100644
--- a/sw/qa/extras/uiwriter/data3/tdf133967.odt
+++ b/sw/qa/extras/uiwriter/data/tdf133967.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf133982.docx b/sw/qa/extras/uiwriter/data/tdf133982.docx
index d2e8573d15ac..d2e8573d15ac 100644
--- a/sw/qa/extras/uiwriter/data3/tdf133982.docx
+++ b/sw/qa/extras/uiwriter/data/tdf133982.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf133990.odt b/sw/qa/extras/uiwriter/data/tdf133990.odt
index 8eaca8161701..8eaca8161701 100644
--- a/sw/qa/extras/uiwriter/data3/tdf133990.odt
+++ b/sw/qa/extras/uiwriter/data/tdf133990.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf134021.docx b/sw/qa/extras/uiwriter/data/tdf134021.docx
index cda11fbdf3ef..cda11fbdf3ef 100644
--- a/sw/qa/extras/uiwriter/data3/tdf134021.docx
+++ b/sw/qa/extras/uiwriter/data/tdf134021.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf134227.docx b/sw/qa/extras/uiwriter/data/tdf134227.docx
index e5228e6ca52f..e5228e6ca52f 100644
--- a/sw/qa/extras/uiwriter/data3/tdf134227.docx
+++ b/sw/qa/extras/uiwriter/data/tdf134227.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf134253.odt b/sw/qa/extras/uiwriter/data/tdf134253.odt
index 234b0bdca7ff..234b0bdca7ff 100644
--- a/sw/qa/extras/uiwriter/data3/tdf134253.odt
+++ b/sw/qa/extras/uiwriter/data/tdf134253.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf134404.odt b/sw/qa/extras/uiwriter/data/tdf134404.odt
index 53875f13822a..53875f13822a 100644
--- a/sw/qa/extras/uiwriter/data3/tdf134404.odt
+++ b/sw/qa/extras/uiwriter/data/tdf134404.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf134626.odt b/sw/qa/extras/uiwriter/data/tdf134626.odt
index 157bc258799e..157bc258799e 100644
--- a/sw/qa/extras/uiwriter/data3/tdf134626.odt
+++ b/sw/qa/extras/uiwriter/data/tdf134626.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf134931.odt b/sw/qa/extras/uiwriter/data/tdf134931.odt
index bfd1ccf2e561..bfd1ccf2e561 100644
--- a/sw/qa/extras/uiwriter/data3/tdf134931.odt
+++ b/sw/qa/extras/uiwriter/data/tdf134931.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf135056.odt b/sw/qa/extras/uiwriter/data/tdf135056.odt
index bd94317d07d4..bd94317d07d4 100644
--- a/sw/qa/extras/uiwriter/data3/tdf135056.odt
+++ b/sw/qa/extras/uiwriter/data/tdf135056.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf135412.docx b/sw/qa/extras/uiwriter/data/tdf135412.docx
index b420fa5ce2d1..b420fa5ce2d1 100644
--- a/sw/qa/extras/uiwriter/data3/tdf135412.docx
+++ b/sw/qa/extras/uiwriter/data/tdf135412.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf135623.docx b/sw/qa/extras/uiwriter/data/tdf135623.docx
index ed139eaeffdb..ed139eaeffdb 100644
--- a/sw/qa/extras/uiwriter/data3/tdf135623.docx
+++ b/sw/qa/extras/uiwriter/data/tdf135623.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf135661.odt b/sw/qa/extras/uiwriter/data/tdf135661.odt
index 7fe6a3ca4d56..7fe6a3ca4d56 100644
--- a/sw/qa/extras/uiwriter/data3/tdf135661.odt
+++ 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 000000000000..d65725bda510
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf135662.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf135733.odt b/sw/qa/extras/uiwriter/data/tdf135733.odt
index 58293a07942d..58293a07942d 100644
--- a/sw/qa/extras/uiwriter/data3/tdf135733.odt
+++ b/sw/qa/extras/uiwriter/data/tdf135733.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf136385.odt b/sw/qa/extras/uiwriter/data/tdf136385.odt
index ee008e52372a..ee008e52372a 100644
--- a/sw/qa/extras/uiwriter/data3/tdf136385.odt
+++ b/sw/qa/extras/uiwriter/data/tdf136385.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 000000000000..d1b6c877c4ed
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf136778.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf137964.odt b/sw/qa/extras/uiwriter/data/tdf137964.odt
index efbb27628ac7..efbb27628ac7 100644
--- a/sw/qa/extras/uiwriter/data3/tdf137964.odt
+++ b/sw/qa/extras/uiwriter/data/tdf137964.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf138130.docx b/sw/qa/extras/uiwriter/data/tdf138130.docx
index a570dec4b08a..a570dec4b08a 100644
--- a/sw/qa/extras/uiwriter/data3/tdf138130.docx
+++ b/sw/qa/extras/uiwriter/data/tdf138130.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf138482.docx b/sw/qa/extras/uiwriter/data/tdf138482.docx
index 7bb4623e2c0c..7bb4623e2c0c 100644
--- a/sw/qa/extras/uiwriter/data3/tdf138482.docx
+++ b/sw/qa/extras/uiwriter/data/tdf138482.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf139127.fodt b/sw/qa/extras/uiwriter/data/tdf139127.fodt
index 1acd9dc24506..1acd9dc24506 100644
--- a/sw/qa/extras/uiwriter/data2/tdf139127.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf139127.fodt
diff --git a/sw/qa/extras/uiwriter/data/tdf140828.docx b/sw/qa/extras/uiwriter/data/tdf140828.docx
new file mode 100644
index 000000000000..bfdabc5d77ea
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf140828.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf39721.fodt b/sw/qa/extras/uiwriter/data/tdf39721.fodt
index 1acf06c5e2a5..1acf06c5e2a5 100644
--- a/sw/qa/extras/uiwriter/data2/tdf39721.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf39721.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf47471_paraStyleBackground.odt b/sw/qa/extras/uiwriter/data/tdf47471_paraStyleBackground.odt
index 1d6f1a5f22fe..1d6f1a5f22fe 100644
--- a/sw/qa/extras/uiwriter/data2/tdf47471_paraStyleBackground.odt
+++ b/sw/qa/extras/uiwriter/data/tdf47471_paraStyleBackground.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf52391.fodt b/sw/qa/extras/uiwriter/data/tdf52391.fodt
index b61d76f716d9..b61d76f716d9 100644
--- a/sw/qa/extras/uiwriter/data2/tdf52391.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf52391.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf54819.fodt b/sw/qa/extras/uiwriter/data/tdf54819.fodt
index f9a8e9d0b698..f9a8e9d0b698 100644
--- a/sw/qa/extras/uiwriter/data2/tdf54819.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf54819.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf54819b.odt b/sw/qa/extras/uiwriter/data/tdf54819b.odt
index 0fb7a6f95b2e..0fb7a6f95b2e 100644
--- a/sw/qa/extras/uiwriter/data2/tdf54819b.odt
+++ b/sw/qa/extras/uiwriter/data/tdf54819b.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf61154.fodt b/sw/qa/extras/uiwriter/data/tdf61154.fodt
index 18e0c0a64331..18e0c0a64331 100644
--- a/sw/qa/extras/uiwriter/data3/tdf61154.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf61154.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf64242_optimizeTable.odt b/sw/qa/extras/uiwriter/data/tdf64242_optimizeTable.odt
index 83d9be2cdf16..83d9be2cdf16 100644
--- a/sw/qa/extras/uiwriter/data2/tdf64242_optimizeTable.odt
+++ b/sw/qa/extras/uiwriter/data/tdf64242_optimizeTable.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/tdf76636.doc b/sw/qa/extras/uiwriter/data/tdf76636.doc
index 2d94868da586..2d94868da586 100644
--- a/sw/qa/extras/uiwriter/data3/tdf76636.doc
+++ b/sw/qa/extras/uiwriter/data/tdf76636.doc
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf76817.docx b/sw/qa/extras/uiwriter/data/tdf76817.docx
index 20478778a0d3..20478778a0d3 100644
--- a/sw/qa/extras/uiwriter/data2/tdf76817.docx
+++ b/sw/qa/extras/uiwriter/data/tdf76817.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf76817.fodt b/sw/qa/extras/uiwriter/data/tdf76817.fodt
index 4b6decb1a82a..4b6decb1a82a 100644
--- a/sw/qa/extras/uiwriter/data2/tdf76817.fodt
+++ b/sw/qa/extras/uiwriter/data/tdf76817.fodt
diff --git a/sw/qa/extras/uiwriter/data2/tdf90069.docx b/sw/qa/extras/uiwriter/data/tdf90069.docx
index 719502a67e78..719502a67e78 100644
--- a/sw/qa/extras/uiwriter/data2/tdf90069.docx
+++ b/sw/qa/extras/uiwriter/data/tdf90069.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/try2.fodt b/sw/qa/extras/uiwriter/data/try2.fodt
index 624a75a85ea9..624a75a85ea9 100644
--- a/sw/qa/extras/uiwriter/data2/try2.fodt
+++ b/sw/qa/extras/uiwriter/data/try2.fodt
diff --git a/sw/qa/extras/uiwriter/data3/txbx_crash.odt b/sw/qa/extras/uiwriter/data/txbx_crash.odt
index 0a029da88289..0a029da88289 100644
--- a/sw/qa/extras/uiwriter/data3/txbx_crash.odt
+++ b/sw/qa/extras/uiwriter/data/txbx_crash.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data3/udindex3.odt b/sw/qa/extras/uiwriter/data/udindex3.odt
index e6c7736b91e4..e6c7736b91e4 100644
--- a/sw/qa/extras/uiwriter/data3/udindex3.odt
+++ b/sw/qa/extras/uiwriter/data/udindex3.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 9c2719f99638..f56cf50d328d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -55,6 +55,7 @@
#include <svl/itemiter.hxx>
#include <svx/svxids.hrc>
#include <unotools/localfilehelper.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/scripttypeitem.hxx>
@@ -399,9 +400,8 @@ public:
void testSpellOnlineParameter();
void testRedlineAutoCorrect();
void testRedlineAutoCorrect2();
-#if HAVE_FEATURE_PDFIUM
+ void testEmojiAutoCorrect();
void testInsertPdf();
-#endif
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -631,9 +631,8 @@ public:
CPPUNIT_TEST(testSpellOnlineParameter);
CPPUNIT_TEST(testRedlineAutoCorrect);
CPPUNIT_TEST(testRedlineAutoCorrect2);
-#if HAVE_FEATURE_PDFIUM
+ CPPUNIT_TEST(testEmojiAutoCorrect);
CPPUNIT_TEST(testInsertPdf);
-#endif
CPPUNIT_TEST_SUITE_END();
private:
@@ -2223,7 +2222,9 @@ void SwUiWriterTest::testTextCursorInvalidation()
// 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
- CPPUNIT_ASSERT_THROW(xCursor->goRight(1, false), uno::RuntimeException);
+ // 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);
}
void SwUiWriterTest::testTdf68183()
@@ -5054,7 +5055,9 @@ void SwUiWriterTest::testTdf92648()
SwDoc* pDoc = createDoc("tdf92648.docx");
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
// Make sure we have ten draw shapes.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(10), SwTextBoxHelper::getCount(pPage));
+ // 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())
@@ -7771,6 +7774,39 @@ void SwUiWriterTest::testRedlineAutoCorrect2()
CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
}
+void SwUiWriterTest::testEmojiAutoCorrect()
+{
+ SwDoc* pDoc = createDoc("redline-autocorrect2.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Emoji replacement (:snowman: -> ☃)
+
+ // without change tracking
+ CPPUNIT_ASSERT(!(pWrtShell->GetRedlineFlags() & RedlineFlags::On));
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+ pWrtShell->Insert(":snowman");
+ pWrtShell->AutoCorrect(corr, ':');
+ sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ OUString sReplaced = u"☃Lorem,";
+ nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+
+ // 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);
+
+ pWrtShell->Insert(":snowman");
+ pWrtShell->AutoCorrect(corr, ':');
+ sReplaced = u"☃☃Lorem,";
+ nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+
+ // tdf#140674 This was ":snowman:" instead of autocorrect
+ CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+}
+
void SwUiWriterTest::testTdf108423()
{
SwDoc* pDoc = createDoc();
@@ -8042,9 +8078,14 @@ void SwUiWriterTest::testInsertLongDateFormat()
CPPUNIT_ASSERT(xField->getString().indexOf(" ") > -1);
}
-#if HAVE_FEATURE_PDFIUM
void SwUiWriterTest::testInsertPdf()
{
+ auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPdfium)
+ {
+ return;
+ }
+
createDoc();
SwXTextDocument *pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -8072,7 +8113,6 @@ void SwUiWriterTest::testInsertPdf()
// Assert that the graphic is a PDF
CPPUNIT_ASSERT_EQUAL(OUString("application/pdf"), getProperty<OUString>(xGraphic, "MimeType"));
}
-#endif
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 0bc22e23aca4..6ffead1dbea9 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -71,7 +71,7 @@
namespace
{
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data2/";
+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
@@ -2265,6 +2265,57 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testJoinParaChangesInMargin)
CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowChangesInMargin());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf140757)
+{
+ load(DATA_DIRECTORY, "tdf54819.fodt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ // switch on "Show changes in margin" mode
+ dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
+
+ SwWrtShell* const pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowChangesInMargin());
+
+ // turn on red-lining and show changes
+ SwDoc* pDoc = pWrtShell->GetDoc();
+ 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, testTdf139127)
{
load(DATA_DIRECTORY, "tdf139127.fodt");
@@ -2390,7 +2441,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf138666)
CPPUNIT_ASSERT_EQUAL(OUString("Loremm"), getParagraph(1)->getString());
CPPUNIT_ASSERT_EQUAL(OUString("dolsit"), getParagraph(2)->getString());
- // switch on "Show changes in margin" mode
+ // switch off "Show changes in margin" mode
dispatchCommand(mxComponent, ".uno:ShowChangesInMargin", {});
// show deletions inline again
@@ -2398,6 +2449,78 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf138666)
CPPUNIT_ASSERT_EQUAL(OUString("dolor sit"), getParagraph(2)->getString());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf140982)
+{
+ SwDoc* pDoc = createDoc("tdf115815.odt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ //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(SwUiWriterTest2, testTdf126206)
{
load(DATA_DIRECTORY, "tdf126206.docx");
@@ -3518,7 +3641,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf128603)
// only care that it doesn't assert/crash
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testOfz18563)
{
- OUString sURL(m_directories.getURLFromSrc(u"/sw/qa/extras/uiwriter/data2/ofz18563.docx"));
+ OUString sURL(m_directories.getURLFromSrc(u"/sw/qa/extras/uiwriter/data/ofz18563.docx"));
SvFileStream aFileStream(sURL, StreamMode::READ);
TestImportDOCX(aFileStream);
}
@@ -3760,6 +3883,57 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf123218)
CPPUNIT_ASSERT_EQUAL(chart2::AxisOrientation_REVERSE, aScaleData.Orientation);
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf126735)
+{
+ SwDoc* pDoc = createDoc("tdf39721.fodt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ //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<view::XSelectionSupplier> xSelSupplier(pTextDoc->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/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 63a322af868e..8454b3ed92e4 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -14,6 +14,7 @@
#include <com/sun/star/drawing/GraphicExportFilter.hpp>
#include <IDocumentDrawModelAccess.hxx>
#include <com/sun/star/text/TextContentAnchorType.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
@@ -41,7 +42,7 @@
namespace
{
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data3/";
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/";
} // namespace
/// Third set of tests asserting the behavior of Writer user interface shells.
@@ -82,6 +83,32 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382)
CPPUNIT_ASSERT_EQUAL(8, getShapes());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135662)
+{
+ load(DATA_DIRECTORY, "tdf135662.odt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ 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)
{
load(DATA_DIRECTORY, "tdf134227.docx");
@@ -1089,6 +1116,37 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf76636_2)
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getColumns()->getCount());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf140828)
+{
+ load(DATA_DIRECTORY, "tdf140828.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ 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(ShpProps->getPropertyValue("AnchorType").get<text::TextContentAnchorType>()
+ != text::TextContentAnchorType::TextContentAnchorType_AS_CHARACTER);
+
+ 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)
{
load(DATA_DIRECTORY, "tdf132725.odt");
@@ -1329,6 +1387,34 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134021)
CPPUNIT_ASSERT_EQUAL(12, getPages());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136778)
+{
+ load(DATA_DIRECTORY, "tdf136778.docx");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ 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)
{
load(DATA_DIRECTORY, "tdf123285.odt");
@@ -2536,6 +2622,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135661)
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477)
{
+ if (getDefaultDeviceBitCount() < 24)
+ return;
load(DATA_DIRECTORY, "tdf133477.fodt");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -2609,6 +2697,52 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf138897)
Scheduler::ProcessEventsToIdle();
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136740)
+{
+ mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ 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_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index 8e45a006f19a..f0ed93e85941 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -318,11 +318,11 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testXAutoTextGroup)
uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);
- const OUString sGroupName = "TestGroup*1";
- const OUString sTextName = "TEST";
- const OUString sTextNameNew = "TESTRENAMED";
- const OUString sTextTitle = "Test Auto Text";
- const OUString sTextTitleNew = "Test Auto Text Renamed";
+ static const OUStringLiteral sGroupName = u"TestGroup*1";
+ static const OUStringLiteral sTextName = u"TEST";
+ static const OUStringLiteral sTextNameNew = u"TESTRENAMED";
+ static const OUStringLiteral sTextTitle = u"Test Auto Text";
+ static const OUStringLiteral sTextTitleNew = u"Test Auto Text Renamed";
// Create new temporary group
uno::Reference<text::XAutoTextGroup> xAutoTextGroup
@@ -1156,7 +1156,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testTdf129841)
// Get SwXCellRange for the same cell
css::uno::Reference<css::beans::XPropertySet> xCellRange(
xTableCellRange->getCellRangeByName("A1:A1"), css::uno::UNO_QUERY_THROW);
- const OUString sBackColor = "BackColor";
+ static const OUStringLiteral sBackColor = u"BackColor";
// Apply background color to table cursor, and read background color from cell range
css::uno::Any aRefColor(sal_Int32(0x00FF0000));
xTableCursor->setPropertyValue(sBackColor, aRefColor);
diff --git a/sw/qa/extras/ww8export/data/rtl-gutter.doc b/sw/qa/extras/ww8export/data/rtl-gutter.doc
new file mode 100644
index 000000000000..37cbf8707ce6
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/rtl-gutter.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf139495_tinyHeader.doc b/sw/qa/extras/ww8export/data/tdf139495_tinyHeader.doc
new file mode 100644
index 000000000000..c45a6c25fd99
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf139495_tinyHeader.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf81705_outlineLevel.doc b/sw/qa/extras/ww8export/data/tdf81705_outlineLevel.doc
new file mode 100644
index 000000000000..55d188356a25
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf81705_outlineLevel.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index be85611d18e3..b7befec7c0cd 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -500,16 +500,12 @@ DECLARE_WW8EXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.doc")
uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
uno::Reference<graphic::XGraphic> graphic;
imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
- uno::Reference<awt::XBitmap> bitmap(graphic, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL( sal_Int32(58), bitmap->getSize().Width );
- CPPUNIT_ASSERT_EQUAL( sal_Int32(320), bitmap->getSize().Height );
- const uno::Sequence< sal_Int8 > data = bitmap->getDIB(); // as .bmp data
- CPPUNIT_ASSERT_EQUAL( sal_Int32(20278), data.getLength());
- CPPUNIT_ASSERT_EQUAL( -50, int(data[0x6b0])); // -50 = 206 pixel value
- CPPUNIT_ASSERT_EQUAL( -50, int(data[0x6b1]));
- CPPUNIT_ASSERT_EQUAL( -50, int(data[0x6b2]));
- CPPUNIT_ASSERT_EQUAL( -50, int(data[0x6b3]));
- CPPUNIT_ASSERT_EQUAL( -50, int(data[0x6b4]));
+ Graphic vclGraphic(graphic);
+ BitmapEx bitmap(vclGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL( tools::Long(58), bitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL( tools::Long(320), bitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL( Color(206,206,206), bitmap.GetPixelColor(16,27));
+ CPPUNIT_ASSERT_EQUAL( Color(206,206,206), bitmap.GetPixelColor(22,48));
}
DECLARE_WW8EXPORT_TEST(testTdf95321, "tdf95321.doc")
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index b2afbce478de..05211e47f0f3 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -256,6 +256,12 @@ DECLARE_WW8EXPORT_TEST(testTdf122460_header, "tdf122460_header.odt")
CPPUNIT_ASSERT(headerIsOn);
}
+DECLARE_WW8EXPORT_TEST(testTdf139495_tinyHeader, "tdf139495_tinyHeader.doc")
+{
+ // In Word 2003, this is one page, but definitely not six pages.
+ CPPUNIT_ASSERT(getPages() < 3);
+}
+
DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
@@ -579,6 +585,14 @@ DECLARE_WW8EXPORT_TEST(testTdf129522_removeShadowStyle, "tdf129522_removeShadowS
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
}
+DECLARE_WW8EXPORT_TEST(testTdf81705_outlineLevel, "tdf81705_outlineLevel.doc")
+{
+ // direct formatting resets outline level to body text (0)
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Paragraph C", sal_uInt16(0), getProperty<sal_uInt16>(getParagraph(3), "OutlineLevel"));
+ // myStyle sets outline level to 1.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Paragraph D", sal_uInt16(1), getProperty<sal_uInt16>(getParagraph(4), "OutlineLevel"));
+}
+
DECLARE_WW8EXPORT_TEST(testBtlrCell, "btlr-cell.doc")
{
// Without the accompanying fix in place, this test would have failed, as
@@ -708,6 +722,23 @@ DECLARE_WW8EXPORT_TEST(testPresetDash, "tdf127166_prstDash_Word97.doc")
}
}
+CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
+{
+ auto verify = [this]() {
+ uno::Reference<beans::XPropertySet> xStandard(
+ getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(getProperty<bool>(xStandard, "RtlGutter"));
+ };
+
+ // Given a document with RTL gutter, when loading it:
+ load(mpTestDocumentPath, "rtl-gutter.doc");
+ // Then make sure the section's gutter is still RTL:
+ // Without the accompanying fix in place, this test would have failed as the SPRM was missing.
+ verify();
+ reload(mpFilter, "rtl-gutter.doc");
+ verify();
+}
+
DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
diff --git a/sw/qa/extras/ww8import/data/tdf120768_zOrder.doc b/sw/qa/extras/ww8import/data/tdf120768_zOrder.doc
new file mode 100644
index 000000000000..b70a7d840b6d
--- /dev/null
+++ b/sw/qa/extras/ww8import/data/tdf120768_zOrder.doc
Binary files differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 7fca28bb49e5..ccae8638a2c3 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -245,6 +245,10 @@ DECLARE_WW8IMPORT_TEST(testTdf122425_1, "tdf122425_1.doc")
CPPUNIT_ASSERT(!pBox->GetLine(eLine));
}
}
+
+ //tdf#139495: without the fix, a negative number was converted into a uInt16, overflowing to 115501
+ auto nDist = getProperty<sal_uInt32>(getStyles("PageStyles")->getByName("Standard"), "HeaderBodyDistance");
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), nDist);
}
DECLARE_WW8IMPORT_TEST(testTdf110987, "tdf110987")
@@ -258,6 +262,14 @@ DECLARE_WW8IMPORT_TEST(testTdf110987, "tdf110987")
CPPUNIT_ASSERT(sFilterName != "MS Word 97 Vorlage");
}
+DECLARE_WW8IMPORT_TEST(testTdf120768_zOrder, "tdf120768_zOrder.doc")
+{
+ //The blue shape was covering everything (highest zorder = 2) instead of the lowest(0)
+ uno::Reference<drawing::XShape> xShape(getShapeByName(u"Picture 2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), getProperty<sal_uInt32>(xShape, "ZOrder"));
+}
+
+
// tests should only be added to ww8IMPORT *if* they fail round-tripping in ww8EXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/python/check_cross_references.py b/sw/qa/python/check_cross_references.py
index 6aad1c47ca3a..de51d919c7c8 100644
--- a/sw/qa/python/check_cross_references.py
+++ b/sw/qa/python/check_cross_references.py
@@ -16,17 +16,6 @@
the License at http://www.apache.org/licenses/LICENSE-2.0 .
'''
import unittest
-import unohelper
-import os
-from com.sun.star.lang import XMultiServiceFactory
-from com.sun.star.text import XTextDocument
-from com.sun.star.text import XTextField
-from com.sun.star.container import XEnumeration
-from com.sun.star.util import XRefreshable
-from com.sun.star.container import XEnumerationAccess
-from com.sun.star.beans import XPropertySet
-from com.sun.star.text import XTextFieldsSupplier
-from com.sun.star.container import XNamed
from com.sun.star.text.ReferenceFieldPart import (NUMBER, NUMBER_NO_CONTEXT, NUMBER_FULL_CONTEXT, TEXT)
from com.sun.star.text.ReferenceFieldSource import BOOKMARK
from org.libreoffice.unotest import UnoInProcess
diff --git a/sw/qa/python/check_indexed_property_values.py b/sw/qa/python/check_indexed_property_values.py
index ceaf82a6cac6..4179872cea4b 100644
--- a/sw/qa/python/check_indexed_property_values.py
+++ b/sw/qa/python/check_indexed_property_values.py
@@ -17,12 +17,9 @@
'''
import unittest
-import unohelper
import uno
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.beans import PropertyValue
-from com.sun.star.container import XIndexContainer
-from org.libreoffice.unotest import OfficeConnection
from com.sun.star.lang import IllegalArgumentException
from com.sun.star.lang import IndexOutOfBoundsException
diff --git a/sw/qa/python/check_named_property_values.py b/sw/qa/python/check_named_property_values.py
index 1a81d13a6323..d11ee2e46651 100644
--- a/sw/qa/python/check_named_property_values.py
+++ b/sw/qa/python/check_named_property_values.py
@@ -17,13 +17,9 @@
'''
import unittest
-import unohelper
-import os
import uno
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.beans import PropertyValue
-from com.sun.star.container import XNameContainer
-from org.libreoffice.unotest import OfficeConnection
from com.sun.star.container import ElementExistException
from com.sun.star.lang import IllegalArgumentException
from com.sun.star.container import NoSuchElementException
diff --git a/sw/qa/python/check_range_properties.py b/sw/qa/python/check_range_properties.py
index 2be93686242a..26babf5220ce 100644
--- a/sw/qa/python/check_range_properties.py
+++ b/sw/qa/python/check_range_properties.py
@@ -7,13 +7,8 @@
# 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/.
#
-import math
import unittest
from org.libreoffice.unotest import UnoInProcess
-from com.sun.star.container import NoSuchElementException
-from com.sun.star.beans import UnknownPropertyException
-from com.sun.star.lang import IndexOutOfBoundsException
-from com.sun.star.lang import IllegalArgumentException
class CheckRangeProperties(unittest.TestCase):
diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py
index c2ae21cf9899..d19f9850b445 100644
--- a/sw/qa/python/check_styles.py
+++ b/sw/qa/python/check_styles.py
@@ -7,7 +7,6 @@
# 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/.
#
-import math
import unittest
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.container import NoSuchElementException
@@ -159,7 +158,7 @@ class CheckStyle(unittest.TestCase):
def test_NumberingFamily(self):
xDoc = CheckStyle._uno.openEmptyWriterDoc()
xNumberingStyles = xDoc.StyleFamilies["NumberingStyles"]
- vEmptyDocStyles = ['List 1', 'List 2', 'List 3', 'List 4', 'List 5', 'Numbering 123', 'Numbering ABC', 'Numbering abc', 'Numbering IVX', 'Numbering ivx']
+ vEmptyDocStyles = ['No List','List 1', 'List 2', 'List 3', 'List 4', 'List 5', 'Numbering 123', 'Numbering ABC', 'Numbering abc', 'Numbering IVX', 'Numbering ivx']
self.__test_StyleFamily(xNumberingStyles, vEmptyDocStyles, "SwXStyle")
self.__test_StyleFamilyIndex(xNumberingStyles, vEmptyDocStyles, "SwXStyle")
self.__test_StyleFamilyInsert(xDoc, xNumberingStyles, vEmptyDocStyles, "com.sun.star.style.NumberingStyle", "com.sun.star.style.CharacterStyle")
diff --git a/sw/qa/python/check_xautotextcontainer.py b/sw/qa/python/check_xautotextcontainer.py
index c460c3d0eaa6..b01125dca3f4 100644
--- a/sw/qa/python/check_xautotextcontainer.py
+++ b/sw/qa/python/check_xautotextcontainer.py
@@ -11,7 +11,6 @@ import unittest
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.container import NoSuchElementException
from com.sun.star.lang import IllegalArgumentException
-from com.sun.star.uno import RuntimeException
class XAutoTextContainer(unittest.TestCase):
# 0 indicates the path of the Office Basis layer
diff --git a/sw/qa/python/check_xautotextgroup.py b/sw/qa/python/check_xautotextgroup.py
index a41987103e6b..504f12dcd422 100644
--- a/sw/qa/python/check_xautotextgroup.py
+++ b/sw/qa/python/check_xautotextgroup.py
@@ -11,7 +11,6 @@ import unittest
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.container import ElementExistException
from com.sun.star.container import NoSuchElementException
-from com.sun.star.uno import RuntimeException
class XAutoTextGroup(unittest.TestCase):
diff --git a/sw/qa/python/check_xmodel.py b/sw/qa/python/check_xmodel.py
index 27740958ddb1..6487b4781be2 100644
--- a/sw/qa/python/check_xmodel.py
+++ b/sw/qa/python/check_xmodel.py
@@ -8,11 +8,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import unittest
-import unohelper
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.lang import IllegalArgumentException
from com.sun.star.beans import PropertyValue
-import uno
class TestXModel(unittest.TestCase):
diff --git a/sw/qa/python/text_portion_enumeration_test.py b/sw/qa/python/text_portion_enumeration_test.py
index 52b1c2c8b702..47f7c21e5307 100644
--- a/sw/qa/python/text_portion_enumeration_test.py
+++ b/sw/qa/python/text_portion_enumeration_test.py
@@ -20,11 +20,11 @@ This file incorporates work covered by the following license notice:
import uno
import unittest
import os.path
-from org.libreoffice.unotest import UnoInProcess, mkPropertyValue
+from org.libreoffice.unotest import UnoInProcess
from tempfile import TemporaryDirectory
from com.sun.star.uno import RuntimeException
from com.sun.star.lang import IllegalArgumentException, NoSupportException
-from com.sun.star.beans import PropertyValue, StringPair
+from com.sun.star.beans import StringPair
from com.sun.star.rdf.URIs import ODF_PREFIX, ODF_SUFFIX
from com.sun.star.i18n.NumberFormatIndex import NUMBER_INT
from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK, HARD_HYPHEN
diff --git a/sw/qa/python/xcontrolshape.py b/sw/qa/python/xcontrolshape.py
index 336a6d3449c0..899c0c20b863 100644
--- a/sw/qa/python/xcontrolshape.py
+++ b/sw/qa/python/xcontrolshape.py
@@ -8,10 +8,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import unittest
-import unohelper
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.beans import UnknownPropertyException
-import uno
class TestXControlShape(unittest.TestCase):
diff --git a/sw/qa/python/xstyleloader.py b/sw/qa/python/xstyleloader.py
index ed2d7ffca4a4..92b901b9d527 100644
--- a/sw/qa/python/xstyleloader.py
+++ b/sw/qa/python/xstyleloader.py
@@ -8,11 +8,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-import os
import pathlib
import unittest
-import unohelper
-import uno
from org.libreoffice.unotest import UnoInProcess, makeCopyFromTDOC
from com.sun.star.beans import PropertyValue
diff --git a/sw/qa/python/xtext.py b/sw/qa/python/xtext.py
index 6d82647bf6b4..db1f83803148 100644
--- a/sw/qa/python/xtext.py
+++ b/sw/qa/python/xtext.py
@@ -11,7 +11,6 @@
import unittest
from org.libreoffice.unotest import UnoInProcess
-from com.sun.star.lang import IllegalArgumentException
class TestXText(unittest.TestCase):
diff --git a/sw/qa/python/xtextcursor.py b/sw/qa/python/xtextcursor.py
index 30d0518690a7..2c374bee5870 100644
--- a/sw/qa/python/xtextcursor.py
+++ b/sw/qa/python/xtextcursor.py
@@ -8,10 +8,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import unittest
-import unohelper
from org.libreoffice.unotest import UnoInProcess
-import uno
-import time
class TestXTextCursor(unittest.TestCase):
diff --git a/sw/qa/python/xtextfieldssupplier.py b/sw/qa/python/xtextfieldssupplier.py
index f99b0fc85ab7..76004a095f26 100755
--- a/sw/qa/python/xtextfieldssupplier.py
+++ b/sw/qa/python/xtextfieldssupplier.py
@@ -8,10 +8,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import unittest
-import unohelper
from org.libreoffice.unotest import UnoInProcess
from com.sun.star.container import NoSuchElementException
-import uno
class TestXTextFieldsSupplier(unittest.TestCase):
diff --git a/sw/qa/python/xtextrange.py b/sw/qa/python/xtextrange.py
index 75e4aed79561..583cabc30aba 100644
--- a/sw/qa/python/xtextrange.py
+++ b/sw/qa/python/xtextrange.py
@@ -8,10 +8,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import unittest
-import unohelper
from org.libreoffice.unotest import UnoInProcess
-import uno
-import time
class TestXTextRange(unittest.TestCase):
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index d267bda51a96..6334be3a553b 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -11,6 +11,8 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+#include <com/sun/star/text/BibliographyDataType.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
@@ -21,6 +23,7 @@
#include <editeng/outlobj.hxx>
#include <editeng/editobj.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <IDocumentContentOperations.hxx>
#include <cmdid.h>
@@ -130,6 +133,43 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testOleSavePreviewUpdate)
CPPUNIT_ASSERT(xNameAccess->hasByName("ObjectReplacements/Object 2"));
}
+CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testBibliographyUrlContextMenu)
+{
+ // Given a document with a bibliography field:
+ SwDoc* pDoc = createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aFields = {
+ comphelper::makePropertyValue("BibiliographicType", text::BibliographyDataType::WWW),
+ comphelper::makePropertyValue("Identifier", OUString("AT")),
+ comphelper::makePropertyValue("Author", OUString("Author")),
+ comphelper::makePropertyValue("Title", OUString("Title")),
+ comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")),
+ };
+ xField->setPropertyValue("Fields", uno::makeAny(aFields));
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<text::XTextContent> xContent(xField, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
+
+ // When selecting the field and opening the context menu:
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ SfxDispatcher* pDispatcher = pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher();
+ css::uno::Any aState;
+ SfxItemState eState = pDispatcher->QueryState(SID_OPEN_HYPERLINK, aState);
+
+ // Then the "open hyperlink" menu item should be visible:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 32 (SfxItemState::DEFAULT)
+ // - Actual : 1 (SfxItemState::DISABLED)
+ // i.e. the menu item was not visible for biblio entry fields with an URL.
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, eState);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index 01dadbc80fee..f4b337d8f9d2 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -9,10 +9,18 @@
#include <swmodeltestbase.hxx>
+#include <com/sun/star/frame/XModel2.hpp>
+#include <com/sun/star/text/XTextViewTextRangeSupplier.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <vcl/scheduler.hxx>
+#include <docsh.hxx>
+#include <edtwin.hxx>
+#include <unotextrange.hxx>
+#include <view.hxx>
+#include <wrtsh.hxx>
+
constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/uibase/uno/data/";
/// Covers sw/source/uibase/uno/ fixes.
@@ -47,6 +55,41 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testCondFieldCachedValue)
getParagraph(2, "1");
}
+CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testCreateTextRangeByPixelPosition)
+{
+ // Given a document with 2 characters, and the pixel position of the point between them:
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert2("AZ");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ Point aLogic = pWrtShell->GetCharRect().Center();
+ SwView* pView = pDocShell->GetView();
+ SwEditWin& rEditWin = pView->GetEditWin();
+ Point aPixel = rEditWin.LogicToPixel(aLogic);
+
+ // When converting that pixel position to a document model position (text range):
+ uno::Reference<frame::XModel2> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xControllers = xModel->getControllers();
+ uno::Reference<text::XTextViewTextRangeSupplier> xController(xControllers->nextElement(),
+ uno::UNO_QUERY);
+ awt::Point aPoint(aPixel.getX(), aPixel.getY());
+ uno::Reference<text::XTextRange> xTextRange
+ = xController->createTextRangeByPixelPosition(aPoint);
+
+ // Then make sure that text range points after the first character:
+ auto pTextRange = dynamic_cast<SwXTextRange*>(xTextRange.get());
+ SwPaM aPaM(pDoc->GetNodes());
+ pTextRange->GetPositions(aPaM);
+ sal_Int32 nActual = aPaM.GetPoint()->nContent.GetIndex();
+ // Without the needed PixelToLogic() call in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the returned text range pointed before the first character, not between the first and
+ // the second character.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nActual);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/uitest/chapterNumbering/chapterNumbering.py b/sw/qa/uitest/chapterNumbering/chapterNumbering.py
index 67e82a40014f..b72e6b458ef2 100644
--- a/sw/qa/uitest/chapterNumbering/chapterNumbering.py
+++ b/sw/qa/uitest/chapterNumbering/chapterNumbering.py
@@ -6,10 +6,10 @@
#
from uitest.framework import UITestCase
-from uitest.debug import sleep
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
from uitest.uihelper.common import change_measurement_unit
#Outline Numbering is now Chapter Numbering
@@ -38,27 +38,17 @@ class WriterChapterNumbering(UITestCase):
xatmf = xDialog.getChild("atmf")
xindentatmf = xDialog.getChild("indentatmf")
select_pos(xtab, "0") #first tab
- props = {"TEXT": "Heading"}
- actionProps = mkPropertyValues(props)
- xstyle.executeAction("SELECT", actionProps)
- props2 = {"TEXT": "1, 2, 3, ..."}
- actionProps2 = mkPropertyValues(props2)
- xnumbering.executeAction("SELECT", actionProps2)
- props3 = {"TEXT": "Bullets"}
- actionProps3 = mkPropertyValues(props3)
- xcharstyle.executeAction("SELECT", actionProps3)
+ select_by_text(xstyle, "Heading")
+ select_by_text(xnumbering, "1, 2, 3, ...")
+ select_by_text(xcharstyle, "Bullets")
xprefix.executeAction("TYPE", mkPropertyValues({"TEXT":"A"}))
xsuffix.executeAction("TYPE", mkPropertyValues({"TEXT":"B"}))
xstartat.executeAction("UP", tuple())
select_pos(xtab, "1") #second tab Position
xalignedatmf.executeAction("UP", tuple())
- props4 = {"TEXT": "Centered"}
- actionProps4 = mkPropertyValues(props4)
- xnum2alignlb.executeAction("SELECT", actionProps4)
- props5 = {"TEXT": "Tab stop"}
- actionProps5 = mkPropertyValues(props5)
- xnumfollowedbylb.executeAction("SELECT", actionProps5)
+ select_by_text(xnum2alignlb, "Centered")
+ select_by_text(xnumfollowedbylb, "Tab stop")
xatmf.executeAction("UP", tuple())
xindentatmf.executeAction("UP", tuple())
diff --git a/sw/qa/uitest/chapterNumbering/tdf123547.py b/sw/qa/uitest/chapterNumbering/tdf123547.py
index 5e0698f8bd1e..4b2cdf0a5f06 100644
--- a/sw/qa/uitest/chapterNumbering/tdf123547.py
+++ b/sw/qa/uitest/chapterNumbering/tdf123547.py
@@ -5,9 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
-from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
from uitest.uihelper.common import select_pos
#Bug 123547 - Systematic crash after opening Tools > Chapter Numbering
diff --git a/sw/qa/uitest/classification/classification.py b/sw/qa/uitest/classification/classification.py
index 181c00417397..72f7dd16bb8a 100644
--- a/sw/qa/uitest/classification/classification.py
+++ b/sw/qa/uitest/classification/classification.py
@@ -6,9 +6,7 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
+from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
#TSCP: add advanced classification dialog https://cgit.freedesktop.org/libreoffice/core/commit/?id=71ee09947d5a71105d64fd225bb3672dfa7ce834
@@ -52,9 +50,7 @@ class classification(UITestCase):
intellectualPropertyPartEntry = xDialog.getChild("intellectualPropertyPartEntry")
intellectualPropertyPartAddButton = xDialog.getChild("intellectualPropertyPartAddButton")
- props = {"TEXT": "Confidential"}
- actionProps = mkPropertyValues(props)
- classificationCB.executeAction("SELECT", actionProps)
+ select_by_text(classificationCB, "Confidential")
#verify International is set too
self.assertEqual(get_state_as_dict(internationalClassificationCB)["SelectEntryText"], "Confidential")
#verify textBox Content
@@ -96,9 +92,7 @@ class classification(UITestCase):
intellectualPropertyPartEntry = xDialog.getChild("intellectualPropertyPartEntry")
intellectualPropertyPartAddButton = xDialog.getChild("intellectualPropertyPartAddButton")
- props = {"TEXT": "Confidential"}
- actionProps = mkPropertyValues(props)
- classificationCB.executeAction("SELECT", actionProps)
+ select_by_text(classificationCB, "Confidential")
#verify International is set too
self.assertEqual(get_state_as_dict(internationalClassificationCB)["SelectEntryText"], "Confidential")
#verify textBox Content TODO textbox not supported
@@ -128,9 +122,7 @@ class classification(UITestCase):
intellectualPropertyPartEntry = xDialog.getChild("intellectualPropertyPartEntry")
intellectualPropertyPartAddButton = xDialog.getChild("intellectualPropertyPartAddButton")
- props = {"TEXT": "Confidential"}
- actionProps = mkPropertyValues(props)
- classificationCB.executeAction("SELECT", actionProps)
+ select_by_text(classificationCB, "Confidential")
#verify International is set too
self.assertEqual(get_state_as_dict(internationalClassificationCB)["SelectEntryText"], "Confidential")
#verify textBox Content TODO - texbox not supported yet
@@ -163,9 +155,7 @@ class classification(UITestCase):
#type text AA
intellectualPropertyPartEntry.executeAction("TYPE", mkPropertyValues({"TEXT":"AA"}))
intellectualPropertyPartAddButton.executeAction("CLICK", tuple())
- props = {"TEXT": "Internal Only"}
- actionProps = mkPropertyValues(props)
- classificationCB.executeAction("SELECT", actionProps)
+ select_by_text(classificationCB, "Internal Only")
#verify International is set too
self.assertEqual(get_state_as_dict(internationalClassificationCB)["SelectEntryText"], "Internal Only")
#verify textBox Content TODO - texbox not supported yet
diff --git a/sw/qa/uitest/data/TestHiddenHeadersFooters.docx b/sw/qa/uitest/data/TestHiddenHeadersFooters.docx
new file mode 100644
index 000000000000..f33482a93ba1
--- /dev/null
+++ b/sw/qa/uitest/data/TestHiddenHeadersFooters.docx
Binary files differ
diff --git a/sw/qa/uitest/data/metadata.odt b/sw/qa/uitest/data/metadata.odt
new file mode 100644
index 000000000000..1566f4ae1d73
--- /dev/null
+++ b/sw/qa/uitest/data/metadata.odt
Binary files differ
diff --git a/sw/qa/uitest/data/tdf140661.odt b/sw/qa/uitest/data/tdf140661.odt
new file mode 100644
index 000000000000..4cc57724e2d3
--- /dev/null
+++ b/sw/qa/uitest/data/tdf140661.odt
Binary files differ
diff --git a/sw/qa/uitest/data/tdf40427_SectionPositions.odt b/sw/qa/uitest/data/tdf40427_SectionPositions.odt
new file mode 100644
index 000000000000..67d30d0ccfee
--- /dev/null
+++ b/sw/qa/uitest/data/tdf40427_SectionPositions.odt
Binary files differ
diff --git a/sw/qa/uitest/data/tdf46561.odt b/sw/qa/uitest/data/tdf46561.odt
new file mode 100644
index 000000000000..c9f9942521d0
--- /dev/null
+++ b/sw/qa/uitest/data/tdf46561.odt
Binary files differ
diff --git a/sw/qa/uitest/findBar/findbar.py b/sw/qa/uitest/findBar/findbar.py
index df973dc8e162..75bfbb33abd9 100644
--- a/sw/qa/uitest/findBar/findbar.py
+++ b/sw/qa/uitest/findBar/findbar.py
@@ -8,10 +8,8 @@
#
from uitest.framework import UITestCase
-import time
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
#test Find Bar
class FindBar(UITestCase):
@@ -43,28 +41,28 @@ class FindBar(UITestCase):
self.assertEqual(get_state_as_dict(xfind_bar)["ItemCount"], "14")
# Press on FindAll in the Find Bar
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "5"})) # 5 is FindAll id
- self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "5")
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"}))
+ self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "5") # 5 is FindAll id for Pos 4
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find All")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:FindAll")
self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "LibreLibreLibre")
# Press on Find Next in the Find Bar
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"})) # 4 is Find Next id
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) # 3 is Find Next pos
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "4")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Next")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:DownSearch")
self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "Libre")
# Press on Find Previous in the Find Bar
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) # 3 is Find Previous id
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "2"})) # 2 is Find Previous pos
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemID"], "3")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemText"], "Find Previous")
self.assertEqual(get_state_as_dict(xfind_bar)["CurrSelectedItemCommand"], ".uno:UpSearch")
self.assertEqual(get_state_as_dict(xWriterEdit)["SelectedText"], "Libre")
# Close the Find Bar
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "1"})) # 1 is for close
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) # 0 is pos for close
self.ui_test.close_doc()
diff --git a/sw/qa/uitest/findBar/tdf136941.py b/sw/qa/uitest/findBar/tdf136941.py
index a96964a2fb79..ab94449aefed 100644
--- a/sw/qa/uitest/findBar/tdf136941.py
+++ b/sw/qa/uitest/findBar/tdf136941.py
@@ -28,10 +28,10 @@ class tdf136941(UITestCase):
xfind_bar = xWriterDoc.getChild("FindBar")
# Search Next
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"}))
# Close button
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "1"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "0"}))
# Check the toolbar is closed
self.assertTrue("find" not in xWriterDoc.getChildren())
@@ -49,10 +49,10 @@ class tdf136941(UITestCase):
xfind_bar = xWriterDoc.getChild("FindBar")
# Search Next
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"}))
# Close button
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "1"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "0"}))
# Check the toolbar is closed
self.assertTrue("find" not in xWriterDoc.getChildren())
diff --git a/sw/qa/uitest/findBar/tdf138232.py b/sw/qa/uitest/findBar/tdf138232.py
index 037296c8d0d6..93f859bc7521 100644
--- a/sw/qa/uitest/findBar/tdf138232.py
+++ b/sw/qa/uitest/findBar/tdf138232.py
@@ -29,7 +29,7 @@ class tdf138232(UITestCase):
xfind_bar = xWriterDoc.getChild("FindBar")
# Click on Find All
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "5"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"}))
self.assertEqual("HelloHello", get_state_as_dict(xWriterEdit)['SelectedText'])
@@ -39,7 +39,7 @@ class tdf138232(UITestCase):
# AssertionError: 'HelloWorld' != 'World'
self.assertEqual("HelloWorld", get_state_as_dict(xfind)['Text'])
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "5"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"}))
self.assertEqual("", get_state_as_dict(xWriterEdit)['SelectedText'])
diff --git a/sw/qa/uitest/findBar/tdf88608.py b/sw/qa/uitest/findBar/tdf88608.py
index 463968dc4daa..b3576ec7587e 100644
--- a/sw/qa/uitest/findBar/tdf88608.py
+++ b/sw/qa/uitest/findBar/tdf88608.py
@@ -29,7 +29,7 @@ class tdf88608(UITestCase):
self.assertEqual('', get_state_as_dict(xfind_bar.getChild('label'))['Text'])
# Search Next
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"}))
self.assertEqual('Search key not found', get_state_as_dict(xfind_bar.getChild('label'))['Text'])
@@ -44,7 +44,7 @@ class tdf88608(UITestCase):
self.assertEqual('', get_state_as_dict(xfind_bar.getChild('label'))['Text'])
# Search Next
- xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "4"}))
+ xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"}))
self.assertEqual('Reached the end of the document', get_state_as_dict(xfind_bar.getChild('label'))['Text'])
diff --git a/sw/qa/uitest/findReplace/findReplace.py b/sw/qa/uitest/findReplace/findReplace.py
index 9ce377f38292..46e00135553e 100644
--- a/sw/qa/uitest/findReplace/findReplace.py
+++ b/sw/qa/uitest/findReplace/findReplace.py
@@ -6,8 +6,6 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
@@ -79,7 +77,6 @@ class findReplace(UITestCase):
select_pos(xTabs, "0")
xSizeFont = dialog.getChild("westsizelb-cjk")
xSizeFont.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
- xSizeFont.executeAction("BACKSPACE", tuple())
xSizeFont.executeAction("TYPE", mkPropertyValues({"TEXT":"16"})) #set font size 16
xOkBtn = dialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOkBtn)
diff --git a/sw/qa/uitest/findReplace/tdf106099.py b/sw/qa/uitest/findReplace/tdf106099.py
index 085bba6e694a..2e8011dab36a 100644
--- a/sw/qa/uitest/findReplace/tdf106099.py
+++ b/sw/qa/uitest/findReplace/tdf106099.py
@@ -5,13 +5,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-from uitest.debug import sleep
+from uitest.uihelper.common import select_by_text
+from uitest.uihelper.common import get_state_as_dict
#Bug 106099 - Find and replace by format, font color added by force
@@ -30,9 +26,7 @@ class tdf106099(UITestCase):
xTabs = dialog.getChild("tabcontrol")
select_pos(xTabs, "1") #tab font effects
underlinelb = dialog.getChild("underlinelb")
- props = {"TEXT": "Single"}
- actionProps = mkPropertyValues(props)
- underlinelb.executeAction("SELECT", actionProps)
+ select_by_text(underlinelb, "Single")
xOkBtn = dialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOkBtn)
diff --git a/sw/qa/uitest/findReplace/tdf118208.py b/sw/qa/uitest/findReplace/tdf118208.py
index 3e2b4373221f..c602158b17a4 100644
--- a/sw/qa/uitest/findReplace/tdf118208.py
+++ b/sw/qa/uitest/findReplace/tdf118208.py
@@ -5,11 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
#Find and replace
#tdf118208/118212 - enabling either CJK or CTL, or both (Tools -> Options -> Language Settings -> Languages: Default Languages for Documents checkboxes)
diff --git a/sw/qa/uitest/findReplace/tdf119462.py b/sw/qa/uitest/findReplace/tdf119462.py
index e87cd8e7b856..8623873cbd02 100644
--- a/sw/qa/uitest/findReplace/tdf119462.py
+++ b/sw/qa/uitest/findReplace/tdf119462.py
@@ -5,13 +5,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-from uitest.debug import sleep
+from uitest.uihelper.common import get_state_as_dict
#Bug 119462 - Find with formatting adds 0pt text size
diff --git a/sw/qa/uitest/findSimilarity/findSimilarity.py b/sw/qa/uitest/findSimilarity/findSimilarity.py
index cb62e5528c4f..ea8929983f80 100644
--- a/sw/qa/uitest/findSimilarity/findSimilarity.py
+++ b/sw/qa/uitest/findSimilarity/findSimilarity.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
#Find similarities
diff --git a/sw/qa/uitest/librelogo/compile.py b/sw/qa/uitest/librelogo/compile.py
index 89e538b8c926..1fb90e955f31 100644
--- a/sw/qa/uitest/librelogo/compile.py
+++ b/sw/qa/uitest/librelogo/compile.py
@@ -5,13 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time, re
-from uitest.debug import sleep
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import select_pos
+import re
class LibreLogoCompileTest(UITestCase):
LIBRELOGO_PATH = "vnd.sun.star.script:LibreLogo|LibreLogo.py$%s?language=Python&location=share"
diff --git a/sw/qa/uitest/librelogo/run.py b/sw/qa/uitest/librelogo/run.py
index 7b243f00b952..26b8f5c7df44 100644
--- a/sw/qa/uitest/librelogo/run.py
+++ b/sw/qa/uitest/librelogo/run.py
@@ -5,13 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-
-import time
-from uitest.debug import sleep
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import type_text
class LibreLogoTest(UITestCase):
LIBRELOGO_PATH = "vnd.sun.star.script:LibreLogo|LibreLogo.py$%s?language=Python&location=share"
diff --git a/sw/qa/uitest/navigator/tdf114724.py b/sw/qa/uitest/navigator/tdf114724.py
index a84bab60da60..fc220f530202 100644
--- a/sw/qa/uitest/navigator/tdf114724.py
+++ b/sw/qa/uitest/navigator/tdf114724.py
@@ -1,3 +1,6 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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
@@ -17,27 +20,32 @@ class tdf114724(UITestCase):
self.xUITest.executeCommand(".uno:Sidebar")
xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SwNavigatorPanel"}))
- xNavigatorPanel = xWriterEdit.getChild("NavigatorPanelParent")
- xNavigatorPanel.executeAction("ROOT", tuple())
+ xNavigatorPanel = xWriterEdit.getChild("NavigatorPanel")
+ xToolBar = xNavigatorPanel.getChild("content5")
+ xToolBar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) # 'root' button
xWriterEdit.executeAction("FOCUS", tuple())
- self.ui_test.wait_until_property_is_updated(xNavigatorPanel, "selectedtext", "HEADING 1")
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "HEADING 1")
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1")
+ xContentTree = xNavigatorPanel.getChild("contenttree")
+
+ self.ui_test.wait_until_property_is_updated(xContentTree, "SelectEntryText", "HEADING 1")
+ self.assertEqual(get_state_as_dict(xContentTree)["SelectEntryText"], "HEADING 1")
+ self.assertEqual(get_state_as_dict(xContentTree)["SelectionCount"], "1")
for _ in range(0,3):
xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"}))
- self.ui_test.wait_until_property_is_updated(xNavigatorPanel, "selectedtext", "HEADING 4")
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "HEADING 4")
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1")
+ self.ui_test.wait_until_property_is_updated(xContentTree, "SelectEntryText", "HEADING 4")
+ self.assertEqual(get_state_as_dict(xContentTree)["SelectEntryText"], "HEADING 4")
+ self.assertEqual(get_state_as_dict(xContentTree)["SelectionCount"], "1")
for _ in range(0,3):
xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
- self.ui_test.wait_until_property_is_updated(xNavigatorPanel, "selectedtext", "HEADING 1")
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectedtext"], "HEADING 1")
- self.assertEqual(get_state_as_dict(xNavigatorPanel)["selectioncount"], "1")
+ self.ui_test.wait_until_property_is_updated(xContentTree, "SelectEntryText", "HEADING 1")
+ self.assertEqual(get_state_as_dict(xContentTree)["SelectEntryText"], "HEADING 1")
+ self.assertEqual(get_state_as_dict(xContentTree)["SelectionCount"], "1")
self.xUITest.executeCommand(".uno:Sidebar")
self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/navigator/tdf137274.py b/sw/qa/uitest/navigator/tdf137274.py
index a4a48dbb9693..36f25f4c2d7a 100644
--- a/sw/qa/uitest/navigator/tdf137274.py
+++ b/sw/qa/uitest/navigator/tdf137274.py
@@ -31,7 +31,7 @@ class tdf137274(UITestCase):
xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SwNavigatorPanel"}))
# wait until the navigator panel is available
- xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanelParent')
+ xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
xComments = xContentTree.getChild('10')
diff --git a/sw/qa/uitest/navigator/tdf140257.py b/sw/qa/uitest/navigator/tdf140257.py
index 6a6674d8f7e8..9c923bedee4d 100644
--- a/sw/qa/uitest/navigator/tdf140257.py
+++ b/sw/qa/uitest/navigator/tdf140257.py
@@ -8,6 +8,7 @@ from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict, type_text
from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
class Tdf140257(UITestCase):
@@ -20,9 +21,7 @@ class Tdf140257(UITestCase):
xOutline = xDialog.getChild("comboLB_OUTLINE_LEVEL")
- props = {"TEXT": sText}
- actionProps = mkPropertyValues(props)
- xOutline.executeAction("SELECT", actionProps)
+ select_by_text(xOutline, sText)
xOKBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
@@ -45,7 +44,7 @@ class Tdf140257(UITestCase):
xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SwNavigatorPanel"}))
# wait until the navigator panel is available
- xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanelParent')
+ xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
xHeadings = xContentTree.getChild('0')
@@ -84,7 +83,7 @@ class Tdf140257(UITestCase):
xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SwNavigatorPanel"}))
# wait until the navigator panel is available
- xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanelParent')
+ xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
xHeadings = xContentTree.getChild('0')
diff --git a/sw/qa/uitest/navigator/tdf140661.py b/sw/qa/uitest/navigator/tdf140661.py
new file mode 100644
index 000000000000..3991105ee78b
--- /dev/null
+++ b/sw/qa/uitest/navigator/tdf140661.py
@@ -0,0 +1,61 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+class tdf140661(UITestCase):
+
+ def launch_navigator(self, bIsBeforeUngroup):
+ xMainWindow = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xMainWindow.getChild("writer_edit")
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+
+ xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SwNavigatorPanel"}))
+
+ # wait until the navigator panel is available
+ xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+
+ xContentTree = xNavigatorPanel.getChild("contenttree")
+ xDrawings = xContentTree.getChild('11')
+ self.assertEqual('Drawing objects', get_state_as_dict(xDrawings)['Text'])
+
+ xDrawings.executeAction("EXPAND", tuple())
+
+ if bIsBeforeUngroup:
+ self.assertEqual(1, len(xDrawings.getChildren()))
+ self.assertEqual('DrawObject1', get_state_as_dict(xDrawings.getChild('0'))['Text'])
+ else:
+ self.assertEqual(12, len(xDrawings.getChildren()))
+ for i in range(12):
+ self.assertEqual('Shape' + str(i + 1), get_state_as_dict(xDrawings.getChild(str(i)))['Text'])
+
+ xDrawings.executeAction("COLLAPSE", tuple())
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+
+ def test_tdf140661(self):
+
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf140661.odt"))
+
+ self.launch_navigator(True)
+
+ # Select the shape and ungroup it
+ self.xUITest.executeCommand(".uno:JumpToNextFrame")
+
+ self.ui_test.wait_until_child_is_available('metricfield')
+
+ self.xUITest.executeCommand(".uno:FormatUngroup")
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: 12 != 0
+ self.launch_navigator(False)
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/navigator/tdf40427.py b/sw/qa/uitest/navigator/tdf40427.py
new file mode 100644
index 000000000000..9b125ff941ec
--- /dev/null
+++ b/sw/qa/uitest/navigator/tdf40427.py
@@ -0,0 +1,81 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+class tdf40427(UITestCase):
+
+ def test_tdf40427(self):
+ self.ui_test.load_file(get_url_for_data_file("tdf40427_SectionPositions.odt"))
+ xMainWindow = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xMainWindow.getChild("writer_edit")
+
+ self.assertEqual(2, self.ui_test.get_component().CurrentController.PageCount)
+
+ # Make sure that the view is 2 pages side-by-side - look at dialog View-Zoom-Zoom
+ self.ui_test.execute_dialog_through_command(".uno:Zoom")
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ columnssb = xDialog.getChild("columnssb")
+ columns = xDialog.getChild("columns")
+ bookmode = xDialog.getChild("bookmode")
+ self.assertEqual("true", get_state_as_dict(columns)["Checked"])
+ self.assertEqual("2", get_state_as_dict(columnssb)["Text"])
+ self.assertEqual("false", get_state_as_dict(bookmode)["Selected"])
+
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
+
+ # In this view, the sections "SectionB" and "SectionC" on second page are positioned on screen
+ # higher than "SectionY" and "SectionA" respectively; there are nested and anchored sections.
+ # Make sure that order in Navigator follows their relative position in document, not vertical
+ # position on screen, nor sorted alphabetically. Sections in flying frames are sorted by their
+ # anchor position in the document.
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+ xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SwNavigatorPanel"}))
+
+ # wait until the navigator panel is available
+ xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+
+ xContentTree = xNavigatorPanel.getChild("contenttree")
+ xSections = xContentTree.getChild('6')
+ self.assertEqual('Sections', get_state_as_dict(xSections)['Text'])
+ xSections.executeAction("EXPAND", ())
+
+ refSectionNames = [
+ 'SectionZ',
+ 'SectionY', # SectionB should not get before this, despite its Y position on screen is higher
+ 'SectionT3', # Sections in tables go in rows, then across rows
+ 'SectionT1',
+ 'SectionT2',
+ 'SectionT0',
+ 'SectionF2', # Goes before SectionF1, because their fly anchors go in that order
+ 'SectionF3', # Same as SectionF1, but anchor section is in fly itself
+ 'SectionFinF3', # Check order of nested sections inside fly
+ 'SectionA',
+ 'SectionF1', # Section in fly anchored in a section goes immediately after its anchor section
+ 'SectionB', # High on screen, but late in list because it's on second page
+ 'SectionC',
+ ]
+ self.assertEqual(len(refSectionNames), len(xSections.getChildren()))
+
+ actSectionNames = []
+ for i in range(len(refSectionNames)):
+ actSectionNames.append(get_state_as_dict(xSections.getChild(str(i)))['Text'])
+ # Without the fix in place, this would fail with
+ # AssertionError: Lists differ: ['SectionZ', 'SectionY', 'SectionT3', 'SectionT1', 'SectionT2'[100 chars]onC'] != ['SectionZ', 'SectionB', 'SectionF3', 'SectionFinF3', 'Section[100 chars]onA']
+ self.assertEqual(refSectionNames, actSectionNames)
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/options/tdf78133.py b/sw/qa/uitest/options/tdf78133.py
index de1f2124200f..883c38231aa9 100644
--- a/sw/qa/uitest/options/tdf78133.py
+++ b/sw/qa/uitest/options/tdf78133.py
@@ -6,8 +6,6 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
from uitest.uihelper.common import get_state_as_dict
#Bug 78133 - LibO crashes when in options dialog
diff --git a/sw/qa/uitest/sidebar/stylesSidebar.py b/sw/qa/uitest/sidebar/stylesSidebar.py
index db625be6f006..8364334ad77e 100644
--- a/sw/qa/uitest/sidebar/stylesSidebar.py
+++ b/sw/qa/uitest/sidebar/stylesSidebar.py
@@ -6,6 +6,7 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
class StylesSidebar(UITestCase):
@@ -53,7 +54,7 @@ class StylesSidebar(UITestCase):
xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "StyleListPanel"}))
xFilter = xWriterEdit.getChild('filter')
- xFilter.executeAction("SELECT", mkPropertyValues({"TEXT": "Custom Styles"}))
+ select_by_text(xFilter, "Custom Styles")
expectedResults = ["customParagraphStyle", "customCharacterStyle", "customFrameStyle",
"customPageStyle", "customNumberingStyle"]
@@ -62,7 +63,7 @@ class StylesSidebar(UITestCase):
xLeft = xWriterEdit.getChild('left')
#change to another style type
- xLeft.executeAction("CLICK", mkPropertyValues({"POS": str( i + 1 )}))
+ xLeft.executeAction("CLICK", mkPropertyValues({"POS": str( i )}))
xFlatView = xWriterEdit.getChild("flatview")
diff --git a/sw/qa/uitest/sidebar/tdf135590.py b/sw/qa/uitest/sidebar/tdf135590.py
index 99d52d8c95e3..6a061b7a1f96 100644
--- a/sw/qa/uitest/sidebar/tdf135590.py
+++ b/sw/qa/uitest/sidebar/tdf135590.py
@@ -7,6 +7,7 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, select_pos
from uitest.uihelper.common import change_measurement_unit
+from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
class tdf135590(UITestCase):
@@ -27,7 +28,7 @@ class tdf135590(UITestCase):
xHeight = xDialog.getChild('height')
xFormat = xDialog.getChild("format")
- xFormat.executeAction("SELECT", mkPropertyValues({"TEXT": "C6 Envelope"}))
+ select_by_text(xFormat, "C6 Envelope")
self.assertEqual("16.2", get_state_as_dict(xWidth)['Value'])
self.assertEqual("11.4", get_state_as_dict(xHeight)['Value'])
diff --git a/sw/qa/uitest/styleInspector/styleInspector.py b/sw/qa/uitest/styleInspector/styleInspector.py
index 1b8cc0c68d90..d26c21f2a9ed 100644
--- a/sw/qa/uitest/styleInspector/styleInspector.py
+++ b/sw/qa/uitest/styleInspector/styleInspector.py
@@ -129,4 +129,62 @@ class styleNavigator(UITestCase):
self.xUITest.executeCommand(".uno:Sidebar")
self.ui_test.close_doc()
+ def test_metadata(self):
+ self.ui_test.load_file(get_url_for_data_file("metadata.odt"))
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+ xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "InspectorTextPanel"}))
+
+ xListBox = xWriterEdit.getChild('listbox_fonts')
+
+ # The cursor is on text without metadata
+ self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
+ self.assertEqual("Default Paragraph Style", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
+ self.assertEqual(136, len(xListBox.getChild('0').getChild('0').getChildren()))
+ self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
+ self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
+ self.assertEqual(0, len(xListBox.getChild('3').getChildren()))
+
+ self.xUITest.executeCommand(".uno:GoDown")
+
+ # The cursor is on text with paragraph metadata showed under direct paragraph formatting
+ self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
+ self.assertEqual("Default Paragraph Style", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
+ self.assertEqual(136, len(xListBox.getChild('0').getChild('0').getChildren()))
+
+ xParDirFormatting = xListBox.getChild('1')
+ self.assertEqual(1, len(xParDirFormatting.getChildren()))
+ self.assertEqual("Metadata Reference", get_state_as_dict(xParDirFormatting.getChild('0'))['Text'])
+
+ xMetadata = xParDirFormatting.getChild('0')
+ self.assertEqual(3, len(xMetadata.getChildren()))
+ self.assertEqual("http://www.w3.org/1999/02/22-rdf-syntax-ns#type\tParagraph", get_state_as_dict(xMetadata.getChild('0'))['Text'])
+ self.assertEqual("http://www.w3.org/2000/01/rdf-schema#comment\tAbout this paragraph...", get_state_as_dict(xMetadata.getChild('1'))['Text'])
+ self.assertEqual("http://www.w3.org/2000/01/rdf-schema#label\tAnnotated paragraph", get_state_as_dict(xMetadata.getChild('2'))['Text'])
+
+ self.xUITest.executeCommand(".uno:GoDown")
+ # FIXME jump over the control character (not visible in getString(), but it affects
+ # cursor position and availability of NestedTextContent)
+ self.xUITest.executeCommand(".uno:GoRight")
+
+ # The cursor is on text with annotated text range
+ xDirFormatting = xListBox.getChild('3')
+ self.assertEqual(2, len(xDirFormatting.getChildren()))
+ self.assertEqual("Metadata Reference", get_state_as_dict(xDirFormatting.getChild('0'))['Text'])
+ self.assertEqual("Nested Text Content\tAnnotated text range", get_state_as_dict(xDirFormatting.getChild('1'))['Text'])
+
+ xMetadata = xDirFormatting.getChild('0')
+ self.assertEqual(3, len(xMetadata.getChildren()))
+ self.assertEqual("http://www.w3.org/1999/02/22-rdf-syntax-ns#type\tText span", get_state_as_dict(xMetadata.getChild('0'))['Text'])
+ self.assertEqual("http://www.w3.org/2000/01/rdf-schema#comment\tComment...", get_state_as_dict(xMetadata.getChild('1'))['Text'])
+ self.assertEqual("http://www.w3.org/2000/01/rdf-schema#label\tAnnotated paragraph portion", get_state_as_dict(xMetadata.getChild('2'))['Text'])
+
+ self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
+ self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+ self.ui_test.close_doc()
+
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/table/sheetToTable.py b/sw/qa/uitest/table/sheetToTable.py
index e47d26a52dc4..7beff37c6c8d 100644
--- a/sw/qa/uitest/table/sheetToTable.py
+++ b/sw/qa/uitest/table/sheetToTable.py
@@ -5,9 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file
from uitest.uihelper.calc import enter_text_to_cell
#Calc sheet to Writer table
diff --git a/sw/qa/uitest/table/splitTable.py b/sw/qa/uitest/table/splitTable.py
index 8994273c4633..402aab45d543 100644
--- a/sw/qa/uitest/table/splitTable.py
+++ b/sw/qa/uitest/table/splitTable.py
@@ -5,11 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file
#Writer Split Table
diff --git a/sw/qa/uitest/table/tableProperties.py b/sw/qa/uitest/table/tableProperties.py
index d74260892f01..da75f2218255 100644
--- a/sw/qa/uitest/table/tableProperties.py
+++ b/sw/qa/uitest/table/tableProperties.py
@@ -6,10 +6,9 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
+from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
from uitest.uihelper.common import change_measurement_unit
#Writer Table Properties
@@ -56,9 +55,7 @@ class tableProperties(UITestCase):
belowmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
belowmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
belowmf.executeAction("TYPE", mkPropertyValues({"TEXT":"1"}))
- props = {"TEXT": "Left-to-right (LTR)"}
- actionProps = mkPropertyValues(props)
- textdirection.executeAction("SELECT", actionProps)
+ select_by_text(textdirection, "Left-to-right (LTR)")
xOKBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
#verify
@@ -103,13 +100,9 @@ class tableProperties(UITestCase):
headline = xDialog.getChild("headline")
headline.executeAction("CLICK", tuple())
textdirection = xDialog.getChild("textorientation")
- props = {"TEXT": "Vertical (bottom to top)"}
- actionProps = mkPropertyValues(props)
- textdirection.executeAction("SELECT", actionProps)
+ select_by_text(textdirection, "Vertical (bottom to top)")
vertorient = xDialog.getChild("vertorient")
- props2 = {"TEXT": "Bottom"}
- actionProps2 = mkPropertyValues(props2)
- vertorient.executeAction("SELECT", actionProps2)
+ select_by_text(vertorient, "Bottom")
xOKBtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
#verify
diff --git a/sw/qa/uitest/table/tableToText.py b/sw/qa/uitest/table/tableToText.py
index 003f46e20548..f131f914c93e 100644
--- a/sw/qa/uitest/table/tableToText.py
+++ b/sw/qa/uitest/table/tableToText.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file
#Writer Table to text
diff --git a/sw/qa/uitest/table/tdf115026.py b/sw/qa/uitest/table/tdf115026.py
index 7e8edcf4260c..92314753a8c3 100644
--- a/sw/qa/uitest/table/tdf115026.py
+++ b/sw/qa/uitest/table/tdf115026.py
@@ -6,7 +6,6 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
class tdf115026(UITestCase):
diff --git a/sw/qa/uitest/table/tdf116737.py b/sw/qa/uitest/table/tdf116737.py
index 7b27020e495e..139fcea3a812 100644
--- a/sw/qa/uitest/table/tdf116737.py
+++ b/sw/qa/uitest/table/tdf116737.py
@@ -6,9 +6,7 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
-from uitest.debug import sleep
from uitest.uihelper.common import select_pos
#Bug 116737 - INSERT TABLE: Can't select table style (gen/gtk)
diff --git a/sw/qa/uitest/table/tdf128593.py b/sw/qa/uitest/table/tdf128593.py
index 26f9d903be27..3306a58d2b09 100755
--- a/sw/qa/uitest/table/tdf128593.py
+++ b/sw/qa/uitest/table/tdf128593.py
@@ -2,7 +2,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-import importlib
from uitest.uihelper.common import get_state_as_dict
#https://bugs.documentfoundation.org/show_bug.cgi?id=128593
diff --git a/sw/qa/uitest/table/tdf134881_colProportionalAdjust.py b/sw/qa/uitest/table/tdf134881_colProportionalAdjust.py
index c1b4aea8b4eb..019c492374a1 100644
--- a/sw/qa/uitest/table/tdf134881_colProportionalAdjust.py
+++ b/sw/qa/uitest/table/tdf134881_colProportionalAdjust.py
@@ -6,7 +6,7 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
from uitest.uihelper.common import change_measurement_unit
from libreoffice.uno.propertyvalue import mkPropertyValues
diff --git a/sw/qa/uitest/table/tdf81292.py b/sw/qa/uitest/table/tdf81292.py
index 68a79e6733d7..343b1a89bb13 100644
--- a/sw/qa/uitest/table/tdf81292.py
+++ b/sw/qa/uitest/table/tdf81292.py
@@ -5,8 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file
#Bug 81292 - TABLE: Crashes on sorting table
diff --git a/sw/qa/uitest/table/tdf99334.py b/sw/qa/uitest/table/tdf99334.py
index 8c97aff57940..e87226a0c485 100644
--- a/sw/qa/uitest/table/tdf99334.py
+++ b/sw/qa/uitest/table/tdf99334.py
@@ -5,8 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file
#Bug 99334 - Crashes when sorting table by columns with umlauts
diff --git a/sw/qa/uitest/table/textToTable.py b/sw/qa/uitest/table/textToTable.py
index d41c514d2716..d901ae6d2c04 100644
--- a/sw/qa/uitest/table/textToTable.py
+++ b/sw/qa/uitest/table/textToTable.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file, type_text
#Writer Text to table
diff --git a/sw/qa/uitest/ui/fmtui/fmtui.py b/sw/qa/uitest/ui/fmtui/fmtui.py
index d147022635fb..36e00c95a479 100644
--- a/sw/qa/uitest/ui/fmtui/fmtui.py
+++ b/sw/qa/uitest/ui/fmtui/fmtui.py
@@ -8,8 +8,6 @@
"""Covers sw/source/ui/fmtui/ fixes."""
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
diff --git a/sw/qa/uitest/writer_dialogs/openDialogs.py b/sw/qa/uitest/writer_dialogs/openDialogs.py
index 6c8cb699a7a6..b4d9b356e153 100644
--- a/sw/qa/uitest/writer_dialogs/openDialogs.py
+++ b/sw/qa/uitest/writer_dialogs/openDialogs.py
@@ -37,7 +37,8 @@ dialogs = [
# {"command": ".uno:InsertBreak", "closeButton": "cancel"},
# tested in uitest/writer_tests/insertBreakDialog.py
{"command": ".uno:InsertObject", "closeButton": "cancel"},
- {"command": ".uno:InsertSection", "closeButton": "cancel"},
+ # {"command": ".uno:InsertSection", "closeButton": "cancel"},
+ # tested in sw/qa/uitest/writer_tests7/tdf140863.py
{"command": ".uno:InsertFrame", "closeButton": "cancel"},
{"command": ".uno:InsertObjectFloatingFrame", "closeButton": "cancel"},
{"command": ".uno:FontworkGalleryFloater", "closeButton": "cancel"},
diff --git a/sw/qa/uitest/writer_tests/comments.py b/sw/qa/uitest/writer_tests/comments.py
index c846372a99aa..66ecb06bb246 100644
--- a/sw/qa/uitest/writer_tests/comments.py
+++ b/sw/qa/uitest/writer_tests/comments.py
@@ -8,11 +8,8 @@
#
from uitest.framework import UITestCase
-import time
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
-from uitest.config import DEFAULT_SLEEP
#test comments
class Comments(UITestCase):
diff --git a/sw/qa/uitest/writer_tests/insertCaption.py b/sw/qa/uitest/writer_tests/insertCaption.py
index de73b3b767e5..57f6273875db 100644
--- a/sw/qa/uitest/writer_tests/insertCaption.py
+++ b/sw/qa/uitest/writer_tests/insertCaption.py
@@ -6,9 +6,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.debug import sleep
from uitest.uihelper.common import select_pos
class insertCaption(UITestCase):
diff --git a/sw/qa/uitest/writer_tests/tdf134734.py b/sw/qa/uitest/writer_tests/tdf134734.py
new file mode 100644
index 000000000000..5685f00a55a9
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/tdf134734.py
@@ -0,0 +1,92 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, select_pos
+from com.sun.star.drawing.FillStyle import SOLID
+import importlib
+
+class TestClass(UITestCase):
+ def test_master_page_background(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+
+ # set margins and fill color
+ self.ui_test.execute_dialog_through_command(".uno:PageDialog")
+ DrawPageDialog = self.xUITest.getTopFocusWindow()
+ xTabs = DrawPageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1")
+ checkBackgroundFullSize = DrawPageDialog.getChild("checkBackgroundFullSize")
+ self.assertEqual(get_state_as_dict(checkBackgroundFullSize)["Selected"], "true")
+ spinMargLeft = DrawPageDialog.getChild("spinMargLeft")
+ for _ in range(20):
+ spinMargLeft.executeAction("UP",tuple())
+ spinMargRight = DrawPageDialog.getChild("spinMargRight")
+ for _ in range(15):
+ spinMargRight.executeAction("UP",tuple())
+ spinMargTop = DrawPageDialog.getChild("spinMargTop")
+ for _ in range(10):
+ spinMargTop.executeAction("UP",tuple())
+ spinMargBot = DrawPageDialog.getChild("spinMargBot")
+ for _ in range(5):
+ spinMargBot.executeAction("UP",tuple())
+ xTabs = DrawPageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "2")
+ btncolor = DrawPageDialog.getChild("btncolor")
+ btncolor.executeAction("CLICK",tuple())
+ ok = DrawPageDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(ok)
+
+ xStyle = document.StyleFamilies["PageStyles"]["Standard"]
+
+ self.assertEqual(xStyle.FillStyle, SOLID)
+ self.assertEqual(xStyle.LeftMargin, 2997)
+ self.assertEqual(xStyle.RightMargin, 2743)
+ self.assertEqual(xStyle.TopMargin, 2489)
+ self.assertEqual(xStyle.BottomMargin, 2235)
+ self.assertEqual(xStyle.BackgroundFullSize, True)
+
+ # uncheck it
+ self.ui_test.execute_dialog_through_command(".uno:PageDialog")
+ DrawPageDialog = self.xUITest.getTopFocusWindow()
+ xTabs = DrawPageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1")
+ checkBackgroundFullSize = DrawPageDialog.getChild("checkBackgroundFullSize")
+ self.assertEqual(get_state_as_dict(checkBackgroundFullSize)["Selected"], "true")
+ checkBackgroundFullSize.executeAction("CLICK",tuple())
+ ok = DrawPageDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(ok)
+
+ self.assertEqual(xStyle.FillStyle, SOLID)
+ self.assertEqual(xStyle.LeftMargin, 2997)
+ self.assertEqual(xStyle.RightMargin, 2743)
+ self.assertEqual(xStyle.TopMargin, 2489)
+ self.assertEqual(xStyle.BottomMargin, 2235)
+ self.assertEqual(xStyle.BackgroundFullSize, False)
+
+ # check it again
+ self.ui_test.execute_dialog_through_command(".uno:PageDialog")
+ DrawPageDialog = self.xUITest.getTopFocusWindow()
+ xTabs = DrawPageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1")
+ checkBackgroundFullSize = DrawPageDialog.getChild("checkBackgroundFullSize")
+ self.assertEqual(get_state_as_dict(checkBackgroundFullSize)["Selected"], "false")
+ checkBackgroundFullSize.executeAction("CLICK",tuple())
+ ok = DrawPageDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(ok)
+
+ self.assertEqual(xStyle.FillStyle, SOLID)
+ self.assertEqual(xStyle.LeftMargin, 2997)
+ self.assertEqual(xStyle.RightMargin, 2743)
+ self.assertEqual(xStyle.TopMargin, 2489)
+ self.assertEqual(xStyle.BottomMargin, 2235)
+ self.assertEqual(xStyle.BackgroundFullSize, True)
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py b/sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py
index 97e60b8c07de..9adbd2047d37 100644
--- a/sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py
+++ b/sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py
@@ -8,7 +8,7 @@
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
class tdf137459(UITestCase):
diff --git a/sw/qa/uitest/writer_tests/tdf53460.py b/sw/qa/uitest/writer_tests/tdf53460.py
index f8fc0ad47451..7f4b57416e6f 100644
--- a/sw/qa/uitest/writer_tests/tdf53460.py
+++ b/sw/qa/uitest/writer_tests/tdf53460.py
@@ -7,7 +7,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
class tdf53460(UITestCase):
diff --git a/sw/qa/uitest/writer_tests/tdf78068.py b/sw/qa/uitest/writer_tests/tdf78068.py
index 145b0bd99b51..1989722a3b1f 100644
--- a/sw/qa/uitest/writer_tests/tdf78068.py
+++ b/sw/qa/uitest/writer_tests/tdf78068.py
@@ -5,12 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import type_text
-import time
-from uitest.debug import sleep
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import select_pos
class tdf78068(UITestCase):
@@ -33,4 +29,4 @@ class tdf78068(UITestCase):
self.assertEqual(document.Text.String[0:4], "Test")
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests/tdf81457.py b/sw/qa/uitest/writer_tests/tdf81457.py
index f8b93a9bc60a..bf615f99c2b0 100644
--- a/sw/qa/uitest/writer_tests/tdf81457.py
+++ b/sw/qa/uitest/writer_tests/tdf81457.py
@@ -8,7 +8,6 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
from uitest.uihelper.common import select_pos
@@ -41,4 +40,4 @@ class tdf81457(UITestCase):
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests/watermark.py b/sw/qa/uitest/writer_tests/watermark.py
index 0d918e92d061..3cf7c6fd84f6 100644
--- a/sw/qa/uitest/writer_tests/watermark.py
+++ b/sw/qa/uitest/writer_tests/watermark.py
@@ -7,9 +7,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.debug import sleep
-from uitest.uihelper.common import select_pos
class watermark(UITestCase):
diff --git a/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py b/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py
index 1af2bfe94933..39ba7eb3595a 100644
--- a/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py
+++ b/sw/qa/uitest/writer_tests2/asianPhoneticGuide.py
@@ -6,10 +6,7 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.debug import sleep
-from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
class asianPhoneticGuide(UITestCase):
@@ -29,15 +26,9 @@ class asianPhoneticGuide(UITestCase):
xLeft1ED.executeAction("TYPE", mkPropertyValues({"TEXT":"a"}))
xRight1ED.executeAction("TYPE", mkPropertyValues({"TEXT":"w"}))
- props = {"TEXT": "Right"}
- actionProps = mkPropertyValues(props)
- xadjustlb.executeAction("SELECT", actionProps)
- props2 = {"TEXT": "Right"}
- actionProps2 = mkPropertyValues(props2)
- xpositionlb.executeAction("SELECT", actionProps2)
- props3 = {"TEXT": "Quotation"}
- actionProps3 = mkPropertyValues(props3)
- xstylelb.executeAction("SELECT", actionProps3)
+ select_by_text(xadjustlb, "Right")
+ select_by_text(xpositionlb, "Right")
+ select_by_text(xstylelb, "Quotation")
xApplyBtn = xDialog.getChild("ok")
xApplyBtn.executeAction("CLICK", tuple())
diff --git a/sw/qa/uitest/writer_tests2/bookmark.py b/sw/qa/uitest/writer_tests2/bookmark.py
index 9cbf82c29b41..57ab151adbcb 100644
--- a/sw/qa/uitest/writer_tests2/bookmark.py
+++ b/sw/qa/uitest/writer_tests2/bookmark.py
@@ -8,10 +8,8 @@
#
from uitest.framework import UITestCase
-import time
from uitest.uihelper.common import get_state_as_dict, type_text
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
#test bookmark dialog
class bookmarkDialog(UITestCase):
diff --git a/sw/qa/uitest/writer_tests2/deleteAllComments.py b/sw/qa/uitest/writer_tests2/deleteAllComments.py
index ad9e0c823e6f..e6832af6cb62 100644
--- a/sw/qa/uitest/writer_tests2/deleteAllComments.py
+++ b/sw/qa/uitest/writer_tests2/deleteAllComments.py
@@ -5,8 +5,7 @@
#
from uitest.framework import UITestCase
-import time
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import type_text
class DeleteAllComments(UITestCase):
@@ -16,7 +15,7 @@ class DeleteAllComments(UITestCase):
xWriterDoc = self.xUITest.getTopFocusWindow()
xWriterEdit = xWriterDoc.getChild("writer_edit")
-
+
type_text(xWriterEdit, "Test LibreOffice")
@@ -25,7 +24,6 @@ class DeleteAllComments(UITestCase):
selection = self.xUITest.executeCommand(".uno:SelectAll")
self.xUITest.executeCommand(".uno:InsertAnnotation")
cursor = document.getCurrentController().getViewCursor()
- xWriterDoc.executeAction("LEFT", tuple())
type_text(xWriterEdit, "EEEEE")
self.xUITest.executeCommand(".uno:InsertAnnotation")
self.xUITest.executeCommand(".uno:DeleteAllNotes")
diff --git a/sw/qa/uitest/writer_tests2/exchangeDatabase.py b/sw/qa/uitest/writer_tests2/exchangeDatabase.py
index d255bd15291b..3f3a49660bfc 100644
--- a/sw/qa/uitest/writer_tests2/exchangeDatabase.py
+++ b/sw/qa/uitest/writer_tests2/exchangeDatabase.py
@@ -6,10 +6,7 @@
#
from uitest.framework import UITestCase
-import time
-from uitest.uihelper.common import get_state_as_dict, type_text
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
+from uitest.uihelper.common import get_state_as_dict
class exchangeDB(UITestCase):
diff --git a/sw/qa/uitest/writer_tests2/fontworks.py b/sw/qa/uitest/writer_tests2/fontworks.py
index 671f63087ba4..4d4044ab2bd0 100644
--- a/sw/qa/uitest/writer_tests2/fontworks.py
+++ b/sw/qa/uitest/writer_tests2/fontworks.py
@@ -8,9 +8,8 @@
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
#test FontWorks dialog
class fontWorksDialog(UITestCase):
@@ -42,4 +41,4 @@ class fontWorksDialog(UITestCase):
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py b/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py
index 9373101a3fd8..4633666f468d 100644
--- a/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py
+++ b/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py
@@ -5,13 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.debug import sleep
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
from uitest.uihelper.common import change_measurement_unit
class formatBulletsNumbering(UITestCase):
@@ -34,9 +32,7 @@ class formatBulletsNumbering(UITestCase):
xokbtn = xDialog.getChild("ok")
xalignedatmf.executeAction("UP", tuple())
- props = {"TEXT": "Centered"}
- actionProps = mkPropertyValues(props)
- xnum2alignlb.executeAction("SELECT", actionProps)
+ select_by_text(xnum2alignlb, "Centered")
xatmf.executeAction("UP", tuple())
xindentatmf.executeAction("UP", tuple())
@@ -71,9 +67,7 @@ class formatBulletsNumbering(UITestCase):
xTabs = xDialog.getChild("tabcontrol")
select_pos(xTabs, "4")
xnumfollowedbylb = xDialog.getChild("numfollowedbylb")
- props = {"TEXT": "Space"}
- actionProps = mkPropertyValues(props)
- xnumfollowedbylb.executeAction("SELECT", actionProps)
+ select_by_text(xnumfollowedbylb, "Space")
xokbtn = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xokbtn)
@@ -106,13 +100,9 @@ class formatBulletsNumbering(UITestCase):
xsuffix = xDialog.getChild("suffix")
xallsame = xDialog.getChild("allsame")
- props = {"TEXT": "A, B, C, ..."}
- actionProps = mkPropertyValues(props)
- xnumfmtlb.executeAction("SELECT", actionProps)
+ select_by_text(xnumfmtlb, "A, B, C, ...")
xstartat.executeAction("UP", tuple())
- props2 = {"TEXT": "Bullets"}
- actionProps2 = mkPropertyValues(props2)
- xcharstyle.executeAction("SELECT", actionProps2)
+ select_by_text(xcharstyle, "Bullets")
xprefix.executeAction("TYPE", mkPropertyValues({"TEXT":"o"}))
xsuffix.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
xsuffix.executeAction("TYPE", mkPropertyValues({"TEXT":"a"}))
diff --git a/sw/qa/uitest/writer_tests2/formatCharacter.py b/sw/qa/uitest/writer_tests2/formatCharacter.py
index e1da1d2cb73b..c0106ddcd47e 100644
--- a/sw/qa/uitest/writer_tests2/formatCharacter.py
+++ b/sw/qa/uitest/writer_tests2/formatCharacter.py
@@ -5,13 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.debug import sleep
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
class formatCharacter(UITestCase):
@@ -142,13 +140,9 @@ class formatCharacter(UITestCase):
xName.executeAction("TYPE", mkPropertyValues({"TEXT":"hyperlink"}))
xVisited = xDialog.getChild("visitedlb")
- props = {"TEXT": "Bullets"}
- actionProps = mkPropertyValues(props)
- xVisited.executeAction("SELECT", actionProps)
+ select_by_text(xVisited, "Bullets")
xUnVisited = xDialog.getChild("unvisitedlb")
- props = {"TEXT": "Bullets"}
- actionProps = mkPropertyValues(props)
- xUnVisited.executeAction("SELECT", actionProps)
+ select_by_text(xUnVisited, "Bullets")
xOK = xDialog.getChild("ok")
self.ui_test.close_dialog_through_button(xOK)
diff --git a/sw/qa/uitest/writer_tests2/formatParagraph.py b/sw/qa/uitest/writer_tests2/formatParagraph.py
index 7d2120f10320..00cce192cb0b 100644
--- a/sw/qa/uitest/writer_tests2/formatParagraph.py
+++ b/sw/qa/uitest/writer_tests2/formatParagraph.py
@@ -5,13 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.debug import sleep
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
from uitest.uihelper.common import change_measurement_unit
class formatParagraph(UITestCase):
@@ -43,9 +41,7 @@ class formatParagraph(UITestCase):
xAbovePar.executeAction("UP", tuple())
xBelowPar.executeAction("UP", tuple())
xChkspace.executeAction("CLICK", tuple())
- props = {"TEXT": "Double"}
- actionProps = mkPropertyValues(props)
- xLineSpacing.executeAction("SELECT", actionProps)
+ select_by_text(xLineSpacing, "Double")
xActivate.executeAction("CLICK", tuple())
xOK = xDialog.getChild("ok")
@@ -97,17 +93,11 @@ class formatParagraph(UITestCase):
xLastLine = xDialog.getChild("comboLB_LASTLINE")
xExpandChk = xDialog.getChild("checkCB_EXPAND")
- props = {"TEXT": "Left-to-right (LTR)"}
- actionProps = mkPropertyValues(props)
- xTextDirection.executeAction("SELECT", actionProps)
- props2 = {"TEXT": "Top"}
- actionProps2 = mkPropertyValues(props2)
- xAlignment.executeAction("SELECT", actionProps2)
+ select_by_text(xTextDirection, "Left-to-right (LTR)")
+ select_by_text(xAlignment, "Top")
xSnapToText.executeAction("CLICK", tuple())
xJustified.executeAction("CLICK", tuple())
- props3 = {"TEXT": "Justified"}
- actionProps3 = mkPropertyValues(props3)
- xLastLine.executeAction("SELECT", actionProps3)
+ select_by_text(xLastLine, "Justified")
xExpandChk.executeAction("CLICK", tuple())
xOK = xDialog.getChild("ok")
@@ -166,12 +156,8 @@ class formatParagraph(UITestCase):
xBegin.executeAction("UP", tuple())
xMax.executeAction("UP", tuple())
xIns.executeAction("CLICK", tuple())
- props = {"TEXT": "Column"}
- actionProps = mkPropertyValues(props)
- xType.executeAction("SELECT", actionProps)
- props2 = {"TEXT": "After"}
- actionProps2 = mkPropertyValues(props2)
- xPosition.executeAction("SELECT", actionProps2)
+ select_by_text(xType, "Column")
+ select_by_text(xPosition, "After")
xspinOrphan.executeAction("UP", tuple())
xspinWidow.executeAction("UP", tuple())
xcheckWidow.executeAction("CLICK", tuple())
@@ -274,12 +260,8 @@ class formatParagraph(UITestCase):
xPara = xDialog.getChild("checkCB_RESTART_PARACOUNT")
xParaSpin = xDialog.getChild("spinNF_RESTART_PARA")
- props = {"TEXT": "Level 1"}
- actionProps = mkPropertyValues(props)
- xOutline.executeAction("SELECT", actionProps)
- props2 = {"TEXT": "Bullet •"}
- actionProps2 = mkPropertyValues(props2)
- xNumbering.executeAction("SELECT", actionProps2)
+ select_by_text(xOutline, "Level 1")
+ select_by_text(xNumbering, "Bullet •")
xPara.executeAction("CLICK", tuple())
xParaSpin.executeAction("UP", tuple())
@@ -467,9 +449,7 @@ class formatParagraph(UITestCase):
xLines.executeAction("UP", tuple())
xSpaceToText.executeAction("UP", tuple())
xText.executeAction("TYPE", mkPropertyValues({"TEXT":"A"}))
- props = {"TEXT": "Definition"}
- actionProps = mkPropertyValues(props)
- xCharStyle.executeAction("SELECT", actionProps)
+ select_by_text(xCharStyle, "Definition")
xOK = xDialog.getChild("ok")
xOK.executeAction("CLICK", tuple())
@@ -516,7 +496,6 @@ class formatParagraph(UITestCase):
xBottom = xDialog.getChild("bottommf")
xMerge = xDialog.getChild("mergewithnext")
- select_pos(xStyle, "1")
xwidth.executeAction("UP", tuple())
xSync.executeAction("CLICK", tuple())
xLeft.executeAction("UP", tuple())
@@ -625,9 +604,7 @@ class formatParagraph(UITestCase):
xEnd = xDialog.getChild("MTR_TRGR_END_VALUE")
xGradient.executeAction("CLICK", tuple())
- props = {"TEXT": "Axial"}
- actionProps = mkPropertyValues(props)
- xType.executeAction("SELECT", actionProps)
+ select_by_text(xType, "Axial")
xAngle.executeAction("UP", tuple())
xBorder.executeAction("UP", tuple())
xStart.executeAction("UP", tuple())
diff --git a/sw/qa/uitest/writer_tests2/horizontalLine.py b/sw/qa/uitest/writer_tests2/horizontalLine.py
index c102f603157d..f004badfc6ec 100644
--- a/sw/qa/uitest/writer_tests2/horizontalLine.py
+++ b/sw/qa/uitest/writer_tests2/horizontalLine.py
@@ -6,9 +6,7 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict, type_text
-from uitest.debug import sleep
class WriterInsertHorizontalLine(UITestCase):
diff --git a/sw/qa/uitest/writer_tests2/insertFootnote.py b/sw/qa/uitest/writer_tests2/insertFootnote.py
index 6bd4db73f0bc..e391f6520477 100644
--- a/sw/qa/uitest/writer_tests2/insertFootnote.py
+++ b/sw/qa/uitest/writer_tests2/insertFootnote.py
@@ -5,10 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
+from uitest.uihelper.common import type_text
class insertFootnote(UITestCase):
diff --git a/sw/qa/uitest/writer_tests2/tdf116474.py b/sw/qa/uitest/writer_tests2/tdf116474.py
index 9dbdd447171a..e6436b73fd73 100644
--- a/sw/qa/uitest/writer_tests2/tdf116474.py
+++ b/sw/qa/uitest/writer_tests2/tdf116474.py
@@ -4,8 +4,7 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import get_url_for_data_file
#Bug 116474 - Undo/redo: The redo of adding caption to an image isn't working: no image
diff --git a/sw/qa/uitest/writer_tests3/autoredactDialog.py b/sw/qa/uitest/writer_tests3/autoredactDialog.py
index 015081431d7a..240e4bd8bce5 100644
--- a/sw/qa/uitest/writer_tests3/autoredactDialog.py
+++ b/sw/qa/uitest/writer_tests3/autoredactDialog.py
@@ -5,14 +5,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import type_text
from uitest.uihelper.common import select_pos
-from uitest.uihelper.common import select_text
-import time
import re
-from uitest.debug import sleep
class AutoRedactDialog(UITestCase):
diff --git a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
index 235f1468ab0f..ff1a30931b5a 100644
--- a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
+++ b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py
@@ -8,10 +8,10 @@
#
from uitest.framework import UITestCase
-import time
-from uitest.uihelper.common import get_state_as_dict, type_text
+import os
+import re
+from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
#test Hyperlink dialog
class HyperlinkDialog(UITestCase):
@@ -80,4 +80,33 @@ class HyperlinkDialog(UITestCase):
self.ui_test.close_doc()
+ def test_tdf141166(self):
+ # Skip this test for --with-help=html and --with-help=online, as that would fail with a
+ # DialogNotExecutedException("did not execute a dialog for a blocking action") thrown from
+ # the below execute_blocking_action call (and would leave behind the relevant HTML page
+ # opened in the user's default browser):
+ if os.getenv('ENABLE_HTMLHELP') == 'TRUE':
+ return
+ # Skip this test for --with-help, as that would fail with a
+ # "uno.com.sun.star.uno.RuntimeException: Could not find child with id: cancel" thrown from
+ # the below execute_blocking_action call, as it would open the "LibreOffice Help" window
+ # instead of the apparently expected "LibreOffice Help Not Installed" dialog that has a
+ # "Cancel" button:
+ if re.compile(r'-DWITH_HELP\b').search(os.getenv('SCPDEFS')):
+ return
+
+ self.ui_test.create_doc_in_start_center("writer")
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ self.ui_test.execute_dialog_through_command(".uno:HyperlinkDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xHelp = xDialog.getChild("help")
+ xHelp.executeAction('FOCUS', tuple())
+
+ # Without the fix in place, this test would have crashed here
+ self.ui_test.execute_blocking_action(xHelp.executeAction,
+ args=("CLICK", tuple()), dialog_element="cancel")
+
+ self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests3/insertEndnote.py b/sw/qa/uitest/writer_tests3/insertEndnote.py
index 705fce6cef54..54dd15e346b5 100644
--- a/sw/qa/uitest/writer_tests3/insertEndnote.py
+++ b/sw/qa/uitest/writer_tests3/insertEndnote.py
@@ -5,10 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
+from uitest.uihelper.common import type_text
class insertEndnote(UITestCase):
diff --git a/sw/qa/uitest/writer_tests3/insertEnvelope.py b/sw/qa/uitest/writer_tests3/insertEnvelope.py
index 2d6e3ffefbe2..0b5a8cfe99fb 100644
--- a/sw/qa/uitest/writer_tests3/insertEnvelope.py
+++ b/sw/qa/uitest/writer_tests3/insertEnvelope.py
@@ -7,7 +7,7 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
#envaddresspage.ui
diff --git a/sw/qa/uitest/writer_tests3/insertFootEndnote.py b/sw/qa/uitest/writer_tests3/insertFootEndnote.py
index be8597411a2d..575abc9ab477 100644
--- a/sw/qa/uitest/writer_tests3/insertFootEndnote.py
+++ b/sw/qa/uitest/writer_tests3/insertFootEndnote.py
@@ -6,10 +6,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-
-import time
-from uitest.debug import sleep
class insertFootEndnote(UITestCase):
diff --git a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
index 3124022e0f01..26bb21b89159 100644
--- a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
+++ b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py
@@ -5,8 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import type_text
from com.sun.star.lang import IndexOutOfBoundsException
class insertQrCode(UITestCase):
@@ -35,7 +34,7 @@ class insertQrCode(UITestCase):
# Get elements in the Dialog Box
xURL = xDialog.getChild("edit_text")
xECC_Low = xDialog.getChild("button_low") #How radio button input is written in text.
- xBorder = xDialog.getChild("edit_border")
+ xBorder = xDialog.getChild("edit_margin")
type_text(xURL, "www.libreoffice.org") #set the QR code
xECC_Low.executeAction("CLICK", tuple())
@@ -61,7 +60,7 @@ class insertQrCode(UITestCase):
xURL = xDialog.getChild("edit_text")
xECC_Low = xDialog.getChild("button_low")
- xBorder = xDialog.getChild("edit_border")
+ xBorder = xDialog.getChild("edit_margin")
type_text(xURL, "www.libreoffice.org") #set the QR code
xECC_Low.executeAction("CLICK", tuple())
diff --git a/sw/qa/uitest/writer_tests3/insertSignatureLine.py b/sw/qa/uitest/writer_tests3/insertSignatureLine.py
index eb75b6cc89b2..ecfc1c61a1d2 100644
--- a/sw/qa/uitest/writer_tests3/insertSignatureLine.py
+++ b/sw/qa/uitest/writer_tests3/insertSignatureLine.py
@@ -6,8 +6,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-from libreoffice.uno.propertyvalue import mkPropertyValues
from com.sun.star.lang import IndexOutOfBoundsException
class insertSignatureLine(UITestCase):
diff --git a/sw/qa/uitest/writer_tests3/lineNumbering.py b/sw/qa/uitest/writer_tests3/lineNumbering.py
index ad1db1ce0921..ec51b4132f80 100644
--- a/sw/qa/uitest/writer_tests3/lineNumbering.py
+++ b/sw/qa/uitest/writer_tests3/lineNumbering.py
@@ -7,8 +7,8 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import select_by_text
+from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import change_measurement_unit
class WriterLineNumbering(UITestCase):
@@ -35,15 +35,9 @@ class WriterLineNumbering(UITestCase):
xrestarteverynewpage = xDialog.getChild("restarteverynewpage")
xshownumbering.executeAction("CLICK", tuple())
- props = {"TEXT": "Bullets"}
- actionProps = mkPropertyValues(props)
- xstyledropdown.executeAction("SELECT", actionProps)
- props2 = {"TEXT": "A, B, C, ..."}
- actionProps2 = mkPropertyValues(props2)
- xformatdropdown.executeAction("SELECT", actionProps2)
- props3 = {"TEXT": "Right"}
- actionProps3 = mkPropertyValues(props3)
- xpositiondropdown.executeAction("SELECT", actionProps3)
+ select_by_text(xstyledropdown, "Bullets")
+ select_by_text(xformatdropdown, "A, B, C, ...")
+ select_by_text(xpositiondropdown, "Right")
xspacingspin.executeAction("UP", tuple())
xintervalspin.executeAction("UP", tuple())
xtextentry.executeAction("TYPE", mkPropertyValues({"TEXT":";"}))
@@ -98,9 +92,7 @@ class WriterLineNumbering(UITestCase):
xshownumbering.executeAction("CLICK", tuple())
itemFormat = ["1, 2, 3, ...", "A, B, C, ...", "a, b, c, ...", "I, II, III, ...", "i, ii, iii, ...", "A, .., AA, .., AAA, ..."]
for i in range(6):
- props2 = {"TEXT": itemFormat[i]}
- actionProps2 = mkPropertyValues(props2)
- xformatdropdown.executeAction("SELECT", actionProps2)
+ select_by_text(xformatdropdown, itemFormat[i])
self.assertEqual(get_state_as_dict(xformatdropdown)["SelectEntryText"], itemFormat[i])
xCancelBtn = xDialog.getChild("cancel")
self.ui_test.close_dialog_through_button(xCancelBtn)
diff --git a/sw/qa/uitest/writer_tests3/pageDialog.py b/sw/qa/uitest/writer_tests3/pageDialog.py
index 73e523444c6e..942aa6d2e96f 100644
--- a/sw/qa/uitest/writer_tests3/pageDialog.py
+++ b/sw/qa/uitest/writer_tests3/pageDialog.py
@@ -6,13 +6,11 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos, get_state_as_dict
-from com.sun.star.uno import RuntimeException
from com.sun.star.awt.GradientStyle import LINEAR
from com.sun.star.drawing.HatchStyle import SINGLE
from com.sun.star.drawing.BitmapMode import REPEAT
from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE
-from libreoffice.uno.propertyvalue import mkPropertyValues
class WriterPageDialog(UITestCase):
diff --git a/sw/qa/uitest/writer_tests3/sort.py b/sw/qa/uitest/writer_tests3/sort.py
index 6ae06c5ecef2..2868c9f8a49e 100644
--- a/sw/qa/uitest/writer_tests3/sort.py
+++ b/sw/qa/uitest/writer_tests3/sort.py
@@ -6,10 +6,8 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
-#Tools -Sort dialog + tdf81292
+from uitest.uihelper.common import select_by_text
+from uitest.uihelper.common import type_text
class WriterSort(UITestCase):
@@ -58,9 +56,7 @@ class WriterSort(UITestCase):
xcharacter = xDialog.getChild("character")
xseparator = xDialog.getChild("separator")
xDown.executeAction("CLICK", tuple())
- props = {"TEXT": "Numerical"}
- actionProps = mkPropertyValues(props)
- xtypelb1.executeAction("SELECT", actionProps)
+ select_by_text(xtypelb1, "Numerical")
xcharacter.executeAction("CLICK", tuple())
xseparator.executeAction("TYPE", mkPropertyValues({"TEXT":";"}))
xOK = xDialog.getChild("ok")
@@ -69,4 +65,4 @@ class WriterSort(UITestCase):
self.assertEqual(document.Text.String[0:5], "2;8;3")
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests3/specialCharacter.py b/sw/qa/uitest/writer_tests3/specialCharacter.py
index 0589d44fb3d1..20955856ba88 100644
--- a/sw/qa/uitest/writer_tests3/specialCharacter.py
+++ b/sw/qa/uitest/writer_tests3/specialCharacter.py
@@ -7,32 +7,30 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-import time
-from uitest.uihelper.common import get_state_as_dict, type_text
-from uitest.debug import sleep
+from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
-#specialcharacters.ui
+
+# specialcharacters.ui
class specialCharacter(UITestCase):
def test_special_character(self):
-
self.ui_test.create_doc_in_start_center("writer")
xWriterDoc = self.xUITest.getTopFocusWindow()
document = self.ui_test.get_component()
- self.ui_test.execute_dialog_through_command(".uno:InsertSymbol") #specialCharacter dialog
+ self.ui_test.execute_dialog_through_command(".uno:InsertSymbol") # specialCharacter dialog
xDialog = self.xUITest.getTopFocusWindow()
- xCharSet = xDialog.getChild("showcharset") #default charset
+ xCharSet = xDialog.getChild("showcharset") # default charset
- xCharSet.executeAction("SELECT", mkPropertyValues({"COLUMN": "1", "ROW": "4"})) #digit 4 selected
+ xCharSet.executeAction("SELECT", mkPropertyValues({"COLUMN": "1", "ROW": "4"})) # digit 4 selected
xHexText = xDialog.getChild("hexvalue")
xDecText = xDialog.getChild("decimalvalue")
- self.assertEqual(get_state_as_dict(xHexText)["Text"], "34") # check the values Hex and decimal
+ self.assertEqual(get_state_as_dict(xHexText)["Text"], "34") # check the values Hex and decimal
self.assertEqual(get_state_as_dict(xDecText)["Text"], "52")
xCancelBtn = xDialog.getChild("cancel")
@@ -42,48 +40,48 @@ class specialCharacter(UITestCase):
xDialog = self.xUITest.getTopFocusWindow()
xComboFont = xDialog.getChild("fontlb")
- select_pos(xComboFont, "0") #select font
+ select_pos(xComboFont, "0") # select font
xComboFont2 = xDialog.getChild("subsetlb")
- select_pos(xComboFont2, "0") #select font subset
-
- xSearchText = xDialog.getChild("search") #test search textBox
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"d"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"i"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"g"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"i"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"t"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":" "}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"f"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"o"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"u"}))
- xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT":"r"}))
-
-# works locally and linux_gcc_release_64, but fails at linux_clang_dbgutil_64.
-#Markus: Actually after a round of debugging I think the problem is actually that the test depends on the used font.
-#Therefore, if the font is not available or not selected by default the test fails.
-# xCharSet = xDialog.getChild("searchcharset") #another charset -> search charset
-# xCharSet.executeAction("SELECT", mkPropertyValues({"COLUMN": "0", "ROW": "0"})) #digit 4 selected, we have only one result;
-# sleep(1) #try sleep here
-# xCharSet.executeAction("SELECT", mkPropertyValues({"COLUMN": "0", "ROW": "0"})) #try it twice, because it works at local,but fail on gerrit
-##gerrit:self.assertEqual(get_state_as_dict(xHexText)["Text"], "34") # check the values for digit 4; AssertionError: '1' != '34'
-
-# xHexText = xDialog.getChild("hexvalue")
-# xDecText = xDialog.getChild("decimalvalue")
-# self.assertEqual(get_state_as_dict(xHexText)["Text"], "34") # check the values for digit 4
-# self.assertEqual(get_state_as_dict(xDecText)["Text"], "52")
-
-# xAddFavBtn = xDialog.getChild("favbtn")
-# xAddFavBtn.executeAction("CLICK", tuple()) # Add to favorites button
-
-# xInsrBtn = xDialog.getChild("insert")
-# xInsrBtn.executeAction("CLICK", tuple()) # Insert to document
-
-# self.assertEqual(document.Text.String[0:1], "4") # check inserted character
-
-# self.xUITest.executeCommand(".uno:Undo")
-# self.xUITest.executeCommand(".uno:Redo") #undo, redo
-
-# self.assertEqual(document.Text.String[0:1], "4") # check inserted character after undo, redo
+ select_pos(xComboFont2, "0") # select font subset
+
+ xSearchText = xDialog.getChild("search") # test search textBox
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "d"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "i"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "g"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "i"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "t"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": " "}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "f"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "o"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "u"}))
+ xSearchText.executeAction("TYPE", mkPropertyValues({"TEXT": "r"}))
+
+ # works locally and linux_gcc_release_64, but fails at linux_clang_dbgutil_64.
+ # Markus: Actually after a round of debugging I think the problem is actually that the test depends on the used font.
+ # Therefore, if the font is not available or not selected by default the test fails.
+ # xCharSet = xDialog.getChild("searchcharset") #another charset -> search charset
+ # xCharSet.executeAction("SELECT", mkPropertyValues({"COLUMN": "0", "ROW": "0"})) #digit 4 selected, we have only one result;
+ # sleep(1) #try sleep here
+ # xCharSet.executeAction("SELECT", mkPropertyValues({"COLUMN": "0", "ROW": "0"})) #try it twice, because it works at local,but fail on gerrit
+ ##gerrit:self.assertEqual(get_state_as_dict(xHexText)["Text"], "34") # check the values for digit 4; AssertionError: '1' != '34'
+
+ # xHexText = xDialog.getChild("hexvalue")
+ # xDecText = xDialog.getChild("decimalvalue")
+ # self.assertEqual(get_state_as_dict(xHexText)["Text"], "34") # check the values for digit 4
+ # self.assertEqual(get_state_as_dict(xDecText)["Text"], "52")
+
+ # xAddFavBtn = xDialog.getChild("favbtn")
+ # xAddFavBtn.executeAction("CLICK", tuple()) # Add to favorites button
+
+ # xInsrBtn = xDialog.getChild("insert")
+ # xInsrBtn.executeAction("CLICK", tuple()) # Insert to document
+
+ # self.assertEqual(document.Text.String[0:1], "4") # check inserted character
+
+ # self.xUITest.executeCommand(".uno:Undo")
+ # self.xUITest.executeCommand(".uno:Redo") #undo, redo
+
+ # self.assertEqual(document.Text.String[0:1], "4") # check inserted character after undo, redo
xCancelBtn = xDialog.getChild("cancel")
self.ui_test.close_dialog_through_button(xCancelBtn)
diff --git a/sw/qa/uitest/writer_tests3/tdf79236.py b/sw/qa/uitest/writer_tests3/tdf79236.py
index 8585e48d8c64..bd3862b5e27a 100644
--- a/sw/qa/uitest/writer_tests3/tdf79236.py
+++ b/sw/qa/uitest/writer_tests3/tdf79236.py
@@ -5,8 +5,7 @@
#
from uitest.framework import UITestCase
-import time
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import type_text
class tdf79236(UITestCase):
diff --git a/sw/qa/uitest/writer_tests4/start.py b/sw/qa/uitest/writer_tests4/start.py
index 8be8322f519f..1ee80f604013 100644
--- a/sw/qa/uitest/writer_tests4/start.py
+++ b/sw/qa/uitest/writer_tests4/start.py
@@ -8,7 +8,7 @@
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
class SimpleWriterTest(UITestCase):
diff --git a/sw/qa/uitest/writer_tests4/tdf113252.py b/sw/qa/uitest/writer_tests4/tdf113252.py
index a0b285354e3e..b8f49444ba6b 100644
--- a/sw/qa/uitest/writer_tests4/tdf113252.py
+++ b/sw/qa/uitest/writer_tests4/tdf113252.py
@@ -5,10 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
+from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
#Bug 113252 - Basic Library Organizer is broken and closing dialogs crashes
@@ -46,4 +43,4 @@ class tdf113252(UITestCase):
self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests4/tdf115088.py b/sw/qa/uitest/writer_tests4/tdf115088.py
index f10fe7490448..02a8618f4283 100644
--- a/sw/qa/uitest/writer_tests4/tdf115088.py
+++ b/sw/qa/uitest/writer_tests4/tdf115088.py
@@ -6,9 +6,7 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
+from uitest.uihelper.common import type_text
class tdf115088(UITestCase):
diff --git a/sw/qa/uitest/writer_tests4/tdf115572.py b/sw/qa/uitest/writer_tests4/tdf115572.py
index 890d4b393852..511da669ccc9 100644
--- a/sw/qa/uitest/writer_tests4/tdf115572.py
+++ b/sw/qa/uitest/writer_tests4/tdf115572.py
@@ -5,10 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
+from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
class tdf115572(UITestCase):
diff --git a/sw/qa/uitest/writer_tests4/tdf115573.py b/sw/qa/uitest/writer_tests4/tdf115573.py
index bfcb872a8b83..af22c155b21e 100644
--- a/sw/qa/uitest/writer_tests4/tdf115573.py
+++ b/sw/qa/uitest/writer_tests4/tdf115573.py
@@ -5,10 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
+from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
class tdf115573(UITestCase):
diff --git a/sw/qa/uitest/writer_tests4/tdf122449.py b/sw/qa/uitest/writer_tests4/tdf122449.py
index 76072dd057ab..1fc69909a978 100644
--- a/sw/qa/uitest/writer_tests4/tdf122449.py
+++ b/sw/qa/uitest/writer_tests4/tdf122449.py
@@ -7,7 +7,7 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
#Bug 122449 - Crash in: mergedlo.dll when closing "Edit Index Entry" dialog (gen/gtk)
diff --git a/sw/qa/uitest/writer_tests4/tdf134439.py b/sw/qa/uitest/writer_tests4/tdf134439.py
index c10b28b448b7..07f4db79c934 100644
--- a/sw/qa/uitest/writer_tests4/tdf134439.py
+++ b/sw/qa/uitest/writer_tests4/tdf134439.py
@@ -6,6 +6,7 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
class tdf134439(UITestCase):
@@ -32,7 +33,7 @@ class tdf134439(UITestCase):
xPageStyle = xDialog.getChild("comboPageStyle")
self.assertEqual("Chap 2", get_state_as_dict(xPageStyle)["SelectEntryText"])
- xPageStyle.executeAction("SELECT", mkPropertyValues({"TEXT": "Chap 3"}))
+ select_by_text(xPageStyle, "Chap 3")
self.assertEqual("Chap 3", get_state_as_dict(xPageStyle)["SelectEntryText"])
diff --git a/sw/qa/uitest/writer_tests4/tdf136578.py b/sw/qa/uitest/writer_tests4/tdf136578.py
index b30005430deb..3de6e019ec41 100644
--- a/sw/qa/uitest/writer_tests4/tdf136578.py
+++ b/sw/qa/uitest/writer_tests4/tdf136578.py
@@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import get_url_for_data_file
class tdf136578(UITestCase):
diff --git a/sw/qa/uitest/writer_tests4/tdf138546.py b/sw/qa/uitest/writer_tests4/tdf138546.py
index c94f7eed3d48..b57c5748baf9 100644
--- a/sw/qa/uitest/writer_tests4/tdf138546.py
+++ b/sw/qa/uitest/writer_tests4/tdf138546.py
@@ -6,12 +6,10 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import change_measurement_unit
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
-import org.libreoffice.unotest
-import pathlib
-def get_url_for_data_file(file_name):
- return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+from uitest.uihelper.common import get_url_for_data_file
+
class tdf138546(UITestCase):
def test_tdf138546(self):
self.ui_test.load_file(get_url_for_data_file("tdf138546.odt"))
diff --git a/sw/qa/uitest/writer_tests4/tdf51352.py b/sw/qa/uitest/writer_tests4/tdf51352.py
index d65800854208..fdc5c66b7e85 100644
--- a/sw/qa/uitest/writer_tests4/tdf51352.py
+++ b/sw/qa/uitest/writer_tests4/tdf51352.py
@@ -7,7 +7,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
class tdf51352(UITestCase):
diff --git a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
index 4e87563f9c82..0d110d315a21 100644
--- a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
+++ b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
@@ -6,7 +6,6 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
class dateFormFieldDialog(UITestCase):
diff --git a/sw/qa/uitest/writer_tests5/autocorrectOptions.py b/sw/qa/uitest/writer_tests5/autocorrectOptions.py
index f9d5d5b9117b..645a334187eb 100644
--- a/sw/qa/uitest/writer_tests5/autocorrectOptions.py
+++ b/sw/qa/uitest/writer_tests5/autocorrectOptions.py
@@ -7,8 +7,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
-import time
-from uitest.debug import sleep
from uitest.uihelper.common import select_pos
class autocorrectOptions(UITestCase):
diff --git a/sw/qa/uitest/writer_tests5/columns.py b/sw/qa/uitest/writer_tests5/columns.py
index 0e71c065d057..03ca73b083ad 100644
--- a/sw/qa/uitest/writer_tests5/columns.py
+++ b/sw/qa/uitest/writer_tests5/columns.py
@@ -6,11 +6,7 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import select_pos
from uitest.uihelper.common import change_measurement_unit
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from uitest.debug import sleep
from libreoffice.uno.propertyvalue import mkPropertyValues
#uitest sw / Columns dialog
diff --git a/sw/qa/uitest/writer_tests5/tdf107494.py b/sw/qa/uitest/writer_tests5/tdf107494.py
index f7eadf68a4c3..0657f33f0635 100644
--- a/sw/qa/uitest/writer_tests5/tdf107494.py
+++ b/sw/qa/uitest/writer_tests5/tdf107494.py
@@ -5,10 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
+from uitest.uihelper.common import get_url_for_data_file
from libreoffice.uno.propertyvalue import mkPropertyValues
#Bug 107494 - CRASH: LibreOffice crashes while deleting the header containing an image
diff --git a/sw/qa/uitest/writer_tests5/tdf117039.py b/sw/qa/uitest/writer_tests5/tdf117039.py
index 0ec90810a7b3..b640ab65266a 100644
--- a/sw/qa/uitest/writer_tests5/tdf117039.py
+++ b/sw/qa/uitest/writer_tests5/tdf117039.py
@@ -8,8 +8,7 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import get_url_for_data_file
#Bug 117039 - Print Preview crashes on signed document
diff --git a/sw/qa/uitest/writer_tests5/tdf118540.py b/sw/qa/uitest/writer_tests5/tdf118540.py
index 6bf46a14396a..2959f2491b64 100644
--- a/sw/qa/uitest/writer_tests5/tdf118540.py
+++ b/sw/qa/uitest/writer_tests5/tdf118540.py
@@ -8,8 +8,7 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import get_url_for_data_file
#Bug 118540 - LO6.1b2: DOCX crashes when properties are opened in print preview mode
diff --git a/sw/qa/uitest/writer_tests5/tdf122045.py b/sw/qa/uitest/writer_tests5/tdf122045.py
index 80d11384ac8f..c40469a70de8 100644
--- a/sw/qa/uitest/writer_tests5/tdf122045.py
+++ b/sw/qa/uitest/writer_tests5/tdf122045.py
@@ -6,7 +6,6 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import select_pos
class tdf122045(UITestCase):
diff --git a/sw/qa/uitest/writer_tests5/tdf122722.py b/sw/qa/uitest/writer_tests5/tdf122722.py
index cbc46e09c17b..4e91519a37af 100644
--- a/sw/qa/uitest/writer_tests5/tdf122722.py
+++ b/sw/qa/uitest/writer_tests5/tdf122722.py
@@ -5,11 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import select_pos
#Bug 122722 - Hiding characters will crash. Crash in: SwAttrIter::CtorInitAttrIter(SwTextNode &,SwScriptInfo &,SwTextFrame const *)
diff --git a/sw/qa/uitest/writer_tests5/tdf123378.py b/sw/qa/uitest/writer_tests5/tdf123378.py
index 6c78e0ecf699..d7b832e25c8c 100644
--- a/sw/qa/uitest/writer_tests5/tdf123378.py
+++ b/sw/qa/uitest/writer_tests5/tdf123378.py
@@ -10,6 +10,8 @@ from uitest.framework import UITestCase
class tdf123378(UITestCase):
def test_tdf123378_print_sets_modified(self):
+ # FIXME unstable test
+ return
self.ui_test.create_doc_in_start_center("writer")
document = self.ui_test.get_component()
xWriterDoc = self.xUITest.getTopFocusWindow()
diff --git a/sw/qa/uitest/writer_tests5/tdf123446.py b/sw/qa/uitest/writer_tests5/tdf123446.py
index dd39dd9f5c64..5a48578fa593 100644
--- a/sw/qa/uitest/writer_tests5/tdf123446.py
+++ b/sw/qa/uitest/writer_tests5/tdf123446.py
@@ -5,10 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-import time
-from uitest.debug import sleep
+from uitest.uihelper.common import type_text
#Bug 123446 - Writer crashes after undoing + redoing ToC insertion in middle of word
class tdf123446(UITestCase):
diff --git a/sw/qa/uitest/writer_tests5/titlePage.py b/sw/qa/uitest/writer_tests5/titlePage.py
index 644406932c53..f048bc6ea006 100644
--- a/sw/qa/uitest/writer_tests5/titlePage.py
+++ b/sw/qa/uitest/writer_tests5/titlePage.py
@@ -5,11 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
#uitest sw / Title Page dialog
class titlePage(UITestCase):
diff --git a/sw/qa/uitest/writer_tests5/titlePageWizard.py b/sw/qa/uitest/writer_tests5/titlePageWizard.py
index f2c235e20fd5..bc5f275e8cfa 100644
--- a/sw/qa/uitest/writer_tests5/titlePageWizard.py
+++ b/sw/qa/uitest/writer_tests5/titlePageWizard.py
@@ -5,8 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
# This tests the Format->Title Page wizard, specifically the reset page number portion,
# replacing some pages with title pages,
diff --git a/sw/qa/uitest/writer_tests5/titlePageWizard2.py b/sw/qa/uitest/writer_tests5/titlePageWizard2.py
index 1359dcc8b16e..9c57a7fa5054 100644
--- a/sw/qa/uitest/writer_tests5/titlePageWizard2.py
+++ b/sw/qa/uitest/writer_tests5/titlePageWizard2.py
@@ -5,8 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
# This tests both an edge cases, and some more realistic situations.
class tdf138907(UITestCase):
diff --git a/sw/qa/uitest/writer_tests5/xwindow.py b/sw/qa/uitest/writer_tests5/xwindow.py
index 49628776bf76..cdacffcb70ae 100644
--- a/sw/qa/uitest/writer_tests5/xwindow.py
+++ b/sw/qa/uitest/writer_tests5/xwindow.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-import unittest
import unohelper
-from org.libreoffice.unotest import UnoInProcess
from com.sun.star.awt import XMouseListener
-from com.sun.star.awt import XToolkitRobot
from com.sun.star.awt import MouseButton
from com.sun.star.awt import MouseEvent
from com.sun.star.awt import KeyEvent
diff --git a/sw/qa/uitest/writer_tests5/zoom.py b/sw/qa/uitest/writer_tests5/zoom.py
index 3d9e224c1dd9..df92b35e929e 100644
--- a/sw/qa/uitest/writer_tests5/zoom.py
+++ b/sw/qa/uitest/writer_tests5/zoom.py
@@ -6,9 +6,6 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
#uitest sw / View-Zoom
diff --git a/sw/qa/uitest/writer_tests6/tdf107847.py b/sw/qa/uitest/writer_tests6/tdf107847.py
index d653ddb0adae..522fe99beba1 100644
--- a/sw/qa/uitest/writer_tests6/tdf107847.py
+++ b/sw/qa/uitest/writer_tests6/tdf107847.py
@@ -5,11 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
from uitest.uihelper.common import select_pos
-import time
-from uitest.debug import sleep
#Bug 107847 - CRASH Opening macro tab of properties dialog (images, frames) causes crash
class tdf107847(UITestCase):
diff --git a/sw/qa/uitest/writer_tests6/tdf120731.py b/sw/qa/uitest/writer_tests6/tdf120731.py
index b9d8f6afb9da..c7177922ad92 100644
--- a/sw/qa/uitest/writer_tests6/tdf120731.py
+++ b/sw/qa/uitest/writer_tests6/tdf120731.py
@@ -5,11 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file
#Bug 120731 - Crash cuilo!makeAutoCorrEdit when open character dialog with large amount of text selected
diff --git a/sw/qa/uitest/writer_tests6/tdf124586.py b/sw/qa/uitest/writer_tests6/tdf124586.py
index 8bb4f67e8888..612824ee740e 100644
--- a/sw/qa/uitest/writer_tests6/tdf124586.py
+++ b/sw/qa/uitest/writer_tests6/tdf124586.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import select_by_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
#Bug 124586 - Crash if switch from user outline numbering to chapter numbering with same paragraph style
@@ -23,9 +20,7 @@ class tdf124586(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:ChapterNumberingDialog")
xDialog = self.xUITest.getTopFocusWindow()
xstyle = xDialog.getChild("style")
- props = {"TEXT": "MyHeading"}
- actionProps = mkPropertyValues(props)
- xstyle.executeAction("SELECT", actionProps)
+ select_by_text(xstyle, "MyHeading")
xOK = xDialog.getChild("ok")
xOK.executeAction("CLICK", tuple())
diff --git a/sw/qa/uitest/writer_tests6/tdf124675.py b/sw/qa/uitest/writer_tests6/tdf124675.py
index f124a554dd08..15cc5c462041 100644
--- a/sw/qa/uitest/writer_tests6/tdf124675.py
+++ b/sw/qa/uitest/writer_tests6/tdf124675.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
#Bug 124675 - CRASH: after moving the content down and undoing
diff --git a/sw/qa/uitest/writer_tests6/tdf125104.py b/sw/qa/uitest/writer_tests6/tdf125104.py
index b711b01caefe..0fa36587b20e 100644
--- a/sw/qa/uitest/writer_tests6/tdf125104.py
+++ b/sw/qa/uitest/writer_tests6/tdf125104.py
@@ -6,6 +6,7 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos, get_state_as_dict
+from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
class tdf125104(UITestCase):
@@ -19,9 +20,7 @@ class tdf125104(UITestCase):
def set_combo_layout_format(self, dialog, format):
comboLayoutFormat = dialog.getChild("comboLayoutFormat")
- props = {"TEXT": format}
- actionProps = mkPropertyValues(props)
- comboLayoutFormat.executeAction("SELECT", actionProps)
+ select_by_text(comboLayoutFormat, format)
okBtn = dialog.getChild("ok")
self.ui_test.close_dialog_through_button(okBtn)
diff --git a/sw/qa/uitest/writer_tests6/tdf126017.py b/sw/qa/uitest/writer_tests6/tdf126017.py
index 3639e9ed1b18..d10a68517429 100644
--- a/sw/qa/uitest/writer_tests6/tdf126017.py
+++ b/sw/qa/uitest/writer_tests6/tdf126017.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_url_for_data_file
#Bug 126017 - Crash swlo!SwNode::EndOfSectionIndex
diff --git a/sw/qa/uitest/writer_tests6/tdf126168.py b/sw/qa/uitest/writer_tests6/tdf126168.py
index d25ae711e49d..db60e9edbea0 100644
--- a/sw/qa/uitest/writer_tests6/tdf126168.py
+++ b/sw/qa/uitest/writer_tests6/tdf126168.py
@@ -6,10 +6,6 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, type_text
-from uitest.uihelper.common import select_pos
-import time
-from uitest.debug import sleep
#Bug 126168 - Crash in: rtl_uString_acquire: frame style undo redo
class tdf126168(UITestCase):
diff --git a/sw/qa/uitest/writer_tests6/tdf126627.py b/sw/qa/uitest/writer_tests6/tdf126627.py
index 0fa84b347910..d72f3d91416b 100644
--- a/sw/qa/uitest/writer_tests6/tdf126627.py
+++ b/sw/qa/uitest/writer_tests6/tdf126627.py
@@ -5,11 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
#Bug 126627 - CRASH: undoing redlinehide deletion
diff --git a/sw/qa/uitest/writer_tests6/tdf128431.py b/sw/qa/uitest/writer_tests6/tdf128431.py
index 88b140235725..17d876bb9a4c 100644
--- a/sw/qa/uitest/writer_tests6/tdf128431.py
+++ b/sw/qa/uitest/writer_tests6/tdf128431.py
@@ -7,13 +7,6 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos, get_state_as_dict
from uitest.uihelper.common import change_measurement_unit
-from com.sun.star.uno import RuntimeException
-from com.sun.star.awt.GradientStyle import LINEAR
-from com.sun.star.drawing.HatchStyle import SINGLE
-from com.sun.star.drawing.BitmapMode import REPEAT
-from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE
-
-from libreoffice.uno.propertyvalue import mkPropertyValues
#Bug 128431 - Synchronize padding in header borders it is not working
class tdf128431(UITestCase):
diff --git a/sw/qa/uitest/writer_tests6/tdf44837.py b/sw/qa/uitest/writer_tests6/tdf44837.py
index 8354709da8ab..9373d6c89901 100644
--- a/sw/qa/uitest/writer_tests6/tdf44837.py
+++ b/sw/qa/uitest/writer_tests6/tdf44837.py
@@ -5,10 +5,8 @@
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import select_pos, get_state_as_dict, type_text
-from com.sun.star.uno import RuntimeException
+from uitest.uihelper.common import type_text
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.debug import sleep
#Bug 44837 - EDITING 'Replace All' clears current selection
class tdf44837(UITestCase):
diff --git a/sw/qa/uitest/writer_tests7/forms.py b/sw/qa/uitest/writer_tests7/forms.py
index d241fc38a876..b931c5d6f3fb 100644
--- a/sw/qa/uitest/writer_tests7/forms.py
+++ b/sw/qa/uitest/writer_tests7/forms.py
@@ -7,6 +7,7 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
from uitest.uihelper.common import change_measurement_unit
+from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
class Forms(UITestCase):
@@ -41,6 +42,27 @@ class Forms(UITestCase):
self.ui_test.close_doc()
+ def test_tdf141084(self):
+
+ # Reuse document from tdf#140239
+ self.ui_test.load_file(get_url_for_data_file("tdf140239.odt"))
+
+ self.xUITest.executeCommand(".uno:JumpToNextFrame")
+
+ self.ui_test.execute_modeless_dialog_through_command(".uno:FormProperties")
+ xURL = self.ui_test.wait_until_child_is_available('urlcontrol-URL')
+ xFrame = self.ui_test.wait_until_child_is_available('combobox-Frame')
+
+ xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "1"}))
+ xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "2"}))
+ xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "3"}))
+ xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "4"}))
+ xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "5"}))
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '12345' != 'file:///tmp/tmp/5file:///tmp/tmp/4file://[40 chars]mp/1'
+ self.assertEqual("12345", get_state_as_dict(xURL)['Text'])
+
def test_tdf140239(self):
self.ui_test.load_file(get_url_for_data_file("tdf140239.odt"))
@@ -55,7 +77,7 @@ class Forms(UITestCase):
self.assertEqual("None", get_state_as_dict(xAction)['SelectEntryText'])
self.assertEqual("false", get_state_as_dict(xURL)['Enabled'])
- xAction.executeAction("SELECT", mkPropertyValues({"TEXT": "Open document/web page"}))
+ select_by_text(xAction, "Open document/web page")
self.assertEqual("Open document/web page", get_state_as_dict(xAction)['SelectEntryText'])
self.assertEqual("true", get_state_as_dict(xURL)['Enabled'])
diff --git a/sw/qa/uitest/writer_tests7/tdf104795.py b/sw/qa/uitest/writer_tests7/tdf104795.py
index 650f0ca23136..1fcc20f5b013 100644
--- a/sw/qa/uitest/writer_tests7/tdf104795.py
+++ b/sw/qa/uitest/writer_tests7/tdf104795.py
@@ -8,7 +8,6 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
class tdf104795(UITestCase):
diff --git a/sw/qa/uitest/writer_tests7/tdf119661.py b/sw/qa/uitest/writer_tests7/tdf119661.py
new file mode 100644
index 000000000000..48f3bf951034
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf119661.py
@@ -0,0 +1,93 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from org.libreoffice.unotest import systemPathToFileUrl
+from tempfile import TemporaryDirectory
+import os.path
+
+class tdf119661(UITestCase):
+
+ def test_tdf119661(self):
+
+ self.ui_test.create_doc_in_start_center("writer")
+
+ self.ui_test.execute_dialog_through_command(".uno:InsertGraphic")
+
+ xOpenDialog = self.xUITest.getTopFocusWindow()
+
+ xFileName = xOpenDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": get_url_for_data_file("LibreOffice.jpg")}))
+
+ xLink = xOpenDialog.getChild("link")
+ self.assertEqual("false", get_state_as_dict(xLink)['Selected'])
+
+ xLink.executeAction("CLICK", tuple())
+
+ xOpenBtn = xOpenDialog.getChild("open")
+ xOpenBtn.executeAction("CLICK", tuple())
+
+ #Confirmation dialog is displayed
+ xWarnDialog = self.xUITest.getTopFocusWindow()
+ xOK = xWarnDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOK)
+
+ self.ui_test.execute_dialog_through_command(".uno:LinkDialog")
+
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ sLinks = "TB_LINKS"
+ xLinks = xDialog.getChild(sLinks)
+ self.assertEqual(1, len(xLinks.getChildren()))
+
+ sFileName = "FULL_FILE_NAME"
+ xFileName = xDialog.getChild(sFileName)
+ self.assertTrue(get_state_as_dict(xFileName)["Text"].endswith("/LibreOffice.jpg"))
+
+ sBreakLink = "BREAK_LINK"
+ xBreakLink = xDialog.getChild(sBreakLink)
+
+ self.ui_test.execute_blocking_action(xBreakLink.executeAction,
+ args=("CLICK", tuple()), dialog_element="yes")
+
+ xClose = xDialog.getChild("close")
+ self.ui_test.close_dialog_through_button(xClose)
+
+ with TemporaryDirectory() as tempdir:
+ xFilePath = os.path.join(tempdir, "tdf119661-tmp.odt")
+
+ # Save Copy as
+ self.ui_test.execute_dialog_through_command(".uno:SaveAs")
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ xFileName = xDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath}))
+
+ xOpenBtn = xDialog.getChild("open")
+ self.ui_test.close_dialog_through_button(xOpenBtn)
+
+ # Close the Writer document
+ self.ui_test.close_doc()
+
+ self.ui_test.load_file(systemPathToFileUrl(xFilePath))
+
+ self.xUITest.executeCommand(".uno:LinkDialog")
+
+ # Since the image is no longer linked, the link dialog is not open.
+ # Without the fix in place, this dialog would have been opened
+ xMainWin = self.xUITest.getTopFocusWindow()
+ self.assertTrue(sLinks not in xMainWin.getChildren())
+ self.assertTrue(sFileName not in xMainWin.getChildren())
+ self.assertTrue(sBreakLink not in xMainWin.getChildren())
+ self.assertTrue("writer_edit" in xMainWin.getChildren())
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf122780.py b/sw/qa/uitest/writer_tests7/tdf122780.py
index 0a18a4a85fae..09f881c5c781 100644
--- a/sw/qa/uitest/writer_tests7/tdf122780.py
+++ b/sw/qa/uitest/writer_tests7/tdf122780.py
@@ -8,7 +8,6 @@
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
class tdf122780(UITestCase):
diff --git a/sw/qa/uitest/writer_tests7/tdf131936.py b/sw/qa/uitest/writer_tests7/tdf131936.py
index 20a5e6b11517..db0c4ae3b47c 100644
--- a/sw/qa/uitest/writer_tests7/tdf131936.py
+++ b/sw/qa/uitest/writer_tests7/tdf131936.py
@@ -4,7 +4,6 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.config import DEFAULT_SLEEP
import time
diff --git a/sw/qa/uitest/writer_tests7/tdf132169.py b/sw/qa/uitest/writer_tests7/tdf132169.py
index 552c2f5cb409..7914fbf85e15 100644
--- a/sw/qa/uitest/writer_tests7/tdf132169.py
+++ b/sw/qa/uitest/writer_tests7/tdf132169.py
@@ -6,7 +6,6 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, type_text
-from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import change_measurement_unit
class tdf132169(UITestCase):
diff --git a/sw/qa/uitest/writer_tests7/tdf137802.py b/sw/qa/uitest/writer_tests7/tdf137802.py
index 3062d7009195..a4067410f41c 100644
--- a/sw/qa/uitest/writer_tests7/tdf137802.py
+++ b/sw/qa/uitest/writer_tests7/tdf137802.py
@@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import get_url_for_data_file
from libreoffice.uno.propertyvalue import mkPropertyValues
from com.sun.star.text.TextContentAnchorType import AT_PAGE, AT_PARAGRAPH
diff --git a/sw/qa/uitest/writer_tests7/tdf137803.py b/sw/qa/uitest/writer_tests7/tdf137803.py
index 2c3f0fcb3713..3e48c267ca55 100644
--- a/sw/qa/uitest/writer_tests7/tdf137803.py
+++ b/sw/qa/uitest/writer_tests7/tdf137803.py
@@ -5,15 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict
-import importlib
-import time
-import org.libreoffice.unotest
-import pathlib
-
-def get_url_for_data_file(file_name):
- return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+from uitest.uihelper.common import get_url_for_data_file
+
class tdf137803(UITestCase):
def test_tdf137803(self):
diff --git a/sw/qa/uitest/writer_tests7/tdf140117.py b/sw/qa/uitest/writer_tests7/tdf140117.py
index c86d11091364..c6244841241e 100644
--- a/sw/qa/uitest/writer_tests7/tdf140117.py
+++ b/sw/qa/uitest/writer_tests7/tdf140117.py
@@ -6,16 +6,9 @@
#
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
from uitest.uihelper.common import type_text
-import importlib
-import time
-import org.libreoffice.unotest
-import pathlib
-
-def get_url_for_data_file(file_name):
- return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+from uitest.uihelper.common import get_url_for_data_file
class tdf140117(UITestCase):
def test_tdf140117(self):
diff --git a/sw/qa/uitest/writer_tests7/tdf140863.py b/sw/qa/uitest/writer_tests7/tdf140863.py
new file mode 100644
index 000000000000..f0355e4684ed
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf140863.py
@@ -0,0 +1,75 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf140863(UITestCase):
+
+ def test_tdf140863(self):
+
+ self.ui_test.create_doc_in_start_center("writer")
+
+ # Insert one section
+ self.ui_test.execute_dialog_through_command(".uno:InsertSection")
+
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ # Insert a page break in the section
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+ self.xUITest.executeCommand(".uno:InsertPagebreak")
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+ document = self.ui_test.get_component()
+ self.assertEqual(1, len(document.TextSections))
+ self.assertTrue(document.TextSections.Section1.IsVisible)
+
+
+ self.ui_test.execute_dialog_through_command(".uno:EditRegion")
+
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ xHide = xDialog.getChild('hide')
+ self.assertEqual('false', get_state_as_dict(xHide)['Selected'])
+
+ xHide.executeAction('CLICK', tuple())
+
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+
+ self.assertEqual(1, len(document.TextSections))
+ self.assertFalse(document.TextSections.Section1.IsVisible)
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
+
+ self.ui_test.execute_dialog_through_command(".uno:EditRegion")
+
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ xHide = xDialog.getChild('hide')
+ self.assertEqual('true', get_state_as_dict(xHide)['Selected'])
+
+ xHide.executeAction('CLICK', tuple())
+
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+
+ self.assertEqual(1, len(document.TextSections))
+ self.assertTrue(document.TextSections.Section1.IsVisible)
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '1' != '2'
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf141158.py b/sw/qa/uitest/writer_tests7/tdf141158.py
new file mode 100644
index 000000000000..e29c36418958
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf141158.py
@@ -0,0 +1,41 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import get_url_for_data_file
+import time
+
+class TestTdf141158(UITestCase):
+ def test_tdf141158(self):
+ # load the desired bugdoc
+ self.ui_test.load_file(get_url_for_data_file("TestHiddenHeadersFooters.docx"))
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+ document = self.ui_test.get_component()
+ # open the page styles dialog and select the headers tab
+ self.xUITest.executeCommand(".uno:PageStyleName")
+ TemplateDialog8 = self.xUITest.getTopFocusWindow()
+ xTabs = TemplateDialog8.getChild("tabcontrol")
+ select_pos(xTabs, "4")
+ # make the same left right page header state to off and apply the setting
+ checkSameLR = TemplateDialog8.getChild("checkSameLR")
+ checkSameLR.executeAction("CLICK",tuple())
+ ok = TemplateDialog8.getChild("ok")
+ self.ui_test.close_dialog_through_button(ok)
+ time.sleep(1)
+ # go to the left header
+ xWriterEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
+ self.xUITest.executeCommand(".uno:JumpToHeader")
+ # get the text of the header
+ xPageSytle = document.getStyleFamilies().getByIndex(2)
+ xHeaderText = xPageSytle.getByIndex(0).HeaderText.String
+ xHeaderLeftText = xPageSytle.getByIndex(0).HeaderTextLeft.String
+ # without the fix in place it was "Right Header" (lost hidden left header),
+ # with the fix it should pass...
+ self.assertEqual("Left Header", xHeaderLeftText)
+ time.sleep(1)
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf46561.py b/sw/qa/uitest/writer_tests7/tdf46561.py
new file mode 100644
index 000000000000..1c90dc3c404a
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf46561.py
@@ -0,0 +1,100 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import type_text
+from uitest.uihelper.common import get_url_for_data_file
+
+class tdf46561(UITestCase):
+ def check_header_texts(self, master="", first="", left="", right=""):
+ # Get the current header style and its text contents
+ xPageStyle = self.document.getStyleFamilies().getByIndex(2)
+ xHeaderText = xPageStyle.getByIndex(0).HeaderText.String
+ xHeaderTextFirst = xPageStyle.getByIndex(0).HeaderTextFirst.String
+ xHeaderTextLeft = xPageStyle.getByIndex(0).HeaderTextLeft.String
+ xHeaderTextRight = xPageStyle.getByIndex(0).HeaderTextRight.String
+
+ # Check the current values
+ self.assertEqual(master, xHeaderText)
+ self.assertEqual(first, xHeaderTextFirst)
+ self.assertEqual(left, xHeaderTextLeft)
+ self.assertEqual(right, xHeaderTextRight)
+
+ def test_tdf46561(self):
+ self.ui_test.load_file(get_url_for_data_file("tdf46561.odt"))
+ self.document = self.ui_test.get_component()
+ self.check_header_texts(master="right", first="1st", left="left", right="right")
+
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+ xWriterEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
+ self.xUITest.executeCommand(".uno:JumpToHeader")
+
+ # Switch "same left and right page headers" on and off a few times
+ for _ in range(4):
+ self.ui_test.execute_dialog_through_command(".uno:PageDialog")
+ PageDialog = self.xUITest.getTopFocusWindow();
+
+ xTabs = PageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "4")
+
+ Button = xTabs.getChild('checkSameLR')
+ Button.executeAction("CLICK",tuple())
+ ok = PageDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(ok)
+
+ # We should be back to the starting state after 2*k on/off changes
+ self.check_header_texts(master="right", first="1st", left="left", right="right")
+
+ # Enter some additional text in the left page header
+ type_text(xWriterEdit, "XXXX")
+ self.check_header_texts(master="right", first="1st", left="XXXXleft", right="right")
+
+ # Now go back one change (before entering "XXXX")
+ self.xUITest.executeCommand(".uno:Undo")
+ self.check_header_texts(master="right", first="1st", left="left", right="right")
+
+ # Undo the fourth change
+ self.xUITest.executeCommand(".uno:Undo")
+ self.check_header_texts(master="right", first="1st", left="right", right="right")
+
+ # Undo the third change
+ self.xUITest.executeCommand(".uno:Undo")
+ self.check_header_texts(master="right", first="1st", left="left", right="right")
+
+ # Undo the second change
+ self.xUITest.executeCommand(".uno:Undo")
+ self.check_header_texts(master="right", first="1st", left="right", right="right")
+
+ # Undo the first change
+ self.xUITest.executeCommand(".uno:Undo")
+ self.check_header_texts(master="right", first="1st", left="left", right="right")
+
+ # Redo the first change
+ self.xUITest.executeCommand(".uno:Redo")
+ self.check_header_texts(master="right", first="1st", left="right", right="right")
+
+ # Redo the second change
+ self.xUITest.executeCommand(".uno:Redo")
+ self.check_header_texts(master="right", first="1st", left="left", right="right")
+
+ # Redo the third change
+ self.xUITest.executeCommand(".uno:Redo")
+ self.check_header_texts(master="right", first="1st", left="right", right="right")
+
+ # Redo the fourth change
+ self.xUITest.executeCommand(".uno:Redo")
+ self.check_header_texts(master="right", first="1st", left="left", right="right")
+
+ # Redo the final change
+ self.xUITest.executeCommand(".uno:Redo")
+ self.check_header_texts(master="right", first="1st", left="XXXXleft", right="right")
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index 389809346d37..60cd329fbbc9 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -144,7 +144,7 @@ void SwModelTestBase::dumpLayout(const uno::Reference<lang::XComponent>& rCompon
// create the xml writer
mpXmlBuffer = xmlBufferCreate();
xmlTextWriterPtr pXmlWriter = xmlNewTextWriterMemory(mpXmlBuffer, 0);
- xmlTextWriterStartDocument(pXmlWriter, nullptr, nullptr, nullptr);
+ (void)xmlTextWriterStartDocument(pXmlWriter, nullptr, nullptr, nullptr);
// create the dump
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(rComponent.get());
@@ -154,7 +154,7 @@ void SwModelTestBase::dumpLayout(const uno::Reference<lang::XComponent>& rCompon
pLayout->dumpAsXml(pXmlWriter);
// delete xml writer
- xmlTextWriterEndDocument(pXmlWriter);
+ (void)xmlTextWriterEndDocument(pXmlWriter);
xmlFreeTextWriter(pXmlWriter);
}
@@ -750,76 +750,7 @@ void SwModelTestBase::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w10"),
BAD_CAST("urn:schemas-microsoft-com:office:word"));
// odt
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("office"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("style"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:style:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("text"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:text:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("table"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:table:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("draw"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("fo"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("config"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:config:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xlink"), BAD_CAST("http://www.w3.org/1999/xlink"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dc"), BAD_CAST("http://purl.org/dc/elements/1.1/"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("meta"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:meta:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("number"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("svg"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("chart"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:chart:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dr3d"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("math"),
- BAD_CAST("http://www.w3.org/1998/Math/MathML"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("form"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:form:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("script"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:script:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("ooo"),
- BAD_CAST("http://openoffice.org/2004/office"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("ooow"),
- BAD_CAST("http://openoffice.org/2004/writer"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("oooc"), BAD_CAST("http://openoffice.org/2004/calc"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dom"),
- BAD_CAST("http://www.w3.org/2001/xml-events"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xforms"), BAD_CAST("http://www.w3.org/2002/xforms"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xsd"), BAD_CAST("http://www.w3.org/2001/XMLSchema"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xsi"),
- BAD_CAST("http://www.w3.org/2001/XMLSchema-instance"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("rpt"),
- BAD_CAST("http://openoffice.org/2005/report"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("of"),
- BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:of:1.2"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xhtml"), BAD_CAST("http://www.w3.org/1999/xhtml"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("grddl"),
- BAD_CAST("http://www.w3.org/2003/g/data-view#"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("officeooo"),
- BAD_CAST("http://openoffice.org/2009/office"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("tableooo"),
- BAD_CAST("http://openoffice.org/2009/table"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("drawooo"),
- BAD_CAST("http://openoffice.org/2010/draw"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("calcext"),
- BAD_CAST("urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("loext"),
- BAD_CAST("urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("field"),
- BAD_CAST("urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"));
- xmlXPathRegisterNs(
- pXmlXpathCtx, BAD_CAST("formx"),
- BAD_CAST("urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"));
- xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("css3t"),
- BAD_CAST("http://www.w3.org/TR/css3-text/"));
+ XmlTestTools::registerODFNamespaces(pXmlXpathCtx);
// reqif-xhtml
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("reqif-xhtml"),
BAD_CAST("http://www.w3.org/1999/xhtml"));